fcml-1.1.1/0000755000175000017500000000000012561462632007443 500000000000000fcml-1.1.1/COPYING0000644000175000017500000006364212560745216010432 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 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 Lesser General Public License for more details. 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 Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! fcml-1.1.1/ltmain.sh0000644000175000017500000117077112560745320011216 00000000000000#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 . PROGRAM=libtool PACKAGE=libtool VERSION=2.4.6 package_revision=2.4.6 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # 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. # As a special exception to the GNU General Public License, if you distribute # this file as part of a program or library that is built using GNU Libtool, # you may include this file under the same distribution terms that you use # for the rest of that program. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES 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 . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath=$0 # The name of this program. progname=`$ECHO "$progpath" |$SED "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # func_quote_for_expand ARG # ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # Set a version string for this script. scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # 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 . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # to the main code. A hook is just a named list of of function, that can # be run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do eval $_G_hook '"$@"' # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift done func_quote_for_eval ${1+"$@"} func_run_hooks_result=$func_quote_for_eval_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, remove any # options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # ;; # *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # # func_quote_for_eval ${1+"$@"} # my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # # You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd func_options_prep ${1+"$@"} eval func_parse_options \ ${func_options_prep_result+"$func_options_prep_result"} eval func_validate_options \ ${func_parse_options_result+"$func_parse_options_result"} eval func_run_hooks func_options \ ${func_validate_options_result+"$func_validate_options_result"} # save modified positional parameters for caller func_options_result=$func_run_hooks_result } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before # returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} # Adjust func_parse_options positional parameters to match eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables after # splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname (GNU libtool) 2.4.6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # 'FILE.' does not work on cygwin managed mounts. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # Get the compilation command and the source file. base_compile= srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg=$arg arg_mode=normal ;; target ) libobj=$arg arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg=$srcfile srcfile=$arg ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix '.c' with the library object suffix, '.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the '--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE use a list of object files found in FILE to specify objects -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with '-') are ignored. Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in '.la', then a libtool library is created, only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created using 'ar' and 'ranlib', or on Windows using 'lib'. If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" cd "unfat-$$/$darwin_base_archive-$darwin_arch" func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined HAVE_DOS_BASED_FILE_SYSTEM if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined HAVE_DOS_BASED_FILE_SYSTEM } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = (size_t) (q - p); p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg=$1 shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg=$arg case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -stdlib=* select c++ std lib with clang -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib=$searchdir/lib$name$search_ext if test -f "$lib"; then if test .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir=$ladir absdir=$abs_ladir # Remove this search path later func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. case $temp_rpath: in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test lib = "$linkmode" && test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; then add=$dir/$linklib case $host in *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add=$dir/$old_library fi elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib"; then add=$inst_prefix_dir$libdir/$linklib else add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test unsupported != "$hardcode_direct"; then test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system cannot link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test yes = "$module"; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i= ;; esac if test -n "$i"; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major=$1 number_minor=$2 number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; esac ;; no) current=$1 revision=$2 age=$3 ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring=0.0 ;; esac if test no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release= versuffix= major= newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib= ;; esac fi if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test no = "$allow_undefined"; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath=$finalize_shlibpath test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname=$realname fi if test -z "$dlname"; then dlname=$soname fi lib=$output_objdir/$realname linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS=$save_ifs if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs # Restore the uninstalled library and exit if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath=$rpath rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath=$rpath if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; then # We don't need to create a wrapper script. link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource=$output_path/$objdir/lt-$output_name.c cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; then if test -z "$install_libdir"; then break fi output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic for arg do case $arg in -f) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: fcml-1.1.1/AUTHORS0000644000175000017500000000006512560745216010435 00000000000000Slawomir Wojtasiak fcml-1.1.1/include/0000755000175000017500000000000012561462631011065 500000000000000fcml-1.1.1/include/fcml_instructions.h0000644000175000017500000005327212560745216014736 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_instructions.h * Instruction codes and addressing modes/instruction forms. * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_INSTRUCTIONS_H_ #define FCML_INSTRUCTIONS_H_ /** * @defgroup INSTRUCTION_TYPES_GROUP Instructions types. * Instructions types. * @{ */ #define FCML_AMT_UNDEF 0x0000000000000000UL /* Grouping. */ #define FCML_AMT_SSEx 0x0000000000000001UL #define FCML_AMT_VEXx 0x0000000000000002UL #define FCML_AMT_SIMD 0x0000000000000004UL /* CPUID. */ #define FCML_AMT_GPI 0x0000000000000008UL #define FCML_AMT_FPU 0x0000000000000010UL #define FCML_AMT_MMX 0x0000000000000020UL | FCML_AMT_SSEx #define FCML_AMT_SSE 0x0000000000000040UL | FCML_AMT_SSEx #define FCML_AMT_SSE2 0x0000000000000080UL | FCML_AMT_SSEx #define FCML_AMT_SSE3 0x0000000000000100UL | FCML_AMT_SSEx #define FCML_AMT_SSSE3 0x0000000000000200UL | FCML_AMT_SSEx #define FCML_AMT_SSE41 0x0000000000000400UL | FCML_AMT_SSEx #define FCML_AMT_SSE42 0x0000000000000800UL | FCML_AMT_SSEx #define FCML_AMT_SSE4A 0x0000000000001000UL | FCML_AMT_SSEx #define FCML_AMT_AVX 0x0000000000002000UL | FCML_AMT_VEXx #define FCML_AMT_AVX2 0x0000000000004000UL | FCML_AMT_VEXx #define FCML_AMT_AES 0x0000000000008000UL #define FCML_AMT_SYSTEM 0x0000000000010000UL #define FCML_AMT_3DNOW 0x0000000000020000UL | FCML_AMT_MMX #define FCML_AMT_TBM 0x0000000000040000UL | FCML_AMT_VEXx #define FCML_AMT_BMI1 0x0000000000080000UL #define FCML_AMT_BMI2 0x0000000000100000UL #define FCML_AMT_HLE 0x0000000000200000UL #define FCML_AMT_ADX 0x0000000000400000UL #define FCML_AMT_CLMUL 0x0000000000800000UL #define FCML_AMT_F16C 0x0000000001000000UL | FCML_AMT_VEXx #define FCML_AMT_RDRAND 0x0000000002000000UL #define FCML_AMT_RDSEED 0x0000000004000000UL #define FCML_AMT_PRFCHW 0x0000000008000000UL #define FCML_AMT_LWP 0x0000000010000000UL | FCML_AMT_SIMD #define FCML_AMT_SVM 0x0000000020000000UL #define FCML_AMT_FSGSBASE 0x0000000040000000UL #define FCML_AMT_FMA 0x0000000080000000UL | FCML_AMT_SIMD #define FCML_AMT_FMA4 0x0000000100000000UL | FCML_AMT_SIMD #define FCML_AMT_XOP 0x0000000200000000UL | FCML_AMT_SIMD #define FCML_AMT_EDX 0x0000000400000000UL #define FCML_AMT_ABM 0x0000000800000000UL #define FCML_AMT_VMX 0x0000001000000000UL #define FCML_AMT_SMX 0x0000002000000000UL #define FCML_AMT_POPCNT 0x0000004000000000UL #define FCML_AMT_RTM 0x0000008000000000UL /* Control transfer instructions. */ #define FCML_AMT_CTI 0x0000010000000000UL #define FCML_AMT_BRANCH 0x0000020000000000UL /* Shortcuts. */ #define FCML_AMT_MMX_SIMD FCML_AMT_MMX | FCML_AMT_SIMD #define FCML_AMT_SSE_SIMD FCML_AMT_SSE | FCML_AMT_SIMD #define FCML_AMT_SSE2_SIMD FCML_AMT_SSE2 | FCML_AMT_SIMD #define FCML_AMT_SSE3_SIMD FCML_AMT_SSE3 | FCML_AMT_SIMD #define FCML_AMT_SSSE3_SIMD FCML_AMT_SSSE3 | FCML_AMT_SIMD #define FCML_AMT_SSE41_SIMD FCML_AMT_SSE41 | FCML_AMT_SIMD #define FCML_AMT_SSE42_SIMD FCML_AMT_SSE42 | FCML_AMT_SIMD #define FCML_AMT_AVX_SIMD FCML_AMT_AVX | FCML_AMT_SIMD #define FCML_AMT_AVX2_SIMD FCML_AMT_AVX2 | FCML_AMT_SIMD #define FCML_AMT_3DNOW_SIMD FCML_AMT_3DNOW | FCML_AMT_SIMD /** @} */ /** Instruction forms. */ enum fcml_en_instruction_addr_mode_codes { FCML_AM_UNKNOWN = 0, FCML_AM_NO_OPERANS, FCML_AM_IMM8, FCML_AM_IMMO, FCML_AM_ER8_IMM8, FCML_AM_R8_IMM8, FCML_AM_ERO_IMMO, FCML_AM_RM8_IMM8, FCML_AM_RMO_IMMO, FCML_AM_R0_IMM0, FCML_AM_RMO_IMM8, FCML_AM_RM8_R8, FCML_AM_R8_RM8, FCML_AM_R8_MOFF8, FCML_AM_MOFF8_R8, FCML_AM_R16_RM8, FCML_AM_RO_RM16, FCML_AM_RMO_RO, FCML_AM_RO_RMO, FCML_AM_RO_MOFFO, FCML_AM_RO_MO, FCML_AM_MOFFO_RO, FCML_AM_MO_RO, FCML_AM_RO_RM8, FCML_AM_RM_SR, FCML_AM_SR_RM, FCML_AM_R32_DR, FCML_AM_R64_DR, FCML_AM_DR_R32, FCML_AM_DR_R64, FCML_AM_R32_CR, FCML_AM_R64_CR, FCML_AM_CR_R32, FCML_AM_CR_R64, FCML_AM_RO_RMO_IMM8, FCML_AM_RO_RMO_IMMO, FCML_AM_R32A_RM32_R32B, FCML_AM_R64A_RM64_R64B, FCML_AM_R32_RM32, FCML_AM_R64_RM64, FCML_AM_R32_RM32_R32, FCML_AM_R64_RM64_R64, FCML_AM_REL16, FCML_AM_PTR16_O, FCML_AM_M16_O, FCML_AM_M8_M8, FCML_AM_MO_MO, FCML_AM_M8, FCML_AM_M16, FCML_AM_M32, FCML_AM_M64, FCML_AM_M80, FCML_AM_M128, FCML_AM_RX_RM32, FCML_AM_RX_RM64, FCML_AM_RX_RX_RM32, FCML_AM_RX_RX_RM64, FCML_AM_R32_RXM64, FCML_AM_R64_RXM64, FCML_AM_RM8, FCML_AM_RMO, FCML_AM_RO, FCML_AM_SRO, FCML_AM_SR_FSGSO, FCML_AM_ST0_ST, FCML_AM_ST_ST0, FCML_AM_ST, FCML_AM_M2BYTE, FCML_AM_AX, FCML_AM_R64_M128, FCML_AM_R32_M128, FCML_AM_RX_RX_I8_I8, FCML_AM_RX_RX, FCML_AM_REL8, FCML_AM_REL0 }; /** * @defgroup INSTRUCTION_GROUP Supported instructions codes. * Set of all supported instructions. Names are based on Intel syntax. * @{ */ /** Instruction codes. */ typedef enum fcml_en_instruction { F_UNKNOWN, F_AAA, F_JCC, F_AAD, F_AAM, F_AAS, F_ADC, F_ADD, F_ADDPD, F_VADDPD, F_ADDPS, F_VADDPS, F_ADDSD, F_VADDSD, F_ADDSS, F_VADDSS, F_ADDSUBPD, F_VADDSUBPD, F_ADDSUBPS, F_VADDSUBPS, F_AESDEC, F_VAESDEC, F_AESDECLAST, F_VAESDECLAST, F_AESENC, F_VAESENC, F_AESENCLAST, F_VAESENCLAST, F_AESIMC, F_VAESIMC, F_AESKEYGENASSIST, F_VAESKEYGENASSIST, F_AND, F_ANDPD, F_VANDPD, F_ANDPS, F_VANDPS, F_ANDNPD, F_VANDNPD, F_ANDNPS, F_VANDNPS, F_ARPL, F_ANDN, F_ADCX, F_ADOX, F_BLENDPD, F_VBLENDPD, F_BLENDPS, F_VBLENDPS, F_BLENDVPD, F_VBLENDVPD, F_BLENDVPS, F_VBLENDVPS, F_BOUND, F_BSF, F_BSR, F_BSWAP, F_BT, F_BTC, F_BTR, F_BTS, F_BEXR, F_BLCFILL, F_BLCI, F_BLCIC, F_BLCMSK, F_BLCS, F_BLSFILL, F_BLSI, F_BLSIC, F_BLSMSK, F_BLSR, F_BZHI, F_CALL, F_CBW, F_CWDE = F_CBW, F_CDQE = F_CBW, F_CLC, F_CLD, F_CLFLUSH, F_CLI, F_CLGI, F_CLTS, F_CMC, F_CMOV, F_CMP, F_CMPPD, F_VCMPPD, F_CMPPS, F_VCMPPS, F_CMPS, F_CMPSD, F_VCMPSD, F_CMPSS, F_VCMPSS, F_CMPXCHG, F_CMPXCHGxB, F_CPUID, F_CRC32, F_CVTDQ2PD, F_VCVTDQ2PD, F_CVTDQ2PS, F_VCVTDQ2PS, F_CVTPD2DQ, F_VCVTPD2DQ, F_CVTPD2PI, F_CVTPD2PS, F_VCVTPD2PS, F_CVTPI2PD, F_CVTPI2PS, F_CVTPS2DQ, F_VCVTPS2DQ, F_CVTPS2PD, F_VCVTPS2PD, F_CVTPS2PI, F_CVTSD2SI, F_VCVTSD2SI, F_CVTSD2SS, F_VCVTSD2SS, F_CVTSI2SD, F_VCVTSI2SD, F_CVTSI2SS, F_VCVTSI2SS, F_CVTSS2SD, F_VCVTSS2SD, F_CVTSS2SI, F_VCVTSS2SI, F_CVTTPD2DQ, F_VCVTTPD2DQ, F_CVTTPD2PI, F_CVTTPS2DQ, F_VCVTTPS2DQ, F_CVTTPS2PI, F_CVTTSD2SI, F_VCVTTSD2SI, F_CVTTSS2SI, F_VCVTTSS2SI, F_CWD, F_CDQ = F_CWD, F_CQO = F_CWD, F_COMISD, F_VCOMISD, F_COMISS, F_VCOMISS, F_DAA, F_DAS, F_DEC, F_DIV, F_DIVPD, F_VDIVPD, F_DIVPS, F_VDIVPS, F_DIVSD, F_VDIVSD, F_DIVSS, F_VDIVSS, F_DPPD, F_VDPPD, F_DPPS, F_VDPPS, F_EMMS, F_ENTER, F_EXTRACTPS, F_VEXTRACTPS, F_EXTRQ, F_F2XM1, F_FABS, F_FADD, F_FIADD, F_FADDP, F_FBLD, F_FBSTP, F_FCHS, F_FCLEX, F_FNCLEX, F_FCMOVB, F_FCMOVE, F_FCMOVBE, F_FCMOVU, F_FCMOVNB, F_FCMOVNE, F_FCMOVNBE, F_FCMOVNU, F_FCOS, F_FCOM, F_FCOMP, F_FCOMPP, F_FCOMI, F_FCOMIP, F_FUCOMI, F_FUCOMIP, F_FDECSTP, F_FDIV, F_FDIVP, F_FIDIV, F_FDIVR, F_FDIVRP, F_FIDIVR, F_FFREE, F_FICOM, F_FICOMP, F_FILD, F_FINCSTP, F_FINIT, F_FNINIT, F_FIST, F_FISTP, F_FLD, F_FLD1, F_FLDL2T, F_FLDL2E, F_FLDPI, F_FLDLG2, F_FLDLN2, F_FLDZ, F_FLDCW, F_FLDENV, F_FMUL, F_FMULP, F_FIMUL, F_FNOP, F_FPATAN, F_FPREM, F_FPREM1, F_FPTAN, F_FRNDINT, F_FRSTOR, F_FSAVE, F_FNSAVE, F_FSCALE, F_FSIN, F_FSINCOS, F_FSQRT, F_FST, F_FSTP, F_FSTCW, F_FNSTCW, F_FSTENV, F_FNSTENV, F_FSTSW, F_FNSTSW, F_FSUB, F_FSUBP, F_FISUB, F_FSUBR, F_FSUBRP, F_FISUBR, F_FTST, F_FUCOM, F_FUCOMP, F_FUCOMPP, F_FXAM, F_FXCH, F_FXRSTOR, F_FXRSTOR64, F_FXSAVE, F_FXSAVE64, F_FXTRACT, F_FYL2X, F_FYL2XP1, F_FEMMS, F_FISTTP, F_GETSEC, F_HADDPD, F_VHADDPD, F_HADDPS, F_VHADDPS, F_HLT, F_HSUBPD, F_VHSUBPD, F_HSUBPS, F_VHSUBPS, F_INVEPT, F_INVVPID, F_IDIV, F_IMUL, F_IN, F_INC, F_INS, F_INSERTPS, F_VINSERTPS, F_VEXTRACTF128, F_VINSERTF128, F_INSERTQ, F_INT3, F_INT, F_INTO, F_INVD, F_INVLPG, F_INVLPGA, F_INVPCID, F_IRET, F_JCXZ, F_JECXZ = F_JCXZ, F_JRCXZ = F_JCXZ, F_JMP, F_LAR, F_LAHF, F_LDDQU, F_VLDDQU, F_LDMXCSR, F_VLDMXCSR, F_LDS, F_LSS, F_LES, F_LFS, F_LGS, F_LEA, F_LEAVE, F_LFENCE, F_LLWPCB, F_LGDT, F_LIDT, F_LLDT, F_LMSW, F_LODS, F_LOOP, F_LOOPE, F_LOOPNE, F_LWPINS, F_LWPVAL, F_LSL, F_LTR, F_LZCNT, F_MASKMOVDQU, F_VMASKMOVDQU, F_MASKMOVQ, F_VMASKMOVPS, F_VMASKMOVPD, F_VPMASKMOVD, F_VPMASKMOV, F_VPMASKMOVQ, F_MAXPD, F_VMAXPD, F_MAXPS, F_VMAXPS, F_MAXSD, F_VMAXSD, F_MAXSS, F_VMAXSS, F_MFENCE, F_MINPD, F_VMINPD, F_MINPS, F_VMINPS, F_MINSD, F_VMINSD, F_MINSS, F_VMINSS, F_MONITOR, F_MOVAPD, F_VMOVAPD, F_MOVAPS, F_VMOVAPS, F_MOVBE, F_MOV, F_MOVD, F_VMOVD, F_MOVQ, F_VMOVQ, F_MOVDDUP, F_VMOVDDUP, F_MOVDQA, F_VMOVDQA, F_MOVDQU, F_VMOVDQU, F_MOVDQ2Q, F_MOVHLPS, F_VMOVHLPS, F_MOVHPD, F_VMOVHPD, F_MOVHPS, F_VMOVHPS, F_MOVLHPS, F_VMOVLHPS, F_MOVLPD, F_VMOVLPD, F_MOVLPS, F_VMOVLPS, F_MOVMSKPD, F_VMOVMSKPD, F_MOVMSKPS, F_VMOVMSKPS, F_MOVNTDQA, F_VMOVNTDQA, F_MOVNTDQ, F_VMOVNTDQ, F_MOVS, F_MOVNTI, F_MOVNTPD, F_VMOVNTPD, F_MOVNTPS, F_VMOVNTPS, F_MOVNTSD, F_MOVNTSS, F_MOVNTQ, F_MOVQ2DQ, F_MOVSD, F_VMOVSD, F_MOVSHDUP, F_VMOVSHDUP, F_MOVSLDUP, F_VMOVSLDUP, F_MOVSS, F_VMOVSS, F_MOVSX, F_MOVSXD, F_MOVUPD, F_VMOVUPD, F_MOVUPS, F_VMOVUPS, F_MOVZX, F_MPSADBW, F_VMPSADBW, F_MUL, F_MULPD, F_VMULPD, F_MULPS, F_VMULPS, F_MULSD, F_VMULSD, F_MULSS, F_VMULSS, F_MWAIT, F_NEG, F_NOP, F_NOT, F_OR, F_ORPD, F_VORPD, F_ORPS, F_VORPS, F_OUT, F_OUTS, F_PABSW, F_PABSB, F_PABSD, F_VPABSB, F_VPABSW, F_VPABSD, F_VPACKSSWB, F_PACKSSWB, F_VPACKSSDW, F_PACKSSDW, F_PACKUSDW, F_VPACKUSDW, F_PACKUSWB, F_VPACKUSWB, F_VPADDW, F_PADDW, F_VPADDB, F_VPADDD, F_PADDB, F_PADDD, F_VPADDSW, F_PADDSB, F_PADDSW, F_VPADDSB, F_PADDUSW, F_PADDUSB, F_VPADDUSW, F_PADDQ, F_VPADDUSB, F_VPADDQ, F_POP, F_PUSH, F_POPA, F_POPAD, F_POPF, F_POPFQ, F_POPFD, F_PUSHA, F_PUSHF, F_PUSHAD, F_PUSHFQ, F_PUSHFD, F_PAVGUSB, F_PF2ID, F_PFACC, F_PFADD, F_PFCMPEQ, F_PFCMPGE, F_PFCMPGT, F_PFMAX, F_PFMIN, F_PFMUL, F_PFRCP, F_PFRCPIT1, F_PFRCPIT2, F_PFRSQIT1, F_PFRSQRT, F_PFSUB, F_PFSUBR, F_PI2FD, F_PMULHRW, F_PF2IW, F_PFNACC, F_PFPNACC, F_PI2FW, F_PSWAPD, F_PALIGNR, F_VPALIGNR, F_PAND, F_VPAND, F_PANDN, F_VPANDN, F_PAUSE, F_PAVGW, F_PAVGB, F_VPAVGW, F_VPAVGB, F_PBLENDVB, F_VPBLENDVB, F_PBLENDW, F_VPBLENDW, F_VPBLENDD, F_PCLMULQDQ, F_VPCLMULQDQ, F_PCMPEQW, F_PCMPEQB, F_PCMPEQD, F_VPCMPEQD, F_VPCMPEQW, F_VPCMPEQB, F_PCMPEQQ, F_VPCMPEQQ, F_PCMPESTRI, F_VPCMPESTRI, F_PCMPESTRM, F_VPCMPESTRM, F_PCMPGTW, F_PCMPGTD, F_PCMPGTB, F_VPCMPGTW, F_VPCMPGTD, F_VPCMPGTB, F_PCMPGTQ, F_VPCMPGTQ, F_PCMPISTRI, F_VPCMPISTRI, F_PCMPISTRM, F_VPCMPISTRM, F_VPEXTRB, F_VPEXTRQ, F_PEXTRQ, F_PEXTRB, F_PEXTRD, F_VPEXTRD, F_PEXTRW, F_VPEXTRW, F_VPHADDW, F_VPHADDD, F_PHADDD, F_PHADDW, F_PHADDSW, F_VPHADDSW, F_PHMINPOSUW, F_VPHMINPOSUW, F_PHSUBD, F_PHSUBW, F_VPHSUBD, F_VPHSUBW, F_PHSUBSW, F_VPHSUBSW, F_PINSRD, F_VPINSRQ, F_PINSRQ, F_PINSRB, F_VPINSRD, F_VPINSRB, F_PINSRW, F_VPINSRW, F_PMADDUBSW, F_VPMADDUBSW, F_PMADDWD, F_VPMADDWD, F_PMAXSB, F_VPMAXSB, F_PMAXSD, F_VPMAXSD, F_PMAXSW, F_VPMAXSW, F_PMAXUB, F_VPMAXUB, F_PMAXUD, F_VPMAXUD, F_PMAXUW, F_VPMAXUW, F_PMINSB, F_VPMINSB, F_PMINSD, F_VPMINSD, F_PMINSW, F_VPMINSW, F_PMINUW, F_VPMINUW, F_PMINUB, F_VPMINUB, F_PMINUD, F_VPMINUD, F_PMOVMSKB, F_VPMOVMSKB, F_VPMOVSXBQ, F_PMOVSXBW, F_PMOVSXWQ, F_VPMOVSXWQ, F_PMOVSXWD, F_PMOVSXBD, F_VPMOVSXDQ, F_VPMOVSXWD, F_PMOVSXBQ, F_VPMOVSXBW, F_PMOVSXDQ, F_VPMOVSXBD, F_PMOVZXWD, F_PMOVZXDQ, F_VPMOVZXDQ, F_PMOVZXWQ, F_VPMOVZXBQ, F_PMOVZXBQ, F_VPMOVZXWD, F_VPMOVZXBD, F_VPMOVZXWQ, F_PMOVZXBD, F_VPMOVZXBW, F_PMOVZXBW, F_PMULDQ, F_PMULHRSW, F_PMULHUW, F_VPMULDQ, F_VPMULHRSW, F_VPMULHUW, F_PMULHW, F_VPMULHW, F_PMULUDQ, F_VPMULUDQ, F_PMULLW, F_PMULLD, F_VPMULLD, F_VPMULLW, F_POPCNT, F_POR, F_VPOR, F_PREFETCHT2, F_PREFETCHW, F_PREFETCHT1, F_PREFETCHNTA, F_PREFETCHT0, F_PSADBW, F_VPSADBW, F_PSHUFB, F_PSHUFD, F_PSHUFHW, F_VPSHUFD, F_VPSHUFB, F_PSHUFLW, F_PSHUFW, F_VPSHUFLW, F_VPSHUFHW, F_VPSIGNB, F_VPSIGND, F_PSIGNW, F_PSIGNB, F_VPSIGNW, F_PSIGND, F_PSLLDQ, F_VPSLLDQ, F_PSLLQ, F_PSLLD, F_VPSLLW, F_VPSLLQ, F_PSLLW, F_VPSLLD, F_VPSRAW, F_PSRAD, F_PSRAW, F_VPSRAD, F_PSRLDQ, F_VPSRLDQ, F_VPSRLQ, F_PSRLQ, F_PSRLD, F_PSRLW, F_VPSRLD, F_VPSRLW, F_VPSUBD, F_PSUBD, F_PSUBW, F_VPSUBB, F_VPSUBQ, F_PSUBB, F_VPSUBW, F_PSUBQ, F_PSUBSB, F_VPSUBSW, F_VPSUBSB, F_PSUBSW, F_VPSUBUSW, F_VPSUBUSB, F_PSUBUSB, F_PSUBUSW, F_VPTEST, F_PTEST, F_PUNPCKLBW, F_PUNPCKLQDQ, F_VPUNPCKLWD, F_VPUNPCKLQDQ, F_VPUNPCKLBW, F_PUNPCKLWD, F_PUNPCKLDQ, F_VPUNPCKLDQ, F_VPUNPCKHWD, F_PUNPCKHDQ, F_PUNPCKHWD, F_PUNPCKHQDQ, F_VPUNPCKHQDQ, F_VPUNPCKHBW, F_PUNPCKHBW, F_VPUNPCKHDQ, F_PXOR, F_VPXOR, F_PREFETCH, F_RCL, F_RCR, F_ROL, F_ROR, F_RET, F_RETF, F_RCPPS, F_VRCPPS, F_RCPSS, F_VRCPSS, F_RDFSBASE, F_RDGSBASE, F_RDRAND, F_RDTSCP, F_RDTSC, F_RDPMC, F_RDMSR, F_ROUNDPD, F_VROUNDPD, F_ROUNDPS, F_VROUNDPS, F_ROUNDSD, F_VROUNDSD, F_ROUNDSS, F_VROUNDSS, F_RSM, F_RSQRTPS, F_VRSQRTPS, F_RSQRTSS, F_VRSQRTSS, F_SAHF, F_SAR, F_SAL, F_SHL = F_SAL, F_SHR, F_SBB, F_SCAS, F_SET, F_STOS, F_SUB, F_SFENCE, F_SGDT, F_SHLD, F_SHRD, F_SKINIT, F_SLWPCB, F_SHUFPD, F_VSHUFPD, F_SHUFPS, F_VSHUFPS, F_SIDT, F_SLDT, F_SMSW, F_SQRTPD, F_VSQRTPD, F_SQRTPS, F_VSQRTPS, F_SQRTSD, F_VSQRTSD, F_SQRTSS, F_VSQRTSS, F_STC, F_STD, F_STGI, F_STI, F_STMXCSR, F_VSTMXCSR, F_STR, F_SUBPD, F_VSUBPD, F_SUBPS, F_VSUBPS, F_SUBSD, F_VSUBSD, F_SUBSS, F_VSUBSS, F_SWAPGS, F_SYSCALL, F_SYSENTER, F_SYSEXIT, F_SYSRET, F_TEST, F_T1MSKC, F_UCOMISD, F_VUCOMISD, F_UCOMISS, F_VUCOMISS, F_UD2, F_UNPCKHPD, F_VUNPCKHPD, F_UNPCKHPS, F_VUNPCKHPS, F_UNPCKLPD, F_VUNPCKLPD, F_UNPCKLPS, F_VUNPCKLPS, F_VMLOAD, F_VMRUN, F_VMSAVE, F_VFRCZPD, F_VFRCZPS, F_VFRCZSD, F_VFRCZSS, F_VPCMOV, F_VPERMIL2PD, F_VPERMIL2PS, F_VPHADDBD, F_VPHADDBW, F_VPHADDBQ, F_VPHADDDQ, F_VPHADDUBD, F_VPHADDUBQ, F_VPHADDUBW, F_VPHADDUDQ, F_VPHADDUWD, F_VPHADDUWQ, F_VPHADDWD, F_VPHADDWQ, F_VPHSUBBW, F_VPHSUBDQ, F_VPHSUBWD, F_VPMACSDD, F_VPMACSDQH, F_VPMACSDQL, F_VPMACSSDD, F_VPMACSSDQH, F_VPMACSSDQL, F_VPMACSSWD, F_VPMACSSWW, F_VPMACSWD, F_VPMACSWW, F_VPMADCSSWD, F_VPMADCSWD, F_VPPERM, F_VPROTD, F_VPROTB, F_VPROTQ, F_VPROTW, F_VPSHAB, F_VPSHAD, F_VPSHAQ, F_VPSHAW, F_VPSHLB, F_VPSHLD, F_VPSHLQ, F_VPSHLW, F_VFMADD213PD, F_VFMADDPD, F_VFMADD132PD, F_VFMADD231PD, F_VFMADDPS, F_VFMADD231PS, F_VFMADD132PS, F_VFMADD213PS, F_VFMADD132SD, F_VFMADD213SD, F_VFMADDSD, F_VFMADD231SD, F_VFMADD132SS, F_VFMADD213SS, F_VFMADDSS, F_VFMADD231SS, F_VFMADDSUB132PD, F_VFMADDSUB213PD, F_VFMADDSUBPD, F_VFMADDSUB231PD, F_VFMADDSUB231PS, F_VFMADDSUBPS, F_VFMADDSUB132PS, F_VFMADDSUB213PS, F_VFMSUBADDPD, F_VFMSUBADD213PD, F_VFMSUBADD132PD, F_VFMSUBADD231PD, F_VFMSUBADDPS, F_VFMSUBADD213PS, F_VFMSUBADD132PS, F_VFMSUBADD231PS, F_VFMSUB213PD, F_VFMSUBPD, F_VFMSUB132PD, F_VFMSUB231PD, F_VFMSUB213PS, F_VFMSUBPS, F_VFMSUB132PS, F_VFMSUB231PS, F_VFMSUBSD, F_VFMSUB231SD, F_VFMSUB132SD, F_VFMSUB213SD, F_VFMSUB231SS, F_VFMSUB213SS, F_VFMSUB132SS, F_VFMSUBSS, F_VFNMADD231PD, F_VFNMADDPD, F_VFNMADD132PD, F_VFNMADD213PD, F_VFNMADD231PS, F_VFNMADD132PS, F_VFNMADD213PS, F_VFNMADDPS, F_VFNMADD213SD, F_VFNMADDSD, F_VFNMADD231SD, F_VFNMADD132SD, F_VFNMADD213SS, F_VFNMADDSS, F_VFNMADD231SS, F_VFNMADD132SS, F_VFNMSUB132PD, F_VFNMSUB213PD, F_VFNMSUB231PD, F_VFNMSUBPD, F_VFNMSUBPS, F_VFNMSUB213PS, F_VFNMSUB132PS, F_VFNMSUB231PS, F_VFNMSUBSD, F_VFNMSUB231SD, F_VFNMSUB213SD, F_VFNMSUB132SD, F_VFNMSUBSS, F_VFNMSUB132SS, F_VFNMSUB213SS, F_VFNMSUB231SS, F_BEXTR, F_VPBROADCASTW, F_VPBROADCASTB, F_VPBROADCASTD, F_VPBROADCASTQ, F_VMPTRLD, F_VMPTRST, F_VMCLEAR, F_VMREAD, F_VMWRITE, F_VMLAUNCH, F_VMRESUME, F_VMXOFF, F_VMXON, F_VMCALL, F_VMFUNC, F_VBROADCASTSD, F_VBROADCASTSS, F_VBROADCASTI128, F_VBROADCASTF128, F_VCVTPH2PS, F_VCVTPS2PH, F_VERR, F_VERW, F_VMMCALL, F_VPERMILPD, F_VPERMILPS, F_VPSLLVQ, F_VPERM2F128, F_VPERM2I128, F_VEXTRACTI128, F_VINSERTI128, F_VPSRAVD, F_VPERMD, F_VPSLLVD, F_VPSRLVD, F_VPSRLVQ, F_VPERMPD, F_VPERMQ, F_VPERMPS, F_VTESTPS, F_VTESTPD, F_VGATHERDPD, F_VGATHERQPD, F_VGATHERDPS, F_VGATHERQPS, F_VPGATHERDD, F_VPGATHERQD, F_VPGATHERDQ, F_VPGATHERQQ, F_VZEROALL, F_VZEROUPPER, F_VPCOMB, F_VPCOMW, F_VPCOMD, F_VPCOMQ, F_VPCOMUB, F_VPCOMUW, F_VPCOMUD, F_VPCOMUQ, F_WAIT, F_FWAIT = F_WAIT, F_WBINVD, F_WRFSBASE, F_WRGSBASE, F_WRMSR, F_XLAT, F_XOR, F_XADD, F_XCHG, F_XGETBV, F_XORPD, F_VXORPD, F_XORPS, F_VXORPS, F_XRSTOR, F_XRSTOR64, F_XSAVE, F_XSAVE64, F_XSAVEOPT, F_XSAVEOPT64, F_XSETBV, F_MULX, F_PDEP, F_PEXT, F_RORX, F_SHLX, F_SHRX, F_SARX, F_TZCNT, F_TZMSK, F_XABORT, F_XBEGIN, F_XEND, F_XTEST, F_RDSEED, F_CLAC, F_STAC } fcml_en_instruction; /** @} */ /** * @defgroup PSEUDO_OPERATIONS_GROUP Supported pseudo operations. * @{ */ /** Pseudo operations. */ typedef enum fcml_en_pseudo_operations { /** Set if there is no pseudo operation. */ FP_NO_PSEUDO_OP, /** db / .byte */ FP_DB } fcml_en_pseudo_operations; /** @} */ #endif /* FCML_INSTRUCTIONS_H_ */ fcml-1.1.1/include/fcml_renderer.hpp0000644000175000017500000001411012560745216014324 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_renderer.hpp * C++ wrapper for FCML renderer. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_RENDERER_HPP_ #define FCML_RENDERER_HPP_ #include "fcml_common.hpp" #include "fcml_disassembler.hpp" #include "fcml_renderer.h" namespace fcml { /** * Component can not be initialized correctly. */ class RenderingFailedException: public BaseException { public: RenderingFailedException( const fcml_cstring &msg, fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR ) : BaseException( msg, error ){ } }; /** Renderer configuration. * * It's a counterpart to the fcml_st_render_config structure. * @since 1.1.0 */ class RenderConfig { public: /** * Creates an empty renderer configuration. * @since 1.1.0 */ RenderConfig() : _throwExceptionOnError(true), _renderFlags(0), _preferedMnemonicPadding(FCML_REND_DEFAULT_MNEMONIC_PADDING), _preferedCodePadding(FCML_REND_DEFAULT_CODE_PADDING) { } /** * Creates a renderer configuration for given renderer flags. * * @param renderFlags The renderer flags. * @since 1.1.0 */ RenderConfig( fcml_uint32_t renderFlags ) : _throwExceptionOnError(true), _renderFlags(renderFlags), _preferedMnemonicPadding(0), _preferedCodePadding(0) { } /** @since 1.1.0 */ fcml_uint16_t getPreferedCodePadding() const { return _preferedCodePadding; } /** @since 1.1.0 */ void setPreferedCodePadding(fcml_uint16_t preferedCodePadding) { _preferedCodePadding = preferedCodePadding; } /** @since 1.1.0 */ fcml_uint16_t getPreferedMnemonicPadding() const { return _preferedMnemonicPadding; } /** @since 1.1.0 */ void setPreferedMnemonicPadding(fcml_uint16_t preferedMnemonicPadding) { _preferedMnemonicPadding = preferedMnemonicPadding; } /** @since 1.1.0 */ fcml_uint32_t getRenderFlags() const { return _renderFlags; } /** @since 1.1.0 */ void setRenderFlags(fcml_uint32_t renderFlags) { _renderFlags = renderFlags; } /** * Returns true if exception should be thrown when disassembling fails. * * @return True if exception is the preferred way of error handling in case of failure. * @since 1.1.0 */ bool isThrowExceptionOnError() const { return _throwExceptionOnError; } /** * Sets the way how the error handling is done. * * @param throwExceptionOnError True if exception should be thrown in case of failure. * @since 1.1.0 */ void setThrowExceptionOnError(bool throwExceptionOnError) { _throwExceptionOnError = throwExceptionOnError; } private: /** Throws exception in case of error. */ bool _throwExceptionOnError; /** Flags which allows to control rendering process. */ fcml_uint32_t _renderFlags; /** Preferred mnemonic padding in characters. */ fcml_uint16_t _preferedMnemonicPadding; /** Preferred code padding in HEX bytes (2 characters on one byte.). */ fcml_uint16_t _preferedCodePadding; }; /** * Converts objects to their structures counterparts. * @since 1.1.0 * @remarks Internal API, not intended to be used outside. */ class RenderTypeConverter { public: static void convert( const RenderConfig &src, fcml_st_render_config &dest ) { dest.prefered_code_padding = src.getPreferedCodePadding(); dest.prefered_mnemonic_padding = src.getPreferedMnemonicPadding(); dest.render_flags = src.getRenderFlags(); } }; /** Renderer wrapper. * @since 1.1.0 */ class Renderer: protected DialectAware { public: /** * Creates a renderer instance for the given dialect. * * @param dialect The dialect instance. * @since 1.1.0 */ Renderer( Dialect &dialect ) : _dialect( dialect ) { } /** * Renders a disassembled instruction. * * @param renderConfig A renderer configuration. * @param assemblerResult The disassembler result. * @param[out] result The rendered instruction. * @throw RenderingFailedException Rendering failed. * @return The error code. */ fcml_ceh_error render( const RenderConfig &renderConfig, DisassemblerResult &assemblerResult, fcml_cstring &result ) { result.clear(); fcml_st_render_config render_config; RenderTypeConverter::convert( renderConfig, render_config ); fcml_st_disassembler_result disassembler_result; DisassemblerTypeConverter::convert( assemblerResult, disassembler_result ); fcml_char buffer[FCML_REND_MAX_BUFF_LEN]; fcml_ceh_error error = ::fcml_fn_render( extractDialect( _dialect ), &render_config, buffer, FCML_REND_MAX_BUFF_LEN, &disassembler_result ); DisassemblerTypeConverter::free( disassembler_result ); if( error && renderConfig.isThrowExceptionOnError() ) { throw RenderingFailedException( FCML_TEXT( "Can not render instruction." ), error ); } result = buffer; return error; } private: /** The dialect instance associated with the renderer. */ Dialect &_dialect; }; } #endif /* FCML_RENDERER_HPP_ */ fcml-1.1.1/include/fcml_stateful_disassembler.hpp0000644000175000017500000001526712560745216017120 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_stateful_disassembler.hpp * Stateful FCML disassembler implementation. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_STATEFUL_DISASSEMBLER_HPP_ #define FCML_STATEFUL_DISASSEMBLER_HPP_ #include "fcml_disassembler.hpp" #include "fcml_renderer.hpp" namespace fcml { /** Stateful disassembler can be used when you have to disassemble a larger piece of code one instruction by one. * It also supports rendering directly using internally managed renderer. * * @since 1.1.0 * @remarks This class isn't thread-safe. */ class StatefulDisassembler { public: /** Creates a stateful disassembler for given FCML disassembler and context. Rendering support can be enabled optionally. * @param disassembler The classic FCML disassembler used to disassemble instructions. * @param context The disassembler context. * @param enableRendering Enables instruction rendering, which is disabled by default. */ StatefulDisassembler( Disassembler &disassembler, DisassemblerContext &context, bool enableRendering = false ) : _disassembler(disassembler), _disassemblerContext(context) { _renderer = enableRendering ? new Renderer( disassembler.getDialect() ) : NULL; // End of line characters to be used when instructions are rendered directly to the output stream. #if defined(_WIN32) _endOfLine = FCML_TEXT( "\r\n" ); #else _endOfLine = FCML_TEXT( "\n" ); #endif } /** Destructor. */ virtual ~StatefulDisassembler() { if( _renderer ) { delete _renderer; } } /** * Disassembles the next instruction pointed by the disassembler state. * @param[out] instruction The destination instruction model. * @return A reference to the stateful disassembler. * @throws DisassemblingFailedException * @since 1.1.0 */ StatefulDisassembler& operator >>( Instruction &instruction ) { // IP has to be incremented automatically, instruction by instruction. DisassemblerConf& config = _disassemblerContext.getDisassemblerConf(); config.setIncrementIp( true ); config.setThrowExceptionOnError( true ); // We don't care about error handling here, because it's disassembler // who is responsible for correctly handling it. _disassembler.disassemble( _disassemblerContext, _disassemblerResult ); instruction = _disassemblerResult.getInstruction(); return *this; } /** * Disassembles the next instruction from the buffer and renders it. * @param[out] instruction Destination string for the instruction. * @return A reference to the stateful disassembler. * @throws DisassemblingFailedException, * IllegalStateException, * RenderingFailedException * @since 1.1.0 */ StatefulDisassembler& operator >>( fcml_cstring &instruction ) { if( !_renderer ) { throw IllegalStateException( FCML_TEXT( "Rendering is disabled." ) ); } // IP has to be incremented automatically, instruction by instruction. DisassemblerConf& config = _disassemblerContext.getDisassemblerConf(); config.setIncrementIp( true ); config.setThrowExceptionOnError( true ); _disassembler.disassemble( _disassemblerContext, _disassemblerResult ); _rendererConfig.setThrowExceptionOnError( true ); _renderer->render( _rendererConfig, _disassemblerResult, instruction ); return *this; } /** * Disassembles the next instruction from the buffer and renders it directly into the output stream. * @param[out] ostream The output stream. * @return A reference to the stateful disassembler. * @throws DisassemblingFailedException, * IllegalStateException, * RenderingFailedException * @since 1.1.0 */ StatefulDisassembler& operator >>( fcml_costream &ostream ) { fcml_cstring instruction; // Render the next instruction into a string. *this >> instruction; // Appends the instruction into an output stream. ostream << instruction << _endOfLine; return *this; } /** * Gets renderer configuration used by the instruction buffer. * @return The renderer configuration. * @since 1.1.0 */ RenderConfig& getRendererConfig() { return _rendererConfig; } /** * Gets renderer configuration used by the internally managed instruction renderer. * @return The renderer configuration. * @since 1.1.0 */ const RenderConfig& getRendererConfig() const { return _rendererConfig; } /** * Gets end of line characters sequence used by the renderer. * * @return End of line characters sequence used by the renderer. * @since 1.1.0 */ const fcml_cstring& getEndOfLine() const { return _endOfLine; } /** * Sets dedicated end of line characters. * * @param endOfLine A sequence of characters used as line ending. * @since 1.1.0 */ void setEndOfLine(const fcml_cstring& endOfLine) { _endOfLine = endOfLine; } private: /** End of line character sequence. */ fcml_cstring _endOfLine; /** Disassembler result used when disassembling instructions. */ DisassemblerResult _disassemblerResult; /** The disassembler used to disassemble the code. */ Disassembler &_disassembler; /** Disassembler context pointing to the machine code. */ DisassemblerContext &_disassemblerContext; /** Renderer configuration used when instructions have to be rendered. */ RenderConfig _rendererConfig; /** Optional renderer used only when instructions are rendered. */ Renderer *_renderer; }; } #endif /* FCML_STATEFUL_DISASSEMBLER_HPP_ */ fcml-1.1.1/include/fcml_symbols.hpp0000644000175000017500000001425512560745216014220 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_symbols.hpp * C++ API for symbols handling. Currently used only by parsers. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_SYMBOLS_HPP_ #define FCML_SYMBOLS_HPP_ #include #include "fcml_common.hpp" #include "fcml_symbols.h" namespace fcml { /** * Represents one named symbol with associated value. * @since 1.1.0 */ class Symbol { public: /** * Creates an empty symbol. * @since 1.1.0 */ Symbol() : _value(0) { } /** * Creates a symbol instance for the given name and value. * * @param name The symbol name. * @param value The symbol value. * @since 1.1.0 */ Symbol( const fcml_cstring &name, fcml_int64_t value ) : _name(name), _value(value) { } /** * Gets symbol value. * @since 1.1.0 */ operator fcml_uint64_t() const { return _value; } /** * Gets symbol value. * @since 1.1.0 */ operator fcml_int64_t() const { return static_cast(_value); } /** * Gets true if symbol is empty. * * @return True if symbol is empty. * @since 1.1.0 */ bool isEmpty() const { return _name.empty(); } /** * Gets the symbol name. * * @return The symbol name. * @since 1.1.0 */ const fcml_cstring& getName() const { return _name; } /** * Gets the symbol value. * * @return The symbol value. * @since 1.1.0 */ fcml_uint64_t getValue() const { return _value; } /** * Sets a new symbol name. * * @param name The symbol name. * @since 1.1.0 */ void setName(const fcml_cstring& name) { _name = name; } /** * Sets a new symbol value. * * @param value The symbol value. * @since 1.1.0 */ void setValue(fcml_uint64_t value) { _value = value; } private: // Symbol name. fcml_cstring _name; // Symbol value. fcml_uint64_t _value; }; /* Due to the performance purposes and the way symbol table is managed internally, it * has to be wrapped directly without doing any conversions when needed. * @since 1.1.0 */ class SymbolTable: public NonCopyable { public: /** * Creates an empty symbol table. * @throw InitException The symbol table can't be allocated. * @since 1.1.0 */ SymbolTable() : _symbolTable(NULL) { _symbolTable = ::fcml_fn_symbol_table_alloc(); if( !_symbolTable ) { throw InitException( FCML_TEXT( "Symbol table can not be initialized correctly." ) ); } } /** * Destructor. * @since 1.1.0 */ virtual ~SymbolTable() { if( _symbolTable ) { ::fcml_fn_symbol_table_free( _symbolTable ); _symbolTable = NULL; } } protected: friend class SymbolTableAware; /** * Gets native FCML symbol table. * @return The native symbol table. * @since 1.1.0 */ fcml_st_symbol_table &getSymbolTable() { return _symbolTable; } public: /** * Adds a new symbol to the table. * * @param symbolName The symbol name. * @param value The symbol value. * @since 1.1.0 */ void add( const fcml_cstring &symbolName, fcml_int64_t value ) { if( ::fcml_fn_symbol_add_raw( _symbolTable, symbolName.c_str(), value ) == FCML_CEH_GEC_OUT_OF_MEMORY ) { throw std::bad_alloc(); } } /** * Removes symbol from the table. * * @param symbolName The symbol name. * @since 1.1.0 */ void remove( const fcml_cstring &symbolName ) { const fcml_string key = symbolName.c_str(); ::fcml_fn_symbol_remove( _symbolTable, key); } /** * Gets true if there is a symbol for the given name in the table. * * @param symbolName The symbol name. * @return true If symbol of the name exists in the table. * @since 1.1.0 */ bool contains( const fcml_cstring &symbolName ) const { return ::fcml_fn_symbol_get( _symbolTable, symbolName.c_str() ) != NULL; } /** * Gets the symbol of the given name. Checks Symbol.isEmpty method of the * returned symbol to check if there is such a symbol. * * @param symbolName The symbol name. * @return The found symbol. * @since 1.1.0 */ Symbol get( const fcml_cstring &symbolName ) const { Symbol symbol; fcml_st_symbol *found_symbol = ::fcml_fn_symbol_get( _symbolTable, symbolName.c_str() ); if( found_symbol ) { symbol.setName( found_symbol->symbol ); symbol.setValue( found_symbol->value ); } return symbol; } private: /** The native FCML symbol table. */ fcml_st_symbol_table _symbolTable; }; /** * Derive from this class if you really need access to the native symbol table. * @since 1.1.0 */ class SymbolTableAware { public: /** * Extracts the native symbol table for the given symbol table wrapper. * @param symbolTable The symbol table wrapper. * @since 1.1.0 */ fcml_st_symbol_table &extractSymbolTable( SymbolTable &symbolTable ) { return symbolTable.getSymbolTable(); } }; } #endif /* FCML_SYMBOLS_HPP_ */ fcml-1.1.1/include/fcml_renderer.h0000644000175000017500000001131312560745216013766 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_renderer.h * Structures and functions declarations related to FCML renderers * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_REND_H_ #define FCML_REND_H_ #include "fcml_lib_export.h" #include "fcml_types.h" #include "fcml_errors.h" #include "fcml_dialect.h" #include "fcml_disassembler.h" #ifdef __cplusplus extern "C" { #endif /** The rendered instruction size can not exceed this value. */ #define FCML_REND_MAX_BUFF_LEN 512 /** * @defgroup RENDERER_FLAGS_GROUP Flags configuring rendering process. * @{ */ /** Render the instruction code as HEX string. */ #define FCML_REND_FLAG_RENDER_CODE 0x00000001 /** Render the immediate operand as HEX integer. */ #define FCML_REND_FLAG_HEX_IMM 0x00000002 /** Render the segment code register even if it is a default one. */ #define FCML_REND_FLAG_RENDER_DEFAULT_SEG 0x00000004 /** Render the displacement value as HEX integer. */ #define FCML_REND_FLAG_HEX_DISPLACEMENT 0x00000008 /** Render the conditional mnemonics using suffixes from first group. */ #define FCML_REND_FLAG_COND_GROUP_1 0x00000010 /** Render the conditional mnemonics using suffixes from second group. */ #define FCML_REND_FLAG_COND_GROUP_2 0x00000020 /** Render the conditional mnemonics using suffixes for 'carry'. */ #define FCML_REND_FLAG_COND_SHOW_CARRY 0x00000040 /** Render SIB operand hints. */ #define FCML_REND_FLAG_RENDER_SIB_HINT 0x00000080 /** Render ABS (Absolute offset) operand hints. */ #define FCML_REND_FLAG_RENDER_ABS_HINT 0x00000100 /** Render REL (Relative offset) operand hints. */ #define FCML_REND_FLAG_RENDER_REL_HINT 0x00000200 /** Render hints for absolute addressing. */ #define FCML_REND_FLAG_RENDER_INDIRECT_HINT 0x00000400 /** Renders repetition prefixes using the first group (repe,repne). */ #define FCML_REND_FLAG_REP_PREFIX_GROUP_1 0x00000800 /** Renders repetition prefixes using the second group (repz,repnz). */ #define FCML_REND_FLAG_REP_PREFIX_GROUP_2 0x00001000 /** Renders the code padding between the instruction code and the mnemonic. */ #define FCML_REND_FLAG_CODE_PADDING 0x00002000 /** Renders the mnemonic padding between the mnemonic and the operands. */ #define FCML_REND_FLAG_MNEMONIC_PADDING 0x00004000 /** Should be used only with FCML_REND_FLAG_HEX_IMM and FCML_REND_FLAG_HEX_DISPLACEMENT flags. */ #define FCML_REND_FLAG_REMOVE_LEADING_ZEROS 0x00008000 /** Default set of the rendering flags. */ #define FCML_REND_DEFAULT_FLAGS 0 /** Default number of characters used as code padding. */ #define FCML_REND_DEFAULT_CODE_PADDING 8 /** Default number of characters used as mnemonic padding. */ #define FCML_REND_DEFAULT_MNEMONIC_PADDING 8 /** @} */ /** Renderer configuration. */ typedef struct fcml_st_render_config { /** Flags which allows to control rendering process. */ fcml_uint32_t render_flags; /** Preferred mnemonic padding in characters. */ fcml_uint16_t prefered_mnemonic_padding; /** Preferred code padding in HEX bytes (2 characters on one byte.). */ fcml_uint16_t prefered_code_padding; } fcml_st_render_config; /** * Renders the disassembled instruction into its textual representation. * Prepares textual representation of the disassembled code using syntax * based on the provided dialect. * * @param dialect Dialect instance. * @param config Renderer configuration. * @param[out] buffer Destination buffer for the generated instruction. * @param buffer_len Size of the destination buffer. * @param result Disassembled instruction. * @return Error code or FCML_CEH_GEC_NO_ERROR. * */ LIB_EXPORT fcml_ceh_error LIB_CALL fcml_fn_render( const fcml_st_dialect *dialect, const fcml_st_render_config *config, fcml_char *buffer, fcml_usize buffer_len, const fcml_st_disassembler_result *result ); #ifdef __cplusplus } #endif #endif /* FCML_REND_H_ */ fcml-1.1.1/include/fcml_assembler.hpp0000644000175000017500000006274112560745216014510 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_assembler.hpp * C++ wrapper for FCML assembler. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_ASSEMBLER_HPP_ #define FCML_ASSEMBLER_HPP_ #include #include #include "fcml_assembler.h" #include "fcml_common.hpp" #include "fcml_errors.hpp" #include "fcml_dialect.hpp" namespace fcml { /** * Assembling failed. * @since 1.1.0 */ class AssemblingFailedException: public ErrorContainerAwareException { public: AssemblingFailedException( const fcml_cstring msg, ErrorContainer errorContainer = ErrorContainer(), fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR ) : ErrorContainerAwareException( msg, errorContainer, error ){ } }; /** Describes an assembled instruction. * @since 1.1.0 */ class AssembledInstruction { public: /** * Creates an assembled instruction basing on given code buffer and errors. * * @param buffer Pointer to the machine code buffer. * @param len Number of machine code bytes. * @param errorContainer Potential warnings related to the assembled instruction. * @since 1.1.0 * */ AssembledInstruction( const fcml_uint8_t *buffer, fcml_usize len, const ErrorContainer &errorContainer ) { set( buffer, len, errorContainer ); } /** * Copy constructor. * @since 1.1.0 */ AssembledInstruction( const AssembledInstruction& cpy ) { set( cpy._code, cpy._codeLength, cpy._warningContainer ); } /** * Copies one instruction into another. * * @param cpy The source instruction. * @return A reference to the destination instruction. * @since 1.1.0 */ AssembledInstruction& operator=( const AssembledInstruction &cpy ) { if ( &cpy != this ) { if( this->_code ) { delete [] this->_code; } set( cpy._code, cpy._codeLength, cpy._warningContainer ); } return *this; } /** * @since 1.1.0 */ virtual ~AssembledInstruction() { if( _code ) { delete [] _code; _code = NULL; } } public: /** * Gets pointer to machine code buffer. * * @return Pointer to machine code buffer. * @since 1.1.0 */ const fcml_uint8_t* getCode() const { return _code; } /** * Gets number of bytes in the buffer. * * @return Number of bytes in the buffer. * @since 1.1.0 */ fcml_usize getCodeLength() const { return _codeLength; } /** * Gets reference to the errors container. * * @return A reference to the errors container. * @since 1.1.0 */ const ErrorContainer& getWarningContainer() const { return _warningContainer; } private: /** * Fills the assembled instruction with new data. * * @param buffer The code buffer. * @param len The code buffer lenght. * @param warnings The warnings container. * @since 1.1.0 */ void set( const fcml_uint8_t *buffer, fcml_usize len, const ErrorContainer warnigns ) { _warningContainer = warnigns; if( len > 0 ) { _code = new fcml_uint8_t[len]; for( fcml_usize i = 0; i < len; i++ ) { _code[i] = buffer[i]; } } else { _code = NULL; } _codeLength = len; } private: /** Warnings related to this instruction. */ ErrorContainer _warningContainer; /** Pointer to the instruction machine code. */ fcml_uint8_t *_code; /** Number of machine code bytes in the array above. */ fcml_usize _codeLength; }; class Assembler; /** Assembler result. */ class AssemblerResult { public: /** * @since 1.1.0 */ AssemblerResult() : _chosenInstructionIndex(-1) { } public: /** * Gets instruction chosen by the assembler as the preferred one. * * @return Preferred instruction. * @since 1.1.0 */ const AssembledInstruction* getChosenInstruction() const { if( _chosenInstructionIndex == -1 ) { return NULL; } return &(_assembledInstructions[ _chosenInstructionIndex ]); } /** * Gets errors container. * * @return Errors container. * @since 1.1.0 */ const ErrorContainer& getErrorContainer() const { return _errorContainer; } /** * Gets number of instructions alternatives available in the result. * * @return Number of available instructions. * @since 1.1.0 */ fcml_usize getSize() const { return _assembledInstructions.size(); } /** * Gets pointer to the chosen instruction. * * @return Pointer to the chosen instruction. * @since 1.1.0 */ operator const AssembledInstruction*() const { if( _chosenInstructionIndex == -1 ) { return NULL; } return &(_assembledInstructions[_chosenInstructionIndex]); } /** * Gets an assembled instruction reference by its index. * * @return The assembled instruction for given index. * @throw BadArgumentException Array index out of bound. * @since 1.1.0 */ const AssembledInstruction& operator[] ( fcml_usize index ) const { if( index > _assembledInstructions.size() ) { throw BadArgumentException(FCML_TEXT("Array index out of bound."), FCML_CEH_GEC_VALUE_OUT_OF_RANGE); } return _assembledInstructions[index]; } /** * Copies machine code of the chosen instruction to the output stream. * * @param[out] out Output stream. * @param result Assembler result. * @return Output stream from the parameter. * @since 1.1.0 */ friend std::basic_ostream& operator<< ( std::basic_ostream &out, const AssemblerResult &result ) { const AssembledInstruction *assembled = result.getChosenInstruction(); if( assembled ) { // If chosen instruction is not available, do not // stream anything. It's not so common, because // instructions choosers are obliged to chose something. if( assembled->getCode() && assembled->getCodeLength() > 0 ) { out.write( assembled->getCode(), assembled->getCodeLength() ); } } return out; } /** * Clears assembler result by removing all assembled instructions, errors and reseting the chosen instruction. * @since 1.1.0 */ void clear() { _errorContainer.clean(); _assembledInstructions.clear(); _chosenInstructionIndex = -1; } protected: friend Assembler; void setErrorContainer(const ErrorContainer& errorContainer) { _errorContainer = errorContainer; } std::vector& getAssembledInstructions() { return _assembledInstructions; } void setChoosenInstructionIndex( fcml_int index ) { _chosenInstructionIndex = index; } private: /** Assembling errors. */ ErrorContainer _errorContainer; /** All assembled instructions are going here. */ std::vector _assembledInstructions; /** Index for the chosen instruction. */ fcml_int _chosenInstructionIndex; }; /** Assembler configuration. * For more information about the flags, see fcml_st_assembler_conf structure documentation. * @since 1.1.0 */ class AssemblerConf { public: /** * @since 1.1.0 */ AssemblerConf() : _throwExceptionOnError(true), _incrementIp(true), _enableErrorMessages(true), _chooseSibEncoding(false), _chooseAbsEncoding(false), _forceRexPrefix(false), _forceThreeByteVEX(false), _noBranchPrediction(false), _optimizer(NULL), _optimizerFlags(0), _chooser(NULL) { } public: /** * @since 1.1.0 */ bool isChooseAbsEncoding() const { return _chooseAbsEncoding; } /** * @since 1.1.0 */ void setChooseAbsEncoding(bool chooseAbsEncoding) { _chooseAbsEncoding = chooseAbsEncoding; } /** * @since 1.1.0 */ fcml_fnp_asm_instruction_chooser getChooser() const { return _chooser; } /** * @since 1.1.0 */ void setChooser(fcml_fnp_asm_instruction_chooser chooser) { _chooser = chooser; } /** * @since 1.1.0 */ bool isChooseSibEncoding() const { return _chooseSibEncoding; } /** * @since 1.1.0 */ void setChooseSibEncoding(bool chooseSibEncoding) { _chooseSibEncoding = chooseSibEncoding; } /** * @since 1.1.0 */ bool isEnableErrorMessages() const { return _enableErrorMessages; } /** * @since 1.1.0 */ void setEnableErrorMessages(bool enableErrorMessages) { _enableErrorMessages = enableErrorMessages; } /** * @since 1.1.0 */ bool isForceRexPrefix() const { return _forceRexPrefix; } /** * @since 1.1.0 */ void setForceRexPrefix(bool forceRexPrefix) { _forceRexPrefix = forceRexPrefix; } /** * @since 1.1.0 */ bool isForceThreeByteVex() const { return _forceThreeByteVEX; } /** * @since 1.1.0 */ void setForceThreeByteVex(bool forceThreeByteVex) { _forceThreeByteVEX = forceThreeByteVex; } /** * @since 1.1.0 */ bool isIncrementIp() const { return _incrementIp; } /** * @since 1.1.0 */ void setIncrementIp(bool incrementIp) { _incrementIp = incrementIp; } /** * @since 1.1.0 */ fcml_fnp_asm_optimizer getOptimizer() const { return _optimizer; } /** * @since 1.1.0 */ void setOptimizer(fcml_fnp_asm_optimizer optimizer) { _optimizer = optimizer; } /** * @since 1.1.0 */ fcml_uint16_t getOptimizerFlags() const { return _optimizerFlags; } /** * @since 1.1.0 */ void setOptimizerFlags(fcml_uint16_t optimizerFlags) { _optimizerFlags = optimizerFlags; } /** * Returns true if exception should be thrown when assembling fails. * * @return True if exception is the preferred way of error handling in case of failure. * @since 1.1.0 */ bool isThrowExceptionOnError() const { return _throwExceptionOnError; } /** * Sets the way how the error handling is done. * * @param throwExceptionOnError True if exception should be thrown in case of failure. * @since 1.1.0 */ void setThrowExceptionOnError(bool throwExceptionOnError) { _throwExceptionOnError = throwExceptionOnError; } private: bool _throwExceptionOnError; bool _incrementIp; bool _enableErrorMessages; bool _chooseSibEncoding; bool _chooseAbsEncoding; bool _forceRexPrefix; bool _forceThreeByteVEX; bool _noBranchPrediction; fcml_fnp_asm_optimizer _optimizer; fcml_uint16_t _optimizerFlags; fcml_fnp_asm_instruction_chooser _chooser; }; /** Assembler context. * * It is a counterpart to the fcml_st_assembler_context structure. * @since 1.1.0 */ class AssemblerContext { public: /** * @since 1.1.0 */ AssemblerContext() { } /** * Creates an entry point instance for given operating mode and optional instruction pointer. * * @param operatingMode The processor operating mode. * @param ip The instruction pointer. * @since 1.1.0 */ AssemblerContext( EntryPoint::OperatingMode operatingMode, fcml_ip ip = 0 ) : _entryPoint( operatingMode, ip ) { } public: /** * Gets constant assembler configuration associated with the context. * * @return Assembler configuration. * @since 1.1.0 */ const AssemblerConf& getConfig() const { return _config; } /** * Gets assembler configuration associated with the context. * * @return Assembler configuration. * @since 1.1.0 */ AssemblerConf& getConfig() { return _config; } /** * Copies given configuration to the instance associated with the context. * Deep copy is performed, so passed object not need to be maintained as * long as the context is used. * * @param config Configuration that is copied to the context. * @since 1.1.0 */ void setConfig(const AssemblerConf &config) { _config = config; } /** * Gets reference to the constant entry point instance associated with the context. * * @return Reference to the constant entry point. * @since 1.1.0 */ const EntryPoint& getEntryPoint() const { return _entryPoint; } /** * Gets reference to the entry point instance associated with the context. * * @return Reference to the entry point. * @since 1.1.0 */ EntryPoint& getEntryPoint() { return _entryPoint; } /** * Copies given entry point to the instance associated with the context. * Deep copy is performed, so passed object not need to be maintained as * long as the context is used. * * @param entryPoint The entry point. * @since 1.1.0 */ void setEntryPoint(const EntryPoint &entryPoint) { _entryPoint = entryPoint; } /** * Sets instruction pointer directly into the entry point. * * @param ip The new IP. * @since 1.1.0 */ void setIP( fcml_ip ip ) { _entryPoint.setIP(ip); } /** * Increments entry point by given number of bytes. * * @param ip Number of bytes the instruction pointer has to be incremented by. * @since 1.1.0 */ void incrementIP( fcml_ip ip ) { _entryPoint.incrementIP( ip ); } /** * Sets processor operating mode directly into the entry point. * * @param operatingMode Processor operating mode to be set. * @since 1.1.0 */ void setOperatingMode( EntryPoint::OperatingMode operatingMode ) { _entryPoint.setOpMode( operatingMode ); } /** * Sets a new address size attribute for the entry point. * * @param addressSizeAttribute The address size attribute. * @since 1.1.0 */ void setAddressSizeAttribute( fcml_usize addressSizeAttribute ) { _entryPoint.setAddressSizeAttribute( addressSizeAttribute ); } /** * Sets a new operand size attribute for the entry point. * * @param operandSizeAttribute The operand size attribute. * @since 1.1.0 */ void setOperandSizeAttribute( fcml_usize operandSizeAttribute ) { _entryPoint.setOperandSizeAttribute( operandSizeAttribute ); } private: /** Entry point associated with the context. */ EntryPoint _entryPoint; /** Assembler configuration associated with the context. */ AssemblerConf _config; }; /** Converts objects to their structures counterparts. * @since 1.1.0 * @remarks Internal API, not intended to be used outside. */ class AssemblerTypeConverter { public: static void convert( const fcml_st_assembler_context &src, AssemblerContext &dest ) { // Converts assembler configuration and entry point. Both of them // have dedicated conversion methods. convert( src.configuration, dest.getConfig() ); TypeConverter::convert( src.entry_point, dest.getEntryPoint() ); } static void convert( const AssemblerContext &src, fcml_st_assembler_context &dest ) { // Converts assembler configuration and entry point. Both of them // have dedicated conversion methods. convert( src.getConfig(), dest.configuration ); TypeConverter::convert( src.getEntryPoint(), dest.entry_point ); } static void convert( const fcml_st_assembler_conf &src, AssemblerConf &dest ) { dest.setChooseAbsEncoding( FCML_TO_CPP_BOOL( src.choose_abs_encoding ) ); dest.setChooseSibEncoding( FCML_TO_CPP_BOOL( src.choose_sib_encoding ) ); dest.setChooser( src.chooser ); dest.setEnableErrorMessages( FCML_TO_CPP_BOOL( src.enable_error_messages ) ); dest.setForceRexPrefix( FCML_TO_CPP_BOOL( src.force_rex_prefix ) ); dest.setForceThreeByteVex( FCML_TO_CPP_BOOL( src.force_three_byte_VEX ) ); dest.setIncrementIp( FCML_TO_CPP_BOOL( src.increment_ip ) ); dest.setOptimizer( src.optimizer ); dest.setOptimizerFlags( src.optimizer_flags ); } static void convert( const AssemblerConf &src, fcml_st_assembler_conf &dest ) { dest.choose_abs_encoding = src.isChooseAbsEncoding(); dest.choose_sib_encoding = src.isChooseSibEncoding(); dest.chooser = src.getChooser(); dest.enable_error_messages = src.isEnableErrorMessages(); dest.force_rex_prefix = src.isForceRexPrefix(); dest.force_three_byte_VEX = src.isForceThreeByteVex(); dest.increment_ip = src.isIncrementIp(); dest.optimizer = src.getOptimizer(); dest.optimizer_flags = src.getOptimizerFlags(); } }; /** * An assembler wrapper. * As you can see the assembler instance is managed internally and is not exposed outside. * @since 1.1.0 * @remarks This class is thread-safe. */ class Assembler: public NonCopyable, protected DialectAware { public: /** * Creates an assembler instance for given dialect. * * @param dialect The dialect for the assembler instance. * @throw InitException Cannot initialize the assembler. * @since 1.1.0 */ Assembler(Dialect &dialect) : _dialect(dialect) { fcml_ceh_error error = ::fcml_fn_assembler_init( extractDialect( dialect ), &_assembler); if (error) { throw InitException(FCML_TEXT("Cannot initialize the assembler."), error); } } /** * @since 1.1.0 */ virtual ~Assembler() { if (_assembler) { ::fcml_fn_assembler_free(_assembler); _assembler = NULL; } } public: /** * Assembles given generic instruction model. * * @param ctx The assembler context. * @param instruction The generic instruction model to be assembled. * @param[out] result Assembler result. * @throw AssemblingFailedException Thrown if assembling fails and AssemblerConf.isThrowExceptionOnError returns true. * @return Error code. * @since 1.1.0 */ fcml_ceh_error assemble( AssemblerContext &ctx, const Instruction &instruction, AssemblerResult &result ) { // Prepare assembler context. fcml_st_assembler_context context; AssemblerTypeConverter::convert( ctx, context ); context.assembler = _assembler; // Prepare instruction. fcml_st_instruction inst; TypeConverter::convert( instruction, inst ); // Prepare assembler result. fcml_st_assembler_result res; ::fcml_fn_assembler_result_prepare( &res ); fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; try { result.clear(); error = ::fcml_fn_assemble( &context, &inst, &res ); // Free instruction mnemonic. TypeConverter::free( inst ); // Failed or not, convert assembler errors. ErrorContainer errorContainer; ErrorTypeConverter::convert( res.errors, errorContainer ); // Prepares assembler result. result.setErrorContainer( errorContainer ); if( error && ctx.getConfig().isThrowExceptionOnError() ) { ::fcml_fn_assembler_result_free( &res ); throw AssemblingFailedException( FCML_TEXT("Assembling failed."), errorContainer, error ); } if( !error ) { std::vector &assembledInstructions = result.getAssembledInstructions(); assembledInstructions.clear(); if( res.number_of_instructions > 0 ) { ErrorContainer instructionWarnings; fcml_int i = 0; fcml_st_assembled_instruction *next_instruction = res.instructions; while( next_instruction ) { fcml_st_ceh_error_container &instruction_warnings = next_instruction->warnings; ErrorTypeConverter::convert( instruction_warnings, instructionWarnings ); AssembledInstruction assembledInstruction( next_instruction->code, next_instruction->code_length, instructionWarnings ); assembledInstructions.push_back( assembledInstruction ); if( next_instruction == res.chosen_instruction ) { result.setChoosenInstructionIndex(i); } next_instruction = next_instruction->next; i++; } } // Convert it back to the context because it might have been // modified during assembling process (IP incrementing etc). TypeConverter::convert( context.entry_point, ctx.getEntryPoint() ); } ::fcml_fn_assembler_result_free( &res ); } catch( std::exception &exc ) { // If anything failed, free assembler results. TypeConverter::free( inst ); ::fcml_fn_assembler_result_free( &res ); throw exc; } return error; } /** * Gets dialect associated with the assembler. * @return The dialect instance associated with the assembler. * @since 1.1.0 */ Dialect& getDialect() const { return _dialect; } private: // A dialect used by the assembler. Dialect &_dialect; // An initialized assembler instance. fcml_st_assembler *_assembler; }; /** Iterates over machine code bytes from assembled instructions. * @since 1.1.0 */ class CodeIterator: public Iterator { public: /** * Creates a code iterator instance. * @param assembledInstructions Assembled instructions. * @since 1.1.0 */ CodeIterator( std::vector &assembledInstructions ) : _buffer(NULL), _len(0), _pos(0), _iterator(assembledInstructions.begin()), _assembledInstructions(assembledInstructions) { } /** * @since 1.1.0 */ virtual ~CodeIterator() { } /** * Gets true if there is an another element in the iterator. * * @return True if there is another byte in the iterator. * @since 1.1.0 */ bool hasNext() { if( _buffer && _pos >= _len ) { _buffer = NULL; } if( !_buffer ) { if( _iterator == _assembledInstructions.end() ) { return false; } AssembledInstruction ¤t = *_iterator++; _buffer = current.getCode(); _len = current.getCodeLength(); _pos = 0; } return true; } /** * Gets the next element from the iterator. * * @return Next machine code byte. * @throw IllegalStateException If iterator is empty. * @since 1.1.0 */ fcml_uint8_t next() { if( ( !_buffer || _pos >= _len ) && !hasNext() ) { throw IllegalStateException( FCML_TEXT( "No more elements in the iterator." ) ); } return _buffer[_pos++]; } private: /** Code of the current instruction iterator points to. */ const fcml_uint8_t *_buffer; /** Code length in bytes. */ fcml_usize _len; /** Position in the code buffer */ fcml_usize _pos; /** Assembled instructions iterator. */ std::vector::iterator _iterator; /** Vector with assembled instructions. */ std::vector &_assembledInstructions; }; } #endif //FCML_ASSEMBLER_HPP_ fcml-1.1.1/include/fcml_intel_mnemonics.h0000644000175000017500000014601512560745216015353 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** @file fcml_intel_mnemonics.h * Declarations of Intel mnemonics for C. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_INTEL_MNEMONICS_H_ #define FCML_INTEL_MNEMONICS_H_ #include "fcml_types.h" #define M_AAA FCML_TEXT("aaa") #define M_AAD FCML_TEXT("aad") #define M_AAM FCML_TEXT("aam") #define M_AAS FCML_TEXT("aas") #define M_ADC FCML_TEXT("adc") #define M_ADCX FCML_TEXT("adcx") #define M_ADD FCML_TEXT("add") #define M_ADDPD FCML_TEXT("addpd") #define M_ADDPS FCML_TEXT("addps") #define M_ADDSD FCML_TEXT("addsd") #define M_ADDSS FCML_TEXT("addss") #define M_ADDSUBPD FCML_TEXT("addsubpd") #define M_ADDSUBPS FCML_TEXT("addsubps") #define M_ADOX FCML_TEXT("adox") #define M_AESDEC FCML_TEXT("aesdec") #define M_AESDECLAST FCML_TEXT("aesdeclast") #define M_AESENC FCML_TEXT("aesenc") #define M_AESENCLAST FCML_TEXT("aesenclast") #define M_AESIMC FCML_TEXT("aesimc") #define M_AESKEYGENASSIST FCML_TEXT("aeskeygenassist") #define M_AND FCML_TEXT("and") #define M_ANDN FCML_TEXT("andn") #define M_ANDNPD FCML_TEXT("andnpd") #define M_ANDNPS FCML_TEXT("andnps") #define M_ANDPD FCML_TEXT("andpd") #define M_ANDPS FCML_TEXT("andps") #define M_ARPL FCML_TEXT("arpl") #define M_BEXR FCML_TEXT("bexr") #define M_BEXTR FCML_TEXT("bextr") #define M_BLCFILL FCML_TEXT("blcfill") #define M_BLCI FCML_TEXT("blci") #define M_BLCIC FCML_TEXT("blcic") #define M_BLCMSK FCML_TEXT("blcmsk") #define M_BLCS FCML_TEXT("blcs") #define M_BLENDPD FCML_TEXT("blendpd") #define M_BLENDPS FCML_TEXT("blendps") #define M_BLENDVPD FCML_TEXT("blendvpd") #define M_BLENDVPS FCML_TEXT("blendvps") #define M_BLSFILL FCML_TEXT("blsfill") #define M_BLSI FCML_TEXT("blsi") #define M_BLSIC FCML_TEXT("blsic") #define M_BLSMSK FCML_TEXT("blsmsk") #define M_BLSR FCML_TEXT("blsr") #define M_BOUND FCML_TEXT("bound") #define M_BSF FCML_TEXT("bsf") #define M_BSR FCML_TEXT("bsr") #define M_BSWAP FCML_TEXT("bswap") #define M_BT FCML_TEXT("bt") #define M_BTC FCML_TEXT("btc") #define M_BTR FCML_TEXT("btr") #define M_BTS FCML_TEXT("bts") #define M_BZHI FCML_TEXT("bzhi") #define M_CALL FCML_TEXT("call") #define M_CBW FCML_TEXT("cbw") #define M_CDQ FCML_TEXT("cdq") #define M_CDQE FCML_TEXT("cdqe") #define M_CLAC FCML_TEXT("clac") #define M_CLC FCML_TEXT("clc") #define M_CLD FCML_TEXT("cld") #define M_CLFLUSH FCML_TEXT("clflush") #define M_CLGI FCML_TEXT("clgi") #define M_CLI FCML_TEXT("cli") #define M_CLTS FCML_TEXT("clts") #define M_CMC FCML_TEXT("cmc") #define M_CMOVO FCML_TEXT("cmovo"); #define M_CMOVNO FCML_TEXT("cmovno"); #define M_CMOVB FCML_TEXT("cmovb"); #define M_CMOVNB FCML_TEXT("cmovnb"); #define M_CMOVE FCML_TEXT("cmove"); #define M_CMOVNE FCML_TEXT("cmovne"); #define M_CMOVBE FCML_TEXT("cmovbe"); #define M_CMOVNBE FCML_TEXT("cmovnbe"); #define M_CMOVS FCML_TEXT("cmovs"); #define M_CMOVNS FCML_TEXT("cmovns"); #define M_CMOVP FCML_TEXT("cmovp"); #define M_CMOVNP FCML_TEXT("cmovnp"); #define M_CMOVL FCML_TEXT("cmovl"); #define M_CMOVNL FCML_TEXT("cmovnl"); #define M_CMOVLE FCML_TEXT("cmovle"); #define M_CMOVNLE FCML_TEXT("cmovnle"); #define M_CMOVNAE FCML_TEXT("cmovnae"); #define M_CMOVAE FCML_TEXT("cmovae"); #define M_CMOVZ FCML_TEXT("cmovz"); #define M_CMOVNZ FCML_TEXT("cmovnz"); #define M_CMOVNA FCML_TEXT("cmovna"); #define M_CMOVA FCML_TEXT("cmova"); #define M_CMOVPE FCML_TEXT("cmovpe"); #define M_CMOVPO FCML_TEXT("cmovpo"); #define M_CMOVNGE FCML_TEXT("cmovnge"); #define M_CMOVGE FCML_TEXT("cmovge"); #define M_CMOVNG FCML_TEXT("cmovng"); #define M_CMOVG FCML_TEXT("cmovg"); #define M_CMOVC FCML_TEXT("cmovc"); #define M_CMOVNC FCML_TEXT("cmovnc"); #define M_CMP FCML_TEXT("cmp") #define M_CMPEQSD FCML_TEXT("cmpeqsd") #define M_CMPEQSS FCML_TEXT("cmpeqss") #define M_CMPLESD FCML_TEXT("cmplesd") #define M_CMPLESS FCML_TEXT("cmpless") #define M_CMPLTSD FCML_TEXT("cmpltsd") #define M_CMPLTSS FCML_TEXT("cmpltss") #define M_CMPNEQSD FCML_TEXT("cmpneqsd") #define M_CMPNEQSS FCML_TEXT("cmpneqss") #define M_CMPNLESD FCML_TEXT("cmpnlesd") #define M_CMPNLESS FCML_TEXT("cmpnless") #define M_CMPNLTSD FCML_TEXT("cmpnltsd") #define M_CMPNLTSS FCML_TEXT("cmpnltss") #define M_CMPORDSD FCML_TEXT("cmpordsd") #define M_CMPORDSS FCML_TEXT("cmpordss") #define M_CMPPD FCML_TEXT("cmppd") #define M_CMPPS FCML_TEXT("cmpps") #define M_CMPS FCML_TEXT("cmps") #define M_CMPSB FCML_TEXT("cmpsb") #define M_CMPSD FCML_TEXT("cmpsd") #define M_CMPSQ FCML_TEXT("cmpsq") #define M_CMPSS FCML_TEXT("cmpss") #define M_CMPSW FCML_TEXT("cmpsw") #define M_CMPUNORDSD FCML_TEXT("cmpunordsd") #define M_CMPUNORDSS FCML_TEXT("cmpunordss") #define M_CMPXCHG FCML_TEXT("cmpxchg") #define M_CMPXCHG16B FCML_TEXT("cmpxchg16b") #define M_CMPXCHG8B FCML_TEXT("cmpxchg8b") #define M_COMISD FCML_TEXT("comisd") #define M_COMISS FCML_TEXT("comiss") #define M_CPUID FCML_TEXT("cpuid") #define M_CQO FCML_TEXT("cqo") #define M_CRC32 FCML_TEXT("crc32") #define M_CVTDQ2PD FCML_TEXT("cvtdq2pd") #define M_CVTDQ2PS FCML_TEXT("cvtdq2ps") #define M_CVTPD2DQ FCML_TEXT("cvtpd2dq") #define M_CVTPD2PI FCML_TEXT("cvtpd2pi") #define M_CVTPD2PS FCML_TEXT("cvtpd2ps") #define M_CVTPI2PD FCML_TEXT("cvtpi2pd") #define M_CVTPI2PS FCML_TEXT("cvtpi2ps") #define M_CVTPS2DQ FCML_TEXT("cvtps2dq") #define M_CVTPS2PD FCML_TEXT("cvtps2pd") #define M_CVTPS2PI FCML_TEXT("cvtps2pi") #define M_CVTSD2SI FCML_TEXT("cvtsd2si") #define M_CVTSD2SS FCML_TEXT("cvtsd2ss") #define M_CVTSI2SD FCML_TEXT("cvtsi2sd") #define M_CVTSI2SS FCML_TEXT("cvtsi2ss") #define M_CVTSS2SD FCML_TEXT("cvtss2sd") #define M_CVTSS2SI FCML_TEXT("cvtss2si") #define M_CVTTPD2DQ FCML_TEXT("cvttpd2dq") #define M_CVTTPD2PI FCML_TEXT("cvttpd2pi") #define M_CVTTPS2DQ FCML_TEXT("cvttps2dq") #define M_CVTTPS2PI FCML_TEXT("cvttps2pi") #define M_CVTTSD2SI FCML_TEXT("cvttsd2si") #define M_CVTTSS2SI FCML_TEXT("cvttss2si") #define M_CWD FCML_TEXT("cwd") #define M_CWDE FCML_TEXT("cwde") #define M_DAA FCML_TEXT("daa") #define M_DAS FCML_TEXT("das") #define M_DEC FCML_TEXT("dec") #define M_DIV FCML_TEXT("div") #define M_DIVPD FCML_TEXT("divpd") #define M_DIVPS FCML_TEXT("divps") #define M_DIVSD FCML_TEXT("divsd") #define M_DIVSS FCML_TEXT("divss") #define M_DPPD FCML_TEXT("dppd") #define M_DPPS FCML_TEXT("dpps") #define M_EMMS FCML_TEXT("emms") #define M_ENTER FCML_TEXT("enter") #define M_EXTRACTPS FCML_TEXT("extractps") #define M_EXTRQ FCML_TEXT("extrq") #define M_F2XM1 FCML_TEXT("f2xm1") #define M_FABS FCML_TEXT("fabs") #define M_FADD FCML_TEXT("fadd") #define M_FADDP FCML_TEXT("faddp") #define M_FBLD FCML_TEXT("fbld") #define M_FBSTP FCML_TEXT("fbstp") #define M_FCHS FCML_TEXT("fchs") #define M_FCLEX FCML_TEXT("fclex") #define M_FCMOVB FCML_TEXT("fcmovb") #define M_FCMOVBE FCML_TEXT("fcmovbe") #define M_FCMOVE FCML_TEXT("fcmove") #define M_FCMOVNB FCML_TEXT("fcmovnb") #define M_FCMOVNBE FCML_TEXT("fcmovnbe") #define M_FCMOVNE FCML_TEXT("fcmovne") #define M_FCMOVNU FCML_TEXT("fcmovnu") #define M_FCMOVU FCML_TEXT("fcmovu") #define M_FCOM FCML_TEXT("fcom") #define M_FCOMI FCML_TEXT("fcomi") #define M_FCOMIP FCML_TEXT("fcomip") #define M_FCOMP FCML_TEXT("fcomp") #define M_FCOMPP FCML_TEXT("fcompp") #define M_FCOS FCML_TEXT("fcos") #define M_FDECSTP FCML_TEXT("fdecstp") #define M_FDIV FCML_TEXT("fdiv") #define M_FDIVP FCML_TEXT("fdivp") #define M_FDIVR FCML_TEXT("fdivr") #define M_FDIVRP FCML_TEXT("fdivrp") #define M_FEMMS FCML_TEXT("femms") #define M_FFREE FCML_TEXT("ffree") #define M_FIADD FCML_TEXT("fiadd") #define M_FICOM FCML_TEXT("ficom") #define M_FICOMP FCML_TEXT("ficomp") #define M_FIDIV FCML_TEXT("fidiv") #define M_FIDIVR FCML_TEXT("fidivr") #define M_FILD FCML_TEXT("fild") #define M_FIMUL FCML_TEXT("fimul") #define M_FINCSTP FCML_TEXT("fincstp") #define M_FINIT FCML_TEXT("finit") #define M_FIST FCML_TEXT("fist") #define M_FISTP FCML_TEXT("fistp") #define M_FISTTP FCML_TEXT("fisttp") #define M_FISUB FCML_TEXT("fisub") #define M_FISUBR FCML_TEXT("fisubr") #define M_FLD FCML_TEXT("fld") #define M_FLD1 FCML_TEXT("fld1") #define M_FLDCW FCML_TEXT("fldcw") #define M_FLDENV FCML_TEXT("fldenv") #define M_FLDL2E FCML_TEXT("fldl2e") #define M_FLDL2T FCML_TEXT("fldl2t") #define M_FLDLG2 FCML_TEXT("fldlg2") #define M_FLDLN2 FCML_TEXT("fldln2") #define M_FLDPI FCML_TEXT("fldpi") #define M_FLDZ FCML_TEXT("fldz") #define M_FMUL FCML_TEXT("fmul") #define M_FMULP FCML_TEXT("fmulp") #define M_FNCLEX FCML_TEXT("fnclex") #define M_FNINIT FCML_TEXT("fninit") #define M_FNOP FCML_TEXT("fnop") #define M_FNSAVE FCML_TEXT("fnsave") #define M_FNSTCW FCML_TEXT("fnstcw") #define M_FNSTENV FCML_TEXT("fnstenv") #define M_FNSTSW FCML_TEXT("fnstsw") #define M_FPATAN FCML_TEXT("fpatan") #define M_FPREM FCML_TEXT("fprem") #define M_FPREM1 FCML_TEXT("fprem1") #define M_FPTAN FCML_TEXT("fptan") #define M_FRNDINT FCML_TEXT("frndint") #define M_FRSTOR FCML_TEXT("frstor") #define M_FSAVE FCML_TEXT("fsave") #define M_FSCALE FCML_TEXT("fscale") #define M_FSIN FCML_TEXT("fsin") #define M_FSINCOS FCML_TEXT("fsincos") #define M_FSQRT FCML_TEXT("fsqrt") #define M_FST FCML_TEXT("fst") #define M_FSTCW FCML_TEXT("fstcw") #define M_FSTENV FCML_TEXT("fstenv") #define M_FSTP FCML_TEXT("fstp") #define M_FSTSW FCML_TEXT("fstsw") #define M_FSUB FCML_TEXT("fsub") #define M_FSUBP FCML_TEXT("fsubp") #define M_FSUBR FCML_TEXT("fsubr") #define M_FSUBRP FCML_TEXT("fsubrp") #define M_FTST FCML_TEXT("ftst") #define M_FUCOM FCML_TEXT("fucom") #define M_FUCOMI FCML_TEXT("fucomi") #define M_FUCOMIP FCML_TEXT("fucomip") #define M_FUCOMP FCML_TEXT("fucomp") #define M_FUCOMPP FCML_TEXT("fucompp") #define M_FWAIT FCML_TEXT("fwait") #define M_FXAM FCML_TEXT("fxam") #define M_FXCH FCML_TEXT("fxch") #define M_FXRSTOR FCML_TEXT("fxrstor") #define M_FXRSTOR64 FCML_TEXT("fxrstor64") #define M_FXSAVE FCML_TEXT("fxsave") #define M_FXSAVE64 FCML_TEXT("fxsave64") #define M_FXTRACT FCML_TEXT("fxtract") #define M_FYL2X FCML_TEXT("fyl2x") #define M_FYL2XP1 FCML_TEXT("fyl2xp1") #define M_GETSEC FCML_TEXT("getsec") #define M_HADDPD FCML_TEXT("haddpd") #define M_HADDPS FCML_TEXT("haddps") #define M_HLT FCML_TEXT("hlt") #define M_HSUBPD FCML_TEXT("hsubpd") #define M_HSUBPS FCML_TEXT("hsubps") #define M_IDIV FCML_TEXT("idiv") #define M_IMUL FCML_TEXT("imul") #define M_IN FCML_TEXT("in") #define M_INC FCML_TEXT("inc") #define M_INS FCML_TEXT("ins") #define M_INSB FCML_TEXT("insb") #define M_INSD FCML_TEXT("insd") #define M_INSERTPS FCML_TEXT("insertps") #define M_INSERTQ FCML_TEXT("insertq") #define M_INSW FCML_TEXT("insw") #define M_INT FCML_TEXT("int") #define M_INT3 FCML_TEXT("int3") #define M_INTO FCML_TEXT("into") #define M_INVD FCML_TEXT("invd") #define M_INVEPT FCML_TEXT("invept") #define M_INVLPG FCML_TEXT("invlpg") #define M_INVLPGA FCML_TEXT("invlpga") #define M_INVPCID FCML_TEXT("invpcid") #define M_INVVPID FCML_TEXT("invvpid") #define M_IRET FCML_TEXT("iret") #define M_IRETD FCML_TEXT("iretd") #define M_IRETQ FCML_TEXT("iretq") #define M_JO FCML_TEXT("jo"); #define M_JNO FCML_TEXT("jno"); #define M_JB FCML_TEXT("jb"); #define M_JNB FCML_TEXT("jnb"); #define M_JE FCML_TEXT("je"); #define M_JNE FCML_TEXT("jne"); #define M_JBE FCML_TEXT("jbe"); #define M_JNBE FCML_TEXT("jnbe"); #define M_JS FCML_TEXT("js"); #define M_JNS FCML_TEXT("jns"); #define M_JP FCML_TEXT("jp"); #define M_JNP FCML_TEXT("jnp"); #define M_JL FCML_TEXT("jl"); #define M_JNL FCML_TEXT("jnl"); #define M_JLE FCML_TEXT("jle"); #define M_JNLE FCML_TEXT("jnle"); #define M_JNAE FCML_TEXT("jnae"); #define M_JAE FCML_TEXT("jae"); #define M_JZ FCML_TEXT("jz"); #define M_JNZ FCML_TEXT("jnz"); #define M_JNA FCML_TEXT("jna"); #define M_JA FCML_TEXT("ja"); #define M_JPE FCML_TEXT("jpe"); #define M_JPO FCML_TEXT("jpo"); #define M_JNGE FCML_TEXT("jnge"); #define M_JGE FCML_TEXT("jge"); #define M_JNG FCML_TEXT("jng"); #define M_JG FCML_TEXT("jg"); #define M_JC FCML_TEXT("jc"); #define M_JNC FCML_TEXT("jnc"); #define M_JCXZ FCML_TEXT("jcxz") #define M_JECXZ FCML_TEXT("jecxz") #define M_JMP FCML_TEXT("jmp") #define M_JRCXZ FCML_TEXT("jrcxz") #define M_LAHF FCML_TEXT("lahf") #define M_LAR FCML_TEXT("lar") #define M_LDDQU FCML_TEXT("lddqu") #define M_LDMXCSR FCML_TEXT("ldmxcsr") #define M_LDS FCML_TEXT("lds") #define M_LEA FCML_TEXT("lea") #define M_LEAVE FCML_TEXT("leave") #define M_LES FCML_TEXT("les") #define M_LFENCE FCML_TEXT("lfence") #define M_LFS FCML_TEXT("lfs") #define M_LGDT FCML_TEXT("lgdt") #define M_LGS FCML_TEXT("lgs") #define M_LIDT FCML_TEXT("lidt") #define M_LLDT FCML_TEXT("lldt") #define M_LLWPCB FCML_TEXT("llwpcb") #define M_LMSW FCML_TEXT("lmsw") #define M_LODS FCML_TEXT("lods") #define M_LODSB FCML_TEXT("lodsb") #define M_LODSD FCML_TEXT("lodsd") #define M_LODSQ FCML_TEXT("lodsq") #define M_LODSW FCML_TEXT("lodsw") #define M_LOOP FCML_TEXT("loop") #define M_LOOPE FCML_TEXT("loope") #define M_LOOPNE FCML_TEXT("loopne") #define M_LOOPNZ FCML_TEXT("loopnz") #define M_LOOPZ FCML_TEXT("loopz") #define M_LSL FCML_TEXT("lsl") #define M_LSS FCML_TEXT("lss") #define M_LTR FCML_TEXT("ltr") #define M_LWPINS FCML_TEXT("lwpins") #define M_LWPVAL FCML_TEXT("lwpval") #define M_LZCNT FCML_TEXT("lzcnt") #define M_MASKMOVDQU FCML_TEXT("maskmovdqu") #define M_MASKMOVQ FCML_TEXT("maskmovq") #define M_MAXPD FCML_TEXT("maxpd") #define M_MAXPS FCML_TEXT("maxps") #define M_MAXSD FCML_TEXT("maxsd") #define M_MAXSS FCML_TEXT("maxss") #define M_MFENCE FCML_TEXT("mfence") #define M_MINPD FCML_TEXT("minpd") #define M_MINPS FCML_TEXT("minps") #define M_MINSD FCML_TEXT("minsd") #define M_MINSS FCML_TEXT("minss") #define M_MONITOR FCML_TEXT("monitor") #define M_MOV FCML_TEXT("mov") #define M_MOVAPD FCML_TEXT("movapd") #define M_MOVAPS FCML_TEXT("movaps") #define M_MOVBE FCML_TEXT("movbe") #define M_MOVD FCML_TEXT("movd") #define M_MOVDDUP FCML_TEXT("movddup") #define M_MOVDQ2Q FCML_TEXT("movdq2q") #define M_MOVDQA FCML_TEXT("movdqa") #define M_MOVDQU FCML_TEXT("movdqu") #define M_MOVHLPS FCML_TEXT("movhlps") #define M_MOVHPD FCML_TEXT("movhpd") #define M_MOVHPS FCML_TEXT("movhps") #define M_MOVLHPS FCML_TEXT("movlhps") #define M_MOVLPD FCML_TEXT("movlpd") #define M_MOVLPS FCML_TEXT("movlps") #define M_MOVMSKPD FCML_TEXT("movmskpd") #define M_MOVMSKPS FCML_TEXT("movmskps") #define M_MOVNTDQ FCML_TEXT("movntdq") #define M_MOVNTDQA FCML_TEXT("movntdqa") #define M_MOVNTI FCML_TEXT("movnti") #define M_MOVNTPD FCML_TEXT("movntpd") #define M_MOVNTPS FCML_TEXT("movntps") #define M_MOVNTQ FCML_TEXT("movntq") #define M_MOVNTSD FCML_TEXT("movntsd") #define M_MOVNTSS FCML_TEXT("movntss") #define M_MOVQ FCML_TEXT("movq") #define M_MOVQ2DQ FCML_TEXT("movq2dq") #define M_MOVS FCML_TEXT("movs") #define M_MOVSB FCML_TEXT("movsb") #define M_MOVSD FCML_TEXT("movsd") #define M_MOVSHDUP FCML_TEXT("movshdup") #define M_MOVSLDUP FCML_TEXT("movsldup") #define M_MOVSQ FCML_TEXT("movsq") #define M_MOVSS FCML_TEXT("movss") #define M_MOVSW FCML_TEXT("movsw") #define M_MOVSX FCML_TEXT("movsx") #define M_MOVSXD FCML_TEXT("movsxd") #define M_MOVUPD FCML_TEXT("movupd") #define M_MOVUPS FCML_TEXT("movups") #define M_MOVZX FCML_TEXT("movzx") #define M_MPSADBW FCML_TEXT("mpsadbw") #define M_MUL FCML_TEXT("mul") #define M_MULPD FCML_TEXT("mulpd") #define M_MULPS FCML_TEXT("mulps") #define M_MULSD FCML_TEXT("mulsd") #define M_MULSS FCML_TEXT("mulss") #define M_MULX FCML_TEXT("mulx") #define M_MWAIT FCML_TEXT("mwait") #define M_NEG FCML_TEXT("neg") #define M_NOP FCML_TEXT("nop") #define M_NOT FCML_TEXT("not") #define M_OR FCML_TEXT("or") #define M_ORPD FCML_TEXT("orpd") #define M_ORPS FCML_TEXT("orps") #define M_OUT FCML_TEXT("out") #define M_OUTS FCML_TEXT("outs") #define M_OUTSB FCML_TEXT("outsb") #define M_OUTSD FCML_TEXT("outsd") #define M_OUTSW FCML_TEXT("outsw") #define M_PABSB FCML_TEXT("pabsb") #define M_PABSD FCML_TEXT("pabsd") #define M_PABSW FCML_TEXT("pabsw") #define M_PACKSSDW FCML_TEXT("packssdw") #define M_PACKSSWB FCML_TEXT("packsswb") #define M_PACKUSDW FCML_TEXT("packusdw") #define M_PACKUSWB FCML_TEXT("packuswb") #define M_PADDB FCML_TEXT("paddb") #define M_PADDD FCML_TEXT("paddd") #define M_PADDQ FCML_TEXT("paddq") #define M_PADDSB FCML_TEXT("paddsb") #define M_PADDSW FCML_TEXT("paddsw") #define M_PADDUSB FCML_TEXT("paddusb") #define M_PADDUSW FCML_TEXT("paddusw") #define M_PADDW FCML_TEXT("paddw") #define M_PALIGNR FCML_TEXT("palignr") #define M_PAND FCML_TEXT("pand") #define M_PANDN FCML_TEXT("pandn") #define M_PAUSE FCML_TEXT("pause") #define M_PAVGB FCML_TEXT("pavgb") #define M_PAVGUSB FCML_TEXT("pavgusb") #define M_PAVGW FCML_TEXT("pavgw") #define M_PBLENDVB FCML_TEXT("pblendvb") #define M_PBLENDW FCML_TEXT("pblendw") #define M_PCLMULQDQ FCML_TEXT("pclmulqdq") #define M_PCMPEQB FCML_TEXT("pcmpeqb") #define M_PCMPEQD FCML_TEXT("pcmpeqd") #define M_PCMPEQQ FCML_TEXT("pcmpeqq") #define M_PCMPEQW FCML_TEXT("pcmpeqw") #define M_PCMPESTRI FCML_TEXT("pcmpestri") #define M_PCMPESTRM FCML_TEXT("pcmpestrm") #define M_PCMPGTB FCML_TEXT("pcmpgtb") #define M_PCMPGTD FCML_TEXT("pcmpgtd") #define M_PCMPGTQ FCML_TEXT("pcmpgtq") #define M_PCMPGTW FCML_TEXT("pcmpgtw") #define M_PCMPISTRI FCML_TEXT("pcmpistri") #define M_PCMPISTRM FCML_TEXT("pcmpistrm") #define M_PDEP FCML_TEXT("pdep") #define M_PEXT FCML_TEXT("pext") #define M_PEXTRB FCML_TEXT("pextrb") #define M_PEXTRD FCML_TEXT("pextrd") #define M_PEXTRQ FCML_TEXT("pextrq") #define M_PEXTRW FCML_TEXT("pextrw") #define M_PF2ID FCML_TEXT("pf2id") #define M_PF2IW FCML_TEXT("pf2iw") #define M_PFACC FCML_TEXT("pfacc") #define M_PFADD FCML_TEXT("pfadd") #define M_PFCMPEQ FCML_TEXT("pfcmpeq") #define M_PFCMPGE FCML_TEXT("pfcmpge") #define M_PFCMPGT FCML_TEXT("pfcmpgt") #define M_PFMAX FCML_TEXT("pfmax") #define M_PFMIN FCML_TEXT("pfmin") #define M_PFMUL FCML_TEXT("pfmul") #define M_PFNACC FCML_TEXT("pfnacc") #define M_PFPNACC FCML_TEXT("pfpnacc") #define M_PFRCP FCML_TEXT("pfrcp") #define M_PFRCPIT1 FCML_TEXT("pfrcpit1") #define M_PFRCPIT2 FCML_TEXT("pfrcpit2") #define M_PFRSQIT1 FCML_TEXT("pfrsqit1") #define M_PFRSQRT FCML_TEXT("pfrsqrt") #define M_PFSUB FCML_TEXT("pfsub") #define M_PFSUBR FCML_TEXT("pfsubr") #define M_PHADDD FCML_TEXT("phaddd") #define M_PHADDSW FCML_TEXT("phaddsw") #define M_PHADDW FCML_TEXT("phaddw") #define M_PHMINPOSUW FCML_TEXT("phminposuw") #define M_PHSUBD FCML_TEXT("phsubd") #define M_PHSUBSW FCML_TEXT("phsubsw") #define M_PHSUBW FCML_TEXT("phsubw") #define M_PI2FD FCML_TEXT("pi2fd") #define M_PI2FW FCML_TEXT("pi2fw") #define M_PINSRB FCML_TEXT("pinsrb") #define M_PINSRD FCML_TEXT("pinsrd") #define M_PINSRQ FCML_TEXT("pinsrq") #define M_PINSRW FCML_TEXT("pinsrw") #define M_PMADDUBSW FCML_TEXT("pmaddubsw") #define M_PMADDWD FCML_TEXT("pmaddwd") #define M_PMAXSB FCML_TEXT("pmaxsb") #define M_PMAXSD FCML_TEXT("pmaxsd") #define M_PMAXSW FCML_TEXT("pmaxsw") #define M_PMAXUB FCML_TEXT("pmaxub") #define M_PMAXUD FCML_TEXT("pmaxud") #define M_PMAXUW FCML_TEXT("pmaxuw") #define M_PMINSB FCML_TEXT("pminsb") #define M_PMINSD FCML_TEXT("pminsd") #define M_PMINSW FCML_TEXT("pminsw") #define M_PMINUB FCML_TEXT("pminub") #define M_PMINUD FCML_TEXT("pminud") #define M_PMINUW FCML_TEXT("pminuw") #define M_PMOVMSKB FCML_TEXT("pmovmskb") #define M_PMOVSXBD FCML_TEXT("pmovsxbd") #define M_PMOVSXBQ FCML_TEXT("pmovsxbq") #define M_PMOVSXBW FCML_TEXT("pmovsxbw") #define M_PMOVSXDQ FCML_TEXT("pmovsxdq") #define M_PMOVSXWD FCML_TEXT("pmovsxwd") #define M_PMOVSXWQ FCML_TEXT("pmovsxwq") #define M_PMOVZXBD FCML_TEXT("pmovzxbd") #define M_PMOVZXBQ FCML_TEXT("pmovzxbq") #define M_PMOVZXBW FCML_TEXT("pmovzxbw") #define M_PMOVZXDQ FCML_TEXT("pmovzxdq") #define M_PMOVZXWD FCML_TEXT("pmovzxwd") #define M_PMOVZXWQ FCML_TEXT("pmovzxwq") #define M_PMULDQ FCML_TEXT("pmuldq") #define M_PMULHRSW FCML_TEXT("pmulhrsw") #define M_PMULHRW FCML_TEXT("pmulhrw") #define M_PMULHUW FCML_TEXT("pmulhuw") #define M_PMULHW FCML_TEXT("pmulhw") #define M_PMULLD FCML_TEXT("pmulld") #define M_PMULLW FCML_TEXT("pmullw") #define M_PMULUDQ FCML_TEXT("pmuludq") #define M_POP FCML_TEXT("pop") #define M_POPA FCML_TEXT("popa") #define M_POPAD FCML_TEXT("popad") #define M_POPCNT FCML_TEXT("popcnt") #define M_POPF FCML_TEXT("popf") #define M_POPFD FCML_TEXT("popfd") #define M_POPFQ FCML_TEXT("popfq") #define M_POR FCML_TEXT("por") #define M_PREFETCH FCML_TEXT("prefetch") #define M_PREFETCHNTA FCML_TEXT("prefetchnta") #define M_PREFETCHT0 FCML_TEXT("prefetcht0") #define M_PREFETCHT1 FCML_TEXT("prefetcht1") #define M_PREFETCHT2 FCML_TEXT("prefetcht2") #define M_PREFETCHW FCML_TEXT("prefetchw") #define M_PSADBW FCML_TEXT("psadbw") #define M_PSHUFB FCML_TEXT("pshufb") #define M_PSHUFD FCML_TEXT("pshufd") #define M_PSHUFHW FCML_TEXT("pshufhw") #define M_PSHUFLW FCML_TEXT("pshuflw") #define M_PSHUFW FCML_TEXT("pshufw") #define M_PSIGNB FCML_TEXT("psignb") #define M_PSIGND FCML_TEXT("psignd") #define M_PSIGNW FCML_TEXT("psignw") #define M_PSLLD FCML_TEXT("pslld") #define M_PSLLDQ FCML_TEXT("pslldq") #define M_PSLLQ FCML_TEXT("psllq") #define M_PSLLW FCML_TEXT("psllw") #define M_PSRAD FCML_TEXT("psrad") #define M_PSRAW FCML_TEXT("psraw") #define M_PSRLD FCML_TEXT("psrld") #define M_PSRLDQ FCML_TEXT("psrldq") #define M_PSRLQ FCML_TEXT("psrlq") #define M_PSRLW FCML_TEXT("psrlw") #define M_PSUBB FCML_TEXT("psubb") #define M_PSUBD FCML_TEXT("psubd") #define M_PSUBQ FCML_TEXT("psubq") #define M_PSUBSB FCML_TEXT("psubsb") #define M_PSUBSW FCML_TEXT("psubsw") #define M_PSUBUSB FCML_TEXT("psubusb") #define M_PSUBUSW FCML_TEXT("psubusw") #define M_PSUBW FCML_TEXT("psubw") #define M_PSWAPD FCML_TEXT("pswapd") #define M_PTEST FCML_TEXT("ptest") #define M_PUNPCKHBW FCML_TEXT("punpckhbw") #define M_PUNPCKHDQ FCML_TEXT("punpckhdq") #define M_PUNPCKHQDQ FCML_TEXT("punpckhqdq") #define M_PUNPCKHWD FCML_TEXT("punpckhwd") #define M_PUNPCKLBW FCML_TEXT("punpcklbw") #define M_PUNPCKLDQ FCML_TEXT("punpckldq") #define M_PUNPCKLQDQ FCML_TEXT("punpcklqdq") #define M_PUNPCKLWD FCML_TEXT("punpcklwd") #define M_PUSH FCML_TEXT("push") #define M_PUSHA FCML_TEXT("pusha") #define M_PUSHAD FCML_TEXT("pushad") #define M_PUSHF FCML_TEXT("pushf") #define M_PUSHFD FCML_TEXT("pushfd") #define M_PUSHFQ FCML_TEXT("pushfq") #define M_PXOR FCML_TEXT("pxor") #define M_RCL FCML_TEXT("rcl") #define M_RCPPS FCML_TEXT("rcpps") #define M_RCPSS FCML_TEXT("rcpss") #define M_RCR FCML_TEXT("rcr") #define M_RDFSBASE FCML_TEXT("rdfsbase") #define M_RDGSBASE FCML_TEXT("rdgsbase") #define M_RDMSR FCML_TEXT("rdmsr") #define M_RDPMC FCML_TEXT("rdpmc") #define M_RDRAND FCML_TEXT("rdrand") #define M_RDSEED FCML_TEXT("rdseed") #define M_RDTSC FCML_TEXT("rdtsc") #define M_RDTSCP FCML_TEXT("rdtscp") #define M_RET FCML_TEXT("ret") #define M_RETF FCML_TEXT("retf") #define M_ROL FCML_TEXT("rol") #define M_ROR FCML_TEXT("ror") #define M_RORX FCML_TEXT("rorx") #define M_ROUNDPD FCML_TEXT("roundpd") #define M_ROUNDPS FCML_TEXT("roundps") #define M_ROUNDSD FCML_TEXT("roundsd") #define M_ROUNDSS FCML_TEXT("roundss") #define M_RSM FCML_TEXT("rsm") #define M_RSQRTPS FCML_TEXT("rsqrtps") #define M_RSQRTSS FCML_TEXT("rsqrtss") #define M_SAHF FCML_TEXT("sahf") #define M_SAL FCML_TEXT("sal") #define M_SAR FCML_TEXT("sar") #define M_SARX FCML_TEXT("sarx") #define M_SBB FCML_TEXT("sbb") #define M_SCAS FCML_TEXT("scas") #define M_SCASB FCML_TEXT("scasb") #define M_SCASD FCML_TEXT("scasd") #define M_SCASQ FCML_TEXT("scasq") #define M_SCASW FCML_TEXT("scasw") #define M_SETO FCML_TEXT("seto"); #define M_SETNO FCML_TEXT("setno"); #define M_SETB FCML_TEXT("setb"); #define M_SETNB FCML_TEXT("setnb"); #define M_SETE FCML_TEXT("sete"); #define M_SETNE FCML_TEXT("setne"); #define M_SETBE FCML_TEXT("setbe"); #define M_SETNBE FCML_TEXT("setnbe"); #define M_SETS FCML_TEXT("sets"); #define M_SETNS FCML_TEXT("setns"); #define M_SETP FCML_TEXT("setp"); #define M_SETNP FCML_TEXT("setnp"); #define M_SETL FCML_TEXT("setl"); #define M_SETNL FCML_TEXT("setnl"); #define M_SETLE FCML_TEXT("setle"); #define M_SETNLE FCML_TEXT("setnle"); #define M_SETNAE FCML_TEXT("setnae"); #define M_SETAE FCML_TEXT("setae"); #define M_SETZ FCML_TEXT("setz"); #define M_SETNZ FCML_TEXT("setnz"); #define M_SETNA FCML_TEXT("setna"); #define M_SETA FCML_TEXT("seta"); #define M_SETPE FCML_TEXT("setpe"); #define M_SETPO FCML_TEXT("setpo"); #define M_SETNGE FCML_TEXT("setnge"); #define M_SETGE FCML_TEXT("setge"); #define M_SETNG FCML_TEXT("setng"); #define M_SETG FCML_TEXT("setg"); #define M_SETC FCML_TEXT("setc"); #define M_SETNC FCML_TEXT("setnc"); #define M_SFENCE FCML_TEXT("sfence") #define M_SGDT FCML_TEXT("sgdt") #define M_SHL FCML_TEXT("shl") #define M_SHLD FCML_TEXT("shld") #define M_SHLX FCML_TEXT("shlx") #define M_SHR FCML_TEXT("shr") #define M_SHRD FCML_TEXT("shrd") #define M_SHRX FCML_TEXT("shrx") #define M_SHUFPD FCML_TEXT("shufpd") #define M_SHUFPS FCML_TEXT("shufps") #define M_SIDT FCML_TEXT("sidt") #define M_SKINIT FCML_TEXT("skinit") #define M_SLDT FCML_TEXT("sldt") #define M_SLWPCB FCML_TEXT("slwpcb") #define M_SMSW FCML_TEXT("smsw") #define M_SQRTPD FCML_TEXT("sqrtpd") #define M_SQRTPS FCML_TEXT("sqrtps") #define M_SQRTSD FCML_TEXT("sqrtsd") #define M_SQRTSS FCML_TEXT("sqrtss") #define M_STAC FCML_TEXT("stac") #define M_STC FCML_TEXT("stc") #define M_STD FCML_TEXT("std") #define M_STGI FCML_TEXT("stgi") #define M_STI FCML_TEXT("sti") #define M_STMXCSR FCML_TEXT("stmxcsr") #define M_STOS FCML_TEXT("stos") #define M_STOSB FCML_TEXT("stosb") #define M_STOSD FCML_TEXT("stosd") #define M_STOSQ FCML_TEXT("stosq") #define M_STOSW FCML_TEXT("stosw") #define M_STR FCML_TEXT("str") #define M_SUB FCML_TEXT("sub") #define M_SUBPD FCML_TEXT("subpd") #define M_SUBPS FCML_TEXT("subps") #define M_SUBSD FCML_TEXT("subsd") #define M_SUBSS FCML_TEXT("subss") #define M_SWAPGS FCML_TEXT("swapgs") #define M_SYSCALL FCML_TEXT("syscall") #define M_SYSENTER FCML_TEXT("sysenter") #define M_SYSEXIT FCML_TEXT("sysexit") #define M_SYSRET FCML_TEXT("sysret") #define M_T1MSKC FCML_TEXT("t1mskc") #define M_TEST FCML_TEXT("test") #define M_TZCNT FCML_TEXT("tzcnt") #define M_TZMSK FCML_TEXT("tzmsk") #define M_UCOMISD FCML_TEXT("ucomisd") #define M_UCOMISS FCML_TEXT("ucomiss") #define M_UD2 FCML_TEXT("ud2") #define M_UNPCKHPD FCML_TEXT("unpckhpd") #define M_UNPCKHPS FCML_TEXT("unpckhps") #define M_UNPCKLPD FCML_TEXT("unpcklpd") #define M_UNPCKLPS FCML_TEXT("unpcklps") #define M_VADDPD FCML_TEXT("vaddpd") #define M_VADDPS FCML_TEXT("vaddps") #define M_VADDSD FCML_TEXT("vaddsd") #define M_VADDSS FCML_TEXT("vaddss") #define M_VADDSUBPD FCML_TEXT("vaddsubpd") #define M_VADDSUBPS FCML_TEXT("vaddsubps") #define M_VAESDEC FCML_TEXT("vaesdec") #define M_VAESDECLAST FCML_TEXT("vaesdeclast") #define M_VAESENC FCML_TEXT("vaesenc") #define M_VAESENCLAST FCML_TEXT("vaesenclast") #define M_VAESIMC FCML_TEXT("vaesimc") #define M_VAESKEYGENASSIST FCML_TEXT("vaeskeygenassist") #define M_VANDNPD FCML_TEXT("vandnpd") #define M_VANDNPS FCML_TEXT("vandnps") #define M_VANDPD FCML_TEXT("vandpd") #define M_VANDPS FCML_TEXT("vandps") #define M_VBLENDPD FCML_TEXT("vblendpd") #define M_VBLENDPS FCML_TEXT("vblendps") #define M_VBLENDVPD FCML_TEXT("vblendvpd") #define M_VBLENDVPS FCML_TEXT("vblendvps") #define M_VBROADCASTF128 FCML_TEXT("vbroadcastf128") #define M_VBROADCASTI128 FCML_TEXT("vbroadcasti128") #define M_VBROADCASTSD FCML_TEXT("vbroadcastsd") #define M_VBROADCASTSS FCML_TEXT("vbroadcastss") #define M_VCMPEQ_OSSD FCML_TEXT("vcmpeq_ossd") #define M_VCMPEQ_OSSS FCML_TEXT("vcmpeq_osss") #define M_VCMPEQSD FCML_TEXT("vcmpeqsd") #define M_VCMPEQSS FCML_TEXT("vcmpeqss") #define M_VCMPEQ_UQSD FCML_TEXT("vcmpeq_uqsd") #define M_VCMPEQ_UQSS FCML_TEXT("vcmpeq_uqss") #define M_VCMPEQ_USSD FCML_TEXT("vcmpeq_ussd") #define M_VCMPEQ_USSS FCML_TEXT("vcmpeq_usss") #define M_VCMPFALSE_OSSD FCML_TEXT("vcmpfalse_ossd") #define M_VCMPFALSE_OSSS FCML_TEXT("vcmpfalse_osss") #define M_VCMPFALSESD FCML_TEXT("vcmpfalsesd") #define M_VCMPFALSESS FCML_TEXT("vcmpfalsess") #define M_VCMPGE_OQSD FCML_TEXT("vcmpge_oqsd") #define M_VCMPGE_OQSS FCML_TEXT("vcmpge_oqss") #define M_VCMPGESD FCML_TEXT("vcmpgesd") #define M_VCMPGESS FCML_TEXT("vcmpgess") #define M_VCMPGT_OQSD FCML_TEXT("vcmpgt_oqsd") #define M_VCMPGT_OQSS FCML_TEXT("vcmpgt_oqss") #define M_VCMPGTSD FCML_TEXT("vcmpgtsd") #define M_VCMPGTSS FCML_TEXT("vcmpgtss") #define M_VCMPLE_OQSD FCML_TEXT("vcmple_oqsd") #define M_VCMPLE_OQSS FCML_TEXT("vcmple_oqss") #define M_VCMPLESD FCML_TEXT("vcmplesd") #define M_VCMPLESS FCML_TEXT("vcmpless") #define M_VCMPLT_OQSD FCML_TEXT("vcmplt_oqsd") #define M_VCMPLT_OQSS FCML_TEXT("vcmplt_oqss") #define M_VCMPLTSD FCML_TEXT("vcmpltsd") #define M_VCMPLTSS FCML_TEXT("vcmpltss") #define M_VCMPNEQ_OQSD FCML_TEXT("vcmpneq_oqsd") #define M_VCMPNEQ_OQSS FCML_TEXT("vcmpneq_oqss") #define M_VCMPNEQ_OSSD FCML_TEXT("vcmpneq_ossd") #define M_VCMPNEQ_OSSS FCML_TEXT("vcmpneq_osss") #define M_VCMPNEQSD FCML_TEXT("vcmpneqsd") #define M_VCMPNEQSS FCML_TEXT("vcmpneqss") #define M_VCMPNEQ_USSD FCML_TEXT("vcmpneq_ussd") #define M_VCMPNEQ_USSS FCML_TEXT("vcmpneq_usss") #define M_VCMPNGESD FCML_TEXT("vcmpngesd") #define M_VCMPNGESS FCML_TEXT("vcmpngess") #define M_VCMPNGE_UQSD FCML_TEXT("vcmpnge_uqsd") #define M_VCMPNGE_UQSS FCML_TEXT("vcmpnge_uqss") #define M_VCMPNGTSD FCML_TEXT("vcmpngtsd") #define M_VCMPNGTSS FCML_TEXT("vcmpngtss") #define M_VCMPNGT_UQSD FCML_TEXT("vcmpngt_uqsd") #define M_VCMPNGT_UQSS FCML_TEXT("vcmpngt_uqss") #define M_VCMPNLESD FCML_TEXT("vcmpnlesd") #define M_VCMPNLESS FCML_TEXT("vcmpnless") #define M_VCMPNLE_UQSD FCML_TEXT("vcmpnle_uqsd") #define M_VCMPNLE_UQSS FCML_TEXT("vcmpnle_uqss") #define M_VCMPNLTSD FCML_TEXT("vcmpnltsd") #define M_VCMPNLTSS FCML_TEXT("vcmpnltss") #define M_VCMPNLT_UQSD FCML_TEXT("vcmpnlt_uqsd") #define M_VCMPNLT_UQSS FCML_TEXT("vcmpnlt_uqss") #define M_VCMPORDSD FCML_TEXT("vcmpordsd") #define M_VCMPORDSS FCML_TEXT("vcmpordss") #define M_VCMPORD_SSD FCML_TEXT("vcmpord_ssd") #define M_VCMPORD_SSS FCML_TEXT("vcmpord_sss") #define M_VCMPPD FCML_TEXT("vcmppd") #define M_VCMPPS FCML_TEXT("vcmpps") #define M_VCMPSD FCML_TEXT("vcmpsd") #define M_VCMPSS FCML_TEXT("vcmpss") #define M_VCMPTRUESD FCML_TEXT("vcmptruesd") #define M_VCMPTRUESS FCML_TEXT("vcmptruess") #define M_VCMPTRUE_USSD FCML_TEXT("vcmptrue_ussd") #define M_VCMPTRUE_USSS FCML_TEXT("vcmptrue_usss") #define M_VCMPUNORDSD FCML_TEXT("vcmpunordsd") #define M_VCMPUNORDSS FCML_TEXT("vcmpunordss") #define M_VCMPUNORD_SSD FCML_TEXT("vcmpunord_ssd") #define M_VCMPUNORD_SSS FCML_TEXT("vcmpunord_sss") #define M_VCOMISD FCML_TEXT("vcomisd") #define M_VCOMISS FCML_TEXT("vcomiss") #define M_VCVTDQ2PD FCML_TEXT("vcvtdq2pd") #define M_VCVTDQ2PS FCML_TEXT("vcvtdq2ps") #define M_VCVTPD2DQ FCML_TEXT("vcvtpd2dq") #define M_VCVTPD2PS FCML_TEXT("vcvtpd2ps") #define M_VCVTPH2PS FCML_TEXT("vcvtph2ps") #define M_VCVTPS2DQ FCML_TEXT("vcvtps2dq") #define M_VCVTPS2PD FCML_TEXT("vcvtps2pd") #define M_VCVTPS2PH FCML_TEXT("vcvtps2ph") #define M_VCVTSD2SI FCML_TEXT("vcvtsd2si") #define M_VCVTSD2SS FCML_TEXT("vcvtsd2ss") #define M_VCVTSI2SD FCML_TEXT("vcvtsi2sd") #define M_VCVTSI2SS FCML_TEXT("vcvtsi2ss") #define M_VCVTSS2SD FCML_TEXT("vcvtss2sd") #define M_VCVTSS2SI FCML_TEXT("vcvtss2si") #define M_VCVTTPD2DQ FCML_TEXT("vcvttpd2dq") #define M_VCVTTPS2DQ FCML_TEXT("vcvttps2dq") #define M_VCVTTSD2SI FCML_TEXT("vcvttsd2si") #define M_VCVTTSS2SI FCML_TEXT("vcvttss2si") #define M_VDIVPD FCML_TEXT("vdivpd") #define M_VDIVPS FCML_TEXT("vdivps") #define M_VDIVSD FCML_TEXT("vdivsd") #define M_VDIVSS FCML_TEXT("vdivss") #define M_VDPPD FCML_TEXT("vdppd") #define M_VDPPS FCML_TEXT("vdpps") #define M_VERR FCML_TEXT("verr") #define M_VERW FCML_TEXT("verw") #define M_VEXTRACTF128 FCML_TEXT("vextractf128") #define M_VEXTRACTI128 FCML_TEXT("vextracti128") #define M_VEXTRACTPS FCML_TEXT("vextractps") #define M_VFMADD132PD FCML_TEXT("vfmadd132pd") #define M_VFMADD132PS FCML_TEXT("vfmadd132ps") #define M_VFMADD132SD FCML_TEXT("vfmadd132sd") #define M_VFMADD132SS FCML_TEXT("vfmadd132ss") #define M_VFMADD213PD FCML_TEXT("vfmadd213pd") #define M_VFMADD213PS FCML_TEXT("vfmadd213ps") #define M_VFMADD213SD FCML_TEXT("vfmadd213sd") #define M_VFMADD213SS FCML_TEXT("vfmadd213ss") #define M_VFMADD231PD FCML_TEXT("vfmadd231pd") #define M_VFMADD231PS FCML_TEXT("vfmadd231ps") #define M_VFMADD231SD FCML_TEXT("vfmadd231sd") #define M_VFMADD231SS FCML_TEXT("vfmadd231ss") #define M_VFMADDPD FCML_TEXT("vfmaddpd") #define M_VFMADDPS FCML_TEXT("vfmaddps") #define M_VFMADDSD FCML_TEXT("vfmaddsd") #define M_VFMADDSS FCML_TEXT("vfmaddss") #define M_VFMADDSUB132PD FCML_TEXT("vfmaddsub132pd") #define M_VFMADDSUB132PS FCML_TEXT("vfmaddsub132ps") #define M_VFMADDSUB213PD FCML_TEXT("vfmaddsub213pd") #define M_VFMADDSUB213PS FCML_TEXT("vfmaddsub213ps") #define M_VFMADDSUB231PD FCML_TEXT("vfmaddsub231pd") #define M_VFMADDSUB231PS FCML_TEXT("vfmaddsub231ps") #define M_VFMADDSUBPD FCML_TEXT("vfmaddsubpd") #define M_VFMADDSUBPS FCML_TEXT("vfmaddsubps") #define M_VFMSUB132PD FCML_TEXT("vfmsub132pd") #define M_VFMSUB132PS FCML_TEXT("vfmsub132ps") #define M_VFMSUB132SD FCML_TEXT("vfmsub132sd") #define M_VFMSUB132SS FCML_TEXT("vfmsub132ss") #define M_VFMSUB213PD FCML_TEXT("vfmsub213pd") #define M_VFMSUB213PS FCML_TEXT("vfmsub213ps") #define M_VFMSUB213SD FCML_TEXT("vfmsub213sd") #define M_VFMSUB213SS FCML_TEXT("vfmsub213ss") #define M_VFMSUB231PD FCML_TEXT("vfmsub231pd") #define M_VFMSUB231PS FCML_TEXT("vfmsub231ps") #define M_VFMSUB231SD FCML_TEXT("vfmsub231sd") #define M_VFMSUB231SS FCML_TEXT("vfmsub231ss") #define M_VFMSUBADD132PD FCML_TEXT("vfmsubadd132pd") #define M_VFMSUBADD132PS FCML_TEXT("vfmsubadd132ps") #define M_VFMSUBADD213PD FCML_TEXT("vfmsubadd213pd") #define M_VFMSUBADD213PS FCML_TEXT("vfmsubadd213ps") #define M_VFMSUBADD231PD FCML_TEXT("vfmsubadd231pd") #define M_VFMSUBADD231PS FCML_TEXT("vfmsubadd231ps") #define M_VFMSUBADDPD FCML_TEXT("vfmsubaddpd") #define M_VFMSUBADDPS FCML_TEXT("vfmsubaddps") #define M_VFMSUBPD FCML_TEXT("vfmsubpd") #define M_VFMSUBPS FCML_TEXT("vfmsubps") #define M_VFMSUBSD FCML_TEXT("vfmsubsd") #define M_VFMSUBSS FCML_TEXT("vfmsubss") #define M_VFNMADD132PD FCML_TEXT("vfnmadd132pd") #define M_VFNMADD132PS FCML_TEXT("vfnmadd132ps") #define M_VFNMADD132SD FCML_TEXT("vfnmadd132sd") #define M_VFNMADD132SS FCML_TEXT("vfnmadd132ss") #define M_VFNMADD213PD FCML_TEXT("vfnmadd213pd") #define M_VFNMADD213PS FCML_TEXT("vfnmadd213ps") #define M_VFNMADD213SD FCML_TEXT("vfnmadd213sd") #define M_VFNMADD213SS FCML_TEXT("vfnmadd213ss") #define M_VFNMADD231PD FCML_TEXT("vfnmadd231pd") #define M_VFNMADD231PS FCML_TEXT("vfnmadd231ps") #define M_VFNMADD231SD FCML_TEXT("vfnmadd231sd") #define M_VFNMADD231SS FCML_TEXT("vfnmadd231ss") #define M_VFNMADDPD FCML_TEXT("vfnmaddpd") #define M_VFNMADDPS FCML_TEXT("vfnmaddps") #define M_VFNMADDSD FCML_TEXT("vfnmaddsd") #define M_VFNMADDSS FCML_TEXT("vfnmaddss") #define M_VFNMSUB132PD FCML_TEXT("vfnmsub132pd") #define M_VFNMSUB132PS FCML_TEXT("vfnmsub132ps") #define M_VFNMSUB132SD FCML_TEXT("vfnmsub132sd") #define M_VFNMSUB132SS FCML_TEXT("vfnmsub132ss") #define M_VFNMSUB213PD FCML_TEXT("vfnmsub213pd") #define M_VFNMSUB213PS FCML_TEXT("vfnmsub213ps") #define M_VFNMSUB213SD FCML_TEXT("vfnmsub213sd") #define M_VFNMSUB213SS FCML_TEXT("vfnmsub213ss") #define M_VFNMSUB231PD FCML_TEXT("vfnmsub231pd") #define M_VFNMSUB231PS FCML_TEXT("vfnmsub231ps") #define M_VFNMSUB231SD FCML_TEXT("vfnmsub231sd") #define M_VFNMSUB231SS FCML_TEXT("vfnmsub231ss") #define M_VFNMSUBPD FCML_TEXT("vfnmsubpd") #define M_VFNMSUBPS FCML_TEXT("vfnmsubps") #define M_VFNMSUBSD FCML_TEXT("vfnmsubsd") #define M_VFNMSUBSS FCML_TEXT("vfnmsubss") #define M_VFRCZPD FCML_TEXT("vfrczpd") #define M_VFRCZPS FCML_TEXT("vfrczps") #define M_VFRCZSD FCML_TEXT("vfrczsd") #define M_VFRCZSS FCML_TEXT("vfrczss") #define M_VGATHERDPD FCML_TEXT("vgatherdpd") #define M_VGATHERDPS FCML_TEXT("vgatherdps") #define M_VGATHERQPD FCML_TEXT("vgatherqpd") #define M_VGATHERQPS FCML_TEXT("vgatherqps") #define M_VHADDPD FCML_TEXT("vhaddpd") #define M_VHADDPS FCML_TEXT("vhaddps") #define M_VHSUBPD FCML_TEXT("vhsubpd") #define M_VHSUBPS FCML_TEXT("vhsubps") #define M_VINSERTF128 FCML_TEXT("vinsertf128") #define M_VINSERTI128 FCML_TEXT("vinserti128") #define M_VINSERTPS FCML_TEXT("vinsertps") #define M_VLDDQU FCML_TEXT("vlddqu") #define M_VLDMXCSR FCML_TEXT("vldmxcsr") #define M_VMASKMOVDQU FCML_TEXT("vmaskmovdqu") #define M_VMASKMOVPD FCML_TEXT("vmaskmovpd") #define M_VMASKMOVPS FCML_TEXT("vmaskmovps") #define M_VMAXPD FCML_TEXT("vmaxpd") #define M_VMAXPS FCML_TEXT("vmaxps") #define M_VMAXSD FCML_TEXT("vmaxsd") #define M_VMAXSS FCML_TEXT("vmaxss") #define M_VMCALL FCML_TEXT("vmcall") #define M_VMCLEAR FCML_TEXT("vmclear") #define M_VMFUNC FCML_TEXT("vmfunc") #define M_VMINPD FCML_TEXT("vminpd") #define M_VMINPS FCML_TEXT("vminps") #define M_VMINSD FCML_TEXT("vminsd") #define M_VMINSS FCML_TEXT("vminss") #define M_VMLAUNCH FCML_TEXT("vmlaunch") #define M_VMLOAD FCML_TEXT("vmload") #define M_VMMCALL FCML_TEXT("vmmcall") #define M_VMOVAPD FCML_TEXT("vmovapd") #define M_VMOVAPS FCML_TEXT("vmovaps") #define M_VMOVD FCML_TEXT("vmovd") #define M_VMOVDDUP FCML_TEXT("vmovddup") #define M_VMOVDQA FCML_TEXT("vmovdqa") #define M_VMOVDQU FCML_TEXT("vmovdqu") #define M_VMOVHLPS FCML_TEXT("vmovhlps") #define M_VMOVHPD FCML_TEXT("vmovhpd") #define M_VMOVHPS FCML_TEXT("vmovhps") #define M_VMOVLHPS FCML_TEXT("vmovlhps") #define M_VMOVLPD FCML_TEXT("vmovlpd") #define M_VMOVLPS FCML_TEXT("vmovlps") #define M_VMOVMSKPD FCML_TEXT("vmovmskpd") #define M_VMOVMSKPS FCML_TEXT("vmovmskps") #define M_VMOVNTDQ FCML_TEXT("vmovntdq") #define M_VMOVNTDQA FCML_TEXT("vmovntdqa") #define M_VMOVNTPD FCML_TEXT("vmovntpd") #define M_VMOVNTPS FCML_TEXT("vmovntps") #define M_VMOVQ FCML_TEXT("vmovq") #define M_VMOVSD FCML_TEXT("vmovsd") #define M_VMOVSHDUP FCML_TEXT("vmovshdup") #define M_VMOVSLDUP FCML_TEXT("vmovsldup") #define M_VMOVSS FCML_TEXT("vmovss") #define M_VMOVUPD FCML_TEXT("vmovupd") #define M_VMOVUPS FCML_TEXT("vmovups") #define M_VMPSADBW FCML_TEXT("vmpsadbw") #define M_VMPTRLD FCML_TEXT("vmptrld") #define M_VMPTRST FCML_TEXT("vmptrst") #define M_VMREAD FCML_TEXT("vmread") #define M_VMRESUME FCML_TEXT("vmresume") #define M_VMRUN FCML_TEXT("vmrun") #define M_VMSAVE FCML_TEXT("vmsave") #define M_VMULPD FCML_TEXT("vmulpd") #define M_VMULPS FCML_TEXT("vmulps") #define M_VMULSD FCML_TEXT("vmulsd") #define M_VMULSS FCML_TEXT("vmulss") #define M_VMWRITE FCML_TEXT("vmwrite") #define M_VMXOFF FCML_TEXT("vmxoff") #define M_VMXON FCML_TEXT("vmxon") #define M_VORPD FCML_TEXT("vorpd") #define M_VORPS FCML_TEXT("vorps") #define M_VPABSB FCML_TEXT("vpabsb") #define M_VPABSD FCML_TEXT("vpabsd") #define M_VPABSW FCML_TEXT("vpabsw") #define M_VPACKSSDW FCML_TEXT("vpackssdw") #define M_VPACKSSWB FCML_TEXT("vpacksswb") #define M_VPACKUSDW FCML_TEXT("vpackusdw") #define M_VPACKUSWB FCML_TEXT("vpackuswb") #define M_VPADDB FCML_TEXT("vpaddb") #define M_VPADDD FCML_TEXT("vpaddd") #define M_VPADDQ FCML_TEXT("vpaddq") #define M_VPADDSB FCML_TEXT("vpaddsb") #define M_VPADDSW FCML_TEXT("vpaddsw") #define M_VPADDUSB FCML_TEXT("vpaddusb") #define M_VPADDUSW FCML_TEXT("vpaddusw") #define M_VPADDW FCML_TEXT("vpaddw") #define M_VPALIGNR FCML_TEXT("vpalignr") #define M_VPAND FCML_TEXT("vpand") #define M_VPANDN FCML_TEXT("vpandn") #define M_VPAVGB FCML_TEXT("vpavgb") #define M_VPAVGW FCML_TEXT("vpavgw") #define M_VPBLENDD FCML_TEXT("vpblendd") #define M_VPBLENDVB FCML_TEXT("vpblendvb") #define M_VPBLENDW FCML_TEXT("vpblendw") #define M_VPBROADCASTB FCML_TEXT("vpbroadcastb") #define M_VPBROADCASTD FCML_TEXT("vpbroadcastd") #define M_VPBROADCASTQ FCML_TEXT("vpbroadcastq") #define M_VPBROADCASTW FCML_TEXT("vpbroadcastw") #define M_VPCLMULQDQ FCML_TEXT("vpclmulqdq") #define M_VPCMOV FCML_TEXT("vpcmov") #define M_VPCMPEQB FCML_TEXT("vpcmpeqb") #define M_VPCMPEQD FCML_TEXT("vpcmpeqd") #define M_VPCMPEQQ FCML_TEXT("vpcmpeqq") #define M_VPCMPEQW FCML_TEXT("vpcmpeqw") #define M_VPCMPESTRI FCML_TEXT("vpcmpestri") #define M_VPCMPESTRM FCML_TEXT("vpcmpestrm") #define M_VPCMPGTB FCML_TEXT("vpcmpgtb") #define M_VPCMPGTD FCML_TEXT("vpcmpgtd") #define M_VPCMPGTQ FCML_TEXT("vpcmpgtq") #define M_VPCMPGTW FCML_TEXT("vpcmpgtw") #define M_VPCMPISTRI FCML_TEXT("vpcmpistri") #define M_VPCMPISTRM FCML_TEXT("vpcmpistrm") #define M_VPCOMB FCML_TEXT("vpcomb") #define M_VPCOMD FCML_TEXT("vpcomd") #define M_VPCOMEQB FCML_TEXT("vpcomeqb") #define M_VPCOMEQD FCML_TEXT("vpcomeqd") #define M_VPCOMEQQ FCML_TEXT("vpcomeqq") #define M_VPCOMEQUB FCML_TEXT("vpcomequb") #define M_VPCOMEQUD FCML_TEXT("vpcomequd") #define M_VPCOMEQUQ FCML_TEXT("vpcomequq") #define M_VPCOMEQUW FCML_TEXT("vpcomequw") #define M_VPCOMEQW FCML_TEXT("vpcomeqw") #define M_VPCOMFALSEB FCML_TEXT("vpcomfalseb") #define M_VPCOMFALSED FCML_TEXT("vpcomfalsed") #define M_VPCOMFALSEQ FCML_TEXT("vpcomfalseq") #define M_VPCOMFALSEUB FCML_TEXT("vpcomfalseub") #define M_VPCOMFALSEUD FCML_TEXT("vpcomfalseud") #define M_VPCOMFALSEUQ FCML_TEXT("vpcomfalseuq") #define M_VPCOMFALSEUW FCML_TEXT("vpcomfalseuw") #define M_VPCOMFALSEW FCML_TEXT("vpcomfalsew") #define M_VPCOMGEB FCML_TEXT("vpcomgeb") #define M_VPCOMGED FCML_TEXT("vpcomged") #define M_VPCOMGEQ FCML_TEXT("vpcomgeq") #define M_VPCOMGEUB FCML_TEXT("vpcomgeub") #define M_VPCOMGEUD FCML_TEXT("vpcomgeud") #define M_VPCOMGEUQ FCML_TEXT("vpcomgeuq") #define M_VPCOMGEUW FCML_TEXT("vpcomgeuw") #define M_VPCOMGEW FCML_TEXT("vpcomgew") #define M_VPCOMGTB FCML_TEXT("vpcomgtb") #define M_VPCOMGTD FCML_TEXT("vpcomgtd") #define M_VPCOMGTQ FCML_TEXT("vpcomgtq") #define M_VPCOMGTUB FCML_TEXT("vpcomgtub") #define M_VPCOMGTUD FCML_TEXT("vpcomgtud") #define M_VPCOMGTUQ FCML_TEXT("vpcomgtuq") #define M_VPCOMGTUW FCML_TEXT("vpcomgtuw") #define M_VPCOMGTW FCML_TEXT("vpcomgtw") #define M_VPCOMLEB FCML_TEXT("vpcomleb") #define M_VPCOMLED FCML_TEXT("vpcomled") #define M_VPCOMLEQ FCML_TEXT("vpcomleq") #define M_VPCOMLEUB FCML_TEXT("vpcomleub") #define M_VPCOMLEUD FCML_TEXT("vpcomleud") #define M_VPCOMLEUQ FCML_TEXT("vpcomleuq") #define M_VPCOMLEUW FCML_TEXT("vpcomleuw") #define M_VPCOMLEW FCML_TEXT("vpcomlew") #define M_VPCOMLTB FCML_TEXT("vpcomltb") #define M_VPCOMLTD FCML_TEXT("vpcomltd") #define M_VPCOMLTQ FCML_TEXT("vpcomltq") #define M_VPCOMLTUB FCML_TEXT("vpcomltub") #define M_VPCOMLTUD FCML_TEXT("vpcomltud") #define M_VPCOMLTUQ FCML_TEXT("vpcomltuq") #define M_VPCOMLTUW FCML_TEXT("vpcomltuw") #define M_VPCOMLTW FCML_TEXT("vpcomltw") #define M_VPCOMNEQB FCML_TEXT("vpcomneqb") #define M_VPCOMNEQD FCML_TEXT("vpcomneqd") #define M_VPCOMNEQQ FCML_TEXT("vpcomneqq") #define M_VPCOMNEQUB FCML_TEXT("vpcomnequb") #define M_VPCOMNEQUD FCML_TEXT("vpcomnequd") #define M_VPCOMNEQUQ FCML_TEXT("vpcomnequq") #define M_VPCOMNEQUW FCML_TEXT("vpcomnequw") #define M_VPCOMNEQW FCML_TEXT("vpcomneqw") #define M_VPCOMQ FCML_TEXT("vpcomq") #define M_VPCOMTRUEB FCML_TEXT("vpcomtrueb") #define M_VPCOMTRUED FCML_TEXT("vpcomtrued") #define M_VPCOMTRUEQ FCML_TEXT("vpcomtrueq") #define M_VPCOMTRUEUB FCML_TEXT("vpcomtrueub") #define M_VPCOMTRUEUD FCML_TEXT("vpcomtrueud") #define M_VPCOMTRUEUQ FCML_TEXT("vpcomtrueuq") #define M_VPCOMTRUEUW FCML_TEXT("vpcomtrueuw") #define M_VPCOMTRUEW FCML_TEXT("vpcomtruew") #define M_VPCOMUB FCML_TEXT("vpcomub") #define M_VPCOMUD FCML_TEXT("vpcomud") #define M_VPCOMUQ FCML_TEXT("vpcomuq") #define M_VPCOMUW FCML_TEXT("vpcomuw") #define M_VPCOMW FCML_TEXT("vpcomw") #define M_VPERM2F128 FCML_TEXT("vperm2f128") #define M_VPERM2I128 FCML_TEXT("vperm2i128") #define M_VPERMD FCML_TEXT("vpermd") #define M_VPERMIL2PD FCML_TEXT("vpermil2pd") #define M_VPERMIL2PS FCML_TEXT("vpermil2ps") #define M_VPERMILPD FCML_TEXT("vpermilpd") #define M_VPERMILPS FCML_TEXT("vpermilps") #define M_VPERMPD FCML_TEXT("vpermpd") #define M_VPERMPS FCML_TEXT("vpermps") #define M_VPERMQ FCML_TEXT("vpermq") #define M_VPEXTRB FCML_TEXT("vpextrb") #define M_VPEXTRD FCML_TEXT("vpextrd") #define M_VPEXTRQ FCML_TEXT("vpextrq") #define M_VPEXTRW FCML_TEXT("vpextrw") #define M_VPGATHERDD FCML_TEXT("vpgatherdd") #define M_VPGATHERDQ FCML_TEXT("vpgatherdq") #define M_VPGATHERQD FCML_TEXT("vpgatherqd") #define M_VPGATHERQQ FCML_TEXT("vpgatherqq") #define M_VPHADDBD FCML_TEXT("vphaddbd") #define M_VPHADDBQ FCML_TEXT("vphaddbq") #define M_VPHADDBW FCML_TEXT("vphaddbw") #define M_VPHADDD FCML_TEXT("vphaddd") #define M_VPHADDDQ FCML_TEXT("vphadddq") #define M_VPHADDSW FCML_TEXT("vphaddsw") #define M_VPHADDUBD FCML_TEXT("vphaddubd") #define M_VPHADDUBQ FCML_TEXT("vphaddubq") #define M_VPHADDUBW FCML_TEXT("vphaddubw") #define M_VPHADDUDQ FCML_TEXT("vphaddudq") #define M_VPHADDUWD FCML_TEXT("vphadduwd") #define M_VPHADDUWQ FCML_TEXT("vphadduwq") #define M_VPHADDW FCML_TEXT("vphaddw") #define M_VPHADDWD FCML_TEXT("vphaddwd") #define M_VPHADDWQ FCML_TEXT("vphaddwq") #define M_VPHMINPOSUW FCML_TEXT("vphminposuw") #define M_VPHSUBBW FCML_TEXT("vphsubbw") #define M_VPHSUBD FCML_TEXT("vphsubd") #define M_VPHSUBDQ FCML_TEXT("vphsubdq") #define M_VPHSUBSW FCML_TEXT("vphsubsw") #define M_VPHSUBW FCML_TEXT("vphsubw") #define M_VPHSUBWD FCML_TEXT("vphsubwd") #define M_VPINSRB FCML_TEXT("vpinsrb") #define M_VPINSRD FCML_TEXT("vpinsrd") #define M_VPINSRQ FCML_TEXT("vpinsrq") #define M_VPINSRW FCML_TEXT("vpinsrw") #define M_VPMACSDD FCML_TEXT("vpmacsdd") #define M_VPMACSDQH FCML_TEXT("vpmacsdqh") #define M_VPMACSDQL FCML_TEXT("vpmacsdql") #define M_VPMACSSDD FCML_TEXT("vpmacssdd") #define M_VPMACSSDQH FCML_TEXT("vpmacssdqh") #define M_VPMACSSDQL FCML_TEXT("vpmacssdql") #define M_VPMACSSWD FCML_TEXT("vpmacsswd") #define M_VPMACSSWW FCML_TEXT("vpmacssww") #define M_VPMACSWD FCML_TEXT("vpmacswd") #define M_VPMACSWW FCML_TEXT("vpmacsww") #define M_VPMADCSSWD FCML_TEXT("vpmadcsswd") #define M_VPMADCSWD FCML_TEXT("vpmadcswd") #define M_VPMADDUBSW FCML_TEXT("vpmaddubsw") #define M_VPMADDWD FCML_TEXT("vpmaddwd") #define M_VPMASKMOV FCML_TEXT("vpmaskmov") #define M_VPMASKMOVD FCML_TEXT("vpmaskmovd") #define M_VPMASKMOVQ FCML_TEXT("vpmaskmovq") #define M_VPMAXSB FCML_TEXT("vpmaxsb") #define M_VPMAXSD FCML_TEXT("vpmaxsd") #define M_VPMAXSW FCML_TEXT("vpmaxsw") #define M_VPMAXUB FCML_TEXT("vpmaxub") #define M_VPMAXUD FCML_TEXT("vpmaxud") #define M_VPMAXUW FCML_TEXT("vpmaxuw") #define M_VPMINSB FCML_TEXT("vpminsb") #define M_VPMINSD FCML_TEXT("vpminsd") #define M_VPMINSW FCML_TEXT("vpminsw") #define M_VPMINUB FCML_TEXT("vpminub") #define M_VPMINUD FCML_TEXT("vpminud") #define M_VPMINUW FCML_TEXT("vpminuw") #define M_VPMOVMSKB FCML_TEXT("vpmovmskb") #define M_VPMOVSXBD FCML_TEXT("vpmovsxbd") #define M_VPMOVSXBQ FCML_TEXT("vpmovsxbq") #define M_VPMOVSXBW FCML_TEXT("vpmovsxbw") #define M_VPMOVSXDQ FCML_TEXT("vpmovsxdq") #define M_VPMOVSXWD FCML_TEXT("vpmovsxwd") #define M_VPMOVSXWQ FCML_TEXT("vpmovsxwq") #define M_VPMOVZXBD FCML_TEXT("vpmovzxbd") #define M_VPMOVZXBQ FCML_TEXT("vpmovzxbq") #define M_VPMOVZXBW FCML_TEXT("vpmovzxbw") #define M_VPMOVZXDQ FCML_TEXT("vpmovzxdq") #define M_VPMOVZXWD FCML_TEXT("vpmovzxwd") #define M_VPMOVZXWQ FCML_TEXT("vpmovzxwq") #define M_VPMULDQ FCML_TEXT("vpmuldq") #define M_VPMULHRSW FCML_TEXT("vpmulhrsw") #define M_VPMULHUW FCML_TEXT("vpmulhuw") #define M_VPMULHW FCML_TEXT("vpmulhw") #define M_VPMULLD FCML_TEXT("vpmulld") #define M_VPMULLW FCML_TEXT("vpmullw") #define M_VPMULUDQ FCML_TEXT("vpmuludq") #define M_VPOR FCML_TEXT("vpor") #define M_VPPERM FCML_TEXT("vpperm") #define M_VPROTB FCML_TEXT("vprotb") #define M_VPROTD FCML_TEXT("vprotd") #define M_VPROTQ FCML_TEXT("vprotq") #define M_VPROTW FCML_TEXT("vprotw") #define M_VPSADBW FCML_TEXT("vpsadbw") #define M_VPSHAB FCML_TEXT("vpshab") #define M_VPSHAD FCML_TEXT("vpshad") #define M_VPSHAQ FCML_TEXT("vpshaq") #define M_VPSHAW FCML_TEXT("vpshaw") #define M_VPSHLB FCML_TEXT("vpshlb") #define M_VPSHLD FCML_TEXT("vpshld") #define M_VPSHLQ FCML_TEXT("vpshlq") #define M_VPSHLW FCML_TEXT("vpshlw") #define M_VPSHUFB FCML_TEXT("vpshufb") #define M_VPSHUFD FCML_TEXT("vpshufd") #define M_VPSHUFHW FCML_TEXT("vpshufhw") #define M_VPSHUFLW FCML_TEXT("vpshuflw") #define M_VPSIGNB FCML_TEXT("vpsignb") #define M_VPSIGND FCML_TEXT("vpsignd") #define M_VPSIGNW FCML_TEXT("vpsignw") #define M_VPSLLD FCML_TEXT("vpslld") #define M_VPSLLDQ FCML_TEXT("vpslldq") #define M_VPSLLQ FCML_TEXT("vpsllq") #define M_VPSLLVD FCML_TEXT("vpsllvd") #define M_VPSLLVQ FCML_TEXT("vpsllvq") #define M_VPSLLW FCML_TEXT("vpsllw") #define M_VPSRAD FCML_TEXT("vpsrad") #define M_VPSRAVD FCML_TEXT("vpsravd") #define M_VPSRAW FCML_TEXT("vpsraw") #define M_VPSRLD FCML_TEXT("vpsrld") #define M_VPSRLDQ FCML_TEXT("vpsrldq") #define M_VPSRLQ FCML_TEXT("vpsrlq") #define M_VPSRLVD FCML_TEXT("vpsrlvd") #define M_VPSRLVQ FCML_TEXT("vpsrlvq") #define M_VPSRLW FCML_TEXT("vpsrlw") #define M_VPSUBB FCML_TEXT("vpsubb") #define M_VPSUBD FCML_TEXT("vpsubd") #define M_VPSUBQ FCML_TEXT("vpsubq") #define M_VPSUBSB FCML_TEXT("vpsubsb") #define M_VPSUBSW FCML_TEXT("vpsubsw") #define M_VPSUBUSB FCML_TEXT("vpsubusb") #define M_VPSUBUSW FCML_TEXT("vpsubusw") #define M_VPSUBW FCML_TEXT("vpsubw") #define M_VPTEST FCML_TEXT("vptest") #define M_VPUNPCKHBW FCML_TEXT("vpunpckhbw") #define M_VPUNPCKHDQ FCML_TEXT("vpunpckhdq") #define M_VPUNPCKHQDQ FCML_TEXT("vpunpckhqdq") #define M_VPUNPCKHWD FCML_TEXT("vpunpckhwd") #define M_VPUNPCKLBW FCML_TEXT("vpunpcklbw") #define M_VPUNPCKLDQ FCML_TEXT("vpunpckldq") #define M_VPUNPCKLQDQ FCML_TEXT("vpunpcklqdq") #define M_VPUNPCKLWD FCML_TEXT("vpunpcklwd") #define M_VPXOR FCML_TEXT("vpxor") #define M_VRCPPS FCML_TEXT("vrcpps") #define M_VRCPSS FCML_TEXT("vrcpss") #define M_VROUNDPD FCML_TEXT("vroundpd") #define M_VROUNDPS FCML_TEXT("vroundps") #define M_VROUNDSD FCML_TEXT("vroundsd") #define M_VROUNDSS FCML_TEXT("vroundss") #define M_VRSQRTPS FCML_TEXT("vrsqrtps") #define M_VRSQRTSS FCML_TEXT("vrsqrtss") #define M_VSHUFPD FCML_TEXT("vshufpd") #define M_VSHUFPS FCML_TEXT("vshufps") #define M_VSQRTPD FCML_TEXT("vsqrtpd") #define M_VSQRTPS FCML_TEXT("vsqrtps") #define M_VSQRTSD FCML_TEXT("vsqrtsd") #define M_VSQRTSS FCML_TEXT("vsqrtss") #define M_VSTMXCSR FCML_TEXT("vstmxcsr") #define M_VSUBPD FCML_TEXT("vsubpd") #define M_VSUBPS FCML_TEXT("vsubps") #define M_VSUBSD FCML_TEXT("vsubsd") #define M_VSUBSS FCML_TEXT("vsubss") #define M_VTESTPD FCML_TEXT("vtestpd") #define M_VTESTPS FCML_TEXT("vtestps") #define M_VUCOMISD FCML_TEXT("vucomisd") #define M_VUCOMISS FCML_TEXT("vucomiss") #define M_VUNPCKHPD FCML_TEXT("vunpckhpd") #define M_VUNPCKHPS FCML_TEXT("vunpckhps") #define M_VUNPCKLPD FCML_TEXT("vunpcklpd") #define M_VUNPCKLPS FCML_TEXT("vunpcklps") #define M_VXORPD FCML_TEXT("vxorpd") #define M_VXORPS FCML_TEXT("vxorps") #define M_VZEROALL FCML_TEXT("vzeroall") #define M_VZEROUPPER FCML_TEXT("vzeroupper") #define M_WAIT FCML_TEXT("wait") #define M_WBINVD FCML_TEXT("wbinvd") #define M_WRFSBASE FCML_TEXT("wrfsbase") #define M_WRGSBASE FCML_TEXT("wrgsbase") #define M_WRMSR FCML_TEXT("wrmsr") #define M_XABORT FCML_TEXT("xabort") #define M_XADD FCML_TEXT("xadd") #define M_XBEGIN FCML_TEXT("xbegin") #define M_XCHG FCML_TEXT("xchg") #define M_XEND FCML_TEXT("xend") #define M_XGETBV FCML_TEXT("xgetbv") #define M_XLAT FCML_TEXT("xlat") #define M_XLATB FCML_TEXT("xlatb") #define M_XOR FCML_TEXT("xor") #define M_XORPD FCML_TEXT("xorpd") #define M_XORPS FCML_TEXT("xorps") #define M_XRSTOR FCML_TEXT("xrstor") #define M_XRSTOR64 FCML_TEXT("xrstor64") #define M_XSAVE FCML_TEXT("xsave") #define M_XSAVE64 FCML_TEXT("xsave64") #define M_XSAVEOPT FCML_TEXT("xsaveopt") #define M_XSAVEOPT64 FCML_TEXT("xsaveopt64") #define M_XSETBV FCML_TEXT("xsetbv") #define M_XTEST FCML_TEXT("xtest") #endif /* FCML_INTEL_MNEMONICS_H_ */ fcml-1.1.1/include/fcml_errors.h0000644000175000017500000001471412560745216013504 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_errors.h * Global error handling related declarations. * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_ASM_ERRORS_H_ #define FCML_ASM_ERRORS_H_ #include "fcml_lib_export.h" #include "fcml_types.h" /** * @defgroup ERRORS_GROUP Global error codes * Describes all available global error codes. * @{ */ /** All global error codes are placed here. */ enum fcml_en_ceh_error_globals { /** Operation succeed. */ FCML_CEH_GEC_NO_ERROR = 0, /** There is not enough memory to complete operation. */ FCML_CEH_GEC_OUT_OF_MEMORY = 1, /** Invalid function arguments. */ FCML_CEH_GEC_INVALID_INPUT = 2, /** An internal error occurred. Enable tracing in order to get more detailed information. */ FCML_CEH_GEC_INTERNAL_ERROR = 3, /** Component hasn't been initialized yet. */ FCML_CEH_GEC_NOT_INITIALIZED = 4, /** Incomplete instruction. */ FCML_CEH_GEC_EOF = 5, /** Used mainly in case of integers and offsets. */ FCML_CEH_GEC_VALUE_OUT_OF_RANGE = 6, /** Chosen operation is not supported in case of given configuration. */ FCML_CEH_GEC_FEATURE_NOT_SUPPORTED = 7, /** Unsupported operating mode. For instance encoded instruction needs 16 bit operating mode, but we are in 64 bit mode. */ FCML_CEH_GEC_INVALID_OPERATING_MODE = 8, /** Chosen addressing form can not be encoded as for example ModR/M field. */ FCML_CEH_GEC_INVALID_ADDRESSING_FORM = 9, /** Unsupported instruction form (Instruction may be supported, but not with given set of operands). */ FCML_CEH_GEC_INVALID_INSTRUCTION_FORM = 10, /** Instruction do not support one of the defined operands. */ FCML_CEH_GEC_INVALID_OPPERAND = 11, /** Unknown mnemonic. */ FCML_CEH_GEC_UNKNOWN_MNEMONIC = 12, /** Operand size (Operand size attribute) is not allowed in given context. */ FCML_CEH_GEC_INVALID_OPPERAND_SIZE = 13, /** Address size (Address size attribute) is not allowed in given context. */ FCML_CEH_GEC_INVALID_ADDRESS_SIZE = 14, /** User chosen unsupported addressing form */ FCML_CEH_GEC_UNKNOWN_INSTRUCTION = 15, /** Assembler can return this error code if there is not allowed prefix defined for given instruction. */ FCML_CEH_GEC_INVALID_PREFIX = 16, /** Wrong register type. */ FCML_CEH_GEC_INVALID_REGISTER_TYPE = 17, /** Wrong register. */ FCML_CEH_GEC_INVALID_REGISTER = 18, /** Error returned by parsers when there is undefined symbol used. */ FCML_CEH_GEC_UNDEFINED_SYMBOL = 19, /** Labels are not supported. */ FCML_CEH_GEC_UNSUPPORTED_LABEL_DECLARATION = 20 }; /** @} */ /** * @defgroup MESSAGE_ERRORS_GROUP Error codes for textual messages * Describes all available error codes dedicated to textual errors. * @{ */ /** Error codes dedicated to textual messages. * In some cases they are a bit more detailed than corresponding * global error codes returned in case of errors. Remember that global * error codes also can be used in place of error codes for textual * messages. It is why they use different code ranges. */ enum fcml_en_ceh_message_errors { /** Segment register can not be overridden. */ FCML_CEH_MEC_ERROR_ILLEGAL_SEG_REG_OVERRIDE = 1000, /** To many operands passed to parser. */ FCML_CEH_MEC_ERROR_TO_MANY_OPERANDS = 1001, /** Unsupported pseudo-op value. */ FCML_CEH_MEC_ERROR_INVALID_PSEUDO_OPCODE_VALUE = 1002, /** HLE prefix is not allowed in given context. */ FCML_CEH_MEC_ERROR_HLE_PREFIX_NOT_ALLOWED = 1003, /** There is more than one HLE prefix. */ FCML_CEH_MEC_ERROR_HLE_MORE_THAN_ONE_PREFIX = 1004, /** Expression attempts to divide by 0 */ FCML_CEH_MEC_ERROR_DIVISION_BY_0 = 1005, /** Wrong value type used in given context. For example float used in place of integer. */ FCML_CEH_MEC_ERROR_WRONG_VALUE_FORMAT = 1006, /** Value out of range, for example 32 bit value used as segment selector. */ FCML_CEH_MEC_ERROR_VALUE_OUT_OF_RANGE = 1007, /** Syntax error from parser. */ FCML_CEH_MEC_ERROR_INVALID_SYNTAX = 1008, /** Wrong register type used in place of segment register. */ FCML_CEH_MEC_ERROR_INVALID_REGISTER_TYPE_SEG = 1009, /** Symbol is already defined in parser's symbol table. */ FCML_CEH_MEC_ERROR_SYMBOL_ALREADY_DEFINED = 1010, /** Symbol is undefined. */ FCML_CEH_MEC_ERROR_UNDEFINED_SYMBOL = 1011, /** Parsed line exceed maximal allowed length. */ FCML_CEH_MEC_ERROR_PARSED_LINE_TOO_LONG = 1012 }; /** Codes for textual warnings. */ enum fcml_en_ceh_message_warnings { /** Value out of range */ FCML_CEH_MEW_WARN_VALUE_OUT_OF_RANGE = 2000, /** Invalid addressing mode. */ FCML_CEH_MEW_WARN_INVALID_ADDRESSING_MODE = 2001 }; /** @} */ /** All error codes should be held in variables of this type. */ typedef fcml_uint16_t fcml_ceh_error; /** Error levels. */ typedef enum fcml_en_ceh_error_level { /** Warnings are reported when processing does not need to be stopped. */ FCML_EN_CEH_EL_WARN, /** Errors are reported when something more important happened and processing should be stopped. */ FCML_EN_CEH_EL_ERROR } fcml_en_ceh_error_level; /** Information about one particular error/warning. */ typedef struct fcml_st_ceh_error_info { /** Next error/warning on the list. */ struct fcml_st_ceh_error_info *next_error; /** Error message. */ fcml_string message; /** Error code */ fcml_ceh_error code; /** Error level. */ fcml_en_ceh_error_level level; } fcml_st_ceh_error_info; /** Container for all collected errors and warnings. */ typedef struct fcml_st_ceh_error_container { /** All errors and warnings going here. */ fcml_st_ceh_error_info *errors; /** Pointer to the last error/warning on the list. */ fcml_st_ceh_error_info *last_error; } fcml_st_ceh_error_container; #endif /* FCML_ASM_ERRORS_H_ */ fcml-1.1.1/include/fcml_dialect.h0000644000175000017500000000326012560745216013567 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_dialect.h * Structures and functions related to dialects. * Functions and structures used for developing new dialects are not exposed as public API. * If you are interested in implementing another dialect you have to use internal headers. * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_DIALECT_H_ #define FCML_DIALECT_H_ #include "fcml_lib_export.h" /** Assembler dialect.*/ typedef struct fcml_st_dialect fcml_st_dialect; #ifdef __cplusplus extern "C" { #endif /** * Frees dialect instance. * Frees all resources occupied by the dialect instance. * @param dialect Dialect to be freed. */ LIB_EXPORT void LIB_CALL fcml_fn_dialect_free( fcml_st_dialect *dialect ); #ifdef __cplusplus } #endif #endif /* FCML_DIALECT_H_ */ fcml-1.1.1/include/fcml_disassembler.hpp0000644000175000017500000014311112560745216015177 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_disassembler.hpp * C++ wrapper for the FCML disassembler. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_DISASSEMBLER_HPP_ #define FCML_DISASSEMBLER_HPP_ #include #include "fcml_disassembler.h" #include "fcml_common.hpp" #include "fcml_errors.hpp" #include "fcml_dialect.hpp" namespace fcml { /** * Component can not be initialized correctly. * @since 1.1.0 */ class DisassemblingFailedException: public ErrorContainerAwareException { public: DisassemblingFailedException( const fcml_cstring &msg, const ErrorContainer &errorContainer, fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR ) : ErrorContainerAwareException( msg, errorContainer, error ){ } }; /** Disassembler configuration. * * It's counterpart to the fcml_st_disassembler_conf structure. * @since 1.1.0 */ class DisassemblerConf { public: /** * Default constructor. * @since 1.1.0 */ DisassemblerConf() : _throwExceptionOnError(true), _incrementIP(true), _enableErrorMessages(true), _carryFlagConditionalSuffix(false), _conditionalGroup(false), _shortForms(false), _extendDispToASA(false), _failIfUnknownInstruction(false) { } /** @since 1.1.0 */ bool isCarryFlagConditionalSuffix() const { return _carryFlagConditionalSuffix; } /** @since 1.1.0 */ void setCarryFlagConditionalSuffix(bool carryFlagConditionalSuffix) { _carryFlagConditionalSuffix = carryFlagConditionalSuffix; } /** @since 1.1.0 */ fcml_uint8_t getConditionalGroup() const { return _conditionalGroup; } /** @since 1.1.0 */ void setConditionalGroup(fcml_uint8_t conditionalGroup) { _conditionalGroup = conditionalGroup; } /** @since 1.1.0 */ bool isEnableErrorMessages() const { return _enableErrorMessages; } /** @since 1.1.0 */ void setEnableErrorMessages(bool enableErrorMessages) { _enableErrorMessages = enableErrorMessages; } /** @since 1.1.0 */ bool isExtendDispToAsa() const { return _extendDispToASA; } /** @since 1.1.0 */ void setExtendDispToAsa(bool extendDispToAsa) { _extendDispToASA = extendDispToAsa; } /** @since 1.1.0 */ bool isFailIfUnknownInstruction() const { return _failIfUnknownInstruction; } /** @since 1.1.0 */ void setFailIfUnknownInstruction(bool failIfUnknownInstruction) { _failIfUnknownInstruction = failIfUnknownInstruction; } /** @since 1.1.0 */ bool isIncrementIp() const { return _incrementIP; } /** @since 1.1.0 */ void setIncrementIp(bool incrementIp) { _incrementIP = incrementIp; } /** @since 1.1.0 */ bool isShortForms() const { return _shortForms; } /** @since 1.1.0 */ void setShortForms(bool shortForms) { _shortForms = shortForms; } /** * Returns true if exception should be thrown when disassembling fails. * * @return True if exception is the preferred way of error handling in case of failure. * @since 1.1.0 */ bool isThrowExceptionOnError() const { return _throwExceptionOnError; } /** * Sets the way how the error handling is done. * * @param throwExceptionOnError True if exception should be thrown in case of failure. * @since 1.1.0 */ void setThrowExceptionOnError(bool throwExceptionOnError) { _throwExceptionOnError = throwExceptionOnError; } private: bool _throwExceptionOnError; bool _incrementIP; bool _enableErrorMessages; bool _carryFlagConditionalSuffix; fcml_uint8_t _conditionalGroup; bool _shortForms; bool _extendDispToASA; bool _failIfUnknownInstruction; }; /** Disassembler context. * @since 1.1.0 */ class DisassemblerContext { public: /** * Creates empty disassembler context. * @since 1.1.0 */ DisassemblerContext() : _code(NULL), _codeLength(0) { } /** * Creates disassembler context for given piece of machine code. * * @param code A buffer with the machine code. * @param codeLength Size of the buffer in bytes. * @since 1.1.0 */ DisassemblerContext( fcml_ptr code, fcml_usize codeLength ) : _code(code), _codeLength(codeLength) { } public: /** * Gets pointer to the machine code buffer. * * @return A pointer to the machine code. * @since 1.1.0 */ fcml_ptr getCode() const { return _code; } /** * Sets a new buffer with machine code for the context. * * @param code The new code buffer. * @since 1.1.0 */ void setCode(fcml_ptr code) { _code = code; } /** * Gets length of the buffer in bytes. * * @return Size of the buffer. * @since 1.1.0 */ fcml_usize getCodeLength() const { return _codeLength; } /** * Sets length of the code buffer in bytes. * * @param codeLength Size of the code. * @since 1.1.0 */ void setCodeLength(fcml_usize codeLength) { _codeLength = codeLength; } /** * Gets a reference to the configuration object associated with the context. * * @return The disassembler configuration. * @since 1.1.0 */ const DisassemblerConf& getDisassemblerConf() const { return _disassemblerConf; } /** * Gets a reference to the configuration object associated with the context. * * @return The disassembler configuration. * @since 1.1.0 */ DisassemblerConf& getDisassemblerConf() { return _disassemblerConf; } /** * Sets a new disassembler configuration for the context. * * @param disassemblerConf The new disassembler configuration. * @since 1.1.0 */ void setDisassemblerConf(DisassemblerConf disassemblerConf) { _disassemblerConf = disassemblerConf; } /** * Gets reference to the constant entry point instance associated with the context. * * @return Reference to the constant entry point. * @since 1.1.0 */ const EntryPoint& getEntryPoint() const { return _entryPoint; } /** * Gets reference to the entry point instance associated with the context. * * @return Reference to the entry point. * @since 1.1.0 */ EntryPoint& getEntryPoint() { return _entryPoint; } /** * Copies given entry point to the instance associated with the context. * Deep copy is performed, so passed object not need to be maintained as * long as the context is used. * * @param entryPoint The entry point which is copied to the context. * @since 1.1.0 */ void setEntryPoint(const EntryPoint& entryPoint) { _entryPoint = entryPoint; } /** * Sets instruction pointer directly into the entry point. * * @param ip The new IP. * @since 1.1.0 */ void setIP( fcml_ip ip ) { _entryPoint.setIP(ip); } /** * Increments entry point by given number of bytes. * * @param ip Number of bytes the instruction pointer has to be incremented by. * @since 1.1.0 */ void incrementIP( fcml_ip ip ) { _entryPoint.incrementIP( ip ); } /** * Sets processor operating mode directly into the entry point. * * @param operatingMode Processor operating mode to be set. * @since 1.1.0 */ void setOperatingMode( EntryPoint::OperatingMode operatingMode ) { _entryPoint.setOpMode( operatingMode ); } /** * Sets a new address size attribute for the entry point. * * @param addressSizeAttribute The address size attribute. * @since 1.1.0 */ void setAddressSizeAttribute( fcml_usize addressSizeAttribute ) { _entryPoint.setAddressSizeAttribute( addressSizeAttribute ); } /** * Sets a new operand size attribute for the entry point. * * @param operandSizeAttribute The operand size attribute. * @since 1.1.0 */ void setOperandSizeAttribute( fcml_usize operandSizeAttribute ) { _entryPoint.setOperandSizeAttribute( operandSizeAttribute ); } private: /** Disassembler configuration. */ DisassemblerConf _disassemblerConf; /** Entry point. */ EntryPoint _entryPoint; /** Code buffer. */ fcml_ptr _code; /** Code length. */ fcml_usize _codeLength; }; /** Instruction prefix. * @since 1.1.0 */ class InstructionPrefixDetails { public: /** Type of the instruction prefix. * @since 1.1.0 */ enum PrefixType { PT_GROUP_UNKNOWN = FCML_PT_GROUP_UNKNOWN, PT_GROUP_1 = FCML_PT_GROUP_1, PT_GROUP_2 = FCML_PT_GROUP_2, PT_GROUP_3 = FCML_PT_GROUP_3, PT_GROUP_4 = FCML_PT_GROUP_4, PT_REX = FCML_PT_REX, PT_VEX = FCML_PT_VEX, PT_XOP = FCML_PT_XOP }; /** * Returns true if it's a mandatory prefix. * * @return True if it's a mandatory prefix. * @since 1.1.0 */ bool isMandatoryPrefix() const { return _mandatoryPrefix; } /** * Sets mandatory prefix flag for the prefix. * * @param mandatoryPrefix Set to true in order to make the prefix mandatory one. * @since 1.1.0 */ void setMandatoryPrefix(bool mandatoryPrefix) { _mandatoryPrefix = mandatoryPrefix; } /** * Gets the prefix byte. * * @return The prefix byte. * @since 1.1.0 */ fcml_uint8_t getPrefix() const { return _prefix; } /** * Sets the prefix byte. * * @param prefix The prefix byte. * @since 1.1.0 */ void setPrefix(fcml_uint8_t prefix) { _prefix = prefix; } /** * Gets the prefix type. * * @return The prefix byte. * @since 1.1.0 */ PrefixType getPrefixType() const { return _prefixType; } /** * Sets a new prefix type. * * @param prefixType The prefix byte to be set. * @since 1.1.0 */ void setPrefixType(PrefixType prefixType) { _prefixType = prefixType; } /** * Gets the second and third bytes of the XOP/VEX prefix. * * @return A pointer to the VEX/XOP bytes. * @since 1.1.0 */ const fcml_uint8_t* getVexXopBytes() const { return _vexXOPBytes; } /** * Gets the second and third bytes of the XOP/VEX prefix. * * @return A pointer to the VEX/XOP bytes. * @since 1.1.0 */ fcml_uint8_t* getVexXopBytes() { return _vexXOPBytes; } private: /** The first byte of the prefix. */ fcml_uint8_t _prefix; /** Tye type of the prefix. */ PrefixType _prefixType; /** True if the prefix is a mandatory one. */ bool _mandatoryPrefix; /** The second and third byte of the prefix. */ fcml_uint8_t _vexXOPBytes[2]; }; /** Prefixes details. * @since 1.1.0 */ class PrefixesDetails { public: /** * Default constructor. * @since 1.1.0 */ PrefixesDetails() : _prefixesCount(0), _prefixesBytesCount(0), _isBranch(false), _isNobranch(false), _isLock(false), _isRep(false), _isRepne(false), _isXrelease(false), _isXacquire(false), _isVex(false), _isXop(false), _isRex(false), _vexXopFirstByte(false), _r(0), _x(0), _b(0), _w(0), _l(0), _mmmm(0), _vvvv(0), _pp(0) { } /** * Gets reference to the instruction prefix at given index. * @param index Number of the prefix. * @return The instruction prefix for given index. * @throw IllegalArgumentException Index out of bound. * @since 1.1.0 */ const InstructionPrefixDetails& operator[](fcml_usize index) const { if( index >= FCML_DASM_PREFIXES_COUNT ) { throw IllegalArgumentException( FCML_TEXT( "Index out of bound." ) ); } return _prefixes[index]; } /** * Gets reference to the instruction prefix at given index. * @param index Number of the prefix. * @return The instruction prefix for given index. * @throw IllegalArgumentException Index out of bound. * @since 1.1.0 */ InstructionPrefixDetails& operator[](fcml_usize index) { if( index >= FCML_DASM_PREFIXES_COUNT ) { throw IllegalArgumentException( FCML_TEXT( "Index out of bound." ) ); } return _prefixes[index]; } /** * Gets b flag. * * @return The B flag. * @since 1.1.0 */ fcml_uint8_t getB() const { return _b; } /** * Sets B flag. * * @param b The B flag. * @since 1.1.0 */ void setB(fcml_uint8_t b) { _b = b; } /** * Gets true if branch prefix is available. * * @return True if branch prefix is available. * @since 1.1.0 */ bool isBranch() const { return _isBranch; } /** * Sets branch prefix availability. * * @param isBranch True if branch prefix is available. * @since 1.1.0 */ void setBranch(bool isBranch) { _isBranch = isBranch; } /** * Gets true if lock prefix is available. * * @return True if lock prefix is available. * @since 1.1.0 */ bool isLock() const { return _isLock; } /** * Sets lock prefix availability. * * @param isLock True if lock prefix is available. * @since 1.1.0 */ void setLock(bool isLock) { _isLock = isLock; } /** * Gets true if no-branch prefix is available. * * @return True if no-branch prefix is available. * @since 1.1.0 */ bool isNobranch() const { return _isNobranch; } /** * Sets no-branch prefix availability. * * @param isNobranch True if no-branch prefix is available. * @since 1.1.0 */ void setNobranch(bool isNobranch) { _isNobranch = isNobranch; } /** * Gets true if Rep prefix is available. * * @return True if Rep prefix is available. * @since 1.1.0 */ bool isRep() const { return _isRep; } /** * Sets Rep prefix availability. * * @param isRep True if Rep prefix is available. * @since 1.1.0 */ void setRep(bool isRep) { _isRep = isRep; } /** * Gets true if Repne prefix is available. * * @return True if Repne prefix is available. * @since 1.1.0 */ bool isRepne() const { return _isRepne; } /** * Sets Repne prefix availability. * * @param isRepne True if branch prefix is available. * @since 1.1.0 */ void setRepne(bool isRepne) { _isRepne = isRepne; } /** * Gets true if Rex prefix is available. * * @return True if Rex prefix is available. * @since 1.1.0 */ bool isRex() const { return _isRex; } /** * Sets REX prefix availability. * * @param isRex True if REX prefix is available. * @since 1.1.0 */ void setRex(bool isRex) { _isRex = isRex; } /** * Gets true if Vex prefix is available. * * @return True if Vex prefix is available. * @since 1.1.0 */ bool isVex() const { return _isVex; } /** * Sets VEX prefix availability. * * @param isVex True if VEX prefix is available. * @since 1.1.0 */ void setVex(bool isVex) { _isVex = isVex; } /** * Gets true if xacquire prefix is available. * * @return True if xacquire prefix is available. * @since 1.1.0 */ bool isXacquire() const { return _isXacquire; } /** * Sets xacquire prefix availability. * * @param isXacquire True if xacquire prefix is available. * @since 1.1.0 */ void setXacquire(bool isXacquire) { _isXacquire = isXacquire; } /** * Gets true if Xop prefix is available. * * @return True if Xop prefix is available. * @since 1.1.0 */ bool isXop() const { return _isXop; } /** * Sets Xop prefix availability. * * @param isXop True if XOP prefix is available. * @since 1.1.0 */ void setXop(bool isXop) { _isXop = isXop; } /** * Gets true if xrelease prefix is available. * * @return True if xrelease prefix is available. * @since 1.1.0 */ bool isXrelease() const { return _isXrelease; } /** * Sets xrelease prefix availability. * * @param isXrelease True if xrelease prefix is available. * @since 1.1.0 */ void setXrelease(bool isXrelease) { _isXrelease = isXrelease; } /** * Gets L flag. * * @return The L flag. * @since 1.1.0 */ fcml_uint8_t getL() const { return _l; } /** * Sets L flag. * * @param l The L flag. * @since 1.1.0 */ void setL(fcml_uint8_t l) { _l = l; } /** * Gets MMMM field. * * @return MMMM field. * @since 1.1.0 */ fcml_uint8_t getMmmm() const { return _mmmm; } /** * Sets MMMM field. * * @param mmmm MMMM field. * @since 1.1.0 */ void setMmmm(fcml_uint8_t mmmm) { _mmmm = mmmm; } /** * Gets PP field. * * @return The PP field. * @since 1.1.0 */ fcml_uint8_t getPp() const { return _pp; } /** * Sets PP field. * * @param pp PP field. * @since 1.1.0 */ void setPp(fcml_uint8_t pp) { _pp = pp; } /** * Gets a reference to the prefix of the given index. * * @param index Index for the prefix. * @return The prefix at given index. * @throw BadArgumentException Array index out of bound. * @since 1.1.0 */ const InstructionPrefixDetails& getPrefixes( fcml_usize index ) const { if( index > FCML_DASM_PREFIXES_COUNT ) { throw BadArgumentException(FCML_TEXT("Array index out of bound."), FCML_CEH_GEC_VALUE_OUT_OF_RANGE); } return _prefixes[index]; } /** * Gets a reference to the prefix of the given index. * * @param index Index for the prefix. * @return The prefix at given index. * @throw BadArgumentException Array index out of bound. * @since 1.1.0 */ InstructionPrefixDetails& getPrefixes( fcml_usize index ) { if( index > FCML_DASM_PREFIXES_COUNT ) { throw BadArgumentException(FCML_TEXT("Array index out of bound."), FCML_CEH_GEC_VALUE_OUT_OF_RANGE); } return _prefixes[index]; } /** * Gets number of bytes interpreted to be prefixes. * * @return Number of prefixes bytes. * @since 1.1.0 */ fcml_int getPrefixesBytesCount() const { return _prefixesBytesCount; } /** * Sets number of prefixes bytes available for the instruction. * * @param prefixesBytesCount Number of the prefixes bytes. * @since 1.1.0 */ void setPrefixesBytesCount(fcml_int prefixesBytesCount) { _prefixesBytesCount = prefixesBytesCount; } /** * Gets number of prefixes available for the instruction. * * @return Number of the prefixes for the instruction. * @since 1.1.0 */ fcml_int getPrefixesCount() const { return _prefixesCount; } /** * Sets number of prefixes available for the instruction. * * @param prefixesCount Number of the available prefixes. * @since 1.1.0 */ void setPrefixesCount(fcml_int prefixesCount) { _prefixesCount = prefixesCount; } /** * Gets R flag. * * @return The R flag. * @since 1.1.0 */ fcml_uint8_t getR() const { return _r; } /** * Sets R flag. * * @param r The R flag. * @since 1.1.0 */ void setR(fcml_uint8_t r) { _r = r; } /** * Gets the first byte of the VEX/XOP prefix. * * @return The first byte of the VEX/XOP prefix. * @since 1.1.0 */ fcml_uint8_t getVexXopFirstByte() const { return _vexXopFirstByte; } /** * Sets a first byte of the XOP/VEX prefix. * * @param vexXopFirstByte The first XOP/VEX prefix byte. * @since 1.1.0 */ void setVexXopFirstByte(fcml_uint8_t vexXopFirstByte) { _vexXopFirstByte = vexXopFirstByte; } /** * Gets VVVV field of the XOP/VEX prefix. * * @return VVVV field of the XOP/VEX prefix. * @since 1.1.0 */ fcml_uint8_t getVvvv() const { return _vvvv; } /** * Sets VVVV field of the XOP/VEX prefix. * * @param vvvv The VVVV field. * @since 1.1.0 */ void setVvvv(fcml_uint8_t vvvv) { _vvvv = vvvv; } /** * Gets W flag. * * @return The W flag. * @since 1.1.0 */ fcml_uint8_t getW() const { return _w; } /** * Sets W flag. * * @param w The W flag. * @since 1.1.0 */ void setW(fcml_uint8_t w) { _w = w; } /** * Gets X flag. * * @return The X flag. * @since 1.1.0 */ fcml_uint8_t getX() const { return _x; } /** * Sets X flag. * * @param x The X flag. * @since 1.1.0 */ void setX(fcml_uint8_t x) { _x = x; } private: /** Array with decoded prefixes. */ InstructionPrefixDetails _prefixes[FCML_DASM_PREFIXES_COUNT]; /** Number of decoded prefixes. */ fcml_int _prefixesCount; /** Number of bytes used by all decoded prefixes. */ fcml_int _prefixesBytesCount; /** FCML_TRUE if branch prefix exists. */ bool _isBranch; /** FCML_TRUE if nobranch prefix exists. */ bool _isNobranch; /** FCML_TRUE if lock explicit prefix exists. */ bool _isLock; /** FCML_TRUE if rep explicit prefix exists. */ bool _isRep; /** FCML_TRUE if repne explicit prefix exists. */ bool _isRepne; /** FCML_TRUE if xrelease explicit prefix exists. */ bool _isXrelease; /** FCML_TRUE if xacquire explicit prefix exists. */ bool _isXacquire; /** FCML_TRUE if VEX prefix exists. */ bool _isVex; /** FCML_TRUE if XOP prefix exists. */ bool _isXop; /** FCML_TRUE if REX prefix exists. */ bool _isRex; /** Various fields encoded inside decoded prefixes.*/ fcml_uint8_t _vexXopFirstByte; /** R field of REX,XOP or VEX prefix. */ fcml_uint8_t _r; /** X field of REX,XOP or VEX prefix. */ fcml_uint8_t _x; /** B field of REX,XOP or VEX prefix. */ fcml_uint8_t _b; /** W field of REX,XOP or VEX prefix. */ fcml_uint8_t _w; /** L field of XOP or VEX prefix. */ fcml_uint8_t _l; /** m-mmmm field of XOP or VEX prefix. */ fcml_uint8_t _mmmm; /** vvvv field of XOP or VEX prefix. */ fcml_uint8_t _vvvv; /** pp field of XOP or VEX prefix. */ fcml_uint8_t _pp; }; /** Operand details. * @since 1.1.0 */ class OperandDetails { public: /** @since 1.1.0 */ enum AccessMode { /** Undefined mode. */ AM_ACCESS_MODE_UNDEFINED = FCML_AM_ACCESS_MODE_UNDEFINED, /** Operand is read by instruction. */ AM_READ = FCML_AM_READ, /** Operand is set by instruction */ AM_WRITE = FCML_AM_WRITE, /** Operand is read but can be also set. */ AM_READ_WRITE = AM_READ | AM_WRITE }; /** * Creates default operand details with an undefined access mode. * @since 1.1.0 */ OperandDetails() : _accessMode( AM_ACCESS_MODE_UNDEFINED ) { } /** * Creates operand details for given access mode. * * @param accessMode Access mode. * @since 1.1.0 */ OperandDetails( AccessMode accessMode ) : _accessMode( accessMode ) { } /** * Gets access mode for the operand. * * @return Access mode. * @since 1.1.0 */ AccessMode getAccessMode() const { return _accessMode; } /** * Sets an access mode for the operand. * * @param accessMode The access mode for the operand. * @since 1.1.0 */ void setAccessMode(AccessMode accessMode) { _accessMode = accessMode; } private: /** Operan's access mode. */ AccessMode _accessMode; }; /** ModRM details. * @since 1.1.0 */ class DecodedModRMDetails { public: /** * Creates an empty ModR/M details. * @since 1.1.0 */ DecodedModRMDetails() : _modRM(0), _sib(0), _isRip(false) { } /** * Gets true if RIP byte is available. * * @return True if RIP byte is available. * @since 1.1.0 */ bool isRip() const { return _isRip; } /** * Sets RIP byte availability. * * @param isRip True if RIP byte is available. * @since 1.1.0 */ void setRip( bool isRip ) { _isRip = isRip; } /** * Gets ModR/M nullable byte. * * @return ModR/M nullable byte. * @since 1.1.0 */ const Nullable& getModRM() const { return _modRM; } /** * Gets ModR/M nullable byte. * * @return ModR/M nullable byte. * @since 1.1.0 */ Nullable& getModRM() { return _modRM; } /** * Sets ModR/M nullable byte. * * @param modRM ModR/M nullable byte. * @since 1.1.0 */ void setModRM( const Nullable &modRM ) { _modRM = modRM; } /** * Gets SIB nullable byte. * * @return SIB nullable byte. * @since 1.1.0 */ const Nullable& getSib() const { return _sib; } /** * Gets SIB nullable byte. * * @return SIB nullable byte. * @since 1.1.0 */ Nullable& getSib() { return _sib; } /** * Sets SIB nullable byte. * * @param sib The SIB nullable byte. * @since 1.1.0 */ void setSib( const Nullable &sib ) { _sib = sib; } private: /** ModR/M byte if exists.*/ Nullable _modRM; /** SIB byte if exists.*/ Nullable _sib; /** True if RIP encoding is used by decoded instruction. This flag is used only in 64 bit mode. */ bool _isRip; }; /** Additional details about an instruction. * @since 1.1.0 */ class InstructionDetails { public: /** * Gets address mode/instruction form. This information is used * internally and is rather useless in day to day usage, but if * you are interested in it do not hesitate to take a look at * the manual. * * @return Instruction form. * @since 1.1.0 */ fcml_uint16_t getAddrMode() const { return _addrMode; } /** * Sets instruction form. * * @param addrMode Addressing mode. * @since 1.1.0 */ void setAddrMode(fcml_uint16_t addrMode) { _addrMode = addrMode; } /** * Gets instruction code. See fcml_en_instruction for more details. * * @return Instruction code. * @since 1.1.0 */ fcml_en_instruction getInstruction() const { return _instruction; } /** * Gets a new instruction code for the instruction. * * @param instruction The new instruction code. * @since 1.1.0 */ void setInstruction(fcml_en_instruction instruction) { _instruction = instruction; } /** * Gets a pointer to the instruction code. See fcml_en_instruction for more details. * * @return The pointer to the instruction code. * @since 1.1.0 */ const fcml_uint8_t* getInstructionCode() const { return _instructionCode; } /** * Gets a pointer to the instruction code. See fcml_en_instruction for more details. * * @return The pointer to the instruction code. * @since 1.1.0 */ fcml_uint8_t* getInstructionCode() { return _instructionCode; } /** * Gets instruction group. See fcml_instructions.h for all available groups. * * @return The instruction group. * @since 1.1.0 */ fcml_uint64_t getInstructionGroup() const { return _instructionGroup; } /** * Sets an instruction group. See fcml_instructions.h for all available groups. * * @param instructionGroup The instruction group. * @since 1.1.0 */ void setInstructionGroup(fcml_uint64_t instructionGroup) { _instructionGroup = instructionGroup; } /** * Instruction size in bytes. * * @return Size of the instruction in bytes. * @since 1.1.0 */ fcml_usize getInstructionSize() const { return _instructionSize; } /** * Sets the instruction size in bytes. * * @param instructionSize The instruction size. * @since 1.1.0 */ void setInstructionSize(fcml_usize instructionSize) { _instructionSize = instructionSize; } /** * Gets true if it's a shortcut instruction. * * @return True if it's a shortcut instruction. * @since 1.1.0 */ bool isShortcut() const { return _isShortcut; } /** * Marks the instruction as a shortcut. * * @param isShortcut True if it's a shortcut instruction. * @since 1.1.0 */ void setShortcut(bool isShortcut) { _isShortcut = isShortcut; } /** * Gets ModR/M instruction details. * * @return ModR/M details. * @since 1.1.0 */ const DecodedModRMDetails& getModRmDetails() const { return _modRMDetails; } /** * Gets ModR/M instruction details. * * @return ModR/M details. * @since 1.1.0 */ DecodedModRMDetails& getModRmDetails() { return _modRMDetails; } /** * Sets a new instruction details for the instruction. * * @param modRmDetails The new instruction details. * @since 1.1.0 */ void setModRmDetails(const DecodedModRMDetails& modRmDetails) { _modRMDetails = modRmDetails; } /** * Gets opcode field 'S'. * * @return 'S' opcode field. * @since 1.1.0 */ bool isOpcodeFieldSBit() const { return _opcodeFieldSBit; } /** * Sets 'S' field of the opcode byte. * * @param opcodeFieldSBit 'S' opcode byte field. * @since 1.1.0 */ void setOpcodeFieldSBit(bool opcodeFieldSBit) { _opcodeFieldSBit = opcodeFieldSBit; } /** * Gets opcode field 'W'. * * @return 'W' opcode field. * @since 1.1.0 */ bool isOpcodeFieldWBit() const { return _opcodeFieldWBit; } /** * Sets 'W' field of the opcode byte. * * @param opcodeFieldWBit 'W' opcode byte field. * @since 1.1.0 */ void setOpcodeFieldWBit(bool opcodeFieldWBit) { _opcodeFieldWBit = opcodeFieldWBit; } /** * Gets the operand details for given index. * * @param index Index of the instruction details. * @return The operand details for the given index. * @throw BadArgumentException Array index out of bound. * @since 1.1.0 */ const OperandDetails& getOperandDetails( fcml_usize index ) const { if( index > FCML_OPERANDS_COUNT ) { throw BadArgumentException(FCML_TEXT("Array index out of bound."), FCML_CEH_GEC_VALUE_OUT_OF_RANGE); } return _operandDetails[index]; } /** * Gets the operand details for given index. * * @param index Index of the instruction details. * @return The operand details for the given index. * @throw BadArgumentException Array index out of bound. * @since 1.1.0 */ OperandDetails& getOperandDetails( fcml_usize index ) { if( index > FCML_OPERANDS_COUNT ) { throw BadArgumentException(FCML_TEXT("Array index out of bound."), FCML_CEH_GEC_VALUE_OUT_OF_RANGE); } return _operandDetails[index]; } /** * Gets instruction prefixes details. * * @return The instruction prefix details. * @since 1.1.0 */ const PrefixesDetails& getPrefixesDetails() const { return _prefixesDetails; } /** * Gets instruction prefixes details. * * @return The instruction prefix details. * @since 1.1.0 */ PrefixesDetails& getPrefixesDetails() { return _prefixesDetails; } /** * Sets a new instruction prefixes details. * * @param prefixesDetails The new prefixes details. * @since 1.1.0 */ void setPrefixesDetails(const PrefixesDetails& prefixesDetails) { _prefixesDetails = prefixesDetails; } /** * Gets pseudo operation code. * * @return The pseudo operation associated with the instruction. * @since 1.1.0 */ fcml_en_pseudo_operations getPseudoOp() const { return _pseudoOp; } /** * Sets pseudo operation for the instruction. * * @param pseudoOp The pseudo operation. * @since 1.1.0 */ void setPseudoOp(fcml_en_pseudo_operations pseudoOp) { _pseudoOp = pseudoOp; } /** * Gets true is it's a pseudo operation. * * @return True if the instruction is a pseudo operation. * @since 1.1.0 */ bool isPseudoOp() const { return _isPseudoOp; } /** * Sets pseudo operation flag. * * @param isPseudoOp True if the instruction is a pseudo operation. * @since 1.1.0 */ void setIsPseudoOp(bool isPseudoOp) { _isPseudoOp = isPseudoOp; } private: /** * True if this is a shortcut. * A good example of such instruction is 'cmpsb' as opposed to 'cmps byte ptr [si],byte ptr [di]'. * It is very important to take this information into consideration when instruction * models are analyzed because there is no operands in the GIM for shortcuts. */ bool _isShortcut; /** * True if given instruction is a short form of pseudo-ops instructions. See 'vcmpunordsd' for instance. */ bool _isPseudoOp; /** * Code of the disassembled instruction. */ fcml_uint8_t _instructionCode[FCML_INSTRUCTION_SIZE]; /** * Instruction size in bytes. */ fcml_usize _instructionSize; /** * Some additional information about decoded instruction prefixes. */ PrefixesDetails _prefixesDetails; /** * All disassembler specific information about operands going there. */ OperandDetails _operandDetails[FCML_OPERANDS_COUNT]; /** * Details about decoded ModR/M and SIB bytes. */ DecodedModRMDetails _modRMDetails; /** Opcode field 's'. * This is set only for informational purpose only and you should not use it for any critical functionality. */ bool _opcodeFieldSBit; /** Opcode field 'w'. * This is set only for informational purpose only and you should not use it for any critical functionality. */ bool _opcodeFieldWBit; /** * Instruction code/number. @see fcml_instructions.h header file. */ fcml_en_instruction _instruction; /** * Pseudo operation code. */ fcml_en_pseudo_operations _pseudoOp; /** * Code of the instruction form/addressing mode of the instruction above. */ fcml_uint16_t _addrMode; /** * Instruction group. */ fcml_uint64_t _instructionGroup; }; /** Disassembler result. * * It's a counterpart to the fcml_st_disassembler_result structure. * @since 1.1.0 */ class DisassemblerResult { public: /** * Gets errors container with errors related to the failed disassembling process. * * @return The error container. * @since 1.1.0 */ const ErrorContainer& getErrorContainer() const { return _errorContainer; } /** * Gets errors container with errors related to the failed disassembling process. * * @return The error container. * @since 1.1.0 */ const Instruction& getInstruction() const { return _instruction; } /** * Gets instruction details associated with the instruction. * * @return The instruction details. * @since 1.1.0 */ const InstructionDetails& getInstructionDetails() const { return _instructionDetails; } /** * Cleans the disassembling result. * @since 1.1.0 */ void clean() { _errorContainer.clean(); _instructionDetails = InstructionDetails(); _instruction = Instruction(); } protected: friend class Disassembler; friend class DisassemblerTypeConverter; /** * Gets mutable instruction details. * @return Instruction details. * @since 1.1.0 */ InstructionDetails& getInstructionDetails() { return _instructionDetails; } /** * Sets new instruction details for the disassembler. * @param instructionDetails The instruction details. * @since 1.1.0 */ void setInstructionDetails(const InstructionDetails& instructionDetails) { _instructionDetails = instructionDetails; } /** * Gets mutable instruction. * @return The mutable instruction. * @since 1.1.0 */ Instruction& getInstructionInternal() { return _instruction; } /** * Sets a new instruction for the result. * @param instruction The instruction to be copied to the result. * @since 1.1.0 */ void setInstruction(const Instruction& instruction) { _instruction = instruction; } /** * Sets error container. * @param errorContainer The error container. * @since 1.1.0 */ void setErrorContainer(const ErrorContainer& errorContainer) { _errorContainer = errorContainer; } private: /** Errors container */ ErrorContainer _errorContainer; /** Instruction details. */ InstructionDetails _instructionDetails; /** The disassembled instruction. */ Instruction _instruction; }; /** * Converts objects to their structures counterparts. * @since 1.1.0 * @remarks Internal API, not intended to be used outside. */ class DisassemblerTypeConverter { protected: friend class Disassembler; friend class Renderer; static void convert( const DisassemblerContext &src, fcml_st_disassembler_context &dest ) { dest.code = src.getCode(); dest.code_length = src.getCodeLength(); TypeConverter::convert( src.getEntryPoint(), dest.entry_point ); convert( src.getDisassemblerConf(), dest.configuration ); } static void convert( const DisassemblerConf &src, fcml_st_disassembler_conf &dest ) { dest.conditional_group = src.getConditionalGroup(); dest.carry_flag_conditional_suffix = src.isCarryFlagConditionalSuffix(); dest.enable_error_messages = src.isEnableErrorMessages(); dest.extend_disp_to_asa = src.isExtendDispToAsa(); dest.fail_if_unknown_instruction = src.isFailIfUnknownInstruction(); dest.increment_ip = src.isIncrementIp(); dest.short_forms = src.isShortForms(); } static void convert( const fcml_st_decoded_modrm_details &src, DecodedModRMDetails &dest ) { dest.setRip( FCML_TO_CPP_BOOL( src.is_rip ) ); Nullable modRM; modRM.setNotNull( FCML_TO_CPP_BOOL( src.is_modrm ) ); modRM.setValue( src.modrm ); Nullable &sib = dest.getSib(); sib.setNotNull( FCML_TO_CPP_BOOL( src.sib.is_not_null ) ); sib.setValue( src.sib.value ); } static void convert( const DecodedModRMDetails &src, fcml_st_decoded_modrm_details &dest ) { dest.is_modrm = src.getModRM().isNotNull(); dest.is_rip = src.isRip(); dest.modrm = src.getModRM().getValue(); fcml_nuint8_t &sib = dest.sib; sib.is_not_null = src.getSib().isNotNull(); sib.value = src.getSib().getValue(); } static void convert( const fcml_st_operand_details &src, OperandDetails &dest ) { dest.setAccessMode( static_cast( src.access_mode ) ); } static void convert( const OperandDetails &src, fcml_st_operand_details &dest ) { dest.access_mode = static_cast( src.getAccessMode() ); } static void convert( const fcml_st_instruction_prefix &src, InstructionPrefixDetails &dest ) { dest.setMandatoryPrefix( FCML_TO_CPP_BOOL( src.mandatory_prefix ) ); dest.setPrefix( src.prefix ); dest.setPrefixType( dest.getPrefixType() ); ::memcpy( dest.getVexXopBytes(), src.vex_xop_bytes, 2 ); } static void convert( const InstructionPrefixDetails &src, fcml_st_instruction_prefix &dest ) { dest.mandatory_prefix = src.isMandatoryPrefix(); dest.prefix = src.getPrefix(); dest.prefix_type = static_cast( src.getPrefixType() ); ::memcpy( dest.vex_xop_bytes, src.getVexXopBytes(), 2 ); } static void convert( const fcml_st_prefixes_details src, PrefixesDetails &dest ) { for( int i = 0; i < FCML_DASM_PREFIXES_COUNT; i++ ) { convert( src.prefixes[i], dest.getPrefixes( i ) ); } dest.setPrefixesCount( src.prefixes_count ); dest.setPrefixesBytesCount( src.prefixes_bytes_count ); dest.setBranch( FCML_TO_CPP_BOOL( src.is_branch ) ); dest.setNobranch( FCML_TO_CPP_BOOL( src.is_nobranch ) ); dest.setLock( FCML_TO_CPP_BOOL( src.is_lock ) ); dest.setRep( FCML_TO_CPP_BOOL( src.is_rep ) ); dest.setRepne( FCML_TO_CPP_BOOL( src.is_repne ) ); dest.setXrelease( FCML_TO_CPP_BOOL( src.is_xrelease ) ); dest.setXacquire( FCML_TO_CPP_BOOL( src.is_xacquire ) ); dest.setVex( FCML_TO_CPP_BOOL( src.is_vex ) ); dest.setXop( FCML_TO_CPP_BOOL( src.is_xop ) ); dest.setRex( FCML_TO_CPP_BOOL( src.is_rex ) ); dest.setVexXopFirstByte( src.vex_xop_first_byte ); dest.setR( src.r ); dest.setX( src.x ); dest.setB( src.b ); dest.setW( src.w ); dest.setL( src.l ); dest.setMmmm( src.mmmm ); dest.setVvvv( src.vvvv ); dest.setPp( src.pp ); } static void convert( const PrefixesDetails src, fcml_st_prefixes_details &dest ) { for( int i = 0; i < FCML_DASM_PREFIXES_COUNT; i++ ) { convert( src.getPrefixes(i), dest.prefixes[i] ); } dest.prefixes_count = src.getPrefixesCount(); dest.prefixes_bytes_count = src.getPrefixesBytesCount(); dest.is_branch = src.isBranch(); dest.is_nobranch = src.isNobranch(); dest.is_lock = src.isLock(); dest.is_rep = src.isRep(); dest.is_repne = src.isRepne(); dest.is_xrelease = src.isXrelease(); dest.is_xacquire = src.isXacquire(); dest.is_vex = src.isVex(); dest.is_xop = src.isXop(); dest.is_rex = src.isRex(); dest.vex_xop_first_byte = src.getVexXopFirstByte(); dest.r = src.getR(); dest.x = src.getX(); dest.b = src.getB(); dest.w = src.getW(); dest.l = src.getL(); dest.mmmm = src.getMmmm(); dest.vvvv = src.getVvvv(); dest.pp = src.getPp(); } static void convert( const fcml_st_instruction_details &src, InstructionDetails &dest ) { dest.setAddrMode( src.addr_mode ); dest.setInstruction( src.instruction ); dest.setInstructionGroup( src.instruction_group ); dest.setInstructionSize( src.instruction_size ); dest.setOpcodeFieldSBit( FCML_TO_CPP_BOOL( src.opcode_field_s_bit ) ); dest.setOpcodeFieldWBit( FCML_TO_CPP_BOOL( src.opcode_field_w_bit ) ); dest.setIsPseudoOp( FCML_TO_CPP_BOOL( src.is_pseudo_op ) ); dest.setPseudoOp( src.pseudo_op ); dest.setShortcut( FCML_TO_CPP_BOOL( src.is_shortcut ) ); convert( src.modrm_details, dest.getModRmDetails() ); for( int i = 0; i < FCML_OPERANDS_COUNT; i++ ) { convert( src.operand_details[i], dest.getOperandDetails(i) ); } convert( src.prefixes_details, dest.getPrefixesDetails() ); } static void convert( const InstructionDetails &src, fcml_st_instruction_details &dest ) { dest.addr_mode = src.getAddrMode(); dest.instruction = src.getInstruction(); dest.instruction_group = src.getInstructionGroup(); dest.instruction_size = src.getInstructionSize(); dest.opcode_field_s_bit = src.isOpcodeFieldSBit(); dest.opcode_field_w_bit = src.isOpcodeFieldWBit(); dest.is_pseudo_op = src.isPseudoOp(); dest.pseudo_op = src.getPseudoOp(); dest.is_shortcut = src.isShortcut(); convert( src.getModRmDetails(), dest.modrm_details ); for( int i = 0; i < FCML_OPERANDS_COUNT; i++ ) { convert( src.getOperandDetails(i), dest.operand_details[i] ); } convert( src.getPrefixesDetails(), dest.prefixes_details ); } static void convert( const fcml_st_disassembler_result &src, DisassemblerResult &dest ) { TypeConverter::convert( src.instruction, dest.getInstructionInternal() ); convert( src.instruction_details, dest.getInstructionDetails() ); } static void convert( const DisassemblerResult &src, fcml_st_disassembler_result &dest ) { TypeConverter::convert( src.getInstruction(), dest.instruction ); convert( src.getInstructionDetails(), dest.instruction_details ); } static void free( fcml_st_disassembler_result &src ) { TypeConverter::free( src.instruction ); } }; /** Disassembler wrapper. * @since 1.1.0 */ class Disassembler : public NonCopyable, protected DialectAware { public: /** * Creates a disassembler instance for the given dialect. * * @param dialect The dialect for the disassembler. * @throw InitException Cannot initialize the disassembler. * @since 1.1.0 */ Disassembler(Dialect &dialect) : _dialect(dialect) { fcml_ceh_error error = ::fcml_fn_disassembler_init( extractDialect( dialect ), &_disassembler); if (error) { throw InitException(FCML_TEXT("Cannot initialize the disassembler."), error); } } /** * Destructor. * @since 1.1.0 */ virtual ~Disassembler() { if (_disassembler) { ::fcml_fn_disassembler_free(_disassembler); _disassembler = NULL; } } public: /** * Disassembled the next instruction from the context. * * @param ctx Context describing the next instruction to disassemble. * @param[out] disassemblerResult Disassembler result. * @throw DisassemblingFailedException Disassemblation failed. * @return Error code. * @since 1.1.0 */ fcml_ceh_error disassemble( DisassemblerContext &ctx, DisassemblerResult &disassemblerResult ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_disassembler_context context; DisassemblerTypeConverter::convert( ctx, context ); context.disassembler = _disassembler; /* Prepare assembler result. */ fcml_st_disassembler_result disassembler_result; ::fcml_fn_disassembler_result_prepare( &disassembler_result ); try { disassemblerResult.clean(); error = ::fcml_fn_disassemble( &context, &disassembler_result ); ErrorContainer errorContainer; ErrorTypeConverter::convert( disassembler_result.errors, errorContainer ); disassemblerResult.setErrorContainer( errorContainer ); if( error && ctx.getDisassemblerConf().isThrowExceptionOnError() ) { ::fcml_fn_disassembler_result_free( &disassembler_result ); throw DisassemblingFailedException( FCML_TEXT("Assembling failed."), errorContainer, error ); } if( !error ) { // Convert result. DisassemblerTypeConverter::convert( disassembler_result, disassemblerResult ); ctx.getEntryPoint().setIP( context.entry_point.ip ); ctx.setCode( context.code ); ctx.setCodeLength( context.code_length ); } ::fcml_fn_disassembler_result_free( &disassembler_result ); } catch( std::exception &exc ) { // If anything failed, free assembler results. ::fcml_fn_disassembler_result_free( &disassembler_result ); throw exc; } return error; } /** * Gets dialect associated with the disassembler. * @return The dialect instance associated with the disassembler. * @since 1.1.0 */ Dialect& getDialect() const { return _dialect; } private: /** The dialect associated with the disassembler. */ Dialect &_dialect; /** The disassembler instance. */ fcml_st_disassembler *_disassembler; }; } #endif //FCML_DISASSEMBLER_HPP_ fcml-1.1.1/include/fcml_stateful_assembler.hpp0000644000175000017500000004117612560745216016416 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_stateful_assembler.hpp * Stateful FCML assembler implementation. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_STATEFUL_ASSEMBLER_HPP_ #define FCML_STATEFUL_ASSEMBLER_HPP_ #include #include "fcml_assembler.hpp" #include "fcml_parser.hpp" namespace fcml { /** * It's a stateful assembler which can be used to assemble instructions one by one on the fly. * By default is works with the general instruction models as well as with instruction builders, * but it can be also configured to parse whole statements using internally managed parser. * It holds it's own state, so it's not necessary to update instruction pointer etc while it's working. * Assembled instructions are placed inside a dedicated vector, but generated machine code is accessing * directly by the dedicated CodeIterator. * * @since 1.1.0 * @remarks This class isn't thread-safe. */ class StatefulAssembler { public: /** Used only to indicate the need of the flush operation. */ class SAFlush { }; /** * Creates a stateful assembler for the given assembler and assembler context. Bear in mind that * assembler and context are not copied in any way and have to be valid as long as the stateful assembler * in in use. Parsing support can be enabled optionally using the third parameter. * * @param assembler The assembled that will be used to assemble the code. * @param context The assembler context. * @param enableParser Enables parsing support. * @since 1.1.0 */ StatefulAssembler( Assembler &assembler, AssemblerContext &context, bool enableParser = false ) : _instructionBuilder(IB(FCML_TEXT(""))), _assembler(assembler), _context(context), _codeLength(0) { // Create parser if needed. _parser = enableParser ? new Parser( assembler.getDialect() ) : NULL; } /** Destructor. * @since 1.1.0 */ virtual ~StatefulAssembler() { if( _parser ) { delete _parser; } } /** * Adds instruction builder to the stateful assembler. Such a instruction * builder will be used then to assemble an instruction it represents. * Before any operation is performed, pending instruction is flushed if * there is any available. * * @param ib The instruction builder to be flushed. * @return The stateful assembler itself. * @throw AssemblingFailedException * @since 1.1.0 */ StatefulAssembler& operator <<(const IB &ib) { return add( ib ); } /** * Adds instruction builder to the stateful assembler. Such a instruction * builder will be used then to assemble an instruction it represents. * Before any operation is performed, pending instruction is flushed if * there is any available. * * @param ib The instruction builder to be flushed. * @return The stateful assembler itself. * @throw AssemblingFailedException * @since 1.1.0 */ StatefulAssembler& add(const IB &ib) { flush(); _instructionBuilder.setNotNull(true); _instructionBuilder.setValue(ib); return *this; } /** * Creates an instruction builder for the given mnemonic. * * @param mnemonic The instruction mnemonic. * @return The stateful assembler itself. * @throw AssemblingFailedException, ParsingFailedException * @since 1.1.0 */ StatefulAssembler& operator <<(const fcml_cstring &mnemonic) { return inst( mnemonic ); } /** * Creates an instruction builder for the given mnemonic. * * @param mnemonic The instruction mnemonic. * @return The stateful assembler itself. * @throw AssemblingFailedException, ParsingFailedException * @since 1.1.0 */ StatefulAssembler& inst(const fcml_cstring &mnemonic) { flush(); if( _parser ) { // Parse instruction and then pass it to the assembler. _parserContext.setIp( _context.getEntryPoint().getIP() ); ParserConfig &config = _parserContext.getConfig(); config.setThrowExceptionOnError(true); _parser->parse( _parserContext, mnemonic, _parserResult ); *this << _parserResult.getInstruction(); } else { // Parser is not available, so treat this string as a full instruction which // have to be parsed. _instructionBuilder.setNotNull(true); _instructionBuilder.setValue(IB(mnemonic)); } return *this; } /** * Adds the new register operand to the instruction builder associated with the buffer. * * @param reg The register. * @return The stateful assembler itself. * @throw IllegalStateException * @since 1.1.0 */ StatefulAssembler& operator <<(const Register ®) { return op( Operand( reg ) ); } /** * Adds the new immediate operand to the instruction builder associated with the buffer. * * @param imm The immediate value. * @return The stateful assembler itself. * @throw IllegalStateException * @since 1.1.0 */ StatefulAssembler& operator <<(const Integer &imm) { return op( Operand( imm ) ); } /** * Adds the new address operand to the instruction builder associated with the buffer. * * @param address The address. * @return The stateful assembler itself. * @throw IllegalStateException * @since 1.1.0 */ StatefulAssembler& operator <<(const Address &address) { return op( Operand( address ) ); } /** * Adds the new far pointer operand to the instruction builder associated with the buffer. * * @param pointer The far pointer. * @return The stateful assembler itself. * @throw IllegalStateException * @since 1.1.0 */ StatefulAssembler& operator <<(const FarPointer &pointer) { return op( Operand( pointer ) ); } /** * Adds an operand to the instruction builder associated with the buffer. * * @param operand The operand to be added. * @return The stateful assembler itself. * @throw IllegalStateException * @since 1.1.0 */ StatefulAssembler& operator <<(const Operand &operand) { return op( operand ); } /** * Adds an operand to the instruction builder associated with the buffer. * * @param operand The operand to be added.. * @return The stateful assembler itself. * @throw IllegalStateException * @since 1.1.0 */ StatefulAssembler& op(const Operand &operand) { if( !_instructionBuilder.isNotNull() ) { throw IllegalStateException( FCML_TEXT( "No instruction builder available." ) ); } IB &ib = _instructionBuilder.getValue(); ib.op( operand ); return *this; } /** * Adds the new register operand to the instruction builder associated with the buffer. * * @param reg The register. * @return The stateful assembler itself. * @throw IllegalStateException * @since 1.1.0 */ StatefulAssembler& op(const Register ®) { return op( Operand( reg ) ); } /** * Adds the new immediate operand to the instruction builder associated with the buffer. * * @param imm The immediate value. * @return The stateful assembler itself. * @throw IllegalStateException * @since 1.1.0 */ StatefulAssembler& op(const Integer &imm) { return op( Operand( imm ) ); } /** * Adds the new address operand to the instruction builder associated with the buffer. * * @param address The address. * @return The stateful assembler itself. * @throw IllegalStateException * @since 1.1.0 */ StatefulAssembler& op(const Address &address) { return op( Operand( address ) ); } /** * Adds the new far pointer operand to the instruction builder associated with the buffer. * * @param pointer The far pointer. * @return The stateful assembler itself. * @throw IllegalStateException * @since 1.1.0 */ StatefulAssembler& op(const FarPointer &pointer) { return op( Operand( pointer ) ); } /** * Flushes the instruction builder. * @param indic Flush indicator. * @return The stateful assembler itself. * @throw AssemblingFailedException * @since 1.1.0 */ StatefulAssembler& operator <<(const SAFlush &indic) { flush(); return *this; } /** * Assembles an instruction in the given instruction builder. * * @param instruction Instruction to be assembled. * @return Stateful assembler. * @throw AssemblingFailedException * @since 1.1.0 */ StatefulAssembler& operator <<(const Instruction &instruction) { return inst( instruction ); } /** * Adds a prefix to the instruction being built. * @param prefix The prefix to be added. * @return The instruction builder with the new prefix set for it. * @since 1.1.0 */ StatefulAssembler& operator <<(const InstructionPrefix &prefix) { return set(prefix); } /** * Adds an instruction level hint to the instruction being built. * @param hint The hint to be added. * @return The instruction builder with the new hint added to it. * @since 1.1.0 */ StatefulAssembler& operator <<(const InstructionHint &hint) { return set( hint ); } /** * Adds an operand level hint to the instruction being built. * @param hint The hint to be added. * @return The instruction builder with the new hint added to it. * @since 1.1.0 */ StatefulAssembler& operator <<(const OperandHint &hint) { return set( hint ); } /** * Adds a prefix to the instruction being built. * @param prefix The prefix to be added. * @return The instruction builder with the new prefix set for it. * @since 1.1.0 */ StatefulAssembler& set( const InstructionPrefix &prefix ) { if( !_instructionBuilder.isNotNull() ) { throw IllegalStateException( FCML_TEXT( "No instruction builder available." ) ); } _instructionBuilder.getValue() << prefix; return *this; } /** * Adds an instruction level hint to the instruction being built. * @param hint The hint to be added. * @return The instruction builder with the new hint added to it. * @since 1.1.0 */ StatefulAssembler& set( const InstructionHint &hint ) { if( !_instructionBuilder.isNotNull() ) { throw IllegalStateException( FCML_TEXT( "No instruction builder available." ) ); } _instructionBuilder.getValue() << hint; return *this; } /** * Adds an operand level hint to the instruction being built. * @param hint The hint to be added. * @return The instruction builder with the new hint added to it. * @since 1.1.0 */ StatefulAssembler& set( const OperandHint &hint ) { if( !_instructionBuilder.isNotNull() ) { throw IllegalStateException( FCML_TEXT( "No instruction builder available." ) ); } _instructionBuilder.getValue() << hint; return *this; } /** * Assembles an instruction in the given instruction builder. * * @param instruction Instruction to be assembled. * @return Stateful assembler. * @throw AssemblingFailedException * @since 1.1.0 */ StatefulAssembler& inst(const Instruction &instruction) { // Flush pending instruction if there is any. flush(); // Just in case. AssemblerConf& config = _context.getConfig(); config.setIncrementIp( true ); config.setThrowExceptionOnError( true ); // Assembler the instruction. _assembler.assemble( _context, instruction, _result ); // Store the chosen assembled instruction for future use. const AssembledInstruction *assembledInstruction = _result.getChosenInstruction(); if( assembledInstruction ) { _assembledInstructions.push_back( *assembledInstruction ); _codeLength += assembledInstruction->getCodeLength(); } else { throw AssemblingFailedException( FCML_TEXT( "Chosen instruction hasn't been set. It seems that the instruction chooser isn't working correctly." ) ); } return *this; } /** * Gets iterator which allows to iterate through the whole machine code byte by byte. * * @return Iterator instance. * @since 1.1.0 */ CodeIterator getCodeIterator() { flush(); return CodeIterator( _assembledInstructions ); } /** * Gets all chosen assembled instructions. * * @return All assembled instructions available in the buffer. * @since 1.1.0 */ std::vector& getAssembledInstructions() { flush(); return _assembledInstructions; } /** * Gets the code length of all assembled instructions available. * * @return The code length. * @since 1.1.0 */ fcml_usize getCodeLength() { flush(); return _codeLength; } /** * Assembles all pending instructions. * @since 1.1.0 * @throw AssemblingFailedException */ void flush() { if( _instructionBuilder.isNotNull() ) { // Build an instruction using the instruction builder. Instruction instruction = _instructionBuilder.getValue().build(); // And clean the builder, is everything succeed. _instructionBuilder.setNotNull(false); // Assemble the instruction. *this << instruction; } } /** * Creates flush indicated for "shift" operators. * @return Flush indicator. * @since 1.1.0 */ static SAFlush FLUSH() { return SAFlush(); } /** Gets configuration used by parser if parsing is supported. * @return Parser configuration. */ const ParserConfig& getParserConfig() const { return _parserContext.getConfig(); } /** Gets configuration used by parser if parsing is supported. * @return Parser configuration. * @since 1.1.0 */ ParserConfig& getParserConfig() { return _parserContext.getConfig(); } /** * Gets symbol table used together with the parser. * @return The symbol table used by the parser. * @since 1.1.0 */ const SymbolTable* getSymbolTable() const { return _parserContext.getSymbolTable(); } /** * Gets symbol table used together with the parser. * @return The symbol table used by the parser. * @since 1.1.0 */ SymbolTable* getSymbolTable() { return _parserContext.getSymbolTable(); } /** * Sets a new symbol table for the parser. * @param symbolTable The new symbol table. * @since 1.1.0 */ void setSymbolTable( SymbolTable *symbolTable ) { _parserContext.setSymbolTable( symbolTable ); } private: /** An instruction parser. */ Parser *_parser; /** Parser result used when parsing is supported. */ ParserResult _parserResult; /** Parser context. */ ParserContext _parserContext; /** A disassembled result used by the assembler when needed. */ AssemblerResult _result; /** Currently used instruction builder. */ Nullable _instructionBuilder; /* Assembler used to assemble code. */ Assembler &_assembler; /** Assembler context. */ AssemblerContext &_context; // Assembled instructions. std::vector _assembledInstructions; /** Length of the code assembled so far. */ fcml_usize _codeLength; }; } #endif /* FCML_STATEFUL_ASSEMBLER_HPP_ */ fcml-1.1.1/include/fcml_choosers.h0000644000175000017500000000572712560745216014021 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_choosers.h * * API for instruction choosers. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_CHOOSER_H_ #define FCML_CHOOSER_H_ #include "fcml_lib_export.h" #include "fcml_types.h" #include "fcml_common.h" #ifdef __cplusplus extern "C" { #endif /** Returns next instructions from the iterator. * Instruction chooser uses this function to get next instruction from the chain. * @param instruction Current instruction. */ typedef fcml_ptr (*fcml_fnp_chooser_next)( fcml_ptr instruction ); /** Gets instruction code from current abstract instruction pointer. * Gets instruction pointer and fills given instruction code * holder with the binary code of the instruction. * @param instruction Instruction pointer. * @param instruction_code Holder for the instruction code. */ typedef void (*fcml_fnp_chooser_extract)( fcml_ptr instruction, fcml_st_instruction_code *instruction_code ); /** Instruction chooser context used to communicate with environment. */ typedef struct fcml_st_chooser_context { /** First instruction in the chain. */ fcml_ptr instruction; /** Gets next instruction code from iterator. */ fcml_fnp_chooser_next next; /** Extracts instruction code from abstract instruction pointer.*/ fcml_fnp_chooser_extract extract; } fcml_st_chooser_context; /** Instruction chooser function pointer declaration. * @param chooser_context Instruction chooser context. */ typedef fcml_ptr (LIB_CALL *fcml_fnp_asm_instruction_chooser)( fcml_st_chooser_context *chooser_context ); /** Default instruction chooser which chooses the shortest instruction available. * @param chooser_context Instruction chooser context. */ fcml_ptr LIB_EXPORT LIB_CALL fcml_fn_asm_default_instruction_chooser( fcml_st_chooser_context *chooser_context ); /** NULL chooser which do not chose anything. * @param chooser_context Instruction chooser context. */ fcml_ptr LIB_EXPORT LIB_CALL fcml_fn_asm_no_instruction_chooser( fcml_st_chooser_context *chooser_context ); #ifdef __cplusplus } #endif #endif /* FCML_CHOOSER_H_ */ fcml-1.1.1/include/fcml_parser.hpp0000644000175000017500000002765612560745216014035 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_parser.hpp * C++ wrapper for instruction parser. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_PARSER_HPP_ #define FCML_PARSER_HPP_ #include "fcml_common.hpp" #include "fcml_symbols.hpp" #include "fcml_errors.hpp" #include "fcml_dialect.hpp" #include "fcml_parser.h" namespace fcml { /** * Something failed while parsing. * @since 1.1.0 */ class ParsingFailedException: public ErrorContainerAwareException { public: ParsingFailedException( const fcml_cstring msg, ErrorContainer &errorContainer, fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR ) : ErrorContainerAwareException( msg, errorContainer, error ){ } }; /** Parser configuration. * @since 1.1.0 */ class ParserConfig { public: /** * Default constructor. * @since 1.1.0 */ ParserConfig() : _throwExceptionOnError(true), _ignoreUndefinedSymbols(false), _disableSymbolsDeclaration(true), _overrideLabels(false), _allocSymbolTableIfNeeded(false), _enableErrorMessages(true) { } /** @since 1.1.0 */ bool isAllocSymbolTableIfNeeded() const { return _allocSymbolTableIfNeeded; } /** @since 1.1.0 */ void setAllocSymbolTableIfNeeded(bool allocSymbolTableIfNeeded) { _allocSymbolTableIfNeeded = allocSymbolTableIfNeeded; } /** @since 1.1.0 */ bool isDisableSymbolsDeclaration() const { return _disableSymbolsDeclaration; } /** @since 1.1.0 */ void setDisableSymbolsDeclaration(bool disableSymbolsDeclaration) { _disableSymbolsDeclaration = disableSymbolsDeclaration; } /** @since 1.1.0 */ bool isEnableErrorMessages() const { return _enableErrorMessages; } /** @since 1.1.0 */ void setEnableErrorMessages(bool enableErrorMessages) { _enableErrorMessages = enableErrorMessages; } /** @since 1.1.0 */ bool isIgnoreUndefinedSymbols() const { return _ignoreUndefinedSymbols; } /** @since 1.1.0 */ void setIgnoreUndefinedSymbols(bool ignoreUndefinedSymbols) { _ignoreUndefinedSymbols = ignoreUndefinedSymbols; } /** @since 1.1.0 */ bool isOverrideLabels() const { return _overrideLabels; } /** @since 1.1.0 */ void setOverrideLabels(bool overrideLabels) { _overrideLabels = overrideLabels; } /** * Gets true if exception should be thrown in case of error. * @return True if exception should be thrown in case of error. * @since 1.1.0 */ bool isThrowExceptionOnError() const { return _throwExceptionOnError; } /** * Sets exception on error flag. Has to be set to true if exception should be thrown in case of error. * @param throwExceptionOnError True if exception should be thrown in case of error. * @since 1.1.0 */ void setThrowExceptionOnError(bool throwExceptionOnError) { _throwExceptionOnError = throwExceptionOnError; } private: bool _throwExceptionOnError; bool _ignoreUndefinedSymbols; bool _disableSymbolsDeclaration; bool _overrideLabels; bool _allocSymbolTableIfNeeded; bool _enableErrorMessages; }; /** Parser context. * @since 1.1.0 */ class ParserContext { public: /** * Creates a parser context instance for optional instruction pointer. * * @param ip The instruction pointer. * @since 1.1.0 */ ParserContext( fcml_ip ip = 0 ) : _ip(ip), _symbolTable(NULL) { } /** * Creates a parser context for given symbol table and optional instruction pointer. * * @param symbolTable The symbol table. * @param ip The instruction pointer. * @since 1.1.0 */ ParserContext( SymbolTable *symbolTable, fcml_ip ip = 0 ) : _ip(ip), _symbolTable(symbolTable) { } public: /** * Gets the parser configuration associated with the context. * * @return The parser configuration associated with the context. * @since 1.1.0 */ const ParserConfig& getConfig() const { return _config; } /** * Gets the parser configuration associated with the context. * * @return The parser configuration associated with the context. * @since 1.1.0 */ ParserConfig& getConfig() { return _config; } /** * Gets the instruction pointer. * * @return The instruction pointer. * @since 1.1.0 */ fcml_ip getIp() const { return _ip; } /** * Gets a new instruction pointer. * * @param ip The new instruction pointer. * @since 1.1.0 */ void setIp(fcml_ip ip) { _ip = ip; } /** * Increments instruction pointer by given number of bytes. * * @param ip The number of bytes the instruction pointer has to be incremented by. * @since 1.1.0 */ void incrementIP( fcml_ip ip ) { _ip += ip; } /** * Gets the symbol table associated with the context. * * @return The symbol table. * @since 1.1.0 */ const SymbolTable* getSymbolTable() const { return _symbolTable; } /** * Gets the symbol table associated with the context. * * @return The symbol table. * @since 1.1.0 */ SymbolTable* getSymbolTable() { return _symbolTable; } /** * Sets a symbol table for the instruction. * * @param symbolTable The symbol table for the parser context. * @since 1.1.0 */ void setSymbolTable(SymbolTable* symbolTable) { _symbolTable = symbolTable; } private: /** The instruction pointer used by declared labels. */ fcml_ip _ip; /** The parser configuration. */ ParserConfig _config; /** The symbol table. */ SymbolTable *_symbolTable; }; /** Parser result. * @since 1.1.0 */ class ParserResult { public: /** * Creates an empty parser result. * @since 1.1.0 */ ParserResult() { } /** * Gets errors container with parsing errors. * * @return Errors container. * @since 1.1.0 */ const ErrorContainer& getErrors() const { return _errors; } /** * Gets the parsed instruction. * * @return The parsed instruction. * @since 1.1.0 */ const Instruction& getInstruction() const { return _instruction; } /** * Gets declared symbol is there is any. * @return Gets symbol if there is any. * @since 1.1.0 */ const Nullable &getSymbol() const { return _symbol; } /** * Cleans the parser result. * @since 1.1.0 */ void clean() { _errors.clean(); _symbol.setNotNull(false); _symbol.setValue(Symbol()); } protected: friend class Parser; /** * Sets error container for the context. * @param errors A new error container. * @since 1.1.0 */ void setErrors(const ErrorContainer& errors) { _errors = errors; } /** * Sets an instruction for the container. * @param instruction The instruction. * @since 1.1.0 */ void setInstruction(const Instruction& instruction) { _instruction = instruction; } /** * Sets symbol. * @param symbol The symbol. * @since 1.1.0 */ void setSymbol(const Nullable& symbol) { _symbol = symbol; } private: /** Errors container. */ ErrorContainer _errors; /** Gets declared symbol. Take into account that it can be 'empty'. */ Nullable _symbol; /** The parsed instruction. */ Instruction _instruction; }; /** * Converts objects to their structures counterparts. * @since 1.1.0 * @remarks Internal API, not intended to be used outside. */ class ParserTypeConverter { public: static void convert( ParserConfig &src, fcml_st_parser_config &dest ) { dest.alloc_symbol_table_if_needed = src.isAllocSymbolTableIfNeeded(); dest.disable_symbols_declaration = src.isDisableSymbolsDeclaration(); dest.enable_error_messages = src.isEnableErrorMessages(); dest.ignore_undefined_symbols = src.isIgnoreUndefinedSymbols(); dest.override_labels = src.isOverrideLabels(); } }; /** Parser wrapper. * @since 1.1.0 */ class Parser: protected DialectAware, protected SymbolTableAware { public: /** * Creates a parser instance for the given dialect. * * @param dialect The dialect instance. * @since 1.1.0 */ Parser( const Dialect &dialect ) : _dialect(dialect) { } /** * Parses instruction given in the parameters. * * @param ctx Parser context. * @param instruction Instruction mnemonic. * @param[out] parserResult Instruction result. * @return Error code. * @throw ParsingFailedException Parsing failed. * @since 1.1.0 */ fcml_ceh_error parse( ParserContext &ctx, const fcml_cstring &instruction, ParserResult &parserResult ) { // Prepare parser context. fcml_st_parser_context context = {0}; ParserTypeConverter::convert( ctx.getConfig(), context.configuration ); context.ip = ctx.getIp(); SymbolTable *symbolTable = ctx.getSymbolTable(); context.symbol_table = ( symbolTable ) ? extractSymbolTable( *symbolTable ) : NULL; context.dialect = extractDialect( _dialect ); fcml_st_parser_result parser_result; ::fcml_fn_parser_result_prepare( &parser_result ); try { parserResult.clean(); // Prepare instruction. fcml_ceh_error error = ::fcml_fn_parse( &context, instruction.c_str(), &parser_result ); ErrorContainer errorContainer; ErrorTypeConverter::convert( parser_result.errors, errorContainer ); parserResult.setErrors( errorContainer ); if( !error && !parser_result.instruction ) { // Just in case, it should never happen. error = FCML_CEH_GEC_INTERNAL_ERROR; } if( error && ctx.getConfig().isThrowExceptionOnError() ) { ::fcml_fn_parser_result_free( &parser_result ); throw ParsingFailedException( errorContainer.prepareErrorMessage( FCML_TEXT("Parsing failed") ), errorContainer, error ); } if( !error ) { Instruction parsedInstruction; TypeConverter::convert( *(parser_result.instruction), parsedInstruction ); parserResult.setInstruction( parsedInstruction ); parserResult.setSymbol( parser_result.symbol ? Symbol( parser_result.symbol->symbol, parser_result.symbol->value ) : Symbol() ); } ::fcml_fn_parser_result_free( &parser_result ); } catch( std::exception &exc ) { // If anything failed, free assembler results. ::fcml_fn_parser_result_free( &parser_result ); throw exc; } return FCML_CEH_GEC_NO_ERROR; } private: /** The dialect for the parser. */ const Dialect &_dialect; }; } #endif /* FCML_PARSER_HPP_ */ fcml-1.1.1/include/fcml_optimizers.h0000644000175000017500000001240612560745216014371 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_optimizers.h * API for assembler optimizers. For more details about optimizers see FCML manual. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_OPTIMIZERS_H_ #define FCML_OPTIMIZERS_H_ #include "fcml_lib_export.h" #include "fcml_types.h" #include "fcml_errors.h" #include "fcml_common.h" #ifdef __cplusplus extern "C" { #endif /** Optimizer context used as a connector with the environment. */ typedef struct fcml_st_asm_optimizer_context { /** Optimizer flags passed through the assembler context. @see fcml_st_assembler_conf*/ fcml_uint16_t optimizer_flags; /** Processor operating mode 16/32/64-bit. */ fcml_en_operating_mode op_mode; /** Default address size attribute not modified by prefixes yet. (See 'D' flag of segment descriptor.)*/ fcml_usize asa; /** Default operand size attribute not modified by prefixes yet. (See 'D' flag of segment descriptor.)*/ fcml_usize osa; } fcml_st_asm_optimizer_context; /** Processing details for optimizers. */ typedef struct fcml_st_asm_optimizer_processing_details { /** Allowed values of the operand size attribute calculated by the assembler engine. * It is optimizer who decides which one should be finally used. */ fcml_st_nullable_size_flags allowed_eosa; /** Allowed values of the address size attribute calculated by the assembler engine. * It is optimizer who decides which one should be finally used. */ fcml_st_nullable_size_flags allowed_easa; /** Effective address size attribute chosen for currently processed instruction form. * If it is set it can not be changed anymore. It has higher priority than flags * above. Take into account that it is effective attribute size attribute so it can be * forced using instruction prefixes to override the default attribute size. */ fcml_usize easa; /** Effective operand size attribute chosen for currently processed instruction form. * If it is set it can not be changed anymore. It has higher priority than flags * above. Take into account that it is effective operand size attribute so it can be * forced using instruction prefixes to override the default attribute size. */ fcml_usize eosa; /** L bit from VEX like prefixes set for encoded instruction.*/ fcml_nuint8_t l; /** Set to true in order to break optimization process immediately.*/ fcml_bool break_optimization; } fcml_st_asm_optimizer_processing_details; /** * Callback used to invoke encoding process for given processing details configuration. * @param args Arguments from optimizer. * @return Error code or FCML_CEH_GEC_NO_ERROR. */ typedef fcml_ceh_error (*fcml_fnp_asm_optimizer_callback)( fcml_ptr args ); /** * Function pointer declaration for optimizers. * @param context Optimizer context. * @param ds_flags Current instruction processing details. * @param callback Callback used to continue processing for configuration prepared by optimizer. * @param args Arguments that should be passed to the callback. * @return Error code or FCML_CEH_GEC_NO_ERROR. */ typedef fcml_ceh_error (LIB_CALL *fcml_fnp_asm_optimizer)( fcml_st_asm_optimizer_context *context, fcml_st_asm_optimizer_processing_details *ds_flags, fcml_fnp_asm_optimizer_callback callback, fcml_ptr args ); /* Optimizers flags that can be used to configure optimization process. */ #define FCML_OPTF_ASA_16 0x01 #define FCML_OPTF_ASA_32 0x02 #define FCML_OPTF_ASA_64 0x03 #define FCML_OPTF_OSA_16 0x10 #define FCML_OPTF_OSA_32 0x20 #define FCML_OPTF_OSA_64 0x30 #define FCML_OPTF_ALL_FORMS 0xFF /** * Default optimizer implementation. * This implementation chooses the best combination of attributes for current processor operating mode. * @param context Optimizer context. * @param ds_flags Current instruction processing details. * @param callback Callback used to continue processing for configuration prepared by optimizer. * @param callback_args Arguments that should be passed to the callback. * @return Error code or FCML_CEH_GEC_NO_ERROR. */ LIB_EXPORT fcml_ceh_error LIB_CALL fcml_fn_asm_default_optimizer( fcml_st_asm_optimizer_context *context, fcml_st_asm_optimizer_processing_details *ds_flags, fcml_fnp_asm_optimizer_callback callback, fcml_ptr callback_args ); #ifdef __cplusplus } #endif #endif /* FCML_OPTIMIZERS_H_ */ fcml-1.1.1/include/fcml_types.h0000644000175000017500000001453012560745216013330 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_types.h * Types declarations. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_TYPES_H_ #define FCML_TYPES_H_ /* If config.h is available, we depend on it; otherwise we give * the responsibility to handle headers appropriately to the compiler runtime. **/ #ifdef HAVE_CONFIG_H #include #ifdef HAVE_STDDEF_H #include #endif #if HAVE_STDINT_H #include #endif #if HAVE_INTTYPES_H #include #endif #else #if defined(_MSC_VER) && defined(_WIN32) #include #define FCML_MSCC /* Disable unit specific lexer features. */ #define YY_NO_INPUT 1 #define YY_NO_UNISTD_H 1 #else #include #include #include #endif #endif #include "fcml_lib_export.h" /** Used to code literal strings. It will be useful if FCML supports UNICODE in the future. */ #define FCML_TEXT(x) x #define _FT(x) FCML_TEXT(x) #ifdef FCML_MSCC #define FCML_PRI_INT8_DEC "%d" #define FCML_PRI_INT16_DEC "%d" #define FCML_PRI_INT32_DEC "%d" #define FCML_PRI_INT64_DEC "%lld" #define FCML_PRI_UINT8_DEC "%u" #define FCML_PRI_UINT16_DEC "%u" #define FCML_PRI_UINT32_DEC "%u" #define FCML_PRI_UINT64_DEC "%llu" #define FCML_PRI_INT8_HEX "%02x" #define FCML_PRI_INT16_HEX "%04x" #define FCML_PRI_INT32_HEX "%08x" #define FCML_PRI_INT64_HEX "%016llx" #define FCML_PRI_INT8_HEX_NO_ZEROS "%x" #define FCML_PRI_INT16_HEX_NO_ZEROS "%x" #define FCML_PRI_INT32_HEX_NO_ZEROS "%x" #define FCML_PRI_INT64_HEX_NO_ZEROS "%llx" typedef int fcml_int; typedef int fcml_bool; typedef __int8 fcml_int8_t; typedef unsigned __int8 fcml_uint8_t; typedef __int16 fcml_int16_t; typedef unsigned __int16 fcml_uint16_t; typedef __int32 fcml_int32_t; typedef unsigned __int32 fcml_uint32_t; typedef __int64 fcml_int64_t; typedef unsigned __int64 fcml_uint64_t; /* Signed integers. */ #define FCML_INT64_MAX _I64_MAX #define FCML_INT64_MIN _I64_MIN #define FCML_INT32_MAX INT_MAX #define FCML_INT32_MIN INT_MIN #define FCML_INT16_MAX SHRT_MAX #define FCML_INT16_MIN SHRT_MIN #define FCML_INT8_MAX SCHAR_MAX #define FCML_INT8_MIN SCHAR_MIN /* Unsigned integers. */ #define FCML_UINT8_MAX UCHAR_MAX #define FCML_UINT16_MAX USHRT_MAX #define FCML_UINT32_MAX UINT_MAX #define FCML_UINT64_MAX _UI64_MAX #else #ifdef PRId8 #define FCML_PRI_INT8_DEC "%"PRId8 #endif #ifdef PRId16 #define FCML_PRI_INT16_DEC "%"PRId16 #endif #ifdef PRId32 #define FCML_PRI_INT32_DEC "%"PRId32 #endif #ifdef PRId64 #define FCML_PRI_INT64_DEC "%"PRId64 #endif #ifdef PRIu8 #define FCML_PRI_UINT8_DEC "%"PRIu8 #endif #ifdef PRIu16 #define FCML_PRI_UINT16_DEC "%"PRIu16 #endif #ifdef PRIu32 #define FCML_PRI_UINT32_DEC "%"PRIu32 #endif #ifdef PRIu64 #define FCML_PRI_UINT64_DEC "%"PRIu64 #endif #ifdef PRIx8 #define FCML_PRI_INT8_HEX "%02"PRIx8 #endif #ifdef PRIx16 #define FCML_PRI_INT16_HEX "%04"PRIx16 #endif #ifdef PRIx32 #define FCML_PRI_INT32_HEX "%08"PRIx32 #endif #ifdef PRIx64 #define FCML_PRI_INT64_HEX "%016"PRIx64 #endif #ifdef PRIx8 #define FCML_PRI_INT8_HEX_NO_ZEROS "%"PRIx8 #endif #ifdef PRIx16 #define FCML_PRI_INT16_HEX_NO_ZEROS "%"PRIx16 #endif #ifdef PRIx32 #define FCML_PRI_INT32_HEX_NO_ZEROS "%"PRIx32 #endif #ifdef PRIx64 #define FCML_PRI_INT64_HEX_NO_ZEROS "%"PRIx64 #endif typedef int fcml_int; typedef unsigned int fcml_uint; typedef int fcml_bool; typedef int8_t fcml_int8_t; typedef uint8_t fcml_uint8_t; typedef int16_t fcml_int16_t; typedef uint16_t fcml_uint16_t; typedef int32_t fcml_int32_t; typedef uint32_t fcml_uint32_t; typedef int64_t fcml_int64_t; typedef uint64_t fcml_uint64_t; /* Signed integers. */ #define FCML_INT64_MAX INT64_MAX #define FCML_INT64_MIN INT64_MIN #define FCML_INT32_MAX INT32_MAX #define FCML_INT32_MIN INT32_MIN #define FCML_INT16_MAX INT16_MAX #define FCML_INT16_MIN INT16_MIN #define FCML_INT8_MAX INT8_MAX #define FCML_INT8_MIN INT8_MIN /* Unsigned integers. */ #define FCML_UINT8_MAX UINT8_MAX #define FCML_UINT16_MAX UINT16_MAX #define FCML_UINT32_MAX UINT32_MAX #define FCML_UINT64_MAX UINT64_MAX #endif typedef char fcml_char; #define fcml_string char* typedef float fcml_float; typedef void* fcml_ptr; typedef fcml_uint32_t fcml_flags; typedef fcml_uint32_t fcml_usize; typedef fcml_int32_t fcml_size; #define FCML_TRUE 1 #define FCML_FALSE 0 /* Macro for bit manipulations. */ #define FCML_TP_SET_BIT(x,y) ( ( x ) | ( 0x01 << ( y ) ) ) #define FCML_TP_GET_BIT(x,y) ( ( x >> y ) & 0x01 ) #define FCML_TP_CLEAR_BIT(x,y) ( ( x ) &= ~( 1 << ( y ) ) ) /* Nulleable types. */ typedef struct fcml_nuint8_t { fcml_uint8_t value; fcml_bool is_not_null; } fcml_nuint8_t; typedef struct fcml_nuint16_t { fcml_uint16_t value; fcml_bool is_not_null; } fcml_nuint16_t; typedef struct fcml_nuint32_t { fcml_uint32_t value; fcml_bool is_not_null; } fcml_nuint32_t; typedef struct fcml_nuint64_t { fcml_uint64_t value; fcml_bool is_not_null; } fcml_nuint64_t; typedef struct fcml_nint8_t { fcml_int8_t value; fcml_bool is_not_null; } fcml_nint8_t; typedef struct fcml_nint16_t { fcml_int16_t value; fcml_bool is_not_null; } fcml_nint16_t; typedef struct fcml_nint32_t { fcml_int32_t value; fcml_bool is_not_null; } fcml_nint32_t; typedef struct fcml_nint64_t { fcml_int64_t value; fcml_bool is_not_null; } fcml_nint64_t; typedef struct fcml_st_integer { fcml_usize size; fcml_bool is_signed; // Data fields. fcml_int8_t int8; fcml_int16_t int16; fcml_int32_t int32; fcml_int64_t int64; } fcml_st_integer; #endif /* FCML_TYPES_H_ */ fcml-1.1.1/include/fcml_intel_dialect.hpp0000644000175000017500000000360012560745216015320 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_intel_dialect.hpp * C++ wrapper for the Intel dialect. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_INTEL_DIALECT_HPP_ #define FCML_INTEL_DIALECT_HPP_ #include "fcml_dialect.hpp" #include "fcml_intel_dialect.h" namespace fcml { /** Wraps the Intel dialect. * @since 1.1.0 */ class IntelDialect: public Dialect { public: /** * Creates the Intel dialect. * * @param flags Optional flags. * @since 1.1.0 */ IntelDialect( fcml_uint32_t flags = FCML_INTEL_DIALECT_CF_DEFAULT ) { fcml_st_dialect *dialect; fcml_ceh_error error = ::fcml_fn_dialect_init_intel( flags, &dialect ); if ( error ) { throw InitException( FCML_TEXT( "Can not initialize the Intel dialect." ), error ); } setDialect( dialect ); } /** * Virtual destructor. * @since 1.1.0 */ virtual ~IntelDialect() { } }; } #endif /* FCML_INTEL_DIALECT_HPP_ */ fcml-1.1.1/include/fcml_symbols.h0000644000175000017500000001201012560745216013643 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_symbols.h * API for symbols handling. Currently used only by parsers. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_SYMBOLS_H_ #define FCML_SYMBOLS_H_ #include "fcml_lib_export.h" #include "fcml_common.h" #include "fcml_errors.h" /** Type for symbol tables. */ typedef fcml_ptr fcml_st_symbol_table; /********************************* * Symbols. *********************************/ /** Represents one named symbol with associated value. */ typedef struct fcml_st_symbol { /* The symbol name. */ fcml_string symbol; /* The symbol value. */ fcml_int64_t value; } fcml_st_symbol; #ifdef __cplusplus extern "C" { #endif /** * Allocates new symbol on FCML library heap. * This function should be always used when symbols * are added using fcml_fn_symbol_add() function. * @return Allocated symbol or NULL if allocation failed. */ LIB_EXPORT fcml_st_symbol* LIB_CALL fcml_fn_symbol_alloc( const fcml_string symbol, fcml_int64_t value ); /** * Frees symbol allocated by FCML library. * @param symbol The symbol to be freed. */ LIB_EXPORT void LIB_CALL fcml_fn_symbol_free( fcml_st_symbol *symbol ); /** * Allocates new symbol table. * @return The allocated symbol table or NULL if something failed. */ LIB_EXPORT fcml_st_symbol_table LIB_CALL fcml_fn_symbol_table_alloc(); /** * Adds new symbol to the symbol table. * This function is more secure than fcml_fn_symbol_add() because it * always allocates new symbol instance internally, so you do not have * to pay attention not to pass the symbol allocated on the different heap * to the symbol table. After the symbol has been properly added you can * safely free the name because this function duplicates the name * to the symbol needs. Of course the symbol as well as the duplicated name * are freed by fcml_fn_symbol_table_free() function. You can also * free it on your own if the symbol is not managed by symbol table * using fcml_fn_symbol_free() function. * @param symbol_table The symbol table. * @param symbol The symbol name. * @param value The symbol value. * @see fcml_fn_symbol_table_free */ LIB_EXPORT fcml_ceh_error LIB_CALL fcml_fn_symbol_add_raw( fcml_st_symbol_table symbol_table, const fcml_string symbol, fcml_int64_t value ); /** * Adds existing symbol to the symbol table. * Remember that only symbols allocated on FCML heap should be * added there. Of course in some cases heaps are shared so * it will works without any problems but even if they are you * should use fcml_fn_symbol_table_alloc() function to allocate * every symbol. * * @param symbol_table The symbol table where new symbol should be placed. * @param symbol The symbol to be added. * @return Error code or FCML_CEH_GEC_NO_ERROR. */ LIB_EXPORT fcml_ceh_error LIB_CALL fcml_fn_symbol_add( fcml_st_symbol_table symbol_table, const fcml_st_symbol *symbol ); /** * Removes the symbol from the symbol table. * The removed symbol is automatically freed. * @param symbol_table The symbol table. * @param symbol The name of the symbol to remove. */ LIB_EXPORT void LIB_CALL fcml_fn_symbol_remove( fcml_st_symbol_table symbol_table, const fcml_string symbol ); /** * Gets the symbol with the given name from the symbol table. * @param symbol_table The symbol table. * @param symbol The name of the symbol to get from the table. * @return The pointer to the symbol or NULL if there is no such symbol in the symbol table. */ LIB_EXPORT fcml_st_symbol* LIB_CALL fcml_fn_symbol_get( fcml_st_symbol_table symbol_table, const fcml_string symbol ); /** * Removes all symbols from the symbol table. * Removes and frees all symbols from the given symbol table * but does not free the symbol table itself. * @param symbol_table The symbol table to be cleared. */ LIB_EXPORT void LIB_CALL fcml_fn_symbol_remove_all( fcml_st_symbol_table symbol_table ); /** * Frees a symbol table. * Frees all symbols as well as the symbol table itself. * @param symbol_table A symbol table to be freed. */ LIB_EXPORT void LIB_CALL fcml_fn_symbol_table_free( fcml_st_symbol_table symbol_table ); #ifdef __cplusplus } #endif #endif /* FCML_SYMBOLS_H_ */ fcml-1.1.1/include/fcml_common_utils.h0000644000175000017500000005561612560745216014706 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_common_utils.h * * Common general purpose utility functions. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_COMMON_UTILS_H_ #define FCML_COMMON_UTILS_H_ #include "fcml_lib_export.h" #include "fcml_common.h" #include "fcml_assembler.h" #include "fcml_disassembler.h" #include "fcml_instructions.h" #ifdef __cplusplus extern "C" { #endif /** * @defgroup REG_STRUCTURES_GROUP Registers * Declarations of structures describing all available registers. * @{ */ extern LIB_EXPORT fcml_st_register fcml_reg_AL; extern LIB_EXPORT fcml_st_register fcml_reg_AX; extern LIB_EXPORT fcml_st_register fcml_reg_EAX; extern LIB_EXPORT fcml_st_register fcml_reg_RAX; extern LIB_EXPORT fcml_st_register fcml_reg_MM0; extern LIB_EXPORT fcml_st_register fcml_reg_XMM0; extern LIB_EXPORT fcml_st_register fcml_reg_YMM0; extern LIB_EXPORT fcml_st_register fcml_reg_CL; extern LIB_EXPORT fcml_st_register fcml_reg_CX; extern LIB_EXPORT fcml_st_register fcml_reg_ECX; extern LIB_EXPORT fcml_st_register fcml_reg_RCX; extern LIB_EXPORT fcml_st_register fcml_reg_MM1; extern LIB_EXPORT fcml_st_register fcml_reg_XMM1; extern LIB_EXPORT fcml_st_register fcml_reg_YMM1; extern LIB_EXPORT fcml_st_register fcml_reg_DL; extern LIB_EXPORT fcml_st_register fcml_reg_DX; extern LIB_EXPORT fcml_st_register fcml_reg_EDX; extern LIB_EXPORT fcml_st_register fcml_reg_RDX; extern LIB_EXPORT fcml_st_register fcml_reg_MM2; extern LIB_EXPORT fcml_st_register fcml_reg_XMM2; extern LIB_EXPORT fcml_st_register fcml_reg_YMM2; extern LIB_EXPORT fcml_st_register fcml_reg_BL; extern LIB_EXPORT fcml_st_register fcml_reg_BX; extern LIB_EXPORT fcml_st_register fcml_reg_EBX; extern LIB_EXPORT fcml_st_register fcml_reg_RBX; extern LIB_EXPORT fcml_st_register fcml_reg_MM3; extern LIB_EXPORT fcml_st_register fcml_reg_XMM3; extern LIB_EXPORT fcml_st_register fcml_reg_YMM3; extern LIB_EXPORT fcml_st_register fcml_reg_AH; extern LIB_EXPORT fcml_st_register fcml_reg_SPL; extern LIB_EXPORT fcml_st_register fcml_reg_SP; extern LIB_EXPORT fcml_st_register fcml_reg_ESP; extern LIB_EXPORT fcml_st_register fcml_reg_RSP; extern LIB_EXPORT fcml_st_register fcml_reg_MM4; extern LIB_EXPORT fcml_st_register fcml_reg_XMM4; extern LIB_EXPORT fcml_st_register fcml_reg_YMM4; extern LIB_EXPORT fcml_st_register fcml_reg_CH; extern LIB_EXPORT fcml_st_register fcml_reg_BPL; extern LIB_EXPORT fcml_st_register fcml_reg_BP; extern LIB_EXPORT fcml_st_register fcml_reg_EBP; extern LIB_EXPORT fcml_st_register fcml_reg_RBP; extern LIB_EXPORT fcml_st_register fcml_reg_MM5; extern LIB_EXPORT fcml_st_register fcml_reg_XMM5; extern LIB_EXPORT fcml_st_register fcml_reg_YMM5; extern LIB_EXPORT fcml_st_register fcml_reg_DH; extern LIB_EXPORT fcml_st_register fcml_reg_SIL; extern LIB_EXPORT fcml_st_register fcml_reg_SI; extern LIB_EXPORT fcml_st_register fcml_reg_ESI; extern LIB_EXPORT fcml_st_register fcml_reg_RSI; extern LIB_EXPORT fcml_st_register fcml_reg_MM6; extern LIB_EXPORT fcml_st_register fcml_reg_XMM6; extern LIB_EXPORT fcml_st_register fcml_reg_YMM6; extern LIB_EXPORT fcml_st_register fcml_reg_BH; extern LIB_EXPORT fcml_st_register fcml_reg_DIL; extern LIB_EXPORT fcml_st_register fcml_reg_DI; extern LIB_EXPORT fcml_st_register fcml_reg_EDI; extern LIB_EXPORT fcml_st_register fcml_reg_RDI; extern LIB_EXPORT fcml_st_register fcml_reg_MM7; extern LIB_EXPORT fcml_st_register fcml_reg_XMM7; extern LIB_EXPORT fcml_st_register fcml_reg_YMM7; extern LIB_EXPORT fcml_st_register fcml_reg_R8L; extern LIB_EXPORT fcml_st_register fcml_reg_R8W; extern LIB_EXPORT fcml_st_register fcml_reg_R8D; extern LIB_EXPORT fcml_st_register fcml_reg_R8; extern LIB_EXPORT fcml_st_register fcml_reg_XMM8; extern LIB_EXPORT fcml_st_register fcml_reg_YMM8; extern LIB_EXPORT fcml_st_register fcml_reg_R9L; extern LIB_EXPORT fcml_st_register fcml_reg_R9W; extern LIB_EXPORT fcml_st_register fcml_reg_R9D; extern LIB_EXPORT fcml_st_register fcml_reg_R9; extern LIB_EXPORT fcml_st_register fcml_reg_XMM9; extern LIB_EXPORT fcml_st_register fcml_reg_YMM9; extern LIB_EXPORT fcml_st_register fcml_reg_R10L; extern LIB_EXPORT fcml_st_register fcml_reg_R10W; extern LIB_EXPORT fcml_st_register fcml_reg_R10D; extern LIB_EXPORT fcml_st_register fcml_reg_R10; extern LIB_EXPORT fcml_st_register fcml_reg_XMM10; extern LIB_EXPORT fcml_st_register fcml_reg_YMM10; extern LIB_EXPORT fcml_st_register fcml_reg_R11L; extern LIB_EXPORT fcml_st_register fcml_reg_R11W; extern LIB_EXPORT fcml_st_register fcml_reg_R11D; extern LIB_EXPORT fcml_st_register fcml_reg_R11; extern LIB_EXPORT fcml_st_register fcml_reg_XMM11; extern LIB_EXPORT fcml_st_register fcml_reg_YMM11; extern LIB_EXPORT fcml_st_register fcml_reg_R12L; extern LIB_EXPORT fcml_st_register fcml_reg_R12W; extern LIB_EXPORT fcml_st_register fcml_reg_R12D; extern LIB_EXPORT fcml_st_register fcml_reg_R12; extern LIB_EXPORT fcml_st_register fcml_reg_XMM12; extern LIB_EXPORT fcml_st_register fcml_reg_YMM12; extern LIB_EXPORT fcml_st_register fcml_reg_R13L; extern LIB_EXPORT fcml_st_register fcml_reg_R13W; extern LIB_EXPORT fcml_st_register fcml_reg_R13D; extern LIB_EXPORT fcml_st_register fcml_reg_R13; extern LIB_EXPORT fcml_st_register fcml_reg_XMM13; extern LIB_EXPORT fcml_st_register fcml_reg_YMM13; extern LIB_EXPORT fcml_st_register fcml_reg_R14L; extern LIB_EXPORT fcml_st_register fcml_reg_R14W; extern LIB_EXPORT fcml_st_register fcml_reg_R14D; extern LIB_EXPORT fcml_st_register fcml_reg_R14; extern LIB_EXPORT fcml_st_register fcml_reg_XMM14; extern LIB_EXPORT fcml_st_register fcml_reg_YMM14; extern LIB_EXPORT fcml_st_register fcml_reg_R15L; extern LIB_EXPORT fcml_st_register fcml_reg_R15W; extern LIB_EXPORT fcml_st_register fcml_reg_R15D; extern LIB_EXPORT fcml_st_register fcml_reg_R15; extern LIB_EXPORT fcml_st_register fcml_reg_XMM15; extern LIB_EXPORT fcml_st_register fcml_reg_YMM15; extern LIB_EXPORT fcml_st_register fcml_reg_ES; extern LIB_EXPORT fcml_st_register fcml_reg_CS; extern LIB_EXPORT fcml_st_register fcml_reg_SS; extern LIB_EXPORT fcml_st_register fcml_reg_DS; extern LIB_EXPORT fcml_st_register fcml_reg_FS; extern LIB_EXPORT fcml_st_register fcml_reg_GS; extern LIB_EXPORT fcml_st_register fcml_reg_ST0; extern LIB_EXPORT fcml_st_register fcml_reg_ST1; extern LIB_EXPORT fcml_st_register fcml_reg_ST2; extern LIB_EXPORT fcml_st_register fcml_reg_ST3; extern LIB_EXPORT fcml_st_register fcml_reg_ST4; extern LIB_EXPORT fcml_st_register fcml_reg_ST5; extern LIB_EXPORT fcml_st_register fcml_reg_ST6; extern LIB_EXPORT fcml_st_register fcml_reg_ST7; extern LIB_EXPORT fcml_st_register fcml_reg_CR0; extern LIB_EXPORT fcml_st_register fcml_reg_CR2; extern LIB_EXPORT fcml_st_register fcml_reg_CR3; extern LIB_EXPORT fcml_st_register fcml_reg_CR4; extern LIB_EXPORT fcml_st_register fcml_reg_CR8; extern LIB_EXPORT fcml_st_register fcml_reg_DR0; extern LIB_EXPORT fcml_st_register fcml_reg_DR1; extern LIB_EXPORT fcml_st_register fcml_reg_DR2; extern LIB_EXPORT fcml_st_register fcml_reg_DR3; extern LIB_EXPORT fcml_st_register fcml_reg_DR4; extern LIB_EXPORT fcml_st_register fcml_reg_DR5; extern LIB_EXPORT fcml_st_register fcml_reg_DR6; extern LIB_EXPORT fcml_st_register fcml_reg_DR7; extern LIB_EXPORT fcml_st_register fcml_reg_IP; extern LIB_EXPORT fcml_st_register fcml_reg_EIP; extern LIB_EXPORT fcml_st_register fcml_reg_RIP; /** @} */ /** Prepares register operand for given register. * @param reg Register for instruction operator. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_reg( fcml_st_register *reg ); /* IMM.*/ /** Prepares immediate operand for unsigned int8. * @param value Value for immediate operand. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_unsigned_imm_8( fcml_uint8_t value ); /** Prepares immediate operand for signed int8. * @param value Value for immediate operand. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_signed_imm_8( fcml_int8_t value ); /** Prepares immediate operand for unsigned int16. * @param value Value for immediate operand. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_unsigned_imm_16( fcml_uint16_t value ); /** Prepares immediate operand for signed int16. * @param value Value for immediate operand. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_signed_imm_16( fcml_int16_t value ); /** Prepares immediate operand for unsigned int32. * @param value Value for immediate operand. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_unsigned_imm_32( fcml_uint32_t value ); /** Prepares immediate operand for signed int32. * @param value Value for immediate operand. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_signed_imm_32( fcml_int32_t value ); /** Prepares immediate operand for unsigned int64. * @param value Value for immediate operand. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_unsigned_imm_64( fcml_uint64_t value ); /** Prepares immediate operand for signed int64. * @param value Value for immediate operand. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_signed_imm_64( fcml_int64_t value ); /* Memory addressing.*/ /** Prepares far pointer operand for given segment and offset. * @param seg 16-bit code segment. * @param offset 16-bit code offset. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_far_pointer_offset16( fcml_int16_t seg, fcml_int16_t offset ); /** Prepares far pointer operand for given segment and offset. * @param seg 16-bit code segment. * @param offset 32-bit code offset. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_far_pointer_offset32( fcml_int16_t seg, fcml_int32_t offset ); /** Prepares memory addressing operand for 16-bit absolute offset. * @param offset 16-bit absolute offset. * @param size_operator Size operator. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_offset_16( fcml_int16_t offset, fcml_usize size_operator ); /** Prepares memory addressing operand for 32-bit absolute offset. * @param offset 32-bit absolute offset. * @param size_operator Size operator. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_offset_32( fcml_int32_t offset, fcml_usize size_operator ); /** Prepares memory addressing operand for 64-bit absolute offset. Function sets operand level hint: FCML_OP_HINT_ABSOLUTE_ADDRESSING. * @param offset 64-bit absolute offset. * @param size_operator Size operator. * @return Prepared operand. * @see RIP addressing. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_offset_abs_64( fcml_int64_t offset, fcml_usize size_operator ); /** Prepares memory addressing operand for 64-bit absolute offset. Function sets operand level hint: FCML_OP_HINT_RELATIVE_ADDRESSING. * @param offset 64-bit absolute offset. * @param size_operator Size operator. * @return Prepared operand. * @see RIP addressing. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_offset_rel_64( fcml_int64_t offset, fcml_usize size_operator ); /** Prepares effective memory addressing operand for 16-bit displacement. * @param disp 16-bit displacement. * @param size_operator Size operator. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_disp_16( fcml_int16_t disp, fcml_usize size_operator ); /** Prepares effective memory addressing operand for 32-bit displacement. * @param disp 32-bit displacement. * @param size_operator Size operator. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_disp_32( fcml_int32_t disp, fcml_usize size_operator ); /** Prepares effective memory addressing operand for 64-bit displacement. * @param disp 64-bit displacement. * @param size_operator Size operator. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_disp_64( fcml_int64_t disp, fcml_usize size_operator ); /** Prepares effective memory addressing operand for 8-bit displacement and base register. * @param base Base register. * @param disp 8-bit displacement. * @param size_operator Size operator. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_b_disp_8( fcml_st_register *base, fcml_int8_t disp, fcml_usize size_operator ); /** Prepares effective memory addressing operand for 16-bit displacement and base register. * @param base Base register. * @param disp 16-bit displacement. * @param size_operator Size operator. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_b_disp_16( fcml_st_register *base, fcml_int16_t disp, fcml_usize size_operator ); /** Prepares effective memory addressing operand for 32-bit displacement and base register. * @param base Base register. * @param disp 32-bit displacement. * @param size_operator Size operator. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_b_disp_32( fcml_st_register *base, fcml_int32_t disp, fcml_usize size_operator ); /** Prepares effective memory addressing operand for 64-bit displacement and base register. * @param base Base register. * @param disp 64-bit displacement. * @param size_operator Size operator. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_b_disp_64( fcml_st_register *base, fcml_int64_t disp, fcml_usize size_operator ); /** Prepares effective memory addressing operand for 8-bit displacement, scale factor and index register. * @param index Index register. * @param scale_factor Scale factor. * @param disp 8-bit displacement. * @param size_operator Size operator. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_is_disp_8( fcml_st_register *index, fcml_uint8_t scale_factor, fcml_int8_t disp, fcml_usize size_operator ); /** Prepares effective memory addressing operand for 16-bit displacement, scale factor and index register. * @param index Index register. * @param scale_factor Scale factor. * @param disp 16-bit displacement. * @param size_operator Size operator. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_is_disp_32( fcml_st_register *index, fcml_uint8_t scale_factor, fcml_int32_t disp, fcml_usize size_operator ); /** Prepares effective memory addressing operand for 32-bit displacement, scale factor and index register. * @param index Index register. * @param scale_factor Scale factor. * @param disp 32-bit displacement. * @param size_operator Size operator. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_is_disp_64( fcml_st_register *index, fcml_uint8_t scale_factor, fcml_int64_t disp, fcml_usize size_operator ); /** Prepares effective memory addressing operand for 8-bit displacement, base register, scale factor and index register. * @param base Base register. * @param index Index register. * @param scale_factor Scale factor. * @param disp 8-bit displacement. * @param size_operator Size operator. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_bis_disp_8( fcml_st_register *base, fcml_st_register *index, fcml_uint8_t scale_factor, fcml_int8_t disp, fcml_usize size_operator ); /** Prepares effective memory addressing operand for 16-bit displacement, base register, scale factor and index register. * @param base Base register. * @param index Index register. * @param scale_factor Scale factor. * @param disp 16-bit displacement. * @param size_operator Size operator. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_bis_disp_32( fcml_st_register *base, fcml_st_register *index, fcml_uint8_t scale_factor, fcml_int32_t disp, fcml_usize size_operator ); /** Prepares effective memory addressing operand for 32-bit displacement, base register, scale factor and index register. * @param base Base register. * @param index Index register. * @param scale_factor Scale factor. * @param disp 32-bit displacement. * @param size_operator Size operator. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_bis_disp_64( fcml_st_register *base, fcml_st_register *index, fcml_uint8_t scale_factor, fcml_int64_t disp, fcml_usize size_operator ); /** Adds hints to the operand. * @param operand Operand for hints. * @param hints Hints mask. * @return Prepared operand. */ LIB_EXPORT fcml_st_operand LIB_CALL fcml_fn_cu_add_operand_hints( fcml_st_operand operand, fcml_hints hints ); /** Clones given instruction. * Allocates new instance of instruction and makes a deep copy of * all fields. Remember that cloned instructions have to be freed * using fcml_fn_cu_free_instruction() function. Do not try to free * it on your own because it might be allocated on different * dedicated memory heap. * @param instruction Instruction to be cloned. * @return Cloned instruction. */ LIB_EXPORT fcml_st_instruction* LIB_CALL fcml_fn_cu_clone_instruction( fcml_st_instruction *instruction ); /** Frees given instruction. * Frees instruction allocated by fcml_fn_cu_clone_instruction() function. * @param instruction Instruction to be freed. */ LIB_EXPORT void LIB_CALL fcml_fn_cu_free_instruction( fcml_st_instruction *instruction ); /** Gets operand of given type or NULL if there is no such operand. * If more than one operand of given type exist, the first one is returned. * @param instruction Finds an operand of the given type for for given instruction. * @param operand_type Operand type. * @return Pointer to the operand of given type. */ LIB_EXPORT fcml_st_operand *fcml_fn_cu_find_operand( fcml_st_instruction *instruction, fcml_en_operand_type operand_type ); /* Some shortcuts for those who prefer to use macros instead of functions.*/ #define FCML_IMM8_S( x ) fcml_fn_cu_operand_signed_imm_8( x ) #define FCML_IMM8( x ) fcml_fn_cu_operand_unsigned_imm_8( x ) #define FCML_IMM16_S( x ) fcml_fn_cu_operand_signed_imm_16( x ) #define FCML_IMM16( x ) fcml_fn_cu_operand_unsigned_imm_16( x ) #define FCML_IMM32_S( x ) fcml_fn_cu_operand_signed_imm_32( x ) #define FCML_IMM32( x ) fcml_fn_cu_operand_unsigned_imm_32( x ) #define FCML_IMM64_S( x ) fcml_fn_cu_operand_signed_imm_64( x ) #define FCML_IMM64( x ) fcml_fn_cu_operand_unsigned_imm_64( x ) #ifdef FCML_USE_SHORT_REG #define FCML_REG( x ) fcml_fn_cu_operand_reg( &fcml_reg_##x ) #else #define FCML_REG( x ) fcml_fn_cu_operand_reg( &x ) #endif #define FCML_FAR_POINTER_16( seg, offset ) fcml_fn_cu_operand_addr_far_pointer_offset16( seg, offset ) #define FCML_FAR_POINTER_32( seg, offset ) fcml_fn_cu_operand_addr_far_pointer_offset32( seg, offset ) #define FCML_OFFSET_16( offset ) fcml_fn_cu_operand_addr_offset_16( offset ) #define FCML_OFFSET_32( offset ) fcml_fn_cu_operand_addr_offset_32( offset ) #define FCML_OFFSET_ABS_64( offset ) fcml_fn_cu_operand_addr_offset_abs_64( offset ) #define FCML_OFFSET_REL_64( offset ) fcml_fn_cu_operand_addr_offset_rel_64( offset ) #define FCML_DISP_16( offset ) fcml_fn_cu_operand_addr_disp_16( offset ) #define FCML_DISP_32( offset ) fcml_fn_cu_operand_addr_disp_32( offset ) #define FCML_DISP_64( offset ) fcml_fn_cu_operand_addr_disp_64( offset ) #ifdef FCML_USE_SHORT_REG #define FCML_B_DISP_8( base, offset ) fcml_fn_cu_operand_addr_b_disp_8( &fcml_reg_##base, offset ) #define FCML_B_DISP_16( base, offset ) fcml_fn_cu_operand_addr_b_disp_16( &fcml_reg_##base, offset ) #define FCML_B_DISP_32( base, offset ) fcml_fn_cu_operand_addr_b_disp_32( &fcml_reg_##base, offset ) #define FCML_B_DISP_64( base, offset ) fcml_fn_cu_operand_addr_b_disp_64( &fcml_reg_##base, offset ) #define FCML_IS_DISP_8( index, scale, offset ) fcml_fn_cu_operand_addr_is_disp_8( &fcml_reg_##index, scale, offset ) #define FCML_IS_DISP_16( index, scale, offset ) fcml_fn_cu_operand_addr_is_disp_32( &fcml_reg_##index, scale, offset ) #define FCML_IS_DISP_32( index, scale, offset ) fcml_fn_cu_operand_addr_is_disp_64( &fcml_reg_##index, scale, offset ) #define FCML_BIS_DISP_8( base, index, scale, offset ) fcml_fn_cu_operand_addr_bis_disp_8( &fcml_reg_##base, &fcml_reg_##index, scale, offset ) #define FCML_BIS_DISP_16( base, index, scale, offset ) fcml_fn_cu_operand_addr_bis_disp_32( &fcml_reg_##base, &fcml_reg_##index, scale, offset ) #define FCML_BIS_DISP_32( base, index, scale, offset ) fcml_fn_cu_operand_addr_bis_disp_64( &fcml_reg_##base, &fcml_reg_##index, scale, offset ) #else #define FCML_B_DISP_8( base, offset ) fcml_fn_cu_operand_addr_b_disp_8( &base, offset ) #define FCML_B_DISP_16( base, offset ) fcml_fn_cu_operand_addr_b_disp_16( &base, offset ) #define FCML_B_DISP_32( base, offset ) fcml_fn_cu_operand_addr_b_disp_32( &base, offset ) #define FCML_B_DISP_64( base, offset ) fcml_fn_cu_operand_addr_b_disp_64( &base, offset ) #define FCML_IS_DISP_8( index, scale, offset ) fcml_fn_cu_operand_addr_is_disp_8( &index, scale, offset ) #define FCML_IS_DISP_16( index, scale, offset ) fcml_fn_cu_operand_addr_is_disp_32( &index, scale, offset ) #define FCML_IS_DISP_32( index, scale, offset ) fcml_fn_cu_operand_addr_is_disp_64( &index, scale, offset ) #define FCML_BIS_DISP_8( base, index, scale, offset ) fcml_fn_cu_operand_addr_bis_disp_8( &base, &index, scale, offset ) #define FCML_BIS_DISP_16( base, index, scale, offset ) fcml_fn_cu_operand_addr_bis_disp_32( &base, &index, scale, offset ) #define FCML_BIS_DISP_32( base, index, scale, offset ) fcml_fn_cu_operand_addr_bis_disp_64( &base, &index, scale, offset ) #endif #define FCML_IS_INSTRUCTION_GROUP( result, group ) ( result.instruction_details.instruction_group & ( group ) ) #define FCML_IS_INSTRUCTION_CODE( result, _ins ) ( result.instruction_details.instruction == _ins ) #ifdef __cplusplus } #endif #endif /* FCML_COMMON_UTILS_H_ */ fcml-1.1.1/include/Makefile.am0000644000175000017500000000156112560745216013046 00000000000000pkginclude_HEADERS = fcml_assembler.h \ fcml_assembler.hpp \ fcml_choosers.h \ fcml_common.h \ fcml_common.hpp \ fcml_common_utils.h \ fcml_dialect.h \ fcml_dialect.hpp \ fcml_disassembler.h \ fcml_disassembler.hpp \ fcml_env.h \ fcml_errors.h \ fcml_errors.hpp \ fcml_gas_dialect.h \ fcml_gas_dialect.hpp \ fcml_gas_mnemonics.h \ fcml_instructions.h \ fcml_intel_dialect.h \ fcml_intel_dialect.hpp \ fcml_intel_mnemonics.h \ fcml_lag_assembler.h \ fcml_lag_assembler.hpp \ fcml_lib_export.h \ fcml_optimizers.h \ fcml_parser.h \ fcml_parser.hpp \ fcml_registers.cpp \ fcml_registers.hpp \ fcml_renderer.h \ fcml_renderer.hpp \ fcml_stateful_assembler.hpp \ fcml_stateful_disassembler.hpp \ fcml_symbols.h \ fcml_symbols.hpp \ fcml_types.h \ fcml_gas_mnemonics.hpp \ fcml_gas_mnemonics.cpp \ fcml_intel_mnemonics.hpp \ fcml_intel_mnemonics.cppfcml-1.1.1/include/fcml_errors.hpp0000644000175000017500000002123512560745216014040 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_errors.hpp * C++ wrapper for the FCML errors handling. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_ERRORS_HPP_ #define FCML_ERRORS_HPP_ #include #include "fcml_types.h" #include "fcml_errors.h" #include "fcml_common.hpp" namespace fcml { /** * Contains an error message together with error level and error code. * @since 1.1.0 */ class ErrorInfo { public: /** Error level. * @since 1.1.0 */ enum ErrorLevel { EL_ERROR, EL_WARN }; public: /** * Default constructor. * @since 1.1.0 */ ErrorInfo() : _code( FCML_CEH_GEC_NO_ERROR ), _level( EL_ERROR ) { } /** * Creates an error for given message and optional error code and level. * @param message The error message. * @param code The error code. * @param level The error level. * @since 1.1.0 */ ErrorInfo( const fcml_cstring &message, fcml_ceh_error code = FCML_CEH_GEC_NO_ERROR, ErrorLevel level = EL_ERROR ) : _message( message ), _code( code ), _level( level ) { } public: /** * Gets error code. * @return The error code. * @since 1.1.0 */ fcml_ceh_error getCode() const { return _code; } /** * Sets a new error code. * @param code The new error code. * @since 1.1.0 */ void setCode(fcml_ceh_error code) { _code = code; } /** * Gets error level. * @return The error level. * @since 1.1.0 */ ErrorLevel getLevel() const { return _level; } /** * Sets error level. * @param level The error level. * @since 1.1.0 */ void setLevel(ErrorLevel level) { _level = level; } /** * Gets error message. * @return The error message. * @since 1.1.0 */ const fcml_cstring& getMessage() const { return _message; } /** * Sets error message. * @param message The error message. * @since 1.1.0 */ void setMessage(const fcml_cstring& message) { _message = message; } private: /** Error message. */ fcml_cstring _message; /** Error code */ fcml_ceh_error _code; /** Error level. */ ErrorLevel _level; }; /** * Wraps multiple errors into one component. * @since 1.1.0 */ class ErrorContainer { public: /** * Default constructor. * @since 1.1.0 */ ErrorContainer() : _isWarn(false), _isError(false) { } /** * Gets number of errors in the container. * @return The number of errors. * @since 1.1.0 */ fcml_usize getSize() const { return static_cast( _errorInfos.size() ); } /** * Gets an error at given index. * @param index The error index. * @return The error at given index. * @throw BadArgumentException If index is out of bound. * @since 1.1.0 */ const ErrorInfo& operator[]( fcml_usize index ) const { checkVectorAccess( index ); return _errorInfos[index]; } /** * Gets an error at given index. * @param index The error index. * @return The error at given index. * @since 1.1.0 */ ErrorInfo& operator[]( fcml_usize index ) { checkVectorAccess( index ); return _errorInfos[index]; } /** * Adds a new error into the container. * @param errorInfo The new error to add. * @since 1.1.0 */ void addErrorInfo( const ErrorInfo &errorInfo ) { _errorInfos.push_back(errorInfo); switch( errorInfo.getLevel() ) { case ErrorInfo::EL_ERROR: _isError = true; break; case ErrorInfo::EL_WARN: _isWarn = true; break; } } /** * Returns true if there is any error in the container. * @return True if there is any error in the container. * @since 1.1.0 */ bool isError() const { return _isError; } /** * Returns true if there is any warning in the container. * @return True if there is any warning in the container. * @since 1.1.0 */ bool isWarn() const { return _isWarn; } /** * Gets true if there is any error or warning in the container. * @return True if there is any error or warning in the container. * @since 1.1.0 */ bool isEmpty() const { return _errorInfos.empty(); } /** * Returns the first error from the container. * @return The first error. * @throw IllegalStateException Container is empty. * @since 1.1.0 */ const ErrorInfo& getFirstError() const { if( isEmpty() ) { throw IllegalStateException( FCML_TEXT( "Container is empty." ) ); } return _errorInfos[0]; } /** * Returns the first error from the container. * @return The first error. * @throw IllegalStateException Container is empty. * @since 1.1.0 */ ErrorInfo& getFirstError() { if( isEmpty() ) { throw IllegalStateException( FCML_TEXT( "Container is empty." ) ); } return _errorInfos[0]; } /** * Returns the first error message from the container. * @return The first error message. * @since 1.1.0 */ fcml_cstring getFirstErrorMessage() const { fcml_cstring message; try { const ErrorInfo &errorInfo = getFirstError(); message = errorInfo.getMessage(); } catch( IllegalStateException &exc ) { } return message; } /** * Prepares an error message basing on the first error in the container. * @param message A prefix for the destination error message. * @return Error message. * @since 1.1.0 */ fcml_cstring prepareErrorMessage( const fcml_cstring &message ) const { const fcml_cstring errorMessage = getFirstErrorMessage(); if( errorMessage.empty() ) { return message + FCML_TEXT('.'); } else { return message + FCML_TEXT(": ") + errorMessage; } } /** * Cleans all errors and warnings. * @since 1.1.0 */ void clean() { _errorInfos.clear(); _isWarn = false; _isError = false; } private: /** * Checks bounds of the index. * @param index The index to check. * @throw BadArgumentException Index out of bound. * @since 1.1.0 */ void checkVectorAccess( fcml_usize index ) const { if( index >= _errorInfos.size() ) { throw BadArgumentException( FCML_TEXT( "Index exceeds the allowed number of error info structures." ) ); } } private: /** Error messages. */ std::vector _errorInfos; /* Sets if there is any warning in the container. */ bool _isWarn; /* Sets if there is any error in the container. */ bool _isError; }; /** * Types converter. * @since 1.1.0 */ class ErrorTypeConverter { public: static void convert( const fcml_st_ceh_error_container &src, ErrorContainer &dest ) { fcml_st_ceh_error_info *error = src.errors; while( error ) { ErrorInfo::ErrorLevel level = ( error->level == FCML_EN_CEH_EL_ERROR ) ? ErrorInfo::EL_ERROR : ErrorInfo::EL_WARN; dest.addErrorInfo( ErrorInfo( error->message, error->code, level ) ); error = error->next_error; } } }; /** * Base class for all exceptions that are aware of ErrorContainer. * @since 1.1.0 */ class ErrorContainerAwareException: public BaseException { public: /** * Creates an error container aware exception instance and sets basic information for it. * @param msg An error message. * @param errorContainer An error container for exception. * @param error An optional FCML error code. * @since 1.1.0 */ ErrorContainerAwareException( const fcml_cstring &msg, const ErrorContainer &errorContainer, fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR ) : BaseException( msg, error ), _errorContainer( errorContainer ) { } /** * Gets a reference to an error container associated with the exception. * @return The error container. * @since 1.1.0 */ const ErrorContainer& getErrorContainer() const { return _errorContainer; } /** * Sets a new error container for the exception. * @param errorContainer The new error container to be set for the exception. * @since 1.1.0 */ void setErrorContainer(const ErrorContainer& errorContainer) { _errorContainer = errorContainer; } private: /** A container for errors. */ ErrorContainer _errorContainer; }; } #endif // FCML_ERRORS_HPP_ fcml-1.1.1/include/fcml_registers.hpp0000644000175000017500000001272412560745216014536 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_registers.hpp * C++ registers declarations. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. * * @since 1.1.0 */ #ifndef FCML_REGISTERS_HPP_ #define FCML_REGISTERS_HPP_ #include "fcml_common.hpp" namespace fcml { extern const Register UNDEF; extern const Register AL; extern const Register AX; extern const Register EAX; extern const Register RAX; extern const Register MM0; extern const Register XMM0; extern const Register YMM0; extern const Register CL; extern const Register CX; extern const Register ECX; extern const Register RCX; extern const Register MM1; extern const Register XMM1; extern const Register YMM1; extern const Register DL; extern const Register DX; extern const Register EDX; extern const Register RDX; extern const Register MM2; extern const Register XMM2; extern const Register YMM2; extern const Register BL; extern const Register BX; extern const Register EBX; extern const Register RBX; extern const Register MM3; extern const Register XMM3; extern const Register YMM3; extern const Register AH; extern const Register SPL; extern const Register SP; extern const Register ESP; extern const Register RSP; extern const Register MM4; extern const Register XMM4; extern const Register YMM4; extern const Register CH; extern const Register BPL; extern const Register BP; extern const Register EBP; extern const Register RBP; extern const Register MM5; extern const Register XMM5; extern const Register YMM5; extern const Register DH; extern const Register SIL; extern const Register SI; extern const Register ESI; extern const Register RSI; extern const Register MM6; extern const Register XMM6; extern const Register YMM6; extern const Register BH; extern const Register DIL; extern const Register DI; extern const Register EDI; extern const Register RDI; extern const Register MM7; extern const Register XMM7; extern const Register YMM7; extern const Register R8L; extern const Register R8W; extern const Register R8D; extern const Register R8; extern const Register XMM8; extern const Register YMM8; extern const Register R9L; extern const Register R9W; extern const Register R9D; extern const Register R9; extern const Register XMM9; extern const Register YMM9; extern const Register R10L; extern const Register R10W; extern const Register R10D; extern const Register R10; extern const Register XMM10; extern const Register YMM10; extern const Register R11L; extern const Register R11W; extern const Register R11D; extern const Register R11; extern const Register XMM11; extern const Register YMM11; extern const Register R12L; extern const Register R12W; extern const Register R12D; extern const Register R12; extern const Register XMM12; extern const Register YMM12; extern const Register R13L; extern const Register R13W; extern const Register R13D; extern const Register R13; extern const Register XMM13; extern const Register YMM13; extern const Register R14L; extern const Register R14W; extern const Register R14D; extern const Register R14; extern const Register XMM14; extern const Register YMM14; extern const Register R15L; extern const Register R15W; extern const Register R15D; extern const Register R15; extern const Register XMM15; extern const Register YMM15; extern const Register ES; extern const Register CS; extern const Register SS; extern const Register DS; extern const Register FS; extern const Register GS; extern const Register ST0; extern const Register ST1; extern const Register ST2; extern const Register ST3; extern const Register ST4; extern const Register ST5; extern const Register ST6; extern const Register ST7; extern const Register CR0; extern const Register CR2; extern const Register CR3; extern const Register CR4; extern const Register CR8; extern const Register DR0; extern const Register DR1; extern const Register DR2; extern const Register DR3; extern const Register DR4; extern const Register DR5; extern const Register DR6; extern const Register DR7; extern const Register IP; extern const Register EIP; extern const Register RIP; } #endif /* FCML_REGISTERS_HPP_ */ fcml-1.1.1/include/fcml_gas_dialect.h0000644000175000017500000000413312560745216014421 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_gas_dialect.h * AT&T dialect implementation. * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_ASM_DIALECT_GAS_H_ #define FCML_ASM_DIALECT_GAS_H_ #include "fcml_lib_export.h" #include "fcml_errors.h" #include "fcml_dialect.h" #ifdef __cplusplus extern "C" { #endif /** Disables "SystemV/386 SVR3.2" compatibility for the non-commutative arithmetic floating point operations with two register operands. */ #define FCML_GAS_DIALECT_CF_SYSV_SVR32_INCOMPATIBLE 0x00000001 /** Default combination of configuration flags. */ #define FCML_GAS_DIALECT_CF_DEFAULT 0 /** * Initializes AT&T dialect. * Prepares new instance of AT&T dialect for given set of configuration flags. * Every dialect has to be freed using fcml_fn_dialect_free() function. * * @param config_flags Configuration flags dedicated to the dialect. * @param[out] dialect Prepared dialect instance. * @return Error code or FCML_CEH_GEC_NO_ERROR. * @see fcml_fn_dialect_free */ LIB_EXPORT fcml_ceh_error LIB_CALL fcml_fn_dialect_init_gas( fcml_uint32_t config_flags, fcml_st_dialect **dialect ); #ifdef __cplusplus } #endif #endif /* FCML_ASM_DIALECT_GAS_H_ */ fcml-1.1.1/include/fcml_dialect.hpp0000644000175000017500000000552612560745216014136 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_dialect.hpp * C++ wrapper for the base dialect. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_DIALECT_HPP_ #define FCML_DIALECT_HPP_ #include "fcml_common.hpp" #include "fcml_dialect.h" namespace fcml { /** * An abstract dialect. It's a base class for all supported dialects. * @since 1.1.0 * @remarks This class is thread-safe. */ class Dialect: public NonCopyable { protected: /** * Default constructor. * @since 1.1.0 */ Dialect() { _dialect = NULL; } /** * Virtual destructor. * @since 1.1.0 */ virtual ~Dialect() { if ( _dialect ) { ::fcml_fn_dialect_free( _dialect ); _dialect = NULL; } } protected: friend class DialectAware; /** * Gets the wrapped FCML dialect. * * @return The wrapped FCML dialect. * @since 1.1.0 */ fcml_st_dialect *getDialect() const { return _dialect; } /** * Sets a new dialect for the wrapper. * * @param dialect The new dialect for the wrapper. * @since 1.1.0 */ void setDialect( fcml_st_dialect *dialect ) { this->_dialect = dialect; } private: /** Wrapped dialect */ fcml_st_dialect *_dialect; }; /** Inherit from this class in order to get access to the native FCML dialect structure. * @since 1.1.0 */ class DialectAware { public: /** * Default constructor. * @since 1.1.0 */ DialectAware() {} /** * Virtual destructor. * @since 1.1.0 */ virtual ~DialectAware() {} /** * Extracts the native FCML dialect from the dialect object. * * @param dialect The wrapper. * @return The wrapped FCML dialect. * @since 1.1.0 */ fcml_st_dialect *extractDialect( const Dialect &dialect ) const { return dialect.getDialect(); } }; } #endif /* FCML_DIALECT_HPP_ */ fcml-1.1.1/include/fcml_registers.cpp0000644000175000017500000001576212560745216014536 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_registers.cpp * C++ registers definitions. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. * * @since 1.1.0 */ #ifndef _FCML_CPP_REGISTERS #define _FCML_CPP_REGISTERS #include "fcml_registers.hpp" namespace fcml { const Register UNDEF( 0, 0, Register::REG_UNDEFINED, FCML_FALSE ); const Register AL( ::fcml_reg_AL ); const Register AX( ::fcml_reg_AX ); const Register EAX( ::fcml_reg_EAX ); const Register RAX( ::fcml_reg_RAX ); const Register MM0( ::fcml_reg_MM0 ); const Register XMM0( ::fcml_reg_XMM0 ); const Register YMM0( ::fcml_reg_YMM0 ); const Register CL( ::fcml_reg_CL ); const Register CX( ::fcml_reg_CX ); const Register ECX( ::fcml_reg_ECX ); const Register RCX( ::fcml_reg_RCX ); const Register MM1( ::fcml_reg_MM1 ); const Register XMM1( ::fcml_reg_XMM1 ); const Register YMM1( ::fcml_reg_YMM1 ); const Register DL( ::fcml_reg_DL ); const Register DX( ::fcml_reg_DX ); const Register EDX( ::fcml_reg_EDX ); const Register RDX( ::fcml_reg_RDX ); const Register MM2( ::fcml_reg_MM2 ); const Register XMM2( ::fcml_reg_XMM2 ); const Register YMM2( ::fcml_reg_YMM2 ); const Register BL( ::fcml_reg_BL ); const Register BX( ::fcml_reg_BX ); const Register EBX( ::fcml_reg_EBX ); const Register RBX( ::fcml_reg_RBX ); const Register MM3( ::fcml_reg_MM3 ); const Register XMM3( ::fcml_reg_XMM3 ); const Register YMM3( ::fcml_reg_YMM3 ); const Register AH( ::fcml_reg_AH ); const Register SPL( ::fcml_reg_SPL ); const Register SP( ::fcml_reg_SP ); const Register ESP( ::fcml_reg_ESP ); const Register RSP( ::fcml_reg_RSP ); const Register MM4( ::fcml_reg_MM4 ); const Register XMM4( ::fcml_reg_XMM4 ); const Register YMM4( ::fcml_reg_YMM4 ); const Register CH( ::fcml_reg_CH ); const Register BPL( ::fcml_reg_BPL ); const Register BP( ::fcml_reg_BP ); const Register EBP( ::fcml_reg_EBP ); const Register RBP( ::fcml_reg_RBP ); const Register MM5( ::fcml_reg_MM5 ); const Register XMM5( ::fcml_reg_XMM5 ); const Register YMM5( ::fcml_reg_YMM5 ); const Register DH( ::fcml_reg_DH ); const Register SIL( ::fcml_reg_SIL ); const Register SI( ::fcml_reg_SI ); const Register ESI( ::fcml_reg_ESI ); const Register RSI( ::fcml_reg_RSI ); const Register MM6( ::fcml_reg_MM6 ); const Register XMM6( ::fcml_reg_XMM6 ); const Register YMM6( ::fcml_reg_YMM6 ); const Register BH( ::fcml_reg_BH ); const Register DIL( ::fcml_reg_DIL ); const Register DI( ::fcml_reg_DI ); const Register EDI( ::fcml_reg_EDI ); const Register RDI( ::fcml_reg_RDI ); const Register MM7( ::fcml_reg_MM7 ); const Register XMM7( ::fcml_reg_XMM7 ); const Register YMM7( ::fcml_reg_YMM7 ); const Register R8L( ::fcml_reg_R8L ); const Register R8W( ::fcml_reg_R8W ); const Register R8D( ::fcml_reg_R8D ); const Register R8( ::fcml_reg_R8 ); const Register XMM8( ::fcml_reg_XMM8 ); const Register YMM8( ::fcml_reg_YMM8 ); const Register R9L( ::fcml_reg_R9L ); const Register R9W( ::fcml_reg_R9W ); const Register R9D( ::fcml_reg_R9D ); const Register R9( ::fcml_reg_R9 ); const Register XMM9( ::fcml_reg_XMM9 ); const Register YMM9( ::fcml_reg_YMM9 ); const Register R10L( ::fcml_reg_R10L ); const Register R10W( ::fcml_reg_R10W ); const Register R10D( ::fcml_reg_R10D ); const Register R10( ::fcml_reg_R10 ); const Register XMM10( ::fcml_reg_XMM10 ); const Register YMM10( ::fcml_reg_YMM10 ); const Register R11L( ::fcml_reg_R11L ); const Register R11W( ::fcml_reg_R11W ); const Register R11D( ::fcml_reg_R11D ); const Register R11( ::fcml_reg_R11 ); const Register XMM11( ::fcml_reg_XMM11 ); const Register YMM11( ::fcml_reg_YMM11 ); const Register R12L( ::fcml_reg_R12L ); const Register R12W( ::fcml_reg_R12W ); const Register R12D( ::fcml_reg_R12D ); const Register R12( ::fcml_reg_R12 ); const Register XMM12( ::fcml_reg_XMM12 ); const Register YMM12( ::fcml_reg_YMM12 ); const Register R13L( ::fcml_reg_R13L ); const Register R13W( ::fcml_reg_R13W ); const Register R13D( ::fcml_reg_R13D ); const Register R13( ::fcml_reg_R13 ); const Register XMM13( ::fcml_reg_XMM13 ); const Register YMM13( ::fcml_reg_YMM13 ); const Register R14L( ::fcml_reg_R14L ); const Register R14W( ::fcml_reg_R14W ); const Register R14D( ::fcml_reg_R14D ); const Register R14( ::fcml_reg_R14 ); const Register XMM14( ::fcml_reg_XMM14 ); const Register YMM14( ::fcml_reg_YMM14 ); const Register R15L( ::fcml_reg_R15L ); const Register R15W( ::fcml_reg_R15W ); const Register R15D( ::fcml_reg_R15D ); const Register R15( ::fcml_reg_R15 ); const Register XMM15( ::fcml_reg_XMM15 ); const Register YMM15( ::fcml_reg_YMM15 ); const Register ES( ::fcml_reg_ES ); const Register CS( ::fcml_reg_CS ); const Register SS( ::fcml_reg_SS ); const Register DS( ::fcml_reg_DS ); const Register FS( ::fcml_reg_FS ); const Register GS( ::fcml_reg_GS ); const Register ST0( ::fcml_reg_ST0 ); const Register ST1( ::fcml_reg_ST1 ); const Register ST2( ::fcml_reg_ST2 ); const Register ST3( ::fcml_reg_ST3 ); const Register ST4( ::fcml_reg_ST4 ); const Register ST5( ::fcml_reg_ST5 ); const Register ST6( ::fcml_reg_ST6 ); const Register ST7( ::fcml_reg_ST7 ); const Register CR0( ::fcml_reg_CR0 ); const Register CR2( ::fcml_reg_CR2 ); const Register CR3( ::fcml_reg_CR3 ); const Register CR4( ::fcml_reg_CR4 ); const Register CR8( ::fcml_reg_CR8 ); const Register DR0( ::fcml_reg_DR0 ); const Register DR1( ::fcml_reg_DR1 ); const Register DR2( ::fcml_reg_DR2 ); const Register DR3( ::fcml_reg_DR3 ); const Register DR4( ::fcml_reg_DR4 ); const Register DR5( ::fcml_reg_DR5 ); const Register DR6( ::fcml_reg_DR6 ); const Register DR7( ::fcml_reg_DR7 ); const Register IP( ::fcml_reg_IP ); const Register EIP( ::fcml_reg_EIP ); const Register RIP( ::fcml_reg_RIP ); } #endif fcml-1.1.1/include/fcml_gas_mnemonics.hpp0000644000175000017500000015646112560745216015360 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_gas_mnemonics.hpp * Declarations of AT&T mnemonics for C++. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_GAS_MNEMONICS_HPP_ #define FCML_GAS_MNEMONICS_HPP_ #include "fcml_types.h" namespace fcml { namespace gas { extern const fcml_cstring M_AAA; extern const fcml_cstring M_AAD; extern const fcml_cstring M_AAM; extern const fcml_cstring M_AAS; extern const fcml_cstring M_ADC; extern const fcml_cstring M_ADCB; extern const fcml_cstring M_ADCL; extern const fcml_cstring M_ADCQ; extern const fcml_cstring M_ADCW; extern const fcml_cstring M_ADCX; extern const fcml_cstring M_ADD; extern const fcml_cstring M_ADDB; extern const fcml_cstring M_ADDL; extern const fcml_cstring M_ADDPD; extern const fcml_cstring M_ADDPS; extern const fcml_cstring M_ADDQ; extern const fcml_cstring M_ADDSD; extern const fcml_cstring M_ADDSS; extern const fcml_cstring M_ADDSUBPD; extern const fcml_cstring M_ADDSUBPS; extern const fcml_cstring M_ADDW; extern const fcml_cstring M_ADOX; extern const fcml_cstring M_AESDEC; extern const fcml_cstring M_AESDECLAST; extern const fcml_cstring M_AESENC; extern const fcml_cstring M_AESENCLAST; extern const fcml_cstring M_AESIMC; extern const fcml_cstring M_AESKEYGENASSIST; extern const fcml_cstring M_AND; extern const fcml_cstring M_ANDB; extern const fcml_cstring M_ANDL; extern const fcml_cstring M_ANDN; extern const fcml_cstring M_ANDNPD; extern const fcml_cstring M_ANDNPS; extern const fcml_cstring M_ANDPD; extern const fcml_cstring M_ANDPS; extern const fcml_cstring M_ANDQ; extern const fcml_cstring M_ANDW; extern const fcml_cstring M_ARPL; extern const fcml_cstring M_BEXR; extern const fcml_cstring M_BEXTR; extern const fcml_cstring M_BLCFILL; extern const fcml_cstring M_BLCI; extern const fcml_cstring M_BLCIC; extern const fcml_cstring M_BLCMSK; extern const fcml_cstring M_BLCS; extern const fcml_cstring M_BLENDPD; extern const fcml_cstring M_BLENDPS; extern const fcml_cstring M_BLENDVPD; extern const fcml_cstring M_BLENDVPS; extern const fcml_cstring M_BLSFILL; extern const fcml_cstring M_BLSI; extern const fcml_cstring M_BLSIC; extern const fcml_cstring M_BLSMSK; extern const fcml_cstring M_BLSR; extern const fcml_cstring M_BOUND; extern const fcml_cstring M_BSF; extern const fcml_cstring M_BSR; extern const fcml_cstring M_BSWAP; extern const fcml_cstring M_BT; extern const fcml_cstring M_BTC; extern const fcml_cstring M_BTCL; extern const fcml_cstring M_BTCQ; extern const fcml_cstring M_BTCW; extern const fcml_cstring M_BTL; extern const fcml_cstring M_BTQ; extern const fcml_cstring M_BTR; extern const fcml_cstring M_BTRL; extern const fcml_cstring M_BTRQ; extern const fcml_cstring M_BTRW; extern const fcml_cstring M_BTS; extern const fcml_cstring M_BTSL; extern const fcml_cstring M_BTSQ; extern const fcml_cstring M_BTSW; extern const fcml_cstring M_BTW; extern const fcml_cstring M_BZHI; extern const fcml_cstring M_CALL; extern const fcml_cstring M_CALLQ; extern const fcml_cstring M_CALLW; extern const fcml_cstring M_CBTW; extern const fcml_cstring M_CLAC; extern const fcml_cstring M_CLC; extern const fcml_cstring M_CLD; extern const fcml_cstring M_CLFLUSH; extern const fcml_cstring M_CLGI; extern const fcml_cstring M_CLI; extern const fcml_cstring M_CLTD; extern const fcml_cstring M_CLTQ; extern const fcml_cstring M_CLTS; extern const fcml_cstring M_CMC; extern const fcml_cstring M_CMOVO; extern const fcml_cstring M_CMOVNO; extern const fcml_cstring M_CMOVB; extern const fcml_cstring M_CMOVNB; extern const fcml_cstring M_CMOVE; extern const fcml_cstring M_CMOVNE; extern const fcml_cstring M_CMOVBE; extern const fcml_cstring M_CMOVNBE; extern const fcml_cstring M_CMOVS; extern const fcml_cstring M_CMOVNS; extern const fcml_cstring M_CMOVP; extern const fcml_cstring M_CMOVNP; extern const fcml_cstring M_CMOVL; extern const fcml_cstring M_CMOVNL; extern const fcml_cstring M_CMOVLE; extern const fcml_cstring M_CMOVNLE; extern const fcml_cstring M_CMOVNAE; extern const fcml_cstring M_CMOVAE; extern const fcml_cstring M_CMOVZ; extern const fcml_cstring M_CMOVNZ; extern const fcml_cstring M_CMOVNA; extern const fcml_cstring M_CMOVA; extern const fcml_cstring M_CMOVPE; extern const fcml_cstring M_CMOVPO; extern const fcml_cstring M_CMOVNGE; extern const fcml_cstring M_CMOVGE; extern const fcml_cstring M_CMOVNG; extern const fcml_cstring M_CMOVG; extern const fcml_cstring M_CMOVC; extern const fcml_cstring M_CMOVNC; extern const fcml_cstring M_CMP; extern const fcml_cstring M_CMPB; extern const fcml_cstring M_CMPEQSD; extern const fcml_cstring M_CMPEQSS; extern const fcml_cstring M_CMPL; extern const fcml_cstring M_CMPLESD; extern const fcml_cstring M_CMPLESS; extern const fcml_cstring M_CMPLTSD; extern const fcml_cstring M_CMPLTSS; extern const fcml_cstring M_CMPNEQSD; extern const fcml_cstring M_CMPNEQSS; extern const fcml_cstring M_CMPNLESD; extern const fcml_cstring M_CMPNLESS; extern const fcml_cstring M_CMPNLTSD; extern const fcml_cstring M_CMPNLTSS; extern const fcml_cstring M_CMPORDSD; extern const fcml_cstring M_CMPORDSS; extern const fcml_cstring M_CMPPD; extern const fcml_cstring M_CMPPS; extern const fcml_cstring M_CMPQ; extern const fcml_cstring M_CMPSB; extern const fcml_cstring M_CMPSD; extern const fcml_cstring M_CMPSL; extern const fcml_cstring M_CMPSQ; extern const fcml_cstring M_CMPSS; extern const fcml_cstring M_CMPSW; extern const fcml_cstring M_CMPUNORDSD; extern const fcml_cstring M_CMPUNORDSS; extern const fcml_cstring M_CMPW; extern const fcml_cstring M_CMPXCHG; extern const fcml_cstring M_CMPXCHG16B; extern const fcml_cstring M_CMPXCHG8B; extern const fcml_cstring M_COMISD; extern const fcml_cstring M_COMISS; extern const fcml_cstring M_CPUID; extern const fcml_cstring M_CQTO; extern const fcml_cstring M_CRC32B; extern const fcml_cstring M_CRC32L; extern const fcml_cstring M_CRC32Q; extern const fcml_cstring M_CRC32W; extern const fcml_cstring M_CVTDQ2PD; extern const fcml_cstring M_CVTDQ2PS; extern const fcml_cstring M_CVTPD2DQ; extern const fcml_cstring M_CVTPD2PI; extern const fcml_cstring M_CVTPD2PS; extern const fcml_cstring M_CVTPI2PD; extern const fcml_cstring M_CVTPI2PS; extern const fcml_cstring M_CVTPS2DQ; extern const fcml_cstring M_CVTPS2PD; extern const fcml_cstring M_CVTPS2PI; extern const fcml_cstring M_CVTSD2SI; extern const fcml_cstring M_CVTSD2SS; extern const fcml_cstring M_CVTSI2SDL; extern const fcml_cstring M_CVTSI2SDQ; extern const fcml_cstring M_CVTSI2SSL; extern const fcml_cstring M_CVTSI2SSQ; extern const fcml_cstring M_CVTSS2SD; extern const fcml_cstring M_CVTSS2SI; extern const fcml_cstring M_CVTTPD2DQ; extern const fcml_cstring M_CVTTPD2PI; extern const fcml_cstring M_CVTTPS2DQ; extern const fcml_cstring M_CVTTPS2PI; extern const fcml_cstring M_CVTTSD2SI; extern const fcml_cstring M_CVTTSS2SI; extern const fcml_cstring M_CWTD; extern const fcml_cstring M_CWTL; extern const fcml_cstring M_DAA; extern const fcml_cstring M_DAS; extern const fcml_cstring M_DEC; extern const fcml_cstring M_DECB; extern const fcml_cstring M_DECL; extern const fcml_cstring M_DECQ; extern const fcml_cstring M_DECW; extern const fcml_cstring M_DIV; extern const fcml_cstring M_DIVB; extern const fcml_cstring M_DIVL; extern const fcml_cstring M_DIVPD; extern const fcml_cstring M_DIVPS; extern const fcml_cstring M_DIVQ; extern const fcml_cstring M_DIVSD; extern const fcml_cstring M_DIVSS; extern const fcml_cstring M_DIVW; extern const fcml_cstring M_DPPD; extern const fcml_cstring M_DPPS; extern const fcml_cstring M_EMMS; extern const fcml_cstring M_ENTER; extern const fcml_cstring M_ENTERQ; extern const fcml_cstring M_EXTRACTPS; extern const fcml_cstring M_EXTRQ; extern const fcml_cstring M_F2XM1; extern const fcml_cstring M_FABS; extern const fcml_cstring M_FADD; extern const fcml_cstring M_FADDL; extern const fcml_cstring M_FADDP; extern const fcml_cstring M_FADDS; extern const fcml_cstring M_FBLD; extern const fcml_cstring M_FBSTP; extern const fcml_cstring M_FCHS; extern const fcml_cstring M_FCLEX; extern const fcml_cstring M_FCMOVB; extern const fcml_cstring M_FCMOVBE; extern const fcml_cstring M_FCMOVE; extern const fcml_cstring M_FCMOVNB; extern const fcml_cstring M_FCMOVNBE; extern const fcml_cstring M_FCMOVNE; extern const fcml_cstring M_FCMOVNU; extern const fcml_cstring M_FCMOVU; extern const fcml_cstring M_FCOM; extern const fcml_cstring M_FCOMI; extern const fcml_cstring M_FCOMIP; extern const fcml_cstring M_FCOML; extern const fcml_cstring M_FCOMP; extern const fcml_cstring M_FCOMPL; extern const fcml_cstring M_FCOMPP; extern const fcml_cstring M_FCOMPS; extern const fcml_cstring M_FCOMS; extern const fcml_cstring M_FCOS; extern const fcml_cstring M_FDECSTP; extern const fcml_cstring M_FDIV; extern const fcml_cstring M_FDIVL; extern const fcml_cstring M_FDIVP; extern const fcml_cstring M_FDIVR; extern const fcml_cstring M_FDIVRL; extern const fcml_cstring M_FDIVRP; extern const fcml_cstring M_FDIVRS; extern const fcml_cstring M_FDIVS; extern const fcml_cstring M_FEMMS; extern const fcml_cstring M_FFREE; extern const fcml_cstring M_FIADD; extern const fcml_cstring M_FIADDL; extern const fcml_cstring M_FICOM; extern const fcml_cstring M_FICOML; extern const fcml_cstring M_FICOMP; extern const fcml_cstring M_FICOMPL; extern const fcml_cstring M_FIDIV; extern const fcml_cstring M_FIDIVL; extern const fcml_cstring M_FIDIVR; extern const fcml_cstring M_FIDIVRL; extern const fcml_cstring M_FILD; extern const fcml_cstring M_FILDL; extern const fcml_cstring M_FILDLL; extern const fcml_cstring M_FIMUL; extern const fcml_cstring M_FIMULL; extern const fcml_cstring M_FINCSTP; extern const fcml_cstring M_FINIT; extern const fcml_cstring M_FIST; extern const fcml_cstring M_FISTL; extern const fcml_cstring M_FISTP; extern const fcml_cstring M_FISTPL; extern const fcml_cstring M_FISTPLL; extern const fcml_cstring M_FISTTP; extern const fcml_cstring M_FISTTPL; extern const fcml_cstring M_FISTTPLL; extern const fcml_cstring M_FISUB; extern const fcml_cstring M_FISUBL; extern const fcml_cstring M_FISUBR; extern const fcml_cstring M_FISUBRL; extern const fcml_cstring M_FLD; extern const fcml_cstring M_FLD1; extern const fcml_cstring M_FLDCW; extern const fcml_cstring M_FLDENV; extern const fcml_cstring M_FLDENVS; extern const fcml_cstring M_FLDL; extern const fcml_cstring M_FLDL2E; extern const fcml_cstring M_FLDL2T; extern const fcml_cstring M_FLDLG2; extern const fcml_cstring M_FLDLN2; extern const fcml_cstring M_FLDPI; extern const fcml_cstring M_FLDS; extern const fcml_cstring M_FLDT; extern const fcml_cstring M_FLDZ; extern const fcml_cstring M_FMUL; extern const fcml_cstring M_FMULL; extern const fcml_cstring M_FMULP; extern const fcml_cstring M_FMULS; extern const fcml_cstring M_FNCLEX; extern const fcml_cstring M_FNINIT; extern const fcml_cstring M_FNOP; extern const fcml_cstring M_FNSAVE; extern const fcml_cstring M_FNSAVES; extern const fcml_cstring M_FNSTCW; extern const fcml_cstring M_FNSTENV; extern const fcml_cstring M_FNSTENVS; extern const fcml_cstring M_FNSTSW; extern const fcml_cstring M_FPATAN; extern const fcml_cstring M_FPREM; extern const fcml_cstring M_FPREM1; extern const fcml_cstring M_FPTAN; extern const fcml_cstring M_FRNDINT; extern const fcml_cstring M_FRSTOR; extern const fcml_cstring M_FRSTORS; extern const fcml_cstring M_FSAVE; extern const fcml_cstring M_FSAVES; extern const fcml_cstring M_FSCALE; extern const fcml_cstring M_FSIN; extern const fcml_cstring M_FSINCOS; extern const fcml_cstring M_FSQRT; extern const fcml_cstring M_FST; extern const fcml_cstring M_FSTCW; extern const fcml_cstring M_FSTENV; extern const fcml_cstring M_FSTENVS; extern const fcml_cstring M_FSTL; extern const fcml_cstring M_FSTP; extern const fcml_cstring M_FSTPL; extern const fcml_cstring M_FSTPS; extern const fcml_cstring M_FSTPT; extern const fcml_cstring M_FSTS; extern const fcml_cstring M_FSTSW; extern const fcml_cstring M_FSUB; extern const fcml_cstring M_FSUBL; extern const fcml_cstring M_FSUBP; extern const fcml_cstring M_FSUBR; extern const fcml_cstring M_FSUBRL; extern const fcml_cstring M_FSUBRP; extern const fcml_cstring M_FSUBRS; extern const fcml_cstring M_FSUBS; extern const fcml_cstring M_FTST; extern const fcml_cstring M_FUCOM; extern const fcml_cstring M_FUCOMI; extern const fcml_cstring M_FUCOMIP; extern const fcml_cstring M_FUCOMP; extern const fcml_cstring M_FUCOMPP; extern const fcml_cstring M_FWAIT; extern const fcml_cstring M_FXAM; extern const fcml_cstring M_FXCH; extern const fcml_cstring M_FXRSTOR; extern const fcml_cstring M_FXRSTOR64; extern const fcml_cstring M_FXSAVE; extern const fcml_cstring M_FXSAVE64; extern const fcml_cstring M_FXTRACT; extern const fcml_cstring M_FYL2X; extern const fcml_cstring M_FYL2XP1; extern const fcml_cstring M_GETSEC; extern const fcml_cstring M_HADDPD; extern const fcml_cstring M_HADDPS; extern const fcml_cstring M_HLT; extern const fcml_cstring M_HSUBPD; extern const fcml_cstring M_HSUBPS; extern const fcml_cstring M_IDIV; extern const fcml_cstring M_IDIVB; extern const fcml_cstring M_IDIVL; extern const fcml_cstring M_IDIVQ; extern const fcml_cstring M_IDIVW; extern const fcml_cstring M_IMUL; extern const fcml_cstring M_IMULB; extern const fcml_cstring M_IMULL; extern const fcml_cstring M_IMULQ; extern const fcml_cstring M_IMULW; extern const fcml_cstring M_IN; extern const fcml_cstring M_INC; extern const fcml_cstring M_INCB; extern const fcml_cstring M_INCL; extern const fcml_cstring M_INCQ; extern const fcml_cstring M_INCW; extern const fcml_cstring M_INSB; extern const fcml_cstring M_INSERTPS; extern const fcml_cstring M_INSERTQ; extern const fcml_cstring M_INSL; extern const fcml_cstring M_INSW; extern const fcml_cstring M_INT; extern const fcml_cstring M_INT3; extern const fcml_cstring M_INTO; extern const fcml_cstring M_INVD; extern const fcml_cstring M_INVEPT; extern const fcml_cstring M_INVLPG; extern const fcml_cstring M_INVLPGA; extern const fcml_cstring M_INVPCID; extern const fcml_cstring M_INVVPID; extern const fcml_cstring M_IRET; extern const fcml_cstring M_IRETQ; extern const fcml_cstring M_IRETW; extern const fcml_cstring M_JO; extern const fcml_cstring M_JNO; extern const fcml_cstring M_JB; extern const fcml_cstring M_JNB; extern const fcml_cstring M_JE; extern const fcml_cstring M_JNE; extern const fcml_cstring M_JBE; extern const fcml_cstring M_JNBE; extern const fcml_cstring M_JS; extern const fcml_cstring M_JNS; extern const fcml_cstring M_JP; extern const fcml_cstring M_JNP; extern const fcml_cstring M_JL; extern const fcml_cstring M_JNL; extern const fcml_cstring M_JLE; extern const fcml_cstring M_JNLE; extern const fcml_cstring M_JNAE; extern const fcml_cstring M_JAE; extern const fcml_cstring M_JZ; extern const fcml_cstring M_JNZ; extern const fcml_cstring M_JNA; extern const fcml_cstring M_JA; extern const fcml_cstring M_JPE; extern const fcml_cstring M_JPO; extern const fcml_cstring M_JNGE; extern const fcml_cstring M_JGE; extern const fcml_cstring M_JNG; extern const fcml_cstring M_JG; extern const fcml_cstring M_JC; extern const fcml_cstring M_JNC; extern const fcml_cstring M_JCXZ; extern const fcml_cstring M_JECXZ; extern const fcml_cstring M_JMP; extern const fcml_cstring M_JMPQ; extern const fcml_cstring M_JMPW; extern const fcml_cstring M_JRCXZ; extern const fcml_cstring M_LAHF; extern const fcml_cstring M_LAR; extern const fcml_cstring M_LCALL; extern const fcml_cstring M_LCALLQ; extern const fcml_cstring M_LCALLW; extern const fcml_cstring M_LDDQU; extern const fcml_cstring M_LDMXCSR; extern const fcml_cstring M_LDS; extern const fcml_cstring M_LEA; extern const fcml_cstring M_LEAVE; extern const fcml_cstring M_LES; extern const fcml_cstring M_LFENCE; extern const fcml_cstring M_LFS; extern const fcml_cstring M_LGDT; extern const fcml_cstring M_LGS; extern const fcml_cstring M_LIDT; extern const fcml_cstring M_LJMP; extern const fcml_cstring M_LJMPL; extern const fcml_cstring M_LJMPQ; extern const fcml_cstring M_LJMPW; extern const fcml_cstring M_LLDT; extern const fcml_cstring M_LLWPCB; extern const fcml_cstring M_LMSW; extern const fcml_cstring M_LODS; extern const fcml_cstring M_LODSB; extern const fcml_cstring M_LODSL; extern const fcml_cstring M_LODSQ; extern const fcml_cstring M_LODSW; extern const fcml_cstring M_LOOP; extern const fcml_cstring M_LOOPE; extern const fcml_cstring M_LOOPNE; extern const fcml_cstring M_LOOPNZ; extern const fcml_cstring M_LOOPZ; extern const fcml_cstring M_LRET; extern const fcml_cstring M_LRETQ; extern const fcml_cstring M_LRETW; extern const fcml_cstring M_LSL; extern const fcml_cstring M_LSS; extern const fcml_cstring M_LTR; extern const fcml_cstring M_LWPINS; extern const fcml_cstring M_LWPVAL; extern const fcml_cstring M_LZCNT; extern const fcml_cstring M_MASKMOVDQU; extern const fcml_cstring M_MASKMOVQ; extern const fcml_cstring M_MAXPD; extern const fcml_cstring M_MAXPS; extern const fcml_cstring M_MAXSD; extern const fcml_cstring M_MAXSS; extern const fcml_cstring M_MFENCE; extern const fcml_cstring M_MINPD; extern const fcml_cstring M_MINPS; extern const fcml_cstring M_MINSD; extern const fcml_cstring M_MINSS; extern const fcml_cstring M_MONITOR; extern const fcml_cstring M_MOV; extern const fcml_cstring M_MOVABS; extern const fcml_cstring M_MOVAPD; extern const fcml_cstring M_MOVAPS; extern const fcml_cstring M_MOVB; extern const fcml_cstring M_MOVBE; extern const fcml_cstring M_MOVD; extern const fcml_cstring M_MOVDDUP; extern const fcml_cstring M_MOVDQ2Q; extern const fcml_cstring M_MOVDQA; extern const fcml_cstring M_MOVDQU; extern const fcml_cstring M_MOVHLPS; extern const fcml_cstring M_MOVHPD; extern const fcml_cstring M_MOVHPS; extern const fcml_cstring M_MOVL; extern const fcml_cstring M_MOVLHPS; extern const fcml_cstring M_MOVLPD; extern const fcml_cstring M_MOVLPS; extern const fcml_cstring M_MOVMSKPD; extern const fcml_cstring M_MOVMSKPS; extern const fcml_cstring M_MOVNTDQ; extern const fcml_cstring M_MOVNTDQA; extern const fcml_cstring M_MOVNTI; extern const fcml_cstring M_MOVNTPD; extern const fcml_cstring M_MOVNTPS; extern const fcml_cstring M_MOVNTQ; extern const fcml_cstring M_MOVNTSD; extern const fcml_cstring M_MOVNTSS; extern const fcml_cstring M_MOVQ; extern const fcml_cstring M_MOVQ2DQ; extern const fcml_cstring M_MOVS; extern const fcml_cstring M_MOVSB; extern const fcml_cstring M_MOVSBL; extern const fcml_cstring M_MOVSBQ; extern const fcml_cstring M_MOVSBW; extern const fcml_cstring M_MOVSD; extern const fcml_cstring M_MOVSHDUP; extern const fcml_cstring M_MOVSL; extern const fcml_cstring M_MOVSLDUP; extern const fcml_cstring M_MOVSQ; extern const fcml_cstring M_MOVSS; extern const fcml_cstring M_MOVSW; extern const fcml_cstring M_MOVSWL; extern const fcml_cstring M_MOVSWQ; extern const fcml_cstring M_MOVSWW; extern const fcml_cstring M_MOVSXD; extern const fcml_cstring M_MOVUPD; extern const fcml_cstring M_MOVUPS; extern const fcml_cstring M_MOVW; extern const fcml_cstring M_MOVZBL; extern const fcml_cstring M_MOVZBQ; extern const fcml_cstring M_MOVZBW; extern const fcml_cstring M_MOVZWL; extern const fcml_cstring M_MOVZWQ; extern const fcml_cstring M_MOVZWW; extern const fcml_cstring M_MPSADBW; extern const fcml_cstring M_MUL; extern const fcml_cstring M_MULB; extern const fcml_cstring M_MULL; extern const fcml_cstring M_MULPD; extern const fcml_cstring M_MULPS; extern const fcml_cstring M_MULQ; extern const fcml_cstring M_MULSD; extern const fcml_cstring M_MULSS; extern const fcml_cstring M_MULW; extern const fcml_cstring M_MULX; extern const fcml_cstring M_MWAIT; extern const fcml_cstring M_NEG; extern const fcml_cstring M_NEGB; extern const fcml_cstring M_NEGL; extern const fcml_cstring M_NEGQ; extern const fcml_cstring M_NEGW; extern const fcml_cstring M_NOP; extern const fcml_cstring M_NOPL; extern const fcml_cstring M_NOPQ; extern const fcml_cstring M_NOPW; extern const fcml_cstring M_NOT; extern const fcml_cstring M_NOTB; extern const fcml_cstring M_NOTL; extern const fcml_cstring M_NOTQ; extern const fcml_cstring M_NOTW; extern const fcml_cstring M_OR; extern const fcml_cstring M_ORB; extern const fcml_cstring M_ORL; extern const fcml_cstring M_ORPD; extern const fcml_cstring M_ORPS; extern const fcml_cstring M_ORQ; extern const fcml_cstring M_ORW; extern const fcml_cstring M_OUT; extern const fcml_cstring M_OUTSB; extern const fcml_cstring M_OUTSL; extern const fcml_cstring M_OUTSW; extern const fcml_cstring M_PABSB; extern const fcml_cstring M_PABSD; extern const fcml_cstring M_PABSW; extern const fcml_cstring M_PACKSSDW; extern const fcml_cstring M_PACKSSWB; extern const fcml_cstring M_PACKUSDW; extern const fcml_cstring M_PACKUSWB; extern const fcml_cstring M_PADDB; extern const fcml_cstring M_PADDD; extern const fcml_cstring M_PADDQ; extern const fcml_cstring M_PADDSB; extern const fcml_cstring M_PADDSW; extern const fcml_cstring M_PADDUSB; extern const fcml_cstring M_PADDUSW; extern const fcml_cstring M_PADDW; extern const fcml_cstring M_PALIGNR; extern const fcml_cstring M_PAND; extern const fcml_cstring M_PANDN; extern const fcml_cstring M_PAUSE; extern const fcml_cstring M_PAVGB; extern const fcml_cstring M_PAVGUSB; extern const fcml_cstring M_PAVGW; extern const fcml_cstring M_PBLENDVB; extern const fcml_cstring M_PBLENDW; extern const fcml_cstring M_PCLMULQDQ; extern const fcml_cstring M_PCMPEQB; extern const fcml_cstring M_PCMPEQD; extern const fcml_cstring M_PCMPEQQ; extern const fcml_cstring M_PCMPEQW; extern const fcml_cstring M_PCMPESTRI; extern const fcml_cstring M_PCMPESTRM; extern const fcml_cstring M_PCMPGTB; extern const fcml_cstring M_PCMPGTD; extern const fcml_cstring M_PCMPGTQ; extern const fcml_cstring M_PCMPGTW; extern const fcml_cstring M_PCMPISTRI; extern const fcml_cstring M_PCMPISTRM; extern const fcml_cstring M_PDEP; extern const fcml_cstring M_PEXT; extern const fcml_cstring M_PEXTRB; extern const fcml_cstring M_PEXTRD; extern const fcml_cstring M_PEXTRQ; extern const fcml_cstring M_PEXTRW; extern const fcml_cstring M_PF2ID; extern const fcml_cstring M_PF2IW; extern const fcml_cstring M_PFACC; extern const fcml_cstring M_PFADD; extern const fcml_cstring M_PFCMPEQ; extern const fcml_cstring M_PFCMPGE; extern const fcml_cstring M_PFCMPGT; extern const fcml_cstring M_PFMAX; extern const fcml_cstring M_PFMIN; extern const fcml_cstring M_PFMUL; extern const fcml_cstring M_PFNACC; extern const fcml_cstring M_PFPNACC; extern const fcml_cstring M_PFRCP; extern const fcml_cstring M_PFRCPIT1; extern const fcml_cstring M_PFRCPIT2; extern const fcml_cstring M_PFRSQIT1; extern const fcml_cstring M_PFRSQRT; extern const fcml_cstring M_PFSUB; extern const fcml_cstring M_PFSUBR; extern const fcml_cstring M_PHADDD; extern const fcml_cstring M_PHADDSW; extern const fcml_cstring M_PHADDW; extern const fcml_cstring M_PHMINPOSUW; extern const fcml_cstring M_PHSUBD; extern const fcml_cstring M_PHSUBSW; extern const fcml_cstring M_PHSUBW; extern const fcml_cstring M_PI2FD; extern const fcml_cstring M_PI2FW; extern const fcml_cstring M_PINSRB; extern const fcml_cstring M_PINSRD; extern const fcml_cstring M_PINSRQ; extern const fcml_cstring M_PINSRW; extern const fcml_cstring M_PMADDUBSW; extern const fcml_cstring M_PMADDWD; extern const fcml_cstring M_PMAXSB; extern const fcml_cstring M_PMAXSD; extern const fcml_cstring M_PMAXSW; extern const fcml_cstring M_PMAXUB; extern const fcml_cstring M_PMAXUD; extern const fcml_cstring M_PMAXUW; extern const fcml_cstring M_PMINSB; extern const fcml_cstring M_PMINSD; extern const fcml_cstring M_PMINSW; extern const fcml_cstring M_PMINUB; extern const fcml_cstring M_PMINUD; extern const fcml_cstring M_PMINUW; extern const fcml_cstring M_PMOVMSKB; extern const fcml_cstring M_PMOVSXBD; extern const fcml_cstring M_PMOVSXBQ; extern const fcml_cstring M_PMOVSXBW; extern const fcml_cstring M_PMOVSXDQ; extern const fcml_cstring M_PMOVSXWD; extern const fcml_cstring M_PMOVSXWQ; extern const fcml_cstring M_PMOVZXBD; extern const fcml_cstring M_PMOVZXBQ; extern const fcml_cstring M_PMOVZXBW; extern const fcml_cstring M_PMOVZXDQ; extern const fcml_cstring M_PMOVZXWD; extern const fcml_cstring M_PMOVZXWQ; extern const fcml_cstring M_PMULDQ; extern const fcml_cstring M_PMULHRSW; extern const fcml_cstring M_PMULHRW; extern const fcml_cstring M_PMULHUW; extern const fcml_cstring M_PMULHW; extern const fcml_cstring M_PMULLD; extern const fcml_cstring M_PMULLW; extern const fcml_cstring M_PMULUDQ; extern const fcml_cstring M_POP; extern const fcml_cstring M_POPA; extern const fcml_cstring M_POPAW; extern const fcml_cstring M_POPCNT; extern const fcml_cstring M_POPF; extern const fcml_cstring M_POPFQ; extern const fcml_cstring M_POPFW; extern const fcml_cstring M_POPL; extern const fcml_cstring M_POPQ; extern const fcml_cstring M_POPW; extern const fcml_cstring M_POR; extern const fcml_cstring M_PREFETCH; extern const fcml_cstring M_PREFETCHNTA; extern const fcml_cstring M_PREFETCHT0; extern const fcml_cstring M_PREFETCHT1; extern const fcml_cstring M_PREFETCHT2; extern const fcml_cstring M_PREFETCHW; extern const fcml_cstring M_PSADBW; extern const fcml_cstring M_PSHUFB; extern const fcml_cstring M_PSHUFD; extern const fcml_cstring M_PSHUFHW; extern const fcml_cstring M_PSHUFLW; extern const fcml_cstring M_PSHUFW; extern const fcml_cstring M_PSIGNB; extern const fcml_cstring M_PSIGND; extern const fcml_cstring M_PSIGNW; extern const fcml_cstring M_PSLLD; extern const fcml_cstring M_PSLLDQ; extern const fcml_cstring M_PSLLQ; extern const fcml_cstring M_PSLLW; extern const fcml_cstring M_PSRAD; extern const fcml_cstring M_PSRAW; extern const fcml_cstring M_PSRLD; extern const fcml_cstring M_PSRLDQ; extern const fcml_cstring M_PSRLQ; extern const fcml_cstring M_PSRLW; extern const fcml_cstring M_PSUBB; extern const fcml_cstring M_PSUBD; extern const fcml_cstring M_PSUBQ; extern const fcml_cstring M_PSUBSB; extern const fcml_cstring M_PSUBSW; extern const fcml_cstring M_PSUBUSB; extern const fcml_cstring M_PSUBUSW; extern const fcml_cstring M_PSUBW; extern const fcml_cstring M_PSWAPD; extern const fcml_cstring M_PTEST; extern const fcml_cstring M_PUNPCKHBW; extern const fcml_cstring M_PUNPCKHDQ; extern const fcml_cstring M_PUNPCKHQDQ; extern const fcml_cstring M_PUNPCKHWD; extern const fcml_cstring M_PUNPCKLBW; extern const fcml_cstring M_PUNPCKLDQ; extern const fcml_cstring M_PUNPCKLQDQ; extern const fcml_cstring M_PUNPCKLWD; extern const fcml_cstring M_PUSH; extern const fcml_cstring M_PUSHA; extern const fcml_cstring M_PUSHAW; extern const fcml_cstring M_PUSHB; extern const fcml_cstring M_PUSHF; extern const fcml_cstring M_PUSHFQ; extern const fcml_cstring M_PUSHFW; extern const fcml_cstring M_PUSHL; extern const fcml_cstring M_PUSHQ; extern const fcml_cstring M_PUSHW; extern const fcml_cstring M_PXOR; extern const fcml_cstring M_RCL; extern const fcml_cstring M_RCLB; extern const fcml_cstring M_RCLL; extern const fcml_cstring M_RCLQ; extern const fcml_cstring M_RCLW; extern const fcml_cstring M_RCPPS; extern const fcml_cstring M_RCPSS; extern const fcml_cstring M_RCR; extern const fcml_cstring M_RCRB; extern const fcml_cstring M_RCRL; extern const fcml_cstring M_RCRQ; extern const fcml_cstring M_RCRW; extern const fcml_cstring M_RDFSBASE; extern const fcml_cstring M_RDGSBASE; extern const fcml_cstring M_RDMSR; extern const fcml_cstring M_RDPMC; extern const fcml_cstring M_RDRAND; extern const fcml_cstring M_RDSEED; extern const fcml_cstring M_RDTSC; extern const fcml_cstring M_RDTSCP; extern const fcml_cstring M_RET; extern const fcml_cstring M_RETQ; extern const fcml_cstring M_RETW; extern const fcml_cstring M_ROL; extern const fcml_cstring M_ROLB; extern const fcml_cstring M_ROLL; extern const fcml_cstring M_ROLQ; extern const fcml_cstring M_ROLW; extern const fcml_cstring M_ROR; extern const fcml_cstring M_RORB; extern const fcml_cstring M_RORL; extern const fcml_cstring M_RORQ; extern const fcml_cstring M_RORW; extern const fcml_cstring M_RORX; extern const fcml_cstring M_ROUNDPD; extern const fcml_cstring M_ROUNDPS; extern const fcml_cstring M_ROUNDSD; extern const fcml_cstring M_ROUNDSS; extern const fcml_cstring M_RSM; extern const fcml_cstring M_RSQRTPS; extern const fcml_cstring M_RSQRTSS; extern const fcml_cstring M_SAHF; extern const fcml_cstring M_SAL; extern const fcml_cstring M_SALB; extern const fcml_cstring M_SALL; extern const fcml_cstring M_SALQ; extern const fcml_cstring M_SALW; extern const fcml_cstring M_SAR; extern const fcml_cstring M_SARB; extern const fcml_cstring M_SARL; extern const fcml_cstring M_SARQ; extern const fcml_cstring M_SARW; extern const fcml_cstring M_SARX; extern const fcml_cstring M_SBB; extern const fcml_cstring M_SBBB; extern const fcml_cstring M_SBBL; extern const fcml_cstring M_SBBQ; extern const fcml_cstring M_SBBW; extern const fcml_cstring M_SCAS; extern const fcml_cstring M_SCASB; extern const fcml_cstring M_SCASL; extern const fcml_cstring M_SCASQ; extern const fcml_cstring M_SCASW; extern const fcml_cstring M_SETO; extern const fcml_cstring M_SETNO; extern const fcml_cstring M_SETB; extern const fcml_cstring M_SETNB; extern const fcml_cstring M_SETE; extern const fcml_cstring M_SETNE; extern const fcml_cstring M_SETBE; extern const fcml_cstring M_SETNBE; extern const fcml_cstring M_SETS; extern const fcml_cstring M_SETNS; extern const fcml_cstring M_SETP; extern const fcml_cstring M_SETNP; extern const fcml_cstring M_SETL; extern const fcml_cstring M_SETNL; extern const fcml_cstring M_SETLE; extern const fcml_cstring M_SETNLE; extern const fcml_cstring M_SETNAE; extern const fcml_cstring M_SETAE; extern const fcml_cstring M_SETZ; extern const fcml_cstring M_SETNZ; extern const fcml_cstring M_SETNA; extern const fcml_cstring M_SETA; extern const fcml_cstring M_SETPE; extern const fcml_cstring M_SETPO; extern const fcml_cstring M_SETNGE; extern const fcml_cstring M_SETGE; extern const fcml_cstring M_SETNG; extern const fcml_cstring M_SETG; extern const fcml_cstring M_SETC; extern const fcml_cstring M_SETNC; extern const fcml_cstring M_SFENCE; extern const fcml_cstring M_SGDT; extern const fcml_cstring M_SHL; extern const fcml_cstring M_SHLB; extern const fcml_cstring M_SHLD; extern const fcml_cstring M_SHLL; extern const fcml_cstring M_SHLQ; extern const fcml_cstring M_SHLW; extern const fcml_cstring M_SHLX; extern const fcml_cstring M_SHR; extern const fcml_cstring M_SHRB; extern const fcml_cstring M_SHRD; extern const fcml_cstring M_SHRL; extern const fcml_cstring M_SHRQ; extern const fcml_cstring M_SHRW; extern const fcml_cstring M_SHRX; extern const fcml_cstring M_SHUFPD; extern const fcml_cstring M_SHUFPS; extern const fcml_cstring M_SIDT; extern const fcml_cstring M_SKINIT; extern const fcml_cstring M_SLDT; extern const fcml_cstring M_SLWPCB; extern const fcml_cstring M_SMSW; extern const fcml_cstring M_SQRTPD; extern const fcml_cstring M_SQRTPS; extern const fcml_cstring M_SQRTSD; extern const fcml_cstring M_SQRTSS; extern const fcml_cstring M_STAC; extern const fcml_cstring M_STC; extern const fcml_cstring M_STD; extern const fcml_cstring M_STGI; extern const fcml_cstring M_STI; extern const fcml_cstring M_STMXCSR; extern const fcml_cstring M_STOS; extern const fcml_cstring M_STOSB; extern const fcml_cstring M_STOSL; extern const fcml_cstring M_STOSQ; extern const fcml_cstring M_STOSW; extern const fcml_cstring M_STR; extern const fcml_cstring M_SUB; extern const fcml_cstring M_SUBB; extern const fcml_cstring M_SUBL; extern const fcml_cstring M_SUBPD; extern const fcml_cstring M_SUBPS; extern const fcml_cstring M_SUBQ; extern const fcml_cstring M_SUBSD; extern const fcml_cstring M_SUBSS; extern const fcml_cstring M_SUBW; extern const fcml_cstring M_SWAPGS; extern const fcml_cstring M_SYSCALL; extern const fcml_cstring M_SYSENTER; extern const fcml_cstring M_SYSEXIT; extern const fcml_cstring M_SYSRET; extern const fcml_cstring M_T1MSKC; extern const fcml_cstring M_TEST; extern const fcml_cstring M_TESTB; extern const fcml_cstring M_TESTL; extern const fcml_cstring M_TESTQ; extern const fcml_cstring M_TESTW; extern const fcml_cstring M_TZCNT; extern const fcml_cstring M_TZMSK; extern const fcml_cstring M_UCOMISD; extern const fcml_cstring M_UCOMISS; extern const fcml_cstring M_UD2; extern const fcml_cstring M_UNPCKHPD; extern const fcml_cstring M_UNPCKHPS; extern const fcml_cstring M_UNPCKLPD; extern const fcml_cstring M_UNPCKLPS; extern const fcml_cstring M_VADDPD; extern const fcml_cstring M_VADDPS; extern const fcml_cstring M_VADDSD; extern const fcml_cstring M_VADDSS; extern const fcml_cstring M_VADDSUBPD; extern const fcml_cstring M_VADDSUBPS; extern const fcml_cstring M_VAESDEC; extern const fcml_cstring M_VAESDECLAST; extern const fcml_cstring M_VAESENC; extern const fcml_cstring M_VAESENCLAST; extern const fcml_cstring M_VAESIMC; extern const fcml_cstring M_VAESKEYGENASSIST; extern const fcml_cstring M_VANDNPD; extern const fcml_cstring M_VANDNPS; extern const fcml_cstring M_VANDPD; extern const fcml_cstring M_VANDPS; extern const fcml_cstring M_VBLENDPD; extern const fcml_cstring M_VBLENDPS; extern const fcml_cstring M_VBLENDVPD; extern const fcml_cstring M_VBLENDVPS; extern const fcml_cstring M_VBROADCASTF128; extern const fcml_cstring M_VBROADCASTI128; extern const fcml_cstring M_VBROADCASTSD; extern const fcml_cstring M_VBROADCASTSS; extern const fcml_cstring M_VCMPEQ_OSSD; extern const fcml_cstring M_VCMPEQ_OSSS; extern const fcml_cstring M_VCMPEQSD; extern const fcml_cstring M_VCMPEQSS; extern const fcml_cstring M_VCMPEQ_UQSD; extern const fcml_cstring M_VCMPEQ_UQSS; extern const fcml_cstring M_VCMPEQ_USSD; extern const fcml_cstring M_VCMPEQ_USSS; extern const fcml_cstring M_VCMPFALSE_OSSD; extern const fcml_cstring M_VCMPFALSE_OSSS; extern const fcml_cstring M_VCMPFALSESD; extern const fcml_cstring M_VCMPFALSESS; extern const fcml_cstring M_VCMPGE_OQSD; extern const fcml_cstring M_VCMPGE_OQSS; extern const fcml_cstring M_VCMPGESD; extern const fcml_cstring M_VCMPGESS; extern const fcml_cstring M_VCMPGT_OQSD; extern const fcml_cstring M_VCMPGT_OQSS; extern const fcml_cstring M_VCMPGTSD; extern const fcml_cstring M_VCMPGTSS; extern const fcml_cstring M_VCMPLE_OQSD; extern const fcml_cstring M_VCMPLE_OQSS; extern const fcml_cstring M_VCMPLESD; extern const fcml_cstring M_VCMPLESS; extern const fcml_cstring M_VCMPLT_OQSD; extern const fcml_cstring M_VCMPLT_OQSS; extern const fcml_cstring M_VCMPLTSD; extern const fcml_cstring M_VCMPLTSS; extern const fcml_cstring M_VCMPNEQ_OQSD; extern const fcml_cstring M_VCMPNEQ_OQSS; extern const fcml_cstring M_VCMPNEQ_OSSD; extern const fcml_cstring M_VCMPNEQ_OSSS; extern const fcml_cstring M_VCMPNEQSD; extern const fcml_cstring M_VCMPNEQSS; extern const fcml_cstring M_VCMPNEQ_USSD; extern const fcml_cstring M_VCMPNEQ_USSS; extern const fcml_cstring M_VCMPNGESD; extern const fcml_cstring M_VCMPNGESS; extern const fcml_cstring M_VCMPNGE_UQSD; extern const fcml_cstring M_VCMPNGE_UQSS; extern const fcml_cstring M_VCMPNGTSD; extern const fcml_cstring M_VCMPNGTSS; extern const fcml_cstring M_VCMPNGT_UQSD; extern const fcml_cstring M_VCMPNGT_UQSS; extern const fcml_cstring M_VCMPNLESD; extern const fcml_cstring M_VCMPNLESS; extern const fcml_cstring M_VCMPNLE_UQSD; extern const fcml_cstring M_VCMPNLE_UQSS; extern const fcml_cstring M_VCMPNLTSD; extern const fcml_cstring M_VCMPNLTSS; extern const fcml_cstring M_VCMPNLT_UQSD; extern const fcml_cstring M_VCMPNLT_UQSS; extern const fcml_cstring M_VCMPORDSD; extern const fcml_cstring M_VCMPORDSS; extern const fcml_cstring M_VCMPORD_SSD; extern const fcml_cstring M_VCMPORD_SSS; extern const fcml_cstring M_VCMPPD; extern const fcml_cstring M_VCMPPS; extern const fcml_cstring M_VCMPSD; extern const fcml_cstring M_VCMPSS; extern const fcml_cstring M_VCMPTRUESD; extern const fcml_cstring M_VCMPTRUESS; extern const fcml_cstring M_VCMPTRUE_USSD; extern const fcml_cstring M_VCMPTRUE_USSS; extern const fcml_cstring M_VCMPUNORDSD; extern const fcml_cstring M_VCMPUNORDSS; extern const fcml_cstring M_VCMPUNORD_SSD; extern const fcml_cstring M_VCMPUNORD_SSS; extern const fcml_cstring M_VCOMISD; extern const fcml_cstring M_VCOMISS; extern const fcml_cstring M_VCVTDQ2PD; extern const fcml_cstring M_VCVTDQ2PS; extern const fcml_cstring M_VCVTPD2DQ; extern const fcml_cstring M_VCVTPD2PSX; extern const fcml_cstring M_VCVTPD2PSY; extern const fcml_cstring M_VCVTPH2PS; extern const fcml_cstring M_VCVTPS2DQ; extern const fcml_cstring M_VCVTPS2PD; extern const fcml_cstring M_VCVTPS2PH; extern const fcml_cstring M_VCVTSD2SI; extern const fcml_cstring M_VCVTSD2SS; extern const fcml_cstring M_VCVTSI2SDL; extern const fcml_cstring M_VCVTSI2SDQ; extern const fcml_cstring M_VCVTSI2SSL; extern const fcml_cstring M_VCVTSI2SSQ; extern const fcml_cstring M_VCVTSS2SD; extern const fcml_cstring M_VCVTSS2SI; extern const fcml_cstring M_VCVTTPD2DQX; extern const fcml_cstring M_VCVTTPD2DQY; extern const fcml_cstring M_VCVTTPS2DQ; extern const fcml_cstring M_VCVTTSD2SI; extern const fcml_cstring M_VCVTTSS2SI; extern const fcml_cstring M_VDIVPD; extern const fcml_cstring M_VDIVPS; extern const fcml_cstring M_VDIVSD; extern const fcml_cstring M_VDIVSS; extern const fcml_cstring M_VDPPD; extern const fcml_cstring M_VDPPS; extern const fcml_cstring M_VERR; extern const fcml_cstring M_VERW; extern const fcml_cstring M_VEXTRACTF128; extern const fcml_cstring M_VEXTRACTI128; extern const fcml_cstring M_VEXTRACTPS; extern const fcml_cstring M_VFMADD132PD; extern const fcml_cstring M_VFMADD132PS; extern const fcml_cstring M_VFMADD132SD; extern const fcml_cstring M_VFMADD132SS; extern const fcml_cstring M_VFMADD213PD; extern const fcml_cstring M_VFMADD213PS; extern const fcml_cstring M_VFMADD213SD; extern const fcml_cstring M_VFMADD213SS; extern const fcml_cstring M_VFMADD231PD; extern const fcml_cstring M_VFMADD231PS; extern const fcml_cstring M_VFMADD231SD; extern const fcml_cstring M_VFMADD231SS; extern const fcml_cstring M_VFMADDPD; extern const fcml_cstring M_VFMADDPS; extern const fcml_cstring M_VFMADDSD; extern const fcml_cstring M_VFMADDSS; extern const fcml_cstring M_VFMADDSUB132PD; extern const fcml_cstring M_VFMADDSUB132PS; extern const fcml_cstring M_VFMADDSUB213PD; extern const fcml_cstring M_VFMADDSUB213PS; extern const fcml_cstring M_VFMADDSUB231PD; extern const fcml_cstring M_VFMADDSUB231PS; extern const fcml_cstring M_VFMADDSUBPD; extern const fcml_cstring M_VFMADDSUBPS; extern const fcml_cstring M_VFMSUB132PD; extern const fcml_cstring M_VFMSUB132PS; extern const fcml_cstring M_VFMSUB132SD; extern const fcml_cstring M_VFMSUB132SS; extern const fcml_cstring M_VFMSUB213PD; extern const fcml_cstring M_VFMSUB213PS; extern const fcml_cstring M_VFMSUB213SD; extern const fcml_cstring M_VFMSUB213SS; extern const fcml_cstring M_VFMSUB231PD; extern const fcml_cstring M_VFMSUB231PS; extern const fcml_cstring M_VFMSUB231SD; extern const fcml_cstring M_VFMSUB231SS; extern const fcml_cstring M_VFMSUBADD132PD; extern const fcml_cstring M_VFMSUBADD132PS; extern const fcml_cstring M_VFMSUBADD213PD; extern const fcml_cstring M_VFMSUBADD213PS; extern const fcml_cstring M_VFMSUBADD231PD; extern const fcml_cstring M_VFMSUBADD231PS; extern const fcml_cstring M_VFMSUBADDPD; extern const fcml_cstring M_VFMSUBADDPS; extern const fcml_cstring M_VFMSUBPD; extern const fcml_cstring M_VFMSUBPS; extern const fcml_cstring M_VFMSUBSD; extern const fcml_cstring M_VFMSUBSS; extern const fcml_cstring M_VFNMADD132PD; extern const fcml_cstring M_VFNMADD132PS; extern const fcml_cstring M_VFNMADD132SD; extern const fcml_cstring M_VFNMADD132SS; extern const fcml_cstring M_VFNMADD213PD; extern const fcml_cstring M_VFNMADD213PS; extern const fcml_cstring M_VFNMADD213SD; extern const fcml_cstring M_VFNMADD213SS; extern const fcml_cstring M_VFNMADD231PD; extern const fcml_cstring M_VFNMADD231PS; extern const fcml_cstring M_VFNMADD231SD; extern const fcml_cstring M_VFNMADD231SS; extern const fcml_cstring M_VFNMADDPD; extern const fcml_cstring M_VFNMADDPS; extern const fcml_cstring M_VFNMADDSD; extern const fcml_cstring M_VFNMADDSS; extern const fcml_cstring M_VFNMSUB132PD; extern const fcml_cstring M_VFNMSUB132PS; extern const fcml_cstring M_VFNMSUB132SD; extern const fcml_cstring M_VFNMSUB132SS; extern const fcml_cstring M_VFNMSUB213PD; extern const fcml_cstring M_VFNMSUB213PS; extern const fcml_cstring M_VFNMSUB213SD; extern const fcml_cstring M_VFNMSUB213SS; extern const fcml_cstring M_VFNMSUB231PD; extern const fcml_cstring M_VFNMSUB231PS; extern const fcml_cstring M_VFNMSUB231SD; extern const fcml_cstring M_VFNMSUB231SS; extern const fcml_cstring M_VFNMSUBPD; extern const fcml_cstring M_VFNMSUBPS; extern const fcml_cstring M_VFNMSUBSD; extern const fcml_cstring M_VFNMSUBSS; extern const fcml_cstring M_VFRCZPD; extern const fcml_cstring M_VFRCZPS; extern const fcml_cstring M_VFRCZSD; extern const fcml_cstring M_VFRCZSS; extern const fcml_cstring M_VGATHERDPD; extern const fcml_cstring M_VGATHERDPS; extern const fcml_cstring M_VGATHERQPD; extern const fcml_cstring M_VGATHERQPS; extern const fcml_cstring M_VHADDPD; extern const fcml_cstring M_VHADDPS; extern const fcml_cstring M_VHSUBPD; extern const fcml_cstring M_VHSUBPS; extern const fcml_cstring M_VINSERTF128; extern const fcml_cstring M_VINSERTI128; extern const fcml_cstring M_VINSERTPS; extern const fcml_cstring M_VLDDQU; extern const fcml_cstring M_VLDMXCSR; extern const fcml_cstring M_VMASKMOVDQU; extern const fcml_cstring M_VMASKMOVPD; extern const fcml_cstring M_VMASKMOVPS; extern const fcml_cstring M_VMAXPD; extern const fcml_cstring M_VMAXPS; extern const fcml_cstring M_VMAXSD; extern const fcml_cstring M_VMAXSS; extern const fcml_cstring M_VMCALL; extern const fcml_cstring M_VMCLEAR; extern const fcml_cstring M_VMFUNC; extern const fcml_cstring M_VMINPD; extern const fcml_cstring M_VMINPS; extern const fcml_cstring M_VMINSD; extern const fcml_cstring M_VMINSS; extern const fcml_cstring M_VMLAUNCH; extern const fcml_cstring M_VMLOAD; extern const fcml_cstring M_VMMCALL; extern const fcml_cstring M_VMOVAPD; extern const fcml_cstring M_VMOVAPS; extern const fcml_cstring M_VMOVD; extern const fcml_cstring M_VMOVDDUP; extern const fcml_cstring M_VMOVDQA; extern const fcml_cstring M_VMOVDQU; extern const fcml_cstring M_VMOVHLPS; extern const fcml_cstring M_VMOVHPD; extern const fcml_cstring M_VMOVHPS; extern const fcml_cstring M_VMOVLHPS; extern const fcml_cstring M_VMOVLPD; extern const fcml_cstring M_VMOVLPS; extern const fcml_cstring M_VMOVMSKPD; extern const fcml_cstring M_VMOVMSKPS; extern const fcml_cstring M_VMOVNTDQ; extern const fcml_cstring M_VMOVNTDQA; extern const fcml_cstring M_VMOVNTPD; extern const fcml_cstring M_VMOVNTPS; extern const fcml_cstring M_VMOVQ; extern const fcml_cstring M_VMOVSD; extern const fcml_cstring M_VMOVSHDUP; extern const fcml_cstring M_VMOVSLDUP; extern const fcml_cstring M_VMOVSS; extern const fcml_cstring M_VMOVUPD; extern const fcml_cstring M_VMOVUPS; extern const fcml_cstring M_VMPSADBW; extern const fcml_cstring M_VMPTRLD; extern const fcml_cstring M_VMPTRST; extern const fcml_cstring M_VMREAD; extern const fcml_cstring M_VMRESUME; extern const fcml_cstring M_VMRUN; extern const fcml_cstring M_VMSAVE; extern const fcml_cstring M_VMULPD; extern const fcml_cstring M_VMULPS; extern const fcml_cstring M_VMULSD; extern const fcml_cstring M_VMULSS; extern const fcml_cstring M_VMWRITE; extern const fcml_cstring M_VMXOFF; extern const fcml_cstring M_VMXON; extern const fcml_cstring M_VORPD; extern const fcml_cstring M_VORPS; extern const fcml_cstring M_VPABSB; extern const fcml_cstring M_VPABSD; extern const fcml_cstring M_VPABSW; extern const fcml_cstring M_VPACKSSDW; extern const fcml_cstring M_VPACKSSWB; extern const fcml_cstring M_VPACKUSDW; extern const fcml_cstring M_VPACKUSWB; extern const fcml_cstring M_VPADDB; extern const fcml_cstring M_VPADDD; extern const fcml_cstring M_VPADDQ; extern const fcml_cstring M_VPADDSB; extern const fcml_cstring M_VPADDSW; extern const fcml_cstring M_VPADDUSB; extern const fcml_cstring M_VPADDUSW; extern const fcml_cstring M_VPADDW; extern const fcml_cstring M_VPALIGNR; extern const fcml_cstring M_VPAND; extern const fcml_cstring M_VPANDN; extern const fcml_cstring M_VPAVGB; extern const fcml_cstring M_VPAVGW; extern const fcml_cstring M_VPBLENDD; extern const fcml_cstring M_VPBLENDVB; extern const fcml_cstring M_VPBLENDW; extern const fcml_cstring M_VPBROADCASTB; extern const fcml_cstring M_VPBROADCASTD; extern const fcml_cstring M_VPBROADCASTQ; extern const fcml_cstring M_VPBROADCASTW; extern const fcml_cstring M_VPCLMULQDQ; extern const fcml_cstring M_VPCMOV; extern const fcml_cstring M_VPCMPEQB; extern const fcml_cstring M_VPCMPEQD; extern const fcml_cstring M_VPCMPEQQ; extern const fcml_cstring M_VPCMPEQW; extern const fcml_cstring M_VPCMPESTRI; extern const fcml_cstring M_VPCMPESTRM; extern const fcml_cstring M_VPCMPGTB; extern const fcml_cstring M_VPCMPGTD; extern const fcml_cstring M_VPCMPGTQ; extern const fcml_cstring M_VPCMPGTW; extern const fcml_cstring M_VPCMPISTRI; extern const fcml_cstring M_VPCMPISTRM; extern const fcml_cstring M_VPCOMB; extern const fcml_cstring M_VPCOMD; extern const fcml_cstring M_VPCOMEQB; extern const fcml_cstring M_VPCOMEQD; extern const fcml_cstring M_VPCOMEQQ; extern const fcml_cstring M_VPCOMEQUB; extern const fcml_cstring M_VPCOMEQUD; extern const fcml_cstring M_VPCOMEQUQ; extern const fcml_cstring M_VPCOMEQUW; extern const fcml_cstring M_VPCOMEQW; extern const fcml_cstring M_VPCOMFALSEB; extern const fcml_cstring M_VPCOMFALSED; extern const fcml_cstring M_VPCOMFALSEQ; extern const fcml_cstring M_VPCOMFALSEUB; extern const fcml_cstring M_VPCOMFALSEUD; extern const fcml_cstring M_VPCOMFALSEUQ; extern const fcml_cstring M_VPCOMFALSEUW; extern const fcml_cstring M_VPCOMFALSEW; extern const fcml_cstring M_VPCOMGEB; extern const fcml_cstring M_VPCOMGED; extern const fcml_cstring M_VPCOMGEQ; extern const fcml_cstring M_VPCOMGEUB; extern const fcml_cstring M_VPCOMGEUD; extern const fcml_cstring M_VPCOMGEUQ; extern const fcml_cstring M_VPCOMGEUW; extern const fcml_cstring M_VPCOMGEW; extern const fcml_cstring M_VPCOMGTB; extern const fcml_cstring M_VPCOMGTD; extern const fcml_cstring M_VPCOMGTQ; extern const fcml_cstring M_VPCOMGTUB; extern const fcml_cstring M_VPCOMGTUD; extern const fcml_cstring M_VPCOMGTUQ; extern const fcml_cstring M_VPCOMGTUW; extern const fcml_cstring M_VPCOMGTW; extern const fcml_cstring M_VPCOMLEB; extern const fcml_cstring M_VPCOMLED; extern const fcml_cstring M_VPCOMLEQ; extern const fcml_cstring M_VPCOMLEUB; extern const fcml_cstring M_VPCOMLEUD; extern const fcml_cstring M_VPCOMLEUQ; extern const fcml_cstring M_VPCOMLEUW; extern const fcml_cstring M_VPCOMLEW; extern const fcml_cstring M_VPCOMLTB; extern const fcml_cstring M_VPCOMLTD; extern const fcml_cstring M_VPCOMLTQ; extern const fcml_cstring M_VPCOMLTUB; extern const fcml_cstring M_VPCOMLTUD; extern const fcml_cstring M_VPCOMLTUQ; extern const fcml_cstring M_VPCOMLTUW; extern const fcml_cstring M_VPCOMLTW; extern const fcml_cstring M_VPCOMNEQB; extern const fcml_cstring M_VPCOMNEQD; extern const fcml_cstring M_VPCOMNEQQ; extern const fcml_cstring M_VPCOMNEQUB; extern const fcml_cstring M_VPCOMNEQUD; extern const fcml_cstring M_VPCOMNEQUQ; extern const fcml_cstring M_VPCOMNEQUW; extern const fcml_cstring M_VPCOMNEQW; extern const fcml_cstring M_VPCOMQ; extern const fcml_cstring M_VPCOMTRUEB; extern const fcml_cstring M_VPCOMTRUED; extern const fcml_cstring M_VPCOMTRUEQ; extern const fcml_cstring M_VPCOMTRUEUB; extern const fcml_cstring M_VPCOMTRUEUD; extern const fcml_cstring M_VPCOMTRUEUQ; extern const fcml_cstring M_VPCOMTRUEUW; extern const fcml_cstring M_VPCOMTRUEW; extern const fcml_cstring M_VPCOMUB; extern const fcml_cstring M_VPCOMUD; extern const fcml_cstring M_VPCOMUQ; extern const fcml_cstring M_VPCOMUW; extern const fcml_cstring M_VPCOMW; extern const fcml_cstring M_VPERM2F128; extern const fcml_cstring M_VPERM2I128; extern const fcml_cstring M_VPERMD; extern const fcml_cstring M_VPERMIL2PD; extern const fcml_cstring M_VPERMIL2PS; extern const fcml_cstring M_VPERMILPD; extern const fcml_cstring M_VPERMILPS; extern const fcml_cstring M_VPERMPD; extern const fcml_cstring M_VPERMPS; extern const fcml_cstring M_VPERMQ; extern const fcml_cstring M_VPEXTRB; extern const fcml_cstring M_VPEXTRD; extern const fcml_cstring M_VPEXTRQ; extern const fcml_cstring M_VPEXTRW; extern const fcml_cstring M_VPGATHERDD; extern const fcml_cstring M_VPGATHERDQ; extern const fcml_cstring M_VPGATHERQD; extern const fcml_cstring M_VPGATHERQQ; extern const fcml_cstring M_VPHADDBD; extern const fcml_cstring M_VPHADDBQ; extern const fcml_cstring M_VPHADDBW; extern const fcml_cstring M_VPHADDD; extern const fcml_cstring M_VPHADDDQ; extern const fcml_cstring M_VPHADDSW; extern const fcml_cstring M_VPHADDUBD; extern const fcml_cstring M_VPHADDUBQ; extern const fcml_cstring M_VPHADDUBW; extern const fcml_cstring M_VPHADDUDQ; extern const fcml_cstring M_VPHADDUWD; extern const fcml_cstring M_VPHADDUWQ; extern const fcml_cstring M_VPHADDW; extern const fcml_cstring M_VPHADDWD; extern const fcml_cstring M_VPHADDWQ; extern const fcml_cstring M_VPHMINPOSUW; extern const fcml_cstring M_VPHSUBBW; extern const fcml_cstring M_VPHSUBD; extern const fcml_cstring M_VPHSUBDQ; extern const fcml_cstring M_VPHSUBSW; extern const fcml_cstring M_VPHSUBW; extern const fcml_cstring M_VPHSUBWD; extern const fcml_cstring M_VPINSRB; extern const fcml_cstring M_VPINSRD; extern const fcml_cstring M_VPINSRQ; extern const fcml_cstring M_VPINSRW; extern const fcml_cstring M_VPMACSDD; extern const fcml_cstring M_VPMACSDQH; extern const fcml_cstring M_VPMACSDQL; extern const fcml_cstring M_VPMACSSDD; extern const fcml_cstring M_VPMACSSDQH; extern const fcml_cstring M_VPMACSSDQL; extern const fcml_cstring M_VPMACSSWD; extern const fcml_cstring M_VPMACSSWW; extern const fcml_cstring M_VPMACSWD; extern const fcml_cstring M_VPMACSWW; extern const fcml_cstring M_VPMADCSSWD; extern const fcml_cstring M_VPMADCSWD; extern const fcml_cstring M_VPMADDUBSW; extern const fcml_cstring M_VPMADDWD; extern const fcml_cstring M_VPMASKMOV; extern const fcml_cstring M_VPMASKMOVD; extern const fcml_cstring M_VPMASKMOVQ; extern const fcml_cstring M_VPMAXSB; extern const fcml_cstring M_VPMAXSD; extern const fcml_cstring M_VPMAXSW; extern const fcml_cstring M_VPMAXUB; extern const fcml_cstring M_VPMAXUD; extern const fcml_cstring M_VPMAXUW; extern const fcml_cstring M_VPMINSB; extern const fcml_cstring M_VPMINSD; extern const fcml_cstring M_VPMINSW; extern const fcml_cstring M_VPMINUB; extern const fcml_cstring M_VPMINUD; extern const fcml_cstring M_VPMINUW; extern const fcml_cstring M_VPMOVMSKB; extern const fcml_cstring M_VPMOVSXBD; extern const fcml_cstring M_VPMOVSXBQ; extern const fcml_cstring M_VPMOVSXBW; extern const fcml_cstring M_VPMOVSXDQ; extern const fcml_cstring M_VPMOVSXWD; extern const fcml_cstring M_VPMOVSXWQ; extern const fcml_cstring M_VPMOVZXBD; extern const fcml_cstring M_VPMOVZXBQ; extern const fcml_cstring M_VPMOVZXBW; extern const fcml_cstring M_VPMOVZXDQ; extern const fcml_cstring M_VPMOVZXWD; extern const fcml_cstring M_VPMOVZXWQ; extern const fcml_cstring M_VPMULDQ; extern const fcml_cstring M_VPMULHRSW; extern const fcml_cstring M_VPMULHUW; extern const fcml_cstring M_VPMULHW; extern const fcml_cstring M_VPMULLD; extern const fcml_cstring M_VPMULLW; extern const fcml_cstring M_VPMULUDQ; extern const fcml_cstring M_VPOR; extern const fcml_cstring M_VPPERM; extern const fcml_cstring M_VPROTB; extern const fcml_cstring M_VPROTD; extern const fcml_cstring M_VPROTQ; extern const fcml_cstring M_VPROTW; extern const fcml_cstring M_VPSADBW; extern const fcml_cstring M_VPSHAB; extern const fcml_cstring M_VPSHAD; extern const fcml_cstring M_VPSHAQ; extern const fcml_cstring M_VPSHAW; extern const fcml_cstring M_VPSHLB; extern const fcml_cstring M_VPSHLD; extern const fcml_cstring M_VPSHLQ; extern const fcml_cstring M_VPSHLW; extern const fcml_cstring M_VPSHUFB; extern const fcml_cstring M_VPSHUFD; extern const fcml_cstring M_VPSHUFHW; extern const fcml_cstring M_VPSHUFLW; extern const fcml_cstring M_VPSIGNB; extern const fcml_cstring M_VPSIGND; extern const fcml_cstring M_VPSIGNW; extern const fcml_cstring M_VPSLLD; extern const fcml_cstring M_VPSLLDQ; extern const fcml_cstring M_VPSLLQ; extern const fcml_cstring M_VPSLLVD; extern const fcml_cstring M_VPSLLVQ; extern const fcml_cstring M_VPSLLW; extern const fcml_cstring M_VPSRAD; extern const fcml_cstring M_VPSRAVD; extern const fcml_cstring M_VPSRAW; extern const fcml_cstring M_VPSRLD; extern const fcml_cstring M_VPSRLDQ; extern const fcml_cstring M_VPSRLQ; extern const fcml_cstring M_VPSRLVD; extern const fcml_cstring M_VPSRLVQ; extern const fcml_cstring M_VPSRLW; extern const fcml_cstring M_VPSUBB; extern const fcml_cstring M_VPSUBD; extern const fcml_cstring M_VPSUBQ; extern const fcml_cstring M_VPSUBSB; extern const fcml_cstring M_VPSUBSW; extern const fcml_cstring M_VPSUBUSB; extern const fcml_cstring M_VPSUBUSW; extern const fcml_cstring M_VPSUBW; extern const fcml_cstring M_VPTEST; extern const fcml_cstring M_VPUNPCKHBW; extern const fcml_cstring M_VPUNPCKHDQ; extern const fcml_cstring M_VPUNPCKHQDQ; extern const fcml_cstring M_VPUNPCKHWD; extern const fcml_cstring M_VPUNPCKLBW; extern const fcml_cstring M_VPUNPCKLDQ; extern const fcml_cstring M_VPUNPCKLQDQ; extern const fcml_cstring M_VPUNPCKLWD; extern const fcml_cstring M_VPXOR; extern const fcml_cstring M_VRCPPS; extern const fcml_cstring M_VRCPSS; extern const fcml_cstring M_VROUNDPD; extern const fcml_cstring M_VROUNDPS; extern const fcml_cstring M_VROUNDSD; extern const fcml_cstring M_VROUNDSS; extern const fcml_cstring M_VRSQRTPS; extern const fcml_cstring M_VRSQRTSS; extern const fcml_cstring M_VSHUFPD; extern const fcml_cstring M_VSHUFPS; extern const fcml_cstring M_VSQRTPD; extern const fcml_cstring M_VSQRTPS; extern const fcml_cstring M_VSQRTSD; extern const fcml_cstring M_VSQRTSS; extern const fcml_cstring M_VSTMXCSR; extern const fcml_cstring M_VSUBPD; extern const fcml_cstring M_VSUBPS; extern const fcml_cstring M_VSUBSD; extern const fcml_cstring M_VSUBSS; extern const fcml_cstring M_VTESTPD; extern const fcml_cstring M_VTESTPS; extern const fcml_cstring M_VUCOMISD; extern const fcml_cstring M_VUCOMISS; extern const fcml_cstring M_VUNPCKHPD; extern const fcml_cstring M_VUNPCKHPS; extern const fcml_cstring M_VUNPCKLPD; extern const fcml_cstring M_VUNPCKLPS; extern const fcml_cstring M_VXORPD; extern const fcml_cstring M_VXORPS; extern const fcml_cstring M_VZEROALL; extern const fcml_cstring M_VZEROUPPER; extern const fcml_cstring M_WAIT; extern const fcml_cstring M_WBINVD; extern const fcml_cstring M_WRFSBASE; extern const fcml_cstring M_WRGSBASE; extern const fcml_cstring M_WRMSR; extern const fcml_cstring M_XABORT; extern const fcml_cstring M_XADD; extern const fcml_cstring M_XBEGIN; extern const fcml_cstring M_XCHG; extern const fcml_cstring M_XEND; extern const fcml_cstring M_XGETBV; extern const fcml_cstring M_XLAT; extern const fcml_cstring M_XLATB; extern const fcml_cstring M_XOR; extern const fcml_cstring M_XORB; extern const fcml_cstring M_XORL; extern const fcml_cstring M_XORPD; extern const fcml_cstring M_XORPS; extern const fcml_cstring M_XORQ; extern const fcml_cstring M_XORW; extern const fcml_cstring M_XRSTOR; extern const fcml_cstring M_XRSTOR64; extern const fcml_cstring M_XSAVE; extern const fcml_cstring M_XSAVE64; extern const fcml_cstring M_XSAVEOPT; extern const fcml_cstring M_XSAVEOPT64; extern const fcml_cstring M_XSETBV; extern const fcml_cstring M_XTEST; } } #endif /* FCML_GAS_MNEMONICS_HPP_ */ fcml-1.1.1/include/fcml_intel_mnemonics.cpp0000644000175000017500000021367112560745216015711 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_intel_mnemonics.cpp * Definitions of Intel mnemonics for C++. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #include "fcml_intel_mnemonics.hpp" namespace fcml { namespace intel { extern const fcml_cstring M_AAA = _FT("aaa"); extern const fcml_cstring M_AAD = _FT("aad"); extern const fcml_cstring M_AAM = _FT("aam"); extern const fcml_cstring M_AAS = _FT("aas"); extern const fcml_cstring M_ADC = _FT("adc"); extern const fcml_cstring M_ADCX = _FT("adcx"); extern const fcml_cstring M_ADD = _FT("add"); extern const fcml_cstring M_ADDPD = _FT("addpd"); extern const fcml_cstring M_ADDPS = _FT("addps"); extern const fcml_cstring M_ADDSD = _FT("addsd"); extern const fcml_cstring M_ADDSS = _FT("addss"); extern const fcml_cstring M_ADDSUBPD = _FT("addsubpd"); extern const fcml_cstring M_ADDSUBPS = _FT("addsubps"); extern const fcml_cstring M_ADOX = _FT("adox"); extern const fcml_cstring M_AESDEC = _FT("aesdec"); extern const fcml_cstring M_AESDECLAST = _FT("aesdeclast"); extern const fcml_cstring M_AESENC = _FT("aesenc"); extern const fcml_cstring M_AESENCLAST = _FT("aesenclast"); extern const fcml_cstring M_AESIMC = _FT("aesimc"); extern const fcml_cstring M_AESKEYGENASSIST = _FT("aeskeygenassist"); extern const fcml_cstring M_AND = _FT("and"); extern const fcml_cstring M_ANDN = _FT("andn"); extern const fcml_cstring M_ANDNPD = _FT("andnpd"); extern const fcml_cstring M_ANDNPS = _FT("andnps"); extern const fcml_cstring M_ANDPD = _FT("andpd"); extern const fcml_cstring M_ANDPS = _FT("andps"); extern const fcml_cstring M_ARPL = _FT("arpl"); extern const fcml_cstring M_BEXR = _FT("bexr"); extern const fcml_cstring M_BEXTR = _FT("bextr"); extern const fcml_cstring M_BLCFILL = _FT("blcfill"); extern const fcml_cstring M_BLCI = _FT("blci"); extern const fcml_cstring M_BLCIC = _FT("blcic"); extern const fcml_cstring M_BLCMSK = _FT("blcmsk"); extern const fcml_cstring M_BLCS = _FT("blcs"); extern const fcml_cstring M_BLENDPD = _FT("blendpd"); extern const fcml_cstring M_BLENDPS = _FT("blendps"); extern const fcml_cstring M_BLENDVPD = _FT("blendvpd"); extern const fcml_cstring M_BLENDVPS = _FT("blendvps"); extern const fcml_cstring M_BLSFILL = _FT("blsfill"); extern const fcml_cstring M_BLSI = _FT("blsi"); extern const fcml_cstring M_BLSIC = _FT("blsic"); extern const fcml_cstring M_BLSMSK = _FT("blsmsk"); extern const fcml_cstring M_BLSR = _FT("blsr"); extern const fcml_cstring M_BOUND = _FT("bound"); extern const fcml_cstring M_BSF = _FT("bsf"); extern const fcml_cstring M_BSR = _FT("bsr"); extern const fcml_cstring M_BSWAP = _FT("bswap"); extern const fcml_cstring M_BT = _FT("bt"); extern const fcml_cstring M_BTC = _FT("btc"); extern const fcml_cstring M_BTR = _FT("btr"); extern const fcml_cstring M_BTS = _FT("bts"); extern const fcml_cstring M_BZHI = _FT("bzhi"); extern const fcml_cstring M_CALL = _FT("call"); extern const fcml_cstring M_CBW = _FT("cbw"); extern const fcml_cstring M_CDQ = _FT("cdq"); extern const fcml_cstring M_CDQE = _FT("cdqe"); extern const fcml_cstring M_CLAC = _FT("clac"); extern const fcml_cstring M_CLC = _FT("clc"); extern const fcml_cstring M_CLD = _FT("cld"); extern const fcml_cstring M_CLFLUSH = _FT("clflush"); extern const fcml_cstring M_CLGI = _FT("clgi"); extern const fcml_cstring M_CLI = _FT("cli"); extern const fcml_cstring M_CLTS = _FT("clts"); extern const fcml_cstring M_CMC = _FT("cmc"); extern const fcml_cstring M_CMOVO = _FT("cmovo"); extern const fcml_cstring M_CMOVNO = _FT("cmovno"); extern const fcml_cstring M_CMOVB = _FT("cmovb"); extern const fcml_cstring M_CMOVNB = _FT("cmovnb"); extern const fcml_cstring M_CMOVE = _FT("cmove"); extern const fcml_cstring M_CMOVNE = _FT("cmovne"); extern const fcml_cstring M_CMOVBE = _FT("cmovbe"); extern const fcml_cstring M_CMOVNBE = _FT("cmovnbe"); extern const fcml_cstring M_CMOVS = _FT("cmovs"); extern const fcml_cstring M_CMOVNS = _FT("cmovns"); extern const fcml_cstring M_CMOVP = _FT("cmovp"); extern const fcml_cstring M_CMOVNP = _FT("cmovnp"); extern const fcml_cstring M_CMOVL = _FT("cmovl"); extern const fcml_cstring M_CMOVNL = _FT("cmovnl"); extern const fcml_cstring M_CMOVLE = _FT("cmovle"); extern const fcml_cstring M_CMOVNLE = _FT("cmovnle"); extern const fcml_cstring M_CMOVNAE = _FT("cmovnae"); extern const fcml_cstring M_CMOVAE = _FT("cmovae"); extern const fcml_cstring M_CMOVZ = _FT("cmovz"); extern const fcml_cstring M_CMOVNZ = _FT("cmovnz"); extern const fcml_cstring M_CMOVNA = _FT("cmovna"); extern const fcml_cstring M_CMOVA = _FT("cmova"); extern const fcml_cstring M_CMOVPE = _FT("cmovpe"); extern const fcml_cstring M_CMOVPO = _FT("cmovpo"); extern const fcml_cstring M_CMOVNGE = _FT("cmovnge"); extern const fcml_cstring M_CMOVGE = _FT("cmovge"); extern const fcml_cstring M_CMOVNG = _FT("cmovng"); extern const fcml_cstring M_CMOVG = _FT("cmovg"); extern const fcml_cstring M_CMOVC = _FT("cmovc"); extern const fcml_cstring M_CMOVNC = _FT("cmovnc"); extern const fcml_cstring M_CMP = _FT("cmp"); extern const fcml_cstring M_CMPEQSD = _FT("cmpeqsd"); extern const fcml_cstring M_CMPEQSS = _FT("cmpeqss"); extern const fcml_cstring M_CMPLESD = _FT("cmplesd"); extern const fcml_cstring M_CMPLESS = _FT("cmpless"); extern const fcml_cstring M_CMPLTSD = _FT("cmpltsd"); extern const fcml_cstring M_CMPLTSS = _FT("cmpltss"); extern const fcml_cstring M_CMPNEQSD = _FT("cmpneqsd"); extern const fcml_cstring M_CMPNEQSS = _FT("cmpneqss"); extern const fcml_cstring M_CMPNLESD = _FT("cmpnlesd"); extern const fcml_cstring M_CMPNLESS = _FT("cmpnless"); extern const fcml_cstring M_CMPNLTSD = _FT("cmpnltsd"); extern const fcml_cstring M_CMPNLTSS = _FT("cmpnltss"); extern const fcml_cstring M_CMPORDSD = _FT("cmpordsd"); extern const fcml_cstring M_CMPORDSS = _FT("cmpordss"); extern const fcml_cstring M_CMPPD = _FT("cmppd"); extern const fcml_cstring M_CMPPS = _FT("cmpps"); extern const fcml_cstring M_CMPS = _FT("cmps"); extern const fcml_cstring M_CMPSB = _FT("cmpsb"); extern const fcml_cstring M_CMPSD = _FT("cmpsd"); extern const fcml_cstring M_CMPSQ = _FT("cmpsq"); extern const fcml_cstring M_CMPSS = _FT("cmpss"); extern const fcml_cstring M_CMPSW = _FT("cmpsw"); extern const fcml_cstring M_CMPUNORDSD = _FT("cmpunordsd"); extern const fcml_cstring M_CMPUNORDSS = _FT("cmpunordss"); extern const fcml_cstring M_CMPXCHG = _FT("cmpxchg"); extern const fcml_cstring M_CMPXCHG16B = _FT("cmpxchg16b"); extern const fcml_cstring M_CMPXCHG8B = _FT("cmpxchg8b"); extern const fcml_cstring M_COMISD = _FT("comisd"); extern const fcml_cstring M_COMISS = _FT("comiss"); extern const fcml_cstring M_CPUID = _FT("cpuid"); extern const fcml_cstring M_CQO = _FT("cqo"); extern const fcml_cstring M_CRC32 = _FT("crc32"); extern const fcml_cstring M_CVTDQ2PD = _FT("cvtdq2pd"); extern const fcml_cstring M_CVTDQ2PS = _FT("cvtdq2ps"); extern const fcml_cstring M_CVTPD2DQ = _FT("cvtpd2dq"); extern const fcml_cstring M_CVTPD2PI = _FT("cvtpd2pi"); extern const fcml_cstring M_CVTPD2PS = _FT("cvtpd2ps"); extern const fcml_cstring M_CVTPI2PD = _FT("cvtpi2pd"); extern const fcml_cstring M_CVTPI2PS = _FT("cvtpi2ps"); extern const fcml_cstring M_CVTPS2DQ = _FT("cvtps2dq"); extern const fcml_cstring M_CVTPS2PD = _FT("cvtps2pd"); extern const fcml_cstring M_CVTPS2PI = _FT("cvtps2pi"); extern const fcml_cstring M_CVTSD2SI = _FT("cvtsd2si"); extern const fcml_cstring M_CVTSD2SS = _FT("cvtsd2ss"); extern const fcml_cstring M_CVTSI2SD = _FT("cvtsi2sd"); extern const fcml_cstring M_CVTSI2SS = _FT("cvtsi2ss"); extern const fcml_cstring M_CVTSS2SD = _FT("cvtss2sd"); extern const fcml_cstring M_CVTSS2SI = _FT("cvtss2si"); extern const fcml_cstring M_CVTTPD2DQ = _FT("cvttpd2dq"); extern const fcml_cstring M_CVTTPD2PI = _FT("cvttpd2pi"); extern const fcml_cstring M_CVTTPS2DQ = _FT("cvttps2dq"); extern const fcml_cstring M_CVTTPS2PI = _FT("cvttps2pi"); extern const fcml_cstring M_CVTTSD2SI = _FT("cvttsd2si"); extern const fcml_cstring M_CVTTSS2SI = _FT("cvttss2si"); extern const fcml_cstring M_CWD = _FT("cwd"); extern const fcml_cstring M_CWDE = _FT("cwde"); extern const fcml_cstring M_DAA = _FT("daa"); extern const fcml_cstring M_DAS = _FT("das"); extern const fcml_cstring M_DEC = _FT("dec"); extern const fcml_cstring M_DIV = _FT("div"); extern const fcml_cstring M_DIVPD = _FT("divpd"); extern const fcml_cstring M_DIVPS = _FT("divps"); extern const fcml_cstring M_DIVSD = _FT("divsd"); extern const fcml_cstring M_DIVSS = _FT("divss"); extern const fcml_cstring M_DPPD = _FT("dppd"); extern const fcml_cstring M_DPPS = _FT("dpps"); extern const fcml_cstring M_EMMS = _FT("emms"); extern const fcml_cstring M_ENTER = _FT("enter"); extern const fcml_cstring M_EXTRACTPS = _FT("extractps"); extern const fcml_cstring M_EXTRQ = _FT("extrq"); extern const fcml_cstring M_F2XM1 = _FT("f2xm1"); extern const fcml_cstring M_FABS = _FT("fabs"); extern const fcml_cstring M_FADD = _FT("fadd"); extern const fcml_cstring M_FADDP = _FT("faddp"); extern const fcml_cstring M_FBLD = _FT("fbld"); extern const fcml_cstring M_FBSTP = _FT("fbstp"); extern const fcml_cstring M_FCHS = _FT("fchs"); extern const fcml_cstring M_FCLEX = _FT("fclex"); extern const fcml_cstring M_FCMOVB = _FT("fcmovb"); extern const fcml_cstring M_FCMOVBE = _FT("fcmovbe"); extern const fcml_cstring M_FCMOVE = _FT("fcmove"); extern const fcml_cstring M_FCMOVNB = _FT("fcmovnb"); extern const fcml_cstring M_FCMOVNBE = _FT("fcmovnbe"); extern const fcml_cstring M_FCMOVNE = _FT("fcmovne"); extern const fcml_cstring M_FCMOVNU = _FT("fcmovnu"); extern const fcml_cstring M_FCMOVU = _FT("fcmovu"); extern const fcml_cstring M_FCOM = _FT("fcom"); extern const fcml_cstring M_FCOMI = _FT("fcomi"); extern const fcml_cstring M_FCOMIP = _FT("fcomip"); extern const fcml_cstring M_FCOMP = _FT("fcomp"); extern const fcml_cstring M_FCOMPP = _FT("fcompp"); extern const fcml_cstring M_FCOS = _FT("fcos"); extern const fcml_cstring M_FDECSTP = _FT("fdecstp"); extern const fcml_cstring M_FDIV = _FT("fdiv"); extern const fcml_cstring M_FDIVP = _FT("fdivp"); extern const fcml_cstring M_FDIVR = _FT("fdivr"); extern const fcml_cstring M_FDIVRP = _FT("fdivrp"); extern const fcml_cstring M_FEMMS = _FT("femms"); extern const fcml_cstring M_FFREE = _FT("ffree"); extern const fcml_cstring M_FIADD = _FT("fiadd"); extern const fcml_cstring M_FICOM = _FT("ficom"); extern const fcml_cstring M_FICOMP = _FT("ficomp"); extern const fcml_cstring M_FIDIV = _FT("fidiv"); extern const fcml_cstring M_FIDIVR = _FT("fidivr"); extern const fcml_cstring M_FILD = _FT("fild"); extern const fcml_cstring M_FIMUL = _FT("fimul"); extern const fcml_cstring M_FINCSTP = _FT("fincstp"); extern const fcml_cstring M_FINIT = _FT("finit"); extern const fcml_cstring M_FIST = _FT("fist"); extern const fcml_cstring M_FISTP = _FT("fistp"); extern const fcml_cstring M_FISTTP = _FT("fisttp"); extern const fcml_cstring M_FISUB = _FT("fisub"); extern const fcml_cstring M_FISUBR = _FT("fisubr"); extern const fcml_cstring M_FLD = _FT("fld"); extern const fcml_cstring M_FLD1 = _FT("fld1"); extern const fcml_cstring M_FLDCW = _FT("fldcw"); extern const fcml_cstring M_FLDENV = _FT("fldenv"); extern const fcml_cstring M_FLDL2E = _FT("fldl2e"); extern const fcml_cstring M_FLDL2T = _FT("fldl2t"); extern const fcml_cstring M_FLDLG2 = _FT("fldlg2"); extern const fcml_cstring M_FLDLN2 = _FT("fldln2"); extern const fcml_cstring M_FLDPI = _FT("fldpi"); extern const fcml_cstring M_FLDZ = _FT("fldz"); extern const fcml_cstring M_FMUL = _FT("fmul"); extern const fcml_cstring M_FMULP = _FT("fmulp"); extern const fcml_cstring M_FNCLEX = _FT("fnclex"); extern const fcml_cstring M_FNINIT = _FT("fninit"); extern const fcml_cstring M_FNOP = _FT("fnop"); extern const fcml_cstring M_FNSAVE = _FT("fnsave"); extern const fcml_cstring M_FNSTCW = _FT("fnstcw"); extern const fcml_cstring M_FNSTENV = _FT("fnstenv"); extern const fcml_cstring M_FNSTSW = _FT("fnstsw"); extern const fcml_cstring M_FPATAN = _FT("fpatan"); extern const fcml_cstring M_FPREM = _FT("fprem"); extern const fcml_cstring M_FPREM1 = _FT("fprem1"); extern const fcml_cstring M_FPTAN = _FT("fptan"); extern const fcml_cstring M_FRNDINT = _FT("frndint"); extern const fcml_cstring M_FRSTOR = _FT("frstor"); extern const fcml_cstring M_FSAVE = _FT("fsave"); extern const fcml_cstring M_FSCALE = _FT("fscale"); extern const fcml_cstring M_FSIN = _FT("fsin"); extern const fcml_cstring M_FSINCOS = _FT("fsincos"); extern const fcml_cstring M_FSQRT = _FT("fsqrt"); extern const fcml_cstring M_FST = _FT("fst"); extern const fcml_cstring M_FSTCW = _FT("fstcw"); extern const fcml_cstring M_FSTENV = _FT("fstenv"); extern const fcml_cstring M_FSTP = _FT("fstp"); extern const fcml_cstring M_FSTSW = _FT("fstsw"); extern const fcml_cstring M_FSUB = _FT("fsub"); extern const fcml_cstring M_FSUBP = _FT("fsubp"); extern const fcml_cstring M_FSUBR = _FT("fsubr"); extern const fcml_cstring M_FSUBRP = _FT("fsubrp"); extern const fcml_cstring M_FTST = _FT("ftst"); extern const fcml_cstring M_FUCOM = _FT("fucom"); extern const fcml_cstring M_FUCOMI = _FT("fucomi"); extern const fcml_cstring M_FUCOMIP = _FT("fucomip"); extern const fcml_cstring M_FUCOMP = _FT("fucomp"); extern const fcml_cstring M_FUCOMPP = _FT("fucompp"); extern const fcml_cstring M_FWAIT = _FT("fwait"); extern const fcml_cstring M_FXAM = _FT("fxam"); extern const fcml_cstring M_FXCH = _FT("fxch"); extern const fcml_cstring M_FXRSTOR = _FT("fxrstor"); extern const fcml_cstring M_FXRSTOR64 = _FT("fxrstor64"); extern const fcml_cstring M_FXSAVE = _FT("fxsave"); extern const fcml_cstring M_FXSAVE64 = _FT("fxsave64"); extern const fcml_cstring M_FXTRACT = _FT("fxtract"); extern const fcml_cstring M_FYL2X = _FT("fyl2x"); extern const fcml_cstring M_FYL2XP1 = _FT("fyl2xp1"); extern const fcml_cstring M_GETSEC = _FT("getsec"); extern const fcml_cstring M_HADDPD = _FT("haddpd"); extern const fcml_cstring M_HADDPS = _FT("haddps"); extern const fcml_cstring M_HLT = _FT("hlt"); extern const fcml_cstring M_HSUBPD = _FT("hsubpd"); extern const fcml_cstring M_HSUBPS = _FT("hsubps"); extern const fcml_cstring M_IDIV = _FT("idiv"); extern const fcml_cstring M_IMUL = _FT("imul"); extern const fcml_cstring M_IN = _FT("in"); extern const fcml_cstring M_INC = _FT("inc"); extern const fcml_cstring M_INS = _FT("ins"); extern const fcml_cstring M_INSB = _FT("insb"); extern const fcml_cstring M_INSD = _FT("insd"); extern const fcml_cstring M_INSERTPS = _FT("insertps"); extern const fcml_cstring M_INSERTQ = _FT("insertq"); extern const fcml_cstring M_INSW = _FT("insw"); extern const fcml_cstring M_INT = _FT("int"); extern const fcml_cstring M_INT3 = _FT("int3"); extern const fcml_cstring M_INTO = _FT("into"); extern const fcml_cstring M_INVD = _FT("invd"); extern const fcml_cstring M_INVEPT = _FT("invept"); extern const fcml_cstring M_INVLPG = _FT("invlpg"); extern const fcml_cstring M_INVLPGA = _FT("invlpga"); extern const fcml_cstring M_INVPCID = _FT("invpcid"); extern const fcml_cstring M_INVVPID = _FT("invvpid"); extern const fcml_cstring M_IRET = _FT("iret"); extern const fcml_cstring M_IRETD = _FT("iretd"); extern const fcml_cstring M_IRETQ = _FT("iretq"); extern const fcml_cstring M_JO = _FT("jo"); extern const fcml_cstring M_JNO = _FT("jno"); extern const fcml_cstring M_JB = _FT("jb"); extern const fcml_cstring M_JNB = _FT("jnb"); extern const fcml_cstring M_JE = _FT("je"); extern const fcml_cstring M_JNE = _FT("jne"); extern const fcml_cstring M_JBE = _FT("jbe"); extern const fcml_cstring M_JNBE = _FT("jnbe"); extern const fcml_cstring M_JS = _FT("js"); extern const fcml_cstring M_JNS = _FT("jns"); extern const fcml_cstring M_JP = _FT("jp"); extern const fcml_cstring M_JNP = _FT("jnp"); extern const fcml_cstring M_JL = _FT("jl"); extern const fcml_cstring M_JNL = _FT("jnl"); extern const fcml_cstring M_JLE = _FT("jle"); extern const fcml_cstring M_JNLE = _FT("jnle"); extern const fcml_cstring M_JNAE = _FT("jnae"); extern const fcml_cstring M_JAE = _FT("jae"); extern const fcml_cstring M_JZ = _FT("jz"); extern const fcml_cstring M_JNZ = _FT("jnz"); extern const fcml_cstring M_JNA = _FT("jna"); extern const fcml_cstring M_JA = _FT("ja"); extern const fcml_cstring M_JPE = _FT("jpe"); extern const fcml_cstring M_JPO = _FT("jpo"); extern const fcml_cstring M_JNGE = _FT("jnge"); extern const fcml_cstring M_JGE = _FT("jge"); extern const fcml_cstring M_JNG = _FT("jng"); extern const fcml_cstring M_JG = _FT("jg"); extern const fcml_cstring M_JC = _FT("jc"); extern const fcml_cstring M_JNC = _FT("jnc"); extern const fcml_cstring M_JCXZ = _FT("jcxz"); extern const fcml_cstring M_JECXZ = _FT("jecxz"); extern const fcml_cstring M_JMP = _FT("jmp"); extern const fcml_cstring M_JRCXZ = _FT("jrcxz"); extern const fcml_cstring M_LAHF = _FT("lahf"); extern const fcml_cstring M_LAR = _FT("lar"); extern const fcml_cstring M_LDDQU = _FT("lddqu"); extern const fcml_cstring M_LDMXCSR = _FT("ldmxcsr"); extern const fcml_cstring M_LDS = _FT("lds"); extern const fcml_cstring M_LEA = _FT("lea"); extern const fcml_cstring M_LEAVE = _FT("leave"); extern const fcml_cstring M_LES = _FT("les"); extern const fcml_cstring M_LFENCE = _FT("lfence"); extern const fcml_cstring M_LFS = _FT("lfs"); extern const fcml_cstring M_LGDT = _FT("lgdt"); extern const fcml_cstring M_LGS = _FT("lgs"); extern const fcml_cstring M_LIDT = _FT("lidt"); extern const fcml_cstring M_LLDT = _FT("lldt"); extern const fcml_cstring M_LLWPCB = _FT("llwpcb"); extern const fcml_cstring M_LMSW = _FT("lmsw"); extern const fcml_cstring M_LODS = _FT("lods"); extern const fcml_cstring M_LODSB = _FT("lodsb"); extern const fcml_cstring M_LODSD = _FT("lodsd"); extern const fcml_cstring M_LODSQ = _FT("lodsq"); extern const fcml_cstring M_LODSW = _FT("lodsw"); extern const fcml_cstring M_LOOP = _FT("loop"); extern const fcml_cstring M_LOOPE = _FT("loope"); extern const fcml_cstring M_LOOPNE = _FT("loopne"); extern const fcml_cstring M_LOOPNZ = _FT("loopnz"); extern const fcml_cstring M_LOOPZ = _FT("loopz"); extern const fcml_cstring M_LSL = _FT("lsl"); extern const fcml_cstring M_LSS = _FT("lss"); extern const fcml_cstring M_LTR = _FT("ltr"); extern const fcml_cstring M_LWPINS = _FT("lwpins"); extern const fcml_cstring M_LWPVAL = _FT("lwpval"); extern const fcml_cstring M_LZCNT = _FT("lzcnt"); extern const fcml_cstring M_MASKMOVDQU = _FT("maskmovdqu"); extern const fcml_cstring M_MASKMOVQ = _FT("maskmovq"); extern const fcml_cstring M_MAXPD = _FT("maxpd"); extern const fcml_cstring M_MAXPS = _FT("maxps"); extern const fcml_cstring M_MAXSD = _FT("maxsd"); extern const fcml_cstring M_MAXSS = _FT("maxss"); extern const fcml_cstring M_MFENCE = _FT("mfence"); extern const fcml_cstring M_MINPD = _FT("minpd"); extern const fcml_cstring M_MINPS = _FT("minps"); extern const fcml_cstring M_MINSD = _FT("minsd"); extern const fcml_cstring M_MINSS = _FT("minss"); extern const fcml_cstring M_MONITOR = _FT("monitor"); extern const fcml_cstring M_MOV = _FT("mov"); extern const fcml_cstring M_MOVAPD = _FT("movapd"); extern const fcml_cstring M_MOVAPS = _FT("movaps"); extern const fcml_cstring M_MOVBE = _FT("movbe"); extern const fcml_cstring M_MOVD = _FT("movd"); extern const fcml_cstring M_MOVDDUP = _FT("movddup"); extern const fcml_cstring M_MOVDQ2Q = _FT("movdq2q"); extern const fcml_cstring M_MOVDQA = _FT("movdqa"); extern const fcml_cstring M_MOVDQU = _FT("movdqu"); extern const fcml_cstring M_MOVHLPS = _FT("movhlps"); extern const fcml_cstring M_MOVHPD = _FT("movhpd"); extern const fcml_cstring M_MOVHPS = _FT("movhps"); extern const fcml_cstring M_MOVLHPS = _FT("movlhps"); extern const fcml_cstring M_MOVLPD = _FT("movlpd"); extern const fcml_cstring M_MOVLPS = _FT("movlps"); extern const fcml_cstring M_MOVMSKPD = _FT("movmskpd"); extern const fcml_cstring M_MOVMSKPS = _FT("movmskps"); extern const fcml_cstring M_MOVNTDQ = _FT("movntdq"); extern const fcml_cstring M_MOVNTDQA = _FT("movntdqa"); extern const fcml_cstring M_MOVNTI = _FT("movnti"); extern const fcml_cstring M_MOVNTPD = _FT("movntpd"); extern const fcml_cstring M_MOVNTPS = _FT("movntps"); extern const fcml_cstring M_MOVNTQ = _FT("movntq"); extern const fcml_cstring M_MOVNTSD = _FT("movntsd"); extern const fcml_cstring M_MOVNTSS = _FT("movntss"); extern const fcml_cstring M_MOVQ = _FT("movq"); extern const fcml_cstring M_MOVQ2DQ = _FT("movq2dq"); extern const fcml_cstring M_MOVS = _FT("movs"); extern const fcml_cstring M_MOVSB = _FT("movsb"); extern const fcml_cstring M_MOVSD = _FT("movsd"); extern const fcml_cstring M_MOVSHDUP = _FT("movshdup"); extern const fcml_cstring M_MOVSLDUP = _FT("movsldup"); extern const fcml_cstring M_MOVSQ = _FT("movsq"); extern const fcml_cstring M_MOVSS = _FT("movss"); extern const fcml_cstring M_MOVSW = _FT("movsw"); extern const fcml_cstring M_MOVSX = _FT("movsx"); extern const fcml_cstring M_MOVSXD = _FT("movsxd"); extern const fcml_cstring M_MOVUPD = _FT("movupd"); extern const fcml_cstring M_MOVUPS = _FT("movups"); extern const fcml_cstring M_MOVZX = _FT("movzx"); extern const fcml_cstring M_MPSADBW = _FT("mpsadbw"); extern const fcml_cstring M_MUL = _FT("mul"); extern const fcml_cstring M_MULPD = _FT("mulpd"); extern const fcml_cstring M_MULPS = _FT("mulps"); extern const fcml_cstring M_MULSD = _FT("mulsd"); extern const fcml_cstring M_MULSS = _FT("mulss"); extern const fcml_cstring M_MULX = _FT("mulx"); extern const fcml_cstring M_MWAIT = _FT("mwait"); extern const fcml_cstring M_NEG = _FT("neg"); extern const fcml_cstring M_NOP = _FT("nop"); extern const fcml_cstring M_NOT = _FT("not"); extern const fcml_cstring M_OR = _FT("or"); extern const fcml_cstring M_ORPD = _FT("orpd"); extern const fcml_cstring M_ORPS = _FT("orps"); extern const fcml_cstring M_OUT = _FT("out"); extern const fcml_cstring M_OUTS = _FT("outs"); extern const fcml_cstring M_OUTSB = _FT("outsb"); extern const fcml_cstring M_OUTSD = _FT("outsd"); extern const fcml_cstring M_OUTSW = _FT("outsw"); extern const fcml_cstring M_PABSB = _FT("pabsb"); extern const fcml_cstring M_PABSD = _FT("pabsd"); extern const fcml_cstring M_PABSW = _FT("pabsw"); extern const fcml_cstring M_PACKSSDW = _FT("packssdw"); extern const fcml_cstring M_PACKSSWB = _FT("packsswb"); extern const fcml_cstring M_PACKUSDW = _FT("packusdw"); extern const fcml_cstring M_PACKUSWB = _FT("packuswb"); extern const fcml_cstring M_PADDB = _FT("paddb"); extern const fcml_cstring M_PADDD = _FT("paddd"); extern const fcml_cstring M_PADDQ = _FT("paddq"); extern const fcml_cstring M_PADDSB = _FT("paddsb"); extern const fcml_cstring M_PADDSW = _FT("paddsw"); extern const fcml_cstring M_PADDUSB = _FT("paddusb"); extern const fcml_cstring M_PADDUSW = _FT("paddusw"); extern const fcml_cstring M_PADDW = _FT("paddw"); extern const fcml_cstring M_PALIGNR = _FT("palignr"); extern const fcml_cstring M_PAND = _FT("pand"); extern const fcml_cstring M_PANDN = _FT("pandn"); extern const fcml_cstring M_PAUSE = _FT("pause"); extern const fcml_cstring M_PAVGB = _FT("pavgb"); extern const fcml_cstring M_PAVGUSB = _FT("pavgusb"); extern const fcml_cstring M_PAVGW = _FT("pavgw"); extern const fcml_cstring M_PBLENDVB = _FT("pblendvb"); extern const fcml_cstring M_PBLENDW = _FT("pblendw"); extern const fcml_cstring M_PCLMULQDQ = _FT("pclmulqdq"); extern const fcml_cstring M_PCMPEQB = _FT("pcmpeqb"); extern const fcml_cstring M_PCMPEQD = _FT("pcmpeqd"); extern const fcml_cstring M_PCMPEQQ = _FT("pcmpeqq"); extern const fcml_cstring M_PCMPEQW = _FT("pcmpeqw"); extern const fcml_cstring M_PCMPESTRI = _FT("pcmpestri"); extern const fcml_cstring M_PCMPESTRM = _FT("pcmpestrm"); extern const fcml_cstring M_PCMPGTB = _FT("pcmpgtb"); extern const fcml_cstring M_PCMPGTD = _FT("pcmpgtd"); extern const fcml_cstring M_PCMPGTQ = _FT("pcmpgtq"); extern const fcml_cstring M_PCMPGTW = _FT("pcmpgtw"); extern const fcml_cstring M_PCMPISTRI = _FT("pcmpistri"); extern const fcml_cstring M_PCMPISTRM = _FT("pcmpistrm"); extern const fcml_cstring M_PDEP = _FT("pdep"); extern const fcml_cstring M_PEXT = _FT("pext"); extern const fcml_cstring M_PEXTRB = _FT("pextrb"); extern const fcml_cstring M_PEXTRD = _FT("pextrd"); extern const fcml_cstring M_PEXTRQ = _FT("pextrq"); extern const fcml_cstring M_PEXTRW = _FT("pextrw"); extern const fcml_cstring M_PF2ID = _FT("pf2id"); extern const fcml_cstring M_PF2IW = _FT("pf2iw"); extern const fcml_cstring M_PFACC = _FT("pfacc"); extern const fcml_cstring M_PFADD = _FT("pfadd"); extern const fcml_cstring M_PFCMPEQ = _FT("pfcmpeq"); extern const fcml_cstring M_PFCMPGE = _FT("pfcmpge"); extern const fcml_cstring M_PFCMPGT = _FT("pfcmpgt"); extern const fcml_cstring M_PFMAX = _FT("pfmax"); extern const fcml_cstring M_PFMIN = _FT("pfmin"); extern const fcml_cstring M_PFMUL = _FT("pfmul"); extern const fcml_cstring M_PFNACC = _FT("pfnacc"); extern const fcml_cstring M_PFPNACC = _FT("pfpnacc"); extern const fcml_cstring M_PFRCP = _FT("pfrcp"); extern const fcml_cstring M_PFRCPIT1 = _FT("pfrcpit1"); extern const fcml_cstring M_PFRCPIT2 = _FT("pfrcpit2"); extern const fcml_cstring M_PFRSQIT1 = _FT("pfrsqit1"); extern const fcml_cstring M_PFRSQRT = _FT("pfrsqrt"); extern const fcml_cstring M_PFSUB = _FT("pfsub"); extern const fcml_cstring M_PFSUBR = _FT("pfsubr"); extern const fcml_cstring M_PHADDD = _FT("phaddd"); extern const fcml_cstring M_PHADDSW = _FT("phaddsw"); extern const fcml_cstring M_PHADDW = _FT("phaddw"); extern const fcml_cstring M_PHMINPOSUW = _FT("phminposuw"); extern const fcml_cstring M_PHSUBD = _FT("phsubd"); extern const fcml_cstring M_PHSUBSW = _FT("phsubsw"); extern const fcml_cstring M_PHSUBW = _FT("phsubw"); extern const fcml_cstring M_PI2FD = _FT("pi2fd"); extern const fcml_cstring M_PI2FW = _FT("pi2fw"); extern const fcml_cstring M_PINSRB = _FT("pinsrb"); extern const fcml_cstring M_PINSRD = _FT("pinsrd"); extern const fcml_cstring M_PINSRQ = _FT("pinsrq"); extern const fcml_cstring M_PINSRW = _FT("pinsrw"); extern const fcml_cstring M_PMADDUBSW = _FT("pmaddubsw"); extern const fcml_cstring M_PMADDWD = _FT("pmaddwd"); extern const fcml_cstring M_PMAXSB = _FT("pmaxsb"); extern const fcml_cstring M_PMAXSD = _FT("pmaxsd"); extern const fcml_cstring M_PMAXSW = _FT("pmaxsw"); extern const fcml_cstring M_PMAXUB = _FT("pmaxub"); extern const fcml_cstring M_PMAXUD = _FT("pmaxud"); extern const fcml_cstring M_PMAXUW = _FT("pmaxuw"); extern const fcml_cstring M_PMINSB = _FT("pminsb"); extern const fcml_cstring M_PMINSD = _FT("pminsd"); extern const fcml_cstring M_PMINSW = _FT("pminsw"); extern const fcml_cstring M_PMINUB = _FT("pminub"); extern const fcml_cstring M_PMINUD = _FT("pminud"); extern const fcml_cstring M_PMINUW = _FT("pminuw"); extern const fcml_cstring M_PMOVMSKB = _FT("pmovmskb"); extern const fcml_cstring M_PMOVSXBD = _FT("pmovsxbd"); extern const fcml_cstring M_PMOVSXBQ = _FT("pmovsxbq"); extern const fcml_cstring M_PMOVSXBW = _FT("pmovsxbw"); extern const fcml_cstring M_PMOVSXDQ = _FT("pmovsxdq"); extern const fcml_cstring M_PMOVSXWD = _FT("pmovsxwd"); extern const fcml_cstring M_PMOVSXWQ = _FT("pmovsxwq"); extern const fcml_cstring M_PMOVZXBD = _FT("pmovzxbd"); extern const fcml_cstring M_PMOVZXBQ = _FT("pmovzxbq"); extern const fcml_cstring M_PMOVZXBW = _FT("pmovzxbw"); extern const fcml_cstring M_PMOVZXDQ = _FT("pmovzxdq"); extern const fcml_cstring M_PMOVZXWD = _FT("pmovzxwd"); extern const fcml_cstring M_PMOVZXWQ = _FT("pmovzxwq"); extern const fcml_cstring M_PMULDQ = _FT("pmuldq"); extern const fcml_cstring M_PMULHRSW = _FT("pmulhrsw"); extern const fcml_cstring M_PMULHRW = _FT("pmulhrw"); extern const fcml_cstring M_PMULHUW = _FT("pmulhuw"); extern const fcml_cstring M_PMULHW = _FT("pmulhw"); extern const fcml_cstring M_PMULLD = _FT("pmulld"); extern const fcml_cstring M_PMULLW = _FT("pmullw"); extern const fcml_cstring M_PMULUDQ = _FT("pmuludq"); extern const fcml_cstring M_POP = _FT("pop"); extern const fcml_cstring M_POPA = _FT("popa"); extern const fcml_cstring M_POPAD = _FT("popad"); extern const fcml_cstring M_POPCNT = _FT("popcnt"); extern const fcml_cstring M_POPF = _FT("popf"); extern const fcml_cstring M_POPFD = _FT("popfd"); extern const fcml_cstring M_POPFQ = _FT("popfq"); extern const fcml_cstring M_POR = _FT("por"); extern const fcml_cstring M_PREFETCH = _FT("prefetch"); extern const fcml_cstring M_PREFETCHNTA = _FT("prefetchnta"); extern const fcml_cstring M_PREFETCHT0 = _FT("prefetcht0"); extern const fcml_cstring M_PREFETCHT1 = _FT("prefetcht1"); extern const fcml_cstring M_PREFETCHT2 = _FT("prefetcht2"); extern const fcml_cstring M_PREFETCHW = _FT("prefetchw"); extern const fcml_cstring M_PSADBW = _FT("psadbw"); extern const fcml_cstring M_PSHUFB = _FT("pshufb"); extern const fcml_cstring M_PSHUFD = _FT("pshufd"); extern const fcml_cstring M_PSHUFHW = _FT("pshufhw"); extern const fcml_cstring M_PSHUFLW = _FT("pshuflw"); extern const fcml_cstring M_PSHUFW = _FT("pshufw"); extern const fcml_cstring M_PSIGNB = _FT("psignb"); extern const fcml_cstring M_PSIGND = _FT("psignd"); extern const fcml_cstring M_PSIGNW = _FT("psignw"); extern const fcml_cstring M_PSLLD = _FT("pslld"); extern const fcml_cstring M_PSLLDQ = _FT("pslldq"); extern const fcml_cstring M_PSLLQ = _FT("psllq"); extern const fcml_cstring M_PSLLW = _FT("psllw"); extern const fcml_cstring M_PSRAD = _FT("psrad"); extern const fcml_cstring M_PSRAW = _FT("psraw"); extern const fcml_cstring M_PSRLD = _FT("psrld"); extern const fcml_cstring M_PSRLDQ = _FT("psrldq"); extern const fcml_cstring M_PSRLQ = _FT("psrlq"); extern const fcml_cstring M_PSRLW = _FT("psrlw"); extern const fcml_cstring M_PSUBB = _FT("psubb"); extern const fcml_cstring M_PSUBD = _FT("psubd"); extern const fcml_cstring M_PSUBQ = _FT("psubq"); extern const fcml_cstring M_PSUBSB = _FT("psubsb"); extern const fcml_cstring M_PSUBSW = _FT("psubsw"); extern const fcml_cstring M_PSUBUSB = _FT("psubusb"); extern const fcml_cstring M_PSUBUSW = _FT("psubusw"); extern const fcml_cstring M_PSUBW = _FT("psubw"); extern const fcml_cstring M_PSWAPD = _FT("pswapd"); extern const fcml_cstring M_PTEST = _FT("ptest"); extern const fcml_cstring M_PUNPCKHBW = _FT("punpckhbw"); extern const fcml_cstring M_PUNPCKHDQ = _FT("punpckhdq"); extern const fcml_cstring M_PUNPCKHQDQ = _FT("punpckhqdq"); extern const fcml_cstring M_PUNPCKHWD = _FT("punpckhwd"); extern const fcml_cstring M_PUNPCKLBW = _FT("punpcklbw"); extern const fcml_cstring M_PUNPCKLDQ = _FT("punpckldq"); extern const fcml_cstring M_PUNPCKLQDQ = _FT("punpcklqdq"); extern const fcml_cstring M_PUNPCKLWD = _FT("punpcklwd"); extern const fcml_cstring M_PUSH = _FT("push"); extern const fcml_cstring M_PUSHA = _FT("pusha"); extern const fcml_cstring M_PUSHAD = _FT("pushad"); extern const fcml_cstring M_PUSHF = _FT("pushf"); extern const fcml_cstring M_PUSHFD = _FT("pushfd"); extern const fcml_cstring M_PUSHFQ = _FT("pushfq"); extern const fcml_cstring M_PXOR = _FT("pxor"); extern const fcml_cstring M_RCL = _FT("rcl"); extern const fcml_cstring M_RCPPS = _FT("rcpps"); extern const fcml_cstring M_RCPSS = _FT("rcpss"); extern const fcml_cstring M_RCR = _FT("rcr"); extern const fcml_cstring M_RDFSBASE = _FT("rdfsbase"); extern const fcml_cstring M_RDGSBASE = _FT("rdgsbase"); extern const fcml_cstring M_RDMSR = _FT("rdmsr"); extern const fcml_cstring M_RDPMC = _FT("rdpmc"); extern const fcml_cstring M_RDRAND = _FT("rdrand"); extern const fcml_cstring M_RDSEED = _FT("rdseed"); extern const fcml_cstring M_RDTSC = _FT("rdtsc"); extern const fcml_cstring M_RDTSCP = _FT("rdtscp"); extern const fcml_cstring M_RET = _FT("ret"); extern const fcml_cstring M_RETF = _FT("retf"); extern const fcml_cstring M_ROL = _FT("rol"); extern const fcml_cstring M_ROR = _FT("ror"); extern const fcml_cstring M_RORX = _FT("rorx"); extern const fcml_cstring M_ROUNDPD = _FT("roundpd"); extern const fcml_cstring M_ROUNDPS = _FT("roundps"); extern const fcml_cstring M_ROUNDSD = _FT("roundsd"); extern const fcml_cstring M_ROUNDSS = _FT("roundss"); extern const fcml_cstring M_RSM = _FT("rsm"); extern const fcml_cstring M_RSQRTPS = _FT("rsqrtps"); extern const fcml_cstring M_RSQRTSS = _FT("rsqrtss"); extern const fcml_cstring M_SAHF = _FT("sahf"); extern const fcml_cstring M_SAL = _FT("sal"); extern const fcml_cstring M_SAR = _FT("sar"); extern const fcml_cstring M_SARX = _FT("sarx"); extern const fcml_cstring M_SBB = _FT("sbb"); extern const fcml_cstring M_SCAS = _FT("scas"); extern const fcml_cstring M_SCASB = _FT("scasb"); extern const fcml_cstring M_SCASD = _FT("scasd"); extern const fcml_cstring M_SCASQ = _FT("scasq"); extern const fcml_cstring M_SCASW = _FT("scasw"); extern const fcml_cstring M_SETO = _FT("seto"); extern const fcml_cstring M_SETNO = _FT("setno"); extern const fcml_cstring M_SETB = _FT("setb"); extern const fcml_cstring M_SETNB = _FT("setnb"); extern const fcml_cstring M_SETE = _FT("sete"); extern const fcml_cstring M_SETNE = _FT("setne"); extern const fcml_cstring M_SETBE = _FT("setbe"); extern const fcml_cstring M_SETNBE = _FT("setnbe"); extern const fcml_cstring M_SETS = _FT("sets"); extern const fcml_cstring M_SETNS = _FT("setns"); extern const fcml_cstring M_SETP = _FT("setp"); extern const fcml_cstring M_SETNP = _FT("setnp"); extern const fcml_cstring M_SETL = _FT("setl"); extern const fcml_cstring M_SETNL = _FT("setnl"); extern const fcml_cstring M_SETLE = _FT("setle"); extern const fcml_cstring M_SETNLE = _FT("setnle"); extern const fcml_cstring M_SETNAE = _FT("setnae"); extern const fcml_cstring M_SETAE = _FT("setae"); extern const fcml_cstring M_SETZ = _FT("setz"); extern const fcml_cstring M_SETNZ = _FT("setnz"); extern const fcml_cstring M_SETNA = _FT("setna"); extern const fcml_cstring M_SETA = _FT("seta"); extern const fcml_cstring M_SETPE = _FT("setpe"); extern const fcml_cstring M_SETPO = _FT("setpo"); extern const fcml_cstring M_SETNGE = _FT("setnge"); extern const fcml_cstring M_SETGE = _FT("setge"); extern const fcml_cstring M_SETNG = _FT("setng"); extern const fcml_cstring M_SETG = _FT("setg"); extern const fcml_cstring M_SETC = _FT("setc"); extern const fcml_cstring M_SETNC = _FT("setnc"); extern const fcml_cstring M_SFENCE = _FT("sfence"); extern const fcml_cstring M_SGDT = _FT("sgdt"); extern const fcml_cstring M_SHL = _FT("shl"); extern const fcml_cstring M_SHLD = _FT("shld"); extern const fcml_cstring M_SHLX = _FT("shlx"); extern const fcml_cstring M_SHR = _FT("shr"); extern const fcml_cstring M_SHRD = _FT("shrd"); extern const fcml_cstring M_SHRX = _FT("shrx"); extern const fcml_cstring M_SHUFPD = _FT("shufpd"); extern const fcml_cstring M_SHUFPS = _FT("shufps"); extern const fcml_cstring M_SIDT = _FT("sidt"); extern const fcml_cstring M_SKINIT = _FT("skinit"); extern const fcml_cstring M_SLDT = _FT("sldt"); extern const fcml_cstring M_SLWPCB = _FT("slwpcb"); extern const fcml_cstring M_SMSW = _FT("smsw"); extern const fcml_cstring M_SQRTPD = _FT("sqrtpd"); extern const fcml_cstring M_SQRTPS = _FT("sqrtps"); extern const fcml_cstring M_SQRTSD = _FT("sqrtsd"); extern const fcml_cstring M_SQRTSS = _FT("sqrtss"); extern const fcml_cstring M_STAC = _FT("stac"); extern const fcml_cstring M_STC = _FT("stc"); extern const fcml_cstring M_STD = _FT("std"); extern const fcml_cstring M_STGI = _FT("stgi"); extern const fcml_cstring M_STI = _FT("sti"); extern const fcml_cstring M_STMXCSR = _FT("stmxcsr"); extern const fcml_cstring M_STOS = _FT("stos"); extern const fcml_cstring M_STOSB = _FT("stosb"); extern const fcml_cstring M_STOSD = _FT("stosd"); extern const fcml_cstring M_STOSQ = _FT("stosq"); extern const fcml_cstring M_STOSW = _FT("stosw"); extern const fcml_cstring M_STR = _FT("str"); extern const fcml_cstring M_SUB = _FT("sub"); extern const fcml_cstring M_SUBPD = _FT("subpd"); extern const fcml_cstring M_SUBPS = _FT("subps"); extern const fcml_cstring M_SUBSD = _FT("subsd"); extern const fcml_cstring M_SUBSS = _FT("subss"); extern const fcml_cstring M_SWAPGS = _FT("swapgs"); extern const fcml_cstring M_SYSCALL = _FT("syscall"); extern const fcml_cstring M_SYSENTER = _FT("sysenter"); extern const fcml_cstring M_SYSEXIT = _FT("sysexit"); extern const fcml_cstring M_SYSRET = _FT("sysret"); extern const fcml_cstring M_T1MSKC = _FT("t1mskc"); extern const fcml_cstring M_TEST = _FT("test"); extern const fcml_cstring M_TZCNT = _FT("tzcnt"); extern const fcml_cstring M_TZMSK = _FT("tzmsk"); extern const fcml_cstring M_UCOMISD = _FT("ucomisd"); extern const fcml_cstring M_UCOMISS = _FT("ucomiss"); extern const fcml_cstring M_UD2 = _FT("ud2"); extern const fcml_cstring M_UNPCKHPD = _FT("unpckhpd"); extern const fcml_cstring M_UNPCKHPS = _FT("unpckhps"); extern const fcml_cstring M_UNPCKLPD = _FT("unpcklpd"); extern const fcml_cstring M_UNPCKLPS = _FT("unpcklps"); extern const fcml_cstring M_VADDPD = _FT("vaddpd"); extern const fcml_cstring M_VADDPS = _FT("vaddps"); extern const fcml_cstring M_VADDSD = _FT("vaddsd"); extern const fcml_cstring M_VADDSS = _FT("vaddss"); extern const fcml_cstring M_VADDSUBPD = _FT("vaddsubpd"); extern const fcml_cstring M_VADDSUBPS = _FT("vaddsubps"); extern const fcml_cstring M_VAESDEC = _FT("vaesdec"); extern const fcml_cstring M_VAESDECLAST = _FT("vaesdeclast"); extern const fcml_cstring M_VAESENC = _FT("vaesenc"); extern const fcml_cstring M_VAESENCLAST = _FT("vaesenclast"); extern const fcml_cstring M_VAESIMC = _FT("vaesimc"); extern const fcml_cstring M_VAESKEYGENASSIST = _FT("vaeskeygenassist"); extern const fcml_cstring M_VANDNPD = _FT("vandnpd"); extern const fcml_cstring M_VANDNPS = _FT("vandnps"); extern const fcml_cstring M_VANDPD = _FT("vandpd"); extern const fcml_cstring M_VANDPS = _FT("vandps"); extern const fcml_cstring M_VBLENDPD = _FT("vblendpd"); extern const fcml_cstring M_VBLENDPS = _FT("vblendps"); extern const fcml_cstring M_VBLENDVPD = _FT("vblendvpd"); extern const fcml_cstring M_VBLENDVPS = _FT("vblendvps"); extern const fcml_cstring M_VBROADCASTF128 = _FT("vbroadcastf128"); extern const fcml_cstring M_VBROADCASTI128 = _FT("vbroadcasti128"); extern const fcml_cstring M_VBROADCASTSD = _FT("vbroadcastsd"); extern const fcml_cstring M_VBROADCASTSS = _FT("vbroadcastss"); extern const fcml_cstring M_VCMPEQ_OSSD = _FT("vcmpeq_ossd"); extern const fcml_cstring M_VCMPEQ_OSSS = _FT("vcmpeq_osss"); extern const fcml_cstring M_VCMPEQSD = _FT("vcmpeqsd"); extern const fcml_cstring M_VCMPEQSS = _FT("vcmpeqss"); extern const fcml_cstring M_VCMPEQ_UQSD = _FT("vcmpeq_uqsd"); extern const fcml_cstring M_VCMPEQ_UQSS = _FT("vcmpeq_uqss"); extern const fcml_cstring M_VCMPEQ_USSD = _FT("vcmpeq_ussd"); extern const fcml_cstring M_VCMPEQ_USSS = _FT("vcmpeq_usss"); extern const fcml_cstring M_VCMPFALSE_OSSD = _FT("vcmpfalse_ossd"); extern const fcml_cstring M_VCMPFALSE_OSSS = _FT("vcmpfalse_osss"); extern const fcml_cstring M_VCMPFALSESD = _FT("vcmpfalsesd"); extern const fcml_cstring M_VCMPFALSESS = _FT("vcmpfalsess"); extern const fcml_cstring M_VCMPGE_OQSD = _FT("vcmpge_oqsd"); extern const fcml_cstring M_VCMPGE_OQSS = _FT("vcmpge_oqss"); extern const fcml_cstring M_VCMPGESD = _FT("vcmpgesd"); extern const fcml_cstring M_VCMPGESS = _FT("vcmpgess"); extern const fcml_cstring M_VCMPGT_OQSD = _FT("vcmpgt_oqsd"); extern const fcml_cstring M_VCMPGT_OQSS = _FT("vcmpgt_oqss"); extern const fcml_cstring M_VCMPGTSD = _FT("vcmpgtsd"); extern const fcml_cstring M_VCMPGTSS = _FT("vcmpgtss"); extern const fcml_cstring M_VCMPLE_OQSD = _FT("vcmple_oqsd"); extern const fcml_cstring M_VCMPLE_OQSS = _FT("vcmple_oqss"); extern const fcml_cstring M_VCMPLESD = _FT("vcmplesd"); extern const fcml_cstring M_VCMPLESS = _FT("vcmpless"); extern const fcml_cstring M_VCMPLT_OQSD = _FT("vcmplt_oqsd"); extern const fcml_cstring M_VCMPLT_OQSS = _FT("vcmplt_oqss"); extern const fcml_cstring M_VCMPLTSD = _FT("vcmpltsd"); extern const fcml_cstring M_VCMPLTSS = _FT("vcmpltss"); extern const fcml_cstring M_VCMPNEQ_OQSD = _FT("vcmpneq_oqsd"); extern const fcml_cstring M_VCMPNEQ_OQSS = _FT("vcmpneq_oqss"); extern const fcml_cstring M_VCMPNEQ_OSSD = _FT("vcmpneq_ossd"); extern const fcml_cstring M_VCMPNEQ_OSSS = _FT("vcmpneq_osss"); extern const fcml_cstring M_VCMPNEQSD = _FT("vcmpneqsd"); extern const fcml_cstring M_VCMPNEQSS = _FT("vcmpneqss"); extern const fcml_cstring M_VCMPNEQ_USSD = _FT("vcmpneq_ussd"); extern const fcml_cstring M_VCMPNEQ_USSS = _FT("vcmpneq_usss"); extern const fcml_cstring M_VCMPNGESD = _FT("vcmpngesd"); extern const fcml_cstring M_VCMPNGESS = _FT("vcmpngess"); extern const fcml_cstring M_VCMPNGE_UQSD = _FT("vcmpnge_uqsd"); extern const fcml_cstring M_VCMPNGE_UQSS = _FT("vcmpnge_uqss"); extern const fcml_cstring M_VCMPNGTSD = _FT("vcmpngtsd"); extern const fcml_cstring M_VCMPNGTSS = _FT("vcmpngtss"); extern const fcml_cstring M_VCMPNGT_UQSD = _FT("vcmpngt_uqsd"); extern const fcml_cstring M_VCMPNGT_UQSS = _FT("vcmpngt_uqss"); extern const fcml_cstring M_VCMPNLESD = _FT("vcmpnlesd"); extern const fcml_cstring M_VCMPNLESS = _FT("vcmpnless"); extern const fcml_cstring M_VCMPNLE_UQSD = _FT("vcmpnle_uqsd"); extern const fcml_cstring M_VCMPNLE_UQSS = _FT("vcmpnle_uqss"); extern const fcml_cstring M_VCMPNLTSD = _FT("vcmpnltsd"); extern const fcml_cstring M_VCMPNLTSS = _FT("vcmpnltss"); extern const fcml_cstring M_VCMPNLT_UQSD = _FT("vcmpnlt_uqsd"); extern const fcml_cstring M_VCMPNLT_UQSS = _FT("vcmpnlt_uqss"); extern const fcml_cstring M_VCMPORDSD = _FT("vcmpordsd"); extern const fcml_cstring M_VCMPORDSS = _FT("vcmpordss"); extern const fcml_cstring M_VCMPORD_SSD = _FT("vcmpord_ssd"); extern const fcml_cstring M_VCMPORD_SSS = _FT("vcmpord_sss"); extern const fcml_cstring M_VCMPPD = _FT("vcmppd"); extern const fcml_cstring M_VCMPPS = _FT("vcmpps"); extern const fcml_cstring M_VCMPSD = _FT("vcmpsd"); extern const fcml_cstring M_VCMPSS = _FT("vcmpss"); extern const fcml_cstring M_VCMPTRUESD = _FT("vcmptruesd"); extern const fcml_cstring M_VCMPTRUESS = _FT("vcmptruess"); extern const fcml_cstring M_VCMPTRUE_USSD = _FT("vcmptrue_ussd"); extern const fcml_cstring M_VCMPTRUE_USSS = _FT("vcmptrue_usss"); extern const fcml_cstring M_VCMPUNORDSD = _FT("vcmpunordsd"); extern const fcml_cstring M_VCMPUNORDSS = _FT("vcmpunordss"); extern const fcml_cstring M_VCMPUNORD_SSD = _FT("vcmpunord_ssd"); extern const fcml_cstring M_VCMPUNORD_SSS = _FT("vcmpunord_sss"); extern const fcml_cstring M_VCOMISD = _FT("vcomisd"); extern const fcml_cstring M_VCOMISS = _FT("vcomiss"); extern const fcml_cstring M_VCVTDQ2PD = _FT("vcvtdq2pd"); extern const fcml_cstring M_VCVTDQ2PS = _FT("vcvtdq2ps"); extern const fcml_cstring M_VCVTPD2DQ = _FT("vcvtpd2dq"); extern const fcml_cstring M_VCVTPD2PS = _FT("vcvtpd2ps"); extern const fcml_cstring M_VCVTPH2PS = _FT("vcvtph2ps"); extern const fcml_cstring M_VCVTPS2DQ = _FT("vcvtps2dq"); extern const fcml_cstring M_VCVTPS2PD = _FT("vcvtps2pd"); extern const fcml_cstring M_VCVTPS2PH = _FT("vcvtps2ph"); extern const fcml_cstring M_VCVTSD2SI = _FT("vcvtsd2si"); extern const fcml_cstring M_VCVTSD2SS = _FT("vcvtsd2ss"); extern const fcml_cstring M_VCVTSI2SD = _FT("vcvtsi2sd"); extern const fcml_cstring M_VCVTSI2SS = _FT("vcvtsi2ss"); extern const fcml_cstring M_VCVTSS2SD = _FT("vcvtss2sd"); extern const fcml_cstring M_VCVTSS2SI = _FT("vcvtss2si"); extern const fcml_cstring M_VCVTTPD2DQ = _FT("vcvttpd2dq"); extern const fcml_cstring M_VCVTTPS2DQ = _FT("vcvttps2dq"); extern const fcml_cstring M_VCVTTSD2SI = _FT("vcvttsd2si"); extern const fcml_cstring M_VCVTTSS2SI = _FT("vcvttss2si"); extern const fcml_cstring M_VDIVPD = _FT("vdivpd"); extern const fcml_cstring M_VDIVPS = _FT("vdivps"); extern const fcml_cstring M_VDIVSD = _FT("vdivsd"); extern const fcml_cstring M_VDIVSS = _FT("vdivss"); extern const fcml_cstring M_VDPPD = _FT("vdppd"); extern const fcml_cstring M_VDPPS = _FT("vdpps"); extern const fcml_cstring M_VERR = _FT("verr"); extern const fcml_cstring M_VERW = _FT("verw"); extern const fcml_cstring M_VEXTRACTF128 = _FT("vextractf128"); extern const fcml_cstring M_VEXTRACTI128 = _FT("vextracti128"); extern const fcml_cstring M_VEXTRACTPS = _FT("vextractps"); extern const fcml_cstring M_VFMADD132PD = _FT("vfmadd132pd"); extern const fcml_cstring M_VFMADD132PS = _FT("vfmadd132ps"); extern const fcml_cstring M_VFMADD132SD = _FT("vfmadd132sd"); extern const fcml_cstring M_VFMADD132SS = _FT("vfmadd132ss"); extern const fcml_cstring M_VFMADD213PD = _FT("vfmadd213pd"); extern const fcml_cstring M_VFMADD213PS = _FT("vfmadd213ps"); extern const fcml_cstring M_VFMADD213SD = _FT("vfmadd213sd"); extern const fcml_cstring M_VFMADD213SS = _FT("vfmadd213ss"); extern const fcml_cstring M_VFMADD231PD = _FT("vfmadd231pd"); extern const fcml_cstring M_VFMADD231PS = _FT("vfmadd231ps"); extern const fcml_cstring M_VFMADD231SD = _FT("vfmadd231sd"); extern const fcml_cstring M_VFMADD231SS = _FT("vfmadd231ss"); extern const fcml_cstring M_VFMADDPD = _FT("vfmaddpd"); extern const fcml_cstring M_VFMADDPS = _FT("vfmaddps"); extern const fcml_cstring M_VFMADDSD = _FT("vfmaddsd"); extern const fcml_cstring M_VFMADDSS = _FT("vfmaddss"); extern const fcml_cstring M_VFMADDSUB132PD = _FT("vfmaddsub132pd"); extern const fcml_cstring M_VFMADDSUB132PS = _FT("vfmaddsub132ps"); extern const fcml_cstring M_VFMADDSUB213PD = _FT("vfmaddsub213pd"); extern const fcml_cstring M_VFMADDSUB213PS = _FT("vfmaddsub213ps"); extern const fcml_cstring M_VFMADDSUB231PD = _FT("vfmaddsub231pd"); extern const fcml_cstring M_VFMADDSUB231PS = _FT("vfmaddsub231ps"); extern const fcml_cstring M_VFMADDSUBPD = _FT("vfmaddsubpd"); extern const fcml_cstring M_VFMADDSUBPS = _FT("vfmaddsubps"); extern const fcml_cstring M_VFMSUB132PD = _FT("vfmsub132pd"); extern const fcml_cstring M_VFMSUB132PS = _FT("vfmsub132ps"); extern const fcml_cstring M_VFMSUB132SD = _FT("vfmsub132sd"); extern const fcml_cstring M_VFMSUB132SS = _FT("vfmsub132ss"); extern const fcml_cstring M_VFMSUB213PD = _FT("vfmsub213pd"); extern const fcml_cstring M_VFMSUB213PS = _FT("vfmsub213ps"); extern const fcml_cstring M_VFMSUB213SD = _FT("vfmsub213sd"); extern const fcml_cstring M_VFMSUB213SS = _FT("vfmsub213ss"); extern const fcml_cstring M_VFMSUB231PD = _FT("vfmsub231pd"); extern const fcml_cstring M_VFMSUB231PS = _FT("vfmsub231ps"); extern const fcml_cstring M_VFMSUB231SD = _FT("vfmsub231sd"); extern const fcml_cstring M_VFMSUB231SS = _FT("vfmsub231ss"); extern const fcml_cstring M_VFMSUBADD132PD = _FT("vfmsubadd132pd"); extern const fcml_cstring M_VFMSUBADD132PS = _FT("vfmsubadd132ps"); extern const fcml_cstring M_VFMSUBADD213PD = _FT("vfmsubadd213pd"); extern const fcml_cstring M_VFMSUBADD213PS = _FT("vfmsubadd213ps"); extern const fcml_cstring M_VFMSUBADD231PD = _FT("vfmsubadd231pd"); extern const fcml_cstring M_VFMSUBADD231PS = _FT("vfmsubadd231ps"); extern const fcml_cstring M_VFMSUBADDPD = _FT("vfmsubaddpd"); extern const fcml_cstring M_VFMSUBADDPS = _FT("vfmsubaddps"); extern const fcml_cstring M_VFMSUBPD = _FT("vfmsubpd"); extern const fcml_cstring M_VFMSUBPS = _FT("vfmsubps"); extern const fcml_cstring M_VFMSUBSD = _FT("vfmsubsd"); extern const fcml_cstring M_VFMSUBSS = _FT("vfmsubss"); extern const fcml_cstring M_VFNMADD132PD = _FT("vfnmadd132pd"); extern const fcml_cstring M_VFNMADD132PS = _FT("vfnmadd132ps"); extern const fcml_cstring M_VFNMADD132SD = _FT("vfnmadd132sd"); extern const fcml_cstring M_VFNMADD132SS = _FT("vfnmadd132ss"); extern const fcml_cstring M_VFNMADD213PD = _FT("vfnmadd213pd"); extern const fcml_cstring M_VFNMADD213PS = _FT("vfnmadd213ps"); extern const fcml_cstring M_VFNMADD213SD = _FT("vfnmadd213sd"); extern const fcml_cstring M_VFNMADD213SS = _FT("vfnmadd213ss"); extern const fcml_cstring M_VFNMADD231PD = _FT("vfnmadd231pd"); extern const fcml_cstring M_VFNMADD231PS = _FT("vfnmadd231ps"); extern const fcml_cstring M_VFNMADD231SD = _FT("vfnmadd231sd"); extern const fcml_cstring M_VFNMADD231SS = _FT("vfnmadd231ss"); extern const fcml_cstring M_VFNMADDPD = _FT("vfnmaddpd"); extern const fcml_cstring M_VFNMADDPS = _FT("vfnmaddps"); extern const fcml_cstring M_VFNMADDSD = _FT("vfnmaddsd"); extern const fcml_cstring M_VFNMADDSS = _FT("vfnmaddss"); extern const fcml_cstring M_VFNMSUB132PD = _FT("vfnmsub132pd"); extern const fcml_cstring M_VFNMSUB132PS = _FT("vfnmsub132ps"); extern const fcml_cstring M_VFNMSUB132SD = _FT("vfnmsub132sd"); extern const fcml_cstring M_VFNMSUB132SS = _FT("vfnmsub132ss"); extern const fcml_cstring M_VFNMSUB213PD = _FT("vfnmsub213pd"); extern const fcml_cstring M_VFNMSUB213PS = _FT("vfnmsub213ps"); extern const fcml_cstring M_VFNMSUB213SD = _FT("vfnmsub213sd"); extern const fcml_cstring M_VFNMSUB213SS = _FT("vfnmsub213ss"); extern const fcml_cstring M_VFNMSUB231PD = _FT("vfnmsub231pd"); extern const fcml_cstring M_VFNMSUB231PS = _FT("vfnmsub231ps"); extern const fcml_cstring M_VFNMSUB231SD = _FT("vfnmsub231sd"); extern const fcml_cstring M_VFNMSUB231SS = _FT("vfnmsub231ss"); extern const fcml_cstring M_VFNMSUBPD = _FT("vfnmsubpd"); extern const fcml_cstring M_VFNMSUBPS = _FT("vfnmsubps"); extern const fcml_cstring M_VFNMSUBSD = _FT("vfnmsubsd"); extern const fcml_cstring M_VFNMSUBSS = _FT("vfnmsubss"); extern const fcml_cstring M_VFRCZPD = _FT("vfrczpd"); extern const fcml_cstring M_VFRCZPS = _FT("vfrczps"); extern const fcml_cstring M_VFRCZSD = _FT("vfrczsd"); extern const fcml_cstring M_VFRCZSS = _FT("vfrczss"); extern const fcml_cstring M_VGATHERDPD = _FT("vgatherdpd"); extern const fcml_cstring M_VGATHERDPS = _FT("vgatherdps"); extern const fcml_cstring M_VGATHERQPD = _FT("vgatherqpd"); extern const fcml_cstring M_VGATHERQPS = _FT("vgatherqps"); extern const fcml_cstring M_VHADDPD = _FT("vhaddpd"); extern const fcml_cstring M_VHADDPS = _FT("vhaddps"); extern const fcml_cstring M_VHSUBPD = _FT("vhsubpd"); extern const fcml_cstring M_VHSUBPS = _FT("vhsubps"); extern const fcml_cstring M_VINSERTF128 = _FT("vinsertf128"); extern const fcml_cstring M_VINSERTI128 = _FT("vinserti128"); extern const fcml_cstring M_VINSERTPS = _FT("vinsertps"); extern const fcml_cstring M_VLDDQU = _FT("vlddqu"); extern const fcml_cstring M_VLDMXCSR = _FT("vldmxcsr"); extern const fcml_cstring M_VMASKMOVDQU = _FT("vmaskmovdqu"); extern const fcml_cstring M_VMASKMOVPD = _FT("vmaskmovpd"); extern const fcml_cstring M_VMASKMOVPS = _FT("vmaskmovps"); extern const fcml_cstring M_VMAXPD = _FT("vmaxpd"); extern const fcml_cstring M_VMAXPS = _FT("vmaxps"); extern const fcml_cstring M_VMAXSD = _FT("vmaxsd"); extern const fcml_cstring M_VMAXSS = _FT("vmaxss"); extern const fcml_cstring M_VMCALL = _FT("vmcall"); extern const fcml_cstring M_VMCLEAR = _FT("vmclear"); extern const fcml_cstring M_VMFUNC = _FT("vmfunc"); extern const fcml_cstring M_VMINPD = _FT("vminpd"); extern const fcml_cstring M_VMINPS = _FT("vminps"); extern const fcml_cstring M_VMINSD = _FT("vminsd"); extern const fcml_cstring M_VMINSS = _FT("vminss"); extern const fcml_cstring M_VMLAUNCH = _FT("vmlaunch"); extern const fcml_cstring M_VMLOAD = _FT("vmload"); extern const fcml_cstring M_VMMCALL = _FT("vmmcall"); extern const fcml_cstring M_VMOVAPD = _FT("vmovapd"); extern const fcml_cstring M_VMOVAPS = _FT("vmovaps"); extern const fcml_cstring M_VMOVD = _FT("vmovd"); extern const fcml_cstring M_VMOVDDUP = _FT("vmovddup"); extern const fcml_cstring M_VMOVDQA = _FT("vmovdqa"); extern const fcml_cstring M_VMOVDQU = _FT("vmovdqu"); extern const fcml_cstring M_VMOVHLPS = _FT("vmovhlps"); extern const fcml_cstring M_VMOVHPD = _FT("vmovhpd"); extern const fcml_cstring M_VMOVHPS = _FT("vmovhps"); extern const fcml_cstring M_VMOVLHPS = _FT("vmovlhps"); extern const fcml_cstring M_VMOVLPD = _FT("vmovlpd"); extern const fcml_cstring M_VMOVLPS = _FT("vmovlps"); extern const fcml_cstring M_VMOVMSKPD = _FT("vmovmskpd"); extern const fcml_cstring M_VMOVMSKPS = _FT("vmovmskps"); extern const fcml_cstring M_VMOVNTDQ = _FT("vmovntdq"); extern const fcml_cstring M_VMOVNTDQA = _FT("vmovntdqa"); extern const fcml_cstring M_VMOVNTPD = _FT("vmovntpd"); extern const fcml_cstring M_VMOVNTPS = _FT("vmovntps"); extern const fcml_cstring M_VMOVQ = _FT("vmovq"); extern const fcml_cstring M_VMOVSD = _FT("vmovsd"); extern const fcml_cstring M_VMOVSHDUP = _FT("vmovshdup"); extern const fcml_cstring M_VMOVSLDUP = _FT("vmovsldup"); extern const fcml_cstring M_VMOVSS = _FT("vmovss"); extern const fcml_cstring M_VMOVUPD = _FT("vmovupd"); extern const fcml_cstring M_VMOVUPS = _FT("vmovups"); extern const fcml_cstring M_VMPSADBW = _FT("vmpsadbw"); extern const fcml_cstring M_VMPTRLD = _FT("vmptrld"); extern const fcml_cstring M_VMPTRST = _FT("vmptrst"); extern const fcml_cstring M_VMREAD = _FT("vmread"); extern const fcml_cstring M_VMRESUME = _FT("vmresume"); extern const fcml_cstring M_VMRUN = _FT("vmrun"); extern const fcml_cstring M_VMSAVE = _FT("vmsave"); extern const fcml_cstring M_VMULPD = _FT("vmulpd"); extern const fcml_cstring M_VMULPS = _FT("vmulps"); extern const fcml_cstring M_VMULSD = _FT("vmulsd"); extern const fcml_cstring M_VMULSS = _FT("vmulss"); extern const fcml_cstring M_VMWRITE = _FT("vmwrite"); extern const fcml_cstring M_VMXOFF = _FT("vmxoff"); extern const fcml_cstring M_VMXON = _FT("vmxon"); extern const fcml_cstring M_VORPD = _FT("vorpd"); extern const fcml_cstring M_VORPS = _FT("vorps"); extern const fcml_cstring M_VPABSB = _FT("vpabsb"); extern const fcml_cstring M_VPABSD = _FT("vpabsd"); extern const fcml_cstring M_VPABSW = _FT("vpabsw"); extern const fcml_cstring M_VPACKSSDW = _FT("vpackssdw"); extern const fcml_cstring M_VPACKSSWB = _FT("vpacksswb"); extern const fcml_cstring M_VPACKUSDW = _FT("vpackusdw"); extern const fcml_cstring M_VPACKUSWB = _FT("vpackuswb"); extern const fcml_cstring M_VPADDB = _FT("vpaddb"); extern const fcml_cstring M_VPADDD = _FT("vpaddd"); extern const fcml_cstring M_VPADDQ = _FT("vpaddq"); extern const fcml_cstring M_VPADDSB = _FT("vpaddsb"); extern const fcml_cstring M_VPADDSW = _FT("vpaddsw"); extern const fcml_cstring M_VPADDUSB = _FT("vpaddusb"); extern const fcml_cstring M_VPADDUSW = _FT("vpaddusw"); extern const fcml_cstring M_VPADDW = _FT("vpaddw"); extern const fcml_cstring M_VPALIGNR = _FT("vpalignr"); extern const fcml_cstring M_VPAND = _FT("vpand"); extern const fcml_cstring M_VPANDN = _FT("vpandn"); extern const fcml_cstring M_VPAVGB = _FT("vpavgb"); extern const fcml_cstring M_VPAVGW = _FT("vpavgw"); extern const fcml_cstring M_VPBLENDD = _FT("vpblendd"); extern const fcml_cstring M_VPBLENDVB = _FT("vpblendvb"); extern const fcml_cstring M_VPBLENDW = _FT("vpblendw"); extern const fcml_cstring M_VPBROADCASTB = _FT("vpbroadcastb"); extern const fcml_cstring M_VPBROADCASTD = _FT("vpbroadcastd"); extern const fcml_cstring M_VPBROADCASTQ = _FT("vpbroadcastq"); extern const fcml_cstring M_VPBROADCASTW = _FT("vpbroadcastw"); extern const fcml_cstring M_VPCLMULQDQ = _FT("vpclmulqdq"); extern const fcml_cstring M_VPCMOV = _FT("vpcmov"); extern const fcml_cstring M_VPCMPEQB = _FT("vpcmpeqb"); extern const fcml_cstring M_VPCMPEQD = _FT("vpcmpeqd"); extern const fcml_cstring M_VPCMPEQQ = _FT("vpcmpeqq"); extern const fcml_cstring M_VPCMPEQW = _FT("vpcmpeqw"); extern const fcml_cstring M_VPCMPESTRI = _FT("vpcmpestri"); extern const fcml_cstring M_VPCMPESTRM = _FT("vpcmpestrm"); extern const fcml_cstring M_VPCMPGTB = _FT("vpcmpgtb"); extern const fcml_cstring M_VPCMPGTD = _FT("vpcmpgtd"); extern const fcml_cstring M_VPCMPGTQ = _FT("vpcmpgtq"); extern const fcml_cstring M_VPCMPGTW = _FT("vpcmpgtw"); extern const fcml_cstring M_VPCMPISTRI = _FT("vpcmpistri"); extern const fcml_cstring M_VPCMPISTRM = _FT("vpcmpistrm"); extern const fcml_cstring M_VPCOMB = _FT("vpcomb"); extern const fcml_cstring M_VPCOMD = _FT("vpcomd"); extern const fcml_cstring M_VPCOMEQB = _FT("vpcomeqb"); extern const fcml_cstring M_VPCOMEQD = _FT("vpcomeqd"); extern const fcml_cstring M_VPCOMEQQ = _FT("vpcomeqq"); extern const fcml_cstring M_VPCOMEQUB = _FT("vpcomequb"); extern const fcml_cstring M_VPCOMEQUD = _FT("vpcomequd"); extern const fcml_cstring M_VPCOMEQUQ = _FT("vpcomequq"); extern const fcml_cstring M_VPCOMEQUW = _FT("vpcomequw"); extern const fcml_cstring M_VPCOMEQW = _FT("vpcomeqw"); extern const fcml_cstring M_VPCOMFALSEB = _FT("vpcomfalseb"); extern const fcml_cstring M_VPCOMFALSED = _FT("vpcomfalsed"); extern const fcml_cstring M_VPCOMFALSEQ = _FT("vpcomfalseq"); extern const fcml_cstring M_VPCOMFALSEUB = _FT("vpcomfalseub"); extern const fcml_cstring M_VPCOMFALSEUD = _FT("vpcomfalseud"); extern const fcml_cstring M_VPCOMFALSEUQ = _FT("vpcomfalseuq"); extern const fcml_cstring M_VPCOMFALSEUW = _FT("vpcomfalseuw"); extern const fcml_cstring M_VPCOMFALSEW = _FT("vpcomfalsew"); extern const fcml_cstring M_VPCOMGEB = _FT("vpcomgeb"); extern const fcml_cstring M_VPCOMGED = _FT("vpcomged"); extern const fcml_cstring M_VPCOMGEQ = _FT("vpcomgeq"); extern const fcml_cstring M_VPCOMGEUB = _FT("vpcomgeub"); extern const fcml_cstring M_VPCOMGEUD = _FT("vpcomgeud"); extern const fcml_cstring M_VPCOMGEUQ = _FT("vpcomgeuq"); extern const fcml_cstring M_VPCOMGEUW = _FT("vpcomgeuw"); extern const fcml_cstring M_VPCOMGEW = _FT("vpcomgew"); extern const fcml_cstring M_VPCOMGTB = _FT("vpcomgtb"); extern const fcml_cstring M_VPCOMGTD = _FT("vpcomgtd"); extern const fcml_cstring M_VPCOMGTQ = _FT("vpcomgtq"); extern const fcml_cstring M_VPCOMGTUB = _FT("vpcomgtub"); extern const fcml_cstring M_VPCOMGTUD = _FT("vpcomgtud"); extern const fcml_cstring M_VPCOMGTUQ = _FT("vpcomgtuq"); extern const fcml_cstring M_VPCOMGTUW = _FT("vpcomgtuw"); extern const fcml_cstring M_VPCOMGTW = _FT("vpcomgtw"); extern const fcml_cstring M_VPCOMLEB = _FT("vpcomleb"); extern const fcml_cstring M_VPCOMLED = _FT("vpcomled"); extern const fcml_cstring M_VPCOMLEQ = _FT("vpcomleq"); extern const fcml_cstring M_VPCOMLEUB = _FT("vpcomleub"); extern const fcml_cstring M_VPCOMLEUD = _FT("vpcomleud"); extern const fcml_cstring M_VPCOMLEUQ = _FT("vpcomleuq"); extern const fcml_cstring M_VPCOMLEUW = _FT("vpcomleuw"); extern const fcml_cstring M_VPCOMLEW = _FT("vpcomlew"); extern const fcml_cstring M_VPCOMLTB = _FT("vpcomltb"); extern const fcml_cstring M_VPCOMLTD = _FT("vpcomltd"); extern const fcml_cstring M_VPCOMLTQ = _FT("vpcomltq"); extern const fcml_cstring M_VPCOMLTUB = _FT("vpcomltub"); extern const fcml_cstring M_VPCOMLTUD = _FT("vpcomltud"); extern const fcml_cstring M_VPCOMLTUQ = _FT("vpcomltuq"); extern const fcml_cstring M_VPCOMLTUW = _FT("vpcomltuw"); extern const fcml_cstring M_VPCOMLTW = _FT("vpcomltw"); extern const fcml_cstring M_VPCOMNEQB = _FT("vpcomneqb"); extern const fcml_cstring M_VPCOMNEQD = _FT("vpcomneqd"); extern const fcml_cstring M_VPCOMNEQQ = _FT("vpcomneqq"); extern const fcml_cstring M_VPCOMNEQUB = _FT("vpcomnequb"); extern const fcml_cstring M_VPCOMNEQUD = _FT("vpcomnequd"); extern const fcml_cstring M_VPCOMNEQUQ = _FT("vpcomnequq"); extern const fcml_cstring M_VPCOMNEQUW = _FT("vpcomnequw"); extern const fcml_cstring M_VPCOMNEQW = _FT("vpcomneqw"); extern const fcml_cstring M_VPCOMQ = _FT("vpcomq"); extern const fcml_cstring M_VPCOMTRUEB = _FT("vpcomtrueb"); extern const fcml_cstring M_VPCOMTRUED = _FT("vpcomtrued"); extern const fcml_cstring M_VPCOMTRUEQ = _FT("vpcomtrueq"); extern const fcml_cstring M_VPCOMTRUEUB = _FT("vpcomtrueub"); extern const fcml_cstring M_VPCOMTRUEUD = _FT("vpcomtrueud"); extern const fcml_cstring M_VPCOMTRUEUQ = _FT("vpcomtrueuq"); extern const fcml_cstring M_VPCOMTRUEUW = _FT("vpcomtrueuw"); extern const fcml_cstring M_VPCOMTRUEW = _FT("vpcomtruew"); extern const fcml_cstring M_VPCOMUB = _FT("vpcomub"); extern const fcml_cstring M_VPCOMUD = _FT("vpcomud"); extern const fcml_cstring M_VPCOMUQ = _FT("vpcomuq"); extern const fcml_cstring M_VPCOMUW = _FT("vpcomuw"); extern const fcml_cstring M_VPCOMW = _FT("vpcomw"); extern const fcml_cstring M_VPERM2F128 = _FT("vperm2f128"); extern const fcml_cstring M_VPERM2I128 = _FT("vperm2i128"); extern const fcml_cstring M_VPERMD = _FT("vpermd"); extern const fcml_cstring M_VPERMIL2PD = _FT("vpermil2pd"); extern const fcml_cstring M_VPERMIL2PS = _FT("vpermil2ps"); extern const fcml_cstring M_VPERMILPD = _FT("vpermilpd"); extern const fcml_cstring M_VPERMILPS = _FT("vpermilps"); extern const fcml_cstring M_VPERMPD = _FT("vpermpd"); extern const fcml_cstring M_VPERMPS = _FT("vpermps"); extern const fcml_cstring M_VPERMQ = _FT("vpermq"); extern const fcml_cstring M_VPEXTRB = _FT("vpextrb"); extern const fcml_cstring M_VPEXTRD = _FT("vpextrd"); extern const fcml_cstring M_VPEXTRQ = _FT("vpextrq"); extern const fcml_cstring M_VPEXTRW = _FT("vpextrw"); extern const fcml_cstring M_VPGATHERDD = _FT("vpgatherdd"); extern const fcml_cstring M_VPGATHERDQ = _FT("vpgatherdq"); extern const fcml_cstring M_VPGATHERQD = _FT("vpgatherqd"); extern const fcml_cstring M_VPGATHERQQ = _FT("vpgatherqq"); extern const fcml_cstring M_VPHADDBD = _FT("vphaddbd"); extern const fcml_cstring M_VPHADDBQ = _FT("vphaddbq"); extern const fcml_cstring M_VPHADDBW = _FT("vphaddbw"); extern const fcml_cstring M_VPHADDD = _FT("vphaddd"); extern const fcml_cstring M_VPHADDDQ = _FT("vphadddq"); extern const fcml_cstring M_VPHADDSW = _FT("vphaddsw"); extern const fcml_cstring M_VPHADDUBD = _FT("vphaddubd"); extern const fcml_cstring M_VPHADDUBQ = _FT("vphaddubq"); extern const fcml_cstring M_VPHADDUBW = _FT("vphaddubw"); extern const fcml_cstring M_VPHADDUDQ = _FT("vphaddudq"); extern const fcml_cstring M_VPHADDUWD = _FT("vphadduwd"); extern const fcml_cstring M_VPHADDUWQ = _FT("vphadduwq"); extern const fcml_cstring M_VPHADDW = _FT("vphaddw"); extern const fcml_cstring M_VPHADDWD = _FT("vphaddwd"); extern const fcml_cstring M_VPHADDWQ = _FT("vphaddwq"); extern const fcml_cstring M_VPHMINPOSUW = _FT("vphminposuw"); extern const fcml_cstring M_VPHSUBBW = _FT("vphsubbw"); extern const fcml_cstring M_VPHSUBD = _FT("vphsubd"); extern const fcml_cstring M_VPHSUBDQ = _FT("vphsubdq"); extern const fcml_cstring M_VPHSUBSW = _FT("vphsubsw"); extern const fcml_cstring M_VPHSUBW = _FT("vphsubw"); extern const fcml_cstring M_VPHSUBWD = _FT("vphsubwd"); extern const fcml_cstring M_VPINSRB = _FT("vpinsrb"); extern const fcml_cstring M_VPINSRD = _FT("vpinsrd"); extern const fcml_cstring M_VPINSRQ = _FT("vpinsrq"); extern const fcml_cstring M_VPINSRW = _FT("vpinsrw"); extern const fcml_cstring M_VPMACSDD = _FT("vpmacsdd"); extern const fcml_cstring M_VPMACSDQH = _FT("vpmacsdqh"); extern const fcml_cstring M_VPMACSDQL = _FT("vpmacsdql"); extern const fcml_cstring M_VPMACSSDD = _FT("vpmacssdd"); extern const fcml_cstring M_VPMACSSDQH = _FT("vpmacssdqh"); extern const fcml_cstring M_VPMACSSDQL = _FT("vpmacssdql"); extern const fcml_cstring M_VPMACSSWD = _FT("vpmacsswd"); extern const fcml_cstring M_VPMACSSWW = _FT("vpmacssww"); extern const fcml_cstring M_VPMACSWD = _FT("vpmacswd"); extern const fcml_cstring M_VPMACSWW = _FT("vpmacsww"); extern const fcml_cstring M_VPMADCSSWD = _FT("vpmadcsswd"); extern const fcml_cstring M_VPMADCSWD = _FT("vpmadcswd"); extern const fcml_cstring M_VPMADDUBSW = _FT("vpmaddubsw"); extern const fcml_cstring M_VPMADDWD = _FT("vpmaddwd"); extern const fcml_cstring M_VPMASKMOV = _FT("vpmaskmov"); extern const fcml_cstring M_VPMASKMOVD = _FT("vpmaskmovd"); extern const fcml_cstring M_VPMASKMOVQ = _FT("vpmaskmovq"); extern const fcml_cstring M_VPMAXSB = _FT("vpmaxsb"); extern const fcml_cstring M_VPMAXSD = _FT("vpmaxsd"); extern const fcml_cstring M_VPMAXSW = _FT("vpmaxsw"); extern const fcml_cstring M_VPMAXUB = _FT("vpmaxub"); extern const fcml_cstring M_VPMAXUD = _FT("vpmaxud"); extern const fcml_cstring M_VPMAXUW = _FT("vpmaxuw"); extern const fcml_cstring M_VPMINSB = _FT("vpminsb"); extern const fcml_cstring M_VPMINSD = _FT("vpminsd"); extern const fcml_cstring M_VPMINSW = _FT("vpminsw"); extern const fcml_cstring M_VPMINUB = _FT("vpminub"); extern const fcml_cstring M_VPMINUD = _FT("vpminud"); extern const fcml_cstring M_VPMINUW = _FT("vpminuw"); extern const fcml_cstring M_VPMOVMSKB = _FT("vpmovmskb"); extern const fcml_cstring M_VPMOVSXBD = _FT("vpmovsxbd"); extern const fcml_cstring M_VPMOVSXBQ = _FT("vpmovsxbq"); extern const fcml_cstring M_VPMOVSXBW = _FT("vpmovsxbw"); extern const fcml_cstring M_VPMOVSXDQ = _FT("vpmovsxdq"); extern const fcml_cstring M_VPMOVSXWD = _FT("vpmovsxwd"); extern const fcml_cstring M_VPMOVSXWQ = _FT("vpmovsxwq"); extern const fcml_cstring M_VPMOVZXBD = _FT("vpmovzxbd"); extern const fcml_cstring M_VPMOVZXBQ = _FT("vpmovzxbq"); extern const fcml_cstring M_VPMOVZXBW = _FT("vpmovzxbw"); extern const fcml_cstring M_VPMOVZXDQ = _FT("vpmovzxdq"); extern const fcml_cstring M_VPMOVZXWD = _FT("vpmovzxwd"); extern const fcml_cstring M_VPMOVZXWQ = _FT("vpmovzxwq"); extern const fcml_cstring M_VPMULDQ = _FT("vpmuldq"); extern const fcml_cstring M_VPMULHRSW = _FT("vpmulhrsw"); extern const fcml_cstring M_VPMULHUW = _FT("vpmulhuw"); extern const fcml_cstring M_VPMULHW = _FT("vpmulhw"); extern const fcml_cstring M_VPMULLD = _FT("vpmulld"); extern const fcml_cstring M_VPMULLW = _FT("vpmullw"); extern const fcml_cstring M_VPMULUDQ = _FT("vpmuludq"); extern const fcml_cstring M_VPOR = _FT("vpor"); extern const fcml_cstring M_VPPERM = _FT("vpperm"); extern const fcml_cstring M_VPROTB = _FT("vprotb"); extern const fcml_cstring M_VPROTD = _FT("vprotd"); extern const fcml_cstring M_VPROTQ = _FT("vprotq"); extern const fcml_cstring M_VPROTW = _FT("vprotw"); extern const fcml_cstring M_VPSADBW = _FT("vpsadbw"); extern const fcml_cstring M_VPSHAB = _FT("vpshab"); extern const fcml_cstring M_VPSHAD = _FT("vpshad"); extern const fcml_cstring M_VPSHAQ = _FT("vpshaq"); extern const fcml_cstring M_VPSHAW = _FT("vpshaw"); extern const fcml_cstring M_VPSHLB = _FT("vpshlb"); extern const fcml_cstring M_VPSHLD = _FT("vpshld"); extern const fcml_cstring M_VPSHLQ = _FT("vpshlq"); extern const fcml_cstring M_VPSHLW = _FT("vpshlw"); extern const fcml_cstring M_VPSHUFB = _FT("vpshufb"); extern const fcml_cstring M_VPSHUFD = _FT("vpshufd"); extern const fcml_cstring M_VPSHUFHW = _FT("vpshufhw"); extern const fcml_cstring M_VPSHUFLW = _FT("vpshuflw"); extern const fcml_cstring M_VPSIGNB = _FT("vpsignb"); extern const fcml_cstring M_VPSIGND = _FT("vpsignd"); extern const fcml_cstring M_VPSIGNW = _FT("vpsignw"); extern const fcml_cstring M_VPSLLD = _FT("vpslld"); extern const fcml_cstring M_VPSLLDQ = _FT("vpslldq"); extern const fcml_cstring M_VPSLLQ = _FT("vpsllq"); extern const fcml_cstring M_VPSLLVD = _FT("vpsllvd"); extern const fcml_cstring M_VPSLLVQ = _FT("vpsllvq"); extern const fcml_cstring M_VPSLLW = _FT("vpsllw"); extern const fcml_cstring M_VPSRAD = _FT("vpsrad"); extern const fcml_cstring M_VPSRAVD = _FT("vpsravd"); extern const fcml_cstring M_VPSRAW = _FT("vpsraw"); extern const fcml_cstring M_VPSRLD = _FT("vpsrld"); extern const fcml_cstring M_VPSRLDQ = _FT("vpsrldq"); extern const fcml_cstring M_VPSRLQ = _FT("vpsrlq"); extern const fcml_cstring M_VPSRLVD = _FT("vpsrlvd"); extern const fcml_cstring M_VPSRLVQ = _FT("vpsrlvq"); extern const fcml_cstring M_VPSRLW = _FT("vpsrlw"); extern const fcml_cstring M_VPSUBB = _FT("vpsubb"); extern const fcml_cstring M_VPSUBD = _FT("vpsubd"); extern const fcml_cstring M_VPSUBQ = _FT("vpsubq"); extern const fcml_cstring M_VPSUBSB = _FT("vpsubsb"); extern const fcml_cstring M_VPSUBSW = _FT("vpsubsw"); extern const fcml_cstring M_VPSUBUSB = _FT("vpsubusb"); extern const fcml_cstring M_VPSUBUSW = _FT("vpsubusw"); extern const fcml_cstring M_VPSUBW = _FT("vpsubw"); extern const fcml_cstring M_VPTEST = _FT("vptest"); extern const fcml_cstring M_VPUNPCKHBW = _FT("vpunpckhbw"); extern const fcml_cstring M_VPUNPCKHDQ = _FT("vpunpckhdq"); extern const fcml_cstring M_VPUNPCKHQDQ = _FT("vpunpckhqdq"); extern const fcml_cstring M_VPUNPCKHWD = _FT("vpunpckhwd"); extern const fcml_cstring M_VPUNPCKLBW = _FT("vpunpcklbw"); extern const fcml_cstring M_VPUNPCKLDQ = _FT("vpunpckldq"); extern const fcml_cstring M_VPUNPCKLQDQ = _FT("vpunpcklqdq"); extern const fcml_cstring M_VPUNPCKLWD = _FT("vpunpcklwd"); extern const fcml_cstring M_VPXOR = _FT("vpxor"); extern const fcml_cstring M_VRCPPS = _FT("vrcpps"); extern const fcml_cstring M_VRCPSS = _FT("vrcpss"); extern const fcml_cstring M_VROUNDPD = _FT("vroundpd"); extern const fcml_cstring M_VROUNDPS = _FT("vroundps"); extern const fcml_cstring M_VROUNDSD = _FT("vroundsd"); extern const fcml_cstring M_VROUNDSS = _FT("vroundss"); extern const fcml_cstring M_VRSQRTPS = _FT("vrsqrtps"); extern const fcml_cstring M_VRSQRTSS = _FT("vrsqrtss"); extern const fcml_cstring M_VSHUFPD = _FT("vshufpd"); extern const fcml_cstring M_VSHUFPS = _FT("vshufps"); extern const fcml_cstring M_VSQRTPD = _FT("vsqrtpd"); extern const fcml_cstring M_VSQRTPS = _FT("vsqrtps"); extern const fcml_cstring M_VSQRTSD = _FT("vsqrtsd"); extern const fcml_cstring M_VSQRTSS = _FT("vsqrtss"); extern const fcml_cstring M_VSTMXCSR = _FT("vstmxcsr"); extern const fcml_cstring M_VSUBPD = _FT("vsubpd"); extern const fcml_cstring M_VSUBPS = _FT("vsubps"); extern const fcml_cstring M_VSUBSD = _FT("vsubsd"); extern const fcml_cstring M_VSUBSS = _FT("vsubss"); extern const fcml_cstring M_VTESTPD = _FT("vtestpd"); extern const fcml_cstring M_VTESTPS = _FT("vtestps"); extern const fcml_cstring M_VUCOMISD = _FT("vucomisd"); extern const fcml_cstring M_VUCOMISS = _FT("vucomiss"); extern const fcml_cstring M_VUNPCKHPD = _FT("vunpckhpd"); extern const fcml_cstring M_VUNPCKHPS = _FT("vunpckhps"); extern const fcml_cstring M_VUNPCKLPD = _FT("vunpcklpd"); extern const fcml_cstring M_VUNPCKLPS = _FT("vunpcklps"); extern const fcml_cstring M_VXORPD = _FT("vxorpd"); extern const fcml_cstring M_VXORPS = _FT("vxorps"); extern const fcml_cstring M_VZEROALL = _FT("vzeroall"); extern const fcml_cstring M_VZEROUPPER = _FT("vzeroupper"); extern const fcml_cstring M_WAIT = _FT("wait"); extern const fcml_cstring M_WBINVD = _FT("wbinvd"); extern const fcml_cstring M_WRFSBASE = _FT("wrfsbase"); extern const fcml_cstring M_WRGSBASE = _FT("wrgsbase"); extern const fcml_cstring M_WRMSR = _FT("wrmsr"); extern const fcml_cstring M_XABORT = _FT("xabort"); extern const fcml_cstring M_XADD = _FT("xadd"); extern const fcml_cstring M_XBEGIN = _FT("xbegin"); extern const fcml_cstring M_XCHG = _FT("xchg"); extern const fcml_cstring M_XEND = _FT("xend"); extern const fcml_cstring M_XGETBV = _FT("xgetbv"); extern const fcml_cstring M_XLAT = _FT("xlat"); extern const fcml_cstring M_XLATB = _FT("xlatb"); extern const fcml_cstring M_XOR = _FT("xor"); extern const fcml_cstring M_XORPD = _FT("xorpd"); extern const fcml_cstring M_XORPS = _FT("xorps"); extern const fcml_cstring M_XRSTOR = _FT("xrstor"); extern const fcml_cstring M_XRSTOR64 = _FT("xrstor64"); extern const fcml_cstring M_XSAVE = _FT("xsave"); extern const fcml_cstring M_XSAVE64 = _FT("xsave64"); extern const fcml_cstring M_XSAVEOPT = _FT("xsaveopt"); extern const fcml_cstring M_XSAVEOPT64 = _FT("xsaveopt64"); extern const fcml_cstring M_XSETBV = _FT("xsetbv"); extern const fcml_cstring M_XTEST = _FT("xtest"); } } fcml-1.1.1/include/fcml_gas_mnemonics.cpp0000644000175000017500000023761312560745216015352 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_gas_mnemonics.cpp * Definitions of AT&T mnemonics for C++. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #include "fcml_gas_mnemonics.hpp" namespace fcml { namespace gas { extern const fcml_cstring M_AAA = _FT("aaa"); extern const fcml_cstring M_AAD = _FT("aad"); extern const fcml_cstring M_AAM = _FT("aam"); extern const fcml_cstring M_AAS = _FT("aas"); extern const fcml_cstring M_ADC = _FT("adc"); extern const fcml_cstring M_ADCB = _FT("adcb"); extern const fcml_cstring M_ADCL = _FT("adcl"); extern const fcml_cstring M_ADCQ = _FT("adcq"); extern const fcml_cstring M_ADCW = _FT("adcw"); extern const fcml_cstring M_ADCX = _FT("adcx"); extern const fcml_cstring M_ADD = _FT("add"); extern const fcml_cstring M_ADDB = _FT("addb"); extern const fcml_cstring M_ADDL = _FT("addl"); extern const fcml_cstring M_ADDPD = _FT("addpd"); extern const fcml_cstring M_ADDPS = _FT("addps"); extern const fcml_cstring M_ADDQ = _FT("addq"); extern const fcml_cstring M_ADDSD = _FT("addsd"); extern const fcml_cstring M_ADDSS = _FT("addss"); extern const fcml_cstring M_ADDSUBPD = _FT("addsubpd"); extern const fcml_cstring M_ADDSUBPS = _FT("addsubps"); extern const fcml_cstring M_ADDW = _FT("addw"); extern const fcml_cstring M_ADOX = _FT("adox"); extern const fcml_cstring M_AESDEC = _FT("aesdec"); extern const fcml_cstring M_AESDECLAST = _FT("aesdeclast"); extern const fcml_cstring M_AESENC = _FT("aesenc"); extern const fcml_cstring M_AESENCLAST = _FT("aesenclast"); extern const fcml_cstring M_AESIMC = _FT("aesimc"); extern const fcml_cstring M_AESKEYGENASSIST = _FT("aeskeygenassist"); extern const fcml_cstring M_AND = _FT("and"); extern const fcml_cstring M_ANDB = _FT("andb"); extern const fcml_cstring M_ANDL = _FT("andl"); extern const fcml_cstring M_ANDN = _FT("andn"); extern const fcml_cstring M_ANDNPD = _FT("andnpd"); extern const fcml_cstring M_ANDNPS = _FT("andnps"); extern const fcml_cstring M_ANDPD = _FT("andpd"); extern const fcml_cstring M_ANDPS = _FT("andps"); extern const fcml_cstring M_ANDQ = _FT("andq"); extern const fcml_cstring M_ANDW = _FT("andw"); extern const fcml_cstring M_ARPL = _FT("arpl"); extern const fcml_cstring M_BEXR = _FT("bexr"); extern const fcml_cstring M_BEXTR = _FT("bextr"); extern const fcml_cstring M_BLCFILL = _FT("blcfill"); extern const fcml_cstring M_BLCI = _FT("blci"); extern const fcml_cstring M_BLCIC = _FT("blcic"); extern const fcml_cstring M_BLCMSK = _FT("blcmsk"); extern const fcml_cstring M_BLCS = _FT("blcs"); extern const fcml_cstring M_BLENDPD = _FT("blendpd"); extern const fcml_cstring M_BLENDPS = _FT("blendps"); extern const fcml_cstring M_BLENDVPD = _FT("blendvpd"); extern const fcml_cstring M_BLENDVPS = _FT("blendvps"); extern const fcml_cstring M_BLSFILL = _FT("blsfill"); extern const fcml_cstring M_BLSI = _FT("blsi"); extern const fcml_cstring M_BLSIC = _FT("blsic"); extern const fcml_cstring M_BLSMSK = _FT("blsmsk"); extern const fcml_cstring M_BLSR = _FT("blsr"); extern const fcml_cstring M_BOUND = _FT("bound"); extern const fcml_cstring M_BSF = _FT("bsf"); extern const fcml_cstring M_BSR = _FT("bsr"); extern const fcml_cstring M_BSWAP = _FT("bswap"); extern const fcml_cstring M_BT = _FT("bt"); extern const fcml_cstring M_BTC = _FT("btc"); extern const fcml_cstring M_BTCL = _FT("btcl"); extern const fcml_cstring M_BTCQ = _FT("btcq"); extern const fcml_cstring M_BTCW = _FT("btcw"); extern const fcml_cstring M_BTL = _FT("btl"); extern const fcml_cstring M_BTQ = _FT("btq"); extern const fcml_cstring M_BTR = _FT("btr"); extern const fcml_cstring M_BTRL = _FT("btrl"); extern const fcml_cstring M_BTRQ = _FT("btrq"); extern const fcml_cstring M_BTRW = _FT("btrw"); extern const fcml_cstring M_BTS = _FT("bts"); extern const fcml_cstring M_BTSL = _FT("btsl"); extern const fcml_cstring M_BTSQ = _FT("btsq"); extern const fcml_cstring M_BTSW = _FT("btsw"); extern const fcml_cstring M_BTW = _FT("btw"); extern const fcml_cstring M_BZHI = _FT("bzhi"); extern const fcml_cstring M_CALL = _FT("call"); extern const fcml_cstring M_CALLQ = _FT("callq"); extern const fcml_cstring M_CALLW = _FT("callw"); extern const fcml_cstring M_CBTW = _FT("cbtw"); extern const fcml_cstring M_CLAC = _FT("clac"); extern const fcml_cstring M_CLC = _FT("clc"); extern const fcml_cstring M_CLD = _FT("cld"); extern const fcml_cstring M_CLFLUSH = _FT("clflush"); extern const fcml_cstring M_CLGI = _FT("clgi"); extern const fcml_cstring M_CLI = _FT("cli"); extern const fcml_cstring M_CLTD = _FT("cltd"); extern const fcml_cstring M_CLTQ = _FT("cltq"); extern const fcml_cstring M_CLTS = _FT("clts"); extern const fcml_cstring M_CMC = _FT("cmc"); extern const fcml_cstring M_CMOVO = _FT("cmovo"); extern const fcml_cstring M_CMOVNO = _FT("cmovno"); extern const fcml_cstring M_CMOVB = _FT("cmovb"); extern const fcml_cstring M_CMOVNB = _FT("cmovnb"); extern const fcml_cstring M_CMOVE = _FT("cmove"); extern const fcml_cstring M_CMOVNE = _FT("cmovne"); extern const fcml_cstring M_CMOVBE = _FT("cmovbe"); extern const fcml_cstring M_CMOVNBE = _FT("cmovnbe"); extern const fcml_cstring M_CMOVS = _FT("cmovs"); extern const fcml_cstring M_CMOVNS = _FT("cmovns"); extern const fcml_cstring M_CMOVP = _FT("cmovp"); extern const fcml_cstring M_CMOVNP = _FT("cmovnp"); extern const fcml_cstring M_CMOVL = _FT("cmovl"); extern const fcml_cstring M_CMOVNL = _FT("cmovnl"); extern const fcml_cstring M_CMOVLE = _FT("cmovle"); extern const fcml_cstring M_CMOVNLE = _FT("cmovnle"); extern const fcml_cstring M_CMOVNAE = _FT("cmovnae"); extern const fcml_cstring M_CMOVAE = _FT("cmovae"); extern const fcml_cstring M_CMOVZ = _FT("cmovz"); extern const fcml_cstring M_CMOVNZ = _FT("cmovnz"); extern const fcml_cstring M_CMOVNA = _FT("cmovna"); extern const fcml_cstring M_CMOVA = _FT("cmova"); extern const fcml_cstring M_CMOVPE = _FT("cmovpe"); extern const fcml_cstring M_CMOVPO = _FT("cmovpo"); extern const fcml_cstring M_CMOVNGE = _FT("cmovnge"); extern const fcml_cstring M_CMOVGE = _FT("cmovge"); extern const fcml_cstring M_CMOVNG = _FT("cmovng"); extern const fcml_cstring M_CMOVG = _FT("cmovg"); extern const fcml_cstring M_CMOVC = _FT("cmovc"); extern const fcml_cstring M_CMOVNC = _FT("cmovnc"); extern const fcml_cstring M_CMP = _FT("cmp"); extern const fcml_cstring M_CMPB = _FT("cmpb"); extern const fcml_cstring M_CMPEQSD = _FT("cmpeqsd"); extern const fcml_cstring M_CMPEQSS = _FT("cmpeqss"); extern const fcml_cstring M_CMPL = _FT("cmpl"); extern const fcml_cstring M_CMPLESD = _FT("cmplesd"); extern const fcml_cstring M_CMPLESS = _FT("cmpless"); extern const fcml_cstring M_CMPLTSD = _FT("cmpltsd"); extern const fcml_cstring M_CMPLTSS = _FT("cmpltss"); extern const fcml_cstring M_CMPNEQSD = _FT("cmpneqsd"); extern const fcml_cstring M_CMPNEQSS = _FT("cmpneqss"); extern const fcml_cstring M_CMPNLESD = _FT("cmpnlesd"); extern const fcml_cstring M_CMPNLESS = _FT("cmpnless"); extern const fcml_cstring M_CMPNLTSD = _FT("cmpnltsd"); extern const fcml_cstring M_CMPNLTSS = _FT("cmpnltss"); extern const fcml_cstring M_CMPORDSD = _FT("cmpordsd"); extern const fcml_cstring M_CMPORDSS = _FT("cmpordss"); extern const fcml_cstring M_CMPPD = _FT("cmppd"); extern const fcml_cstring M_CMPPS = _FT("cmpps"); extern const fcml_cstring M_CMPQ = _FT("cmpq"); extern const fcml_cstring M_CMPSB = _FT("cmpsb"); extern const fcml_cstring M_CMPSD = _FT("cmpsd"); extern const fcml_cstring M_CMPSL = _FT("cmpsl"); extern const fcml_cstring M_CMPSQ = _FT("cmpsq"); extern const fcml_cstring M_CMPSS = _FT("cmpss"); extern const fcml_cstring M_CMPSW = _FT("cmpsw"); extern const fcml_cstring M_CMPUNORDSD = _FT("cmpunordsd"); extern const fcml_cstring M_CMPUNORDSS = _FT("cmpunordss"); extern const fcml_cstring M_CMPW = _FT("cmpw"); extern const fcml_cstring M_CMPXCHG = _FT("cmpxchg"); extern const fcml_cstring M_CMPXCHG16B = _FT("cmpxchg16b"); extern const fcml_cstring M_CMPXCHG8B = _FT("cmpxchg8b"); extern const fcml_cstring M_COMISD = _FT("comisd"); extern const fcml_cstring M_COMISS = _FT("comiss"); extern const fcml_cstring M_CPUID = _FT("cpuid"); extern const fcml_cstring M_CQTO = _FT("cqto"); extern const fcml_cstring M_CRC32B = _FT("crc32b"); extern const fcml_cstring M_CRC32L = _FT("crc32l"); extern const fcml_cstring M_CRC32Q = _FT("crc32q"); extern const fcml_cstring M_CRC32W = _FT("crc32w"); extern const fcml_cstring M_CVTDQ2PD = _FT("cvtdq2pd"); extern const fcml_cstring M_CVTDQ2PS = _FT("cvtdq2ps"); extern const fcml_cstring M_CVTPD2DQ = _FT("cvtpd2dq"); extern const fcml_cstring M_CVTPD2PI = _FT("cvtpd2pi"); extern const fcml_cstring M_CVTPD2PS = _FT("cvtpd2ps"); extern const fcml_cstring M_CVTPI2PD = _FT("cvtpi2pd"); extern const fcml_cstring M_CVTPI2PS = _FT("cvtpi2ps"); extern const fcml_cstring M_CVTPS2DQ = _FT("cvtps2dq"); extern const fcml_cstring M_CVTPS2PD = _FT("cvtps2pd"); extern const fcml_cstring M_CVTPS2PI = _FT("cvtps2pi"); extern const fcml_cstring M_CVTSD2SI = _FT("cvtsd2si"); extern const fcml_cstring M_CVTSD2SS = _FT("cvtsd2ss"); extern const fcml_cstring M_CVTSI2SDL = _FT("cvtsi2sdl"); extern const fcml_cstring M_CVTSI2SDQ = _FT("cvtsi2sdq"); extern const fcml_cstring M_CVTSI2SSL = _FT("cvtsi2ssl"); extern const fcml_cstring M_CVTSI2SSQ = _FT("cvtsi2ssq"); extern const fcml_cstring M_CVTSS2SD = _FT("cvtss2sd"); extern const fcml_cstring M_CVTSS2SI = _FT("cvtss2si"); extern const fcml_cstring M_CVTTPD2DQ = _FT("cvttpd2dq"); extern const fcml_cstring M_CVTTPD2PI = _FT("cvttpd2pi"); extern const fcml_cstring M_CVTTPS2DQ = _FT("cvttps2dq"); extern const fcml_cstring M_CVTTPS2PI = _FT("cvttps2pi"); extern const fcml_cstring M_CVTTSD2SI = _FT("cvttsd2si"); extern const fcml_cstring M_CVTTSS2SI = _FT("cvttss2si"); extern const fcml_cstring M_CWTD = _FT("cwtd"); extern const fcml_cstring M_CWTL = _FT("cwtl"); extern const fcml_cstring M_DAA = _FT("daa"); extern const fcml_cstring M_DAS = _FT("das"); extern const fcml_cstring M_DEC = _FT("dec"); extern const fcml_cstring M_DECB = _FT("decb"); extern const fcml_cstring M_DECL = _FT("decl"); extern const fcml_cstring M_DECQ = _FT("decq"); extern const fcml_cstring M_DECW = _FT("decw"); extern const fcml_cstring M_DIV = _FT("div"); extern const fcml_cstring M_DIVB = _FT("divb"); extern const fcml_cstring M_DIVL = _FT("divl"); extern const fcml_cstring M_DIVPD = _FT("divpd"); extern const fcml_cstring M_DIVPS = _FT("divps"); extern const fcml_cstring M_DIVQ = _FT("divq"); extern const fcml_cstring M_DIVSD = _FT("divsd"); extern const fcml_cstring M_DIVSS = _FT("divss"); extern const fcml_cstring M_DIVW = _FT("divw"); extern const fcml_cstring M_DPPD = _FT("dppd"); extern const fcml_cstring M_DPPS = _FT("dpps"); extern const fcml_cstring M_EMMS = _FT("emms"); extern const fcml_cstring M_ENTER = _FT("enter"); extern const fcml_cstring M_ENTERQ = _FT("enterq"); extern const fcml_cstring M_EXTRACTPS = _FT("extractps"); extern const fcml_cstring M_EXTRQ = _FT("extrq"); extern const fcml_cstring M_F2XM1 = _FT("f2xm1"); extern const fcml_cstring M_FABS = _FT("fabs"); extern const fcml_cstring M_FADD = _FT("fadd"); extern const fcml_cstring M_FADDL = _FT("faddl"); extern const fcml_cstring M_FADDP = _FT("faddp"); extern const fcml_cstring M_FADDS = _FT("fadds"); extern const fcml_cstring M_FBLD = _FT("fbld"); extern const fcml_cstring M_FBSTP = _FT("fbstp"); extern const fcml_cstring M_FCHS = _FT("fchs"); extern const fcml_cstring M_FCLEX = _FT("fclex"); extern const fcml_cstring M_FCMOVB = _FT("fcmovb"); extern const fcml_cstring M_FCMOVBE = _FT("fcmovbe"); extern const fcml_cstring M_FCMOVE = _FT("fcmove"); extern const fcml_cstring M_FCMOVNB = _FT("fcmovnb"); extern const fcml_cstring M_FCMOVNBE = _FT("fcmovnbe"); extern const fcml_cstring M_FCMOVNE = _FT("fcmovne"); extern const fcml_cstring M_FCMOVNU = _FT("fcmovnu"); extern const fcml_cstring M_FCMOVU = _FT("fcmovu"); extern const fcml_cstring M_FCOM = _FT("fcom"); extern const fcml_cstring M_FCOMI = _FT("fcomi"); extern const fcml_cstring M_FCOMIP = _FT("fcomip"); extern const fcml_cstring M_FCOML = _FT("fcoml"); extern const fcml_cstring M_FCOMP = _FT("fcomp"); extern const fcml_cstring M_FCOMPL = _FT("fcompl"); extern const fcml_cstring M_FCOMPP = _FT("fcompp"); extern const fcml_cstring M_FCOMPS = _FT("fcomps"); extern const fcml_cstring M_FCOMS = _FT("fcoms"); extern const fcml_cstring M_FCOS = _FT("fcos"); extern const fcml_cstring M_FDECSTP = _FT("fdecstp"); extern const fcml_cstring M_FDIV = _FT("fdiv"); extern const fcml_cstring M_FDIVL = _FT("fdivl"); extern const fcml_cstring M_FDIVP = _FT("fdivp"); extern const fcml_cstring M_FDIVR = _FT("fdivr"); extern const fcml_cstring M_FDIVRL = _FT("fdivrl"); extern const fcml_cstring M_FDIVRP = _FT("fdivrp"); extern const fcml_cstring M_FDIVRS = _FT("fdivrs"); extern const fcml_cstring M_FDIVS = _FT("fdivs"); extern const fcml_cstring M_FEMMS = _FT("femms"); extern const fcml_cstring M_FFREE = _FT("ffree"); extern const fcml_cstring M_FIADD = _FT("fiadd"); extern const fcml_cstring M_FIADDL = _FT("fiaddl"); extern const fcml_cstring M_FICOM = _FT("ficom"); extern const fcml_cstring M_FICOML = _FT("ficoml"); extern const fcml_cstring M_FICOMP = _FT("ficomp"); extern const fcml_cstring M_FICOMPL = _FT("ficompl"); extern const fcml_cstring M_FIDIV = _FT("fidiv"); extern const fcml_cstring M_FIDIVL = _FT("fidivl"); extern const fcml_cstring M_FIDIVR = _FT("fidivr"); extern const fcml_cstring M_FIDIVRL = _FT("fidivrl"); extern const fcml_cstring M_FILD = _FT("fild"); extern const fcml_cstring M_FILDL = _FT("fildl"); extern const fcml_cstring M_FILDLL = _FT("fildll"); extern const fcml_cstring M_FIMUL = _FT("fimul"); extern const fcml_cstring M_FIMULL = _FT("fimull"); extern const fcml_cstring M_FINCSTP = _FT("fincstp"); extern const fcml_cstring M_FINIT = _FT("finit"); extern const fcml_cstring M_FIST = _FT("fist"); extern const fcml_cstring M_FISTL = _FT("fistl"); extern const fcml_cstring M_FISTP = _FT("fistp"); extern const fcml_cstring M_FISTPL = _FT("fistpl"); extern const fcml_cstring M_FISTPLL = _FT("fistpll"); extern const fcml_cstring M_FISTTP = _FT("fisttp"); extern const fcml_cstring M_FISTTPL = _FT("fisttpl"); extern const fcml_cstring M_FISTTPLL = _FT("fisttpll"); extern const fcml_cstring M_FISUB = _FT("fisub"); extern const fcml_cstring M_FISUBL = _FT("fisubl"); extern const fcml_cstring M_FISUBR = _FT("fisubr"); extern const fcml_cstring M_FISUBRL = _FT("fisubrl"); extern const fcml_cstring M_FLD = _FT("fld"); extern const fcml_cstring M_FLD1 = _FT("fld1"); extern const fcml_cstring M_FLDCW = _FT("fldcw"); extern const fcml_cstring M_FLDENV = _FT("fldenv"); extern const fcml_cstring M_FLDENVS = _FT("fldenvs"); extern const fcml_cstring M_FLDL = _FT("fldl"); extern const fcml_cstring M_FLDL2E = _FT("fldl2e"); extern const fcml_cstring M_FLDL2T = _FT("fldl2t"); extern const fcml_cstring M_FLDLG2 = _FT("fldlg2"); extern const fcml_cstring M_FLDLN2 = _FT("fldln2"); extern const fcml_cstring M_FLDPI = _FT("fldpi"); extern const fcml_cstring M_FLDS = _FT("flds"); extern const fcml_cstring M_FLDT = _FT("fldt"); extern const fcml_cstring M_FLDZ = _FT("fldz"); extern const fcml_cstring M_FMUL = _FT("fmul"); extern const fcml_cstring M_FMULL = _FT("fmull"); extern const fcml_cstring M_FMULP = _FT("fmulp"); extern const fcml_cstring M_FMULS = _FT("fmuls"); extern const fcml_cstring M_FNCLEX = _FT("fnclex"); extern const fcml_cstring M_FNINIT = _FT("fninit"); extern const fcml_cstring M_FNOP = _FT("fnop"); extern const fcml_cstring M_FNSAVE = _FT("fnsave"); extern const fcml_cstring M_FNSAVES = _FT("fnsaves"); extern const fcml_cstring M_FNSTCW = _FT("fnstcw"); extern const fcml_cstring M_FNSTENV = _FT("fnstenv"); extern const fcml_cstring M_FNSTENVS = _FT("fnstenvs"); extern const fcml_cstring M_FNSTSW = _FT("fnstsw"); extern const fcml_cstring M_FPATAN = _FT("fpatan"); extern const fcml_cstring M_FPREM = _FT("fprem"); extern const fcml_cstring M_FPREM1 = _FT("fprem1"); extern const fcml_cstring M_FPTAN = _FT("fptan"); extern const fcml_cstring M_FRNDINT = _FT("frndint"); extern const fcml_cstring M_FRSTOR = _FT("frstor"); extern const fcml_cstring M_FRSTORS = _FT("frstors"); extern const fcml_cstring M_FSAVE = _FT("fsave"); extern const fcml_cstring M_FSAVES = _FT("fsaves"); extern const fcml_cstring M_FSCALE = _FT("fscale"); extern const fcml_cstring M_FSIN = _FT("fsin"); extern const fcml_cstring M_FSINCOS = _FT("fsincos"); extern const fcml_cstring M_FSQRT = _FT("fsqrt"); extern const fcml_cstring M_FST = _FT("fst"); extern const fcml_cstring M_FSTCW = _FT("fstcw"); extern const fcml_cstring M_FSTENV = _FT("fstenv"); extern const fcml_cstring M_FSTENVS = _FT("fstenvs"); extern const fcml_cstring M_FSTL = _FT("fstl"); extern const fcml_cstring M_FSTP = _FT("fstp"); extern const fcml_cstring M_FSTPL = _FT("fstpl"); extern const fcml_cstring M_FSTPS = _FT("fstps"); extern const fcml_cstring M_FSTPT = _FT("fstpt"); extern const fcml_cstring M_FSTS = _FT("fsts"); extern const fcml_cstring M_FSTSW = _FT("fstsw"); extern const fcml_cstring M_FSUB = _FT("fsub"); extern const fcml_cstring M_FSUBL = _FT("fsubl"); extern const fcml_cstring M_FSUBP = _FT("fsubp"); extern const fcml_cstring M_FSUBR = _FT("fsubr"); extern const fcml_cstring M_FSUBRL = _FT("fsubrl"); extern const fcml_cstring M_FSUBRP = _FT("fsubrp"); extern const fcml_cstring M_FSUBRS = _FT("fsubrs"); extern const fcml_cstring M_FSUBS = _FT("fsubs"); extern const fcml_cstring M_FTST = _FT("ftst"); extern const fcml_cstring M_FUCOM = _FT("fucom"); extern const fcml_cstring M_FUCOMI = _FT("fucomi"); extern const fcml_cstring M_FUCOMIP = _FT("fucomip"); extern const fcml_cstring M_FUCOMP = _FT("fucomp"); extern const fcml_cstring M_FUCOMPP = _FT("fucompp"); extern const fcml_cstring M_FWAIT = _FT("fwait"); extern const fcml_cstring M_FXAM = _FT("fxam"); extern const fcml_cstring M_FXCH = _FT("fxch"); extern const fcml_cstring M_FXRSTOR = _FT("fxrstor"); extern const fcml_cstring M_FXRSTOR64 = _FT("fxrstor64"); extern const fcml_cstring M_FXSAVE = _FT("fxsave"); extern const fcml_cstring M_FXSAVE64 = _FT("fxsave64"); extern const fcml_cstring M_FXTRACT = _FT("fxtract"); extern const fcml_cstring M_FYL2X = _FT("fyl2x"); extern const fcml_cstring M_FYL2XP1 = _FT("fyl2xp1"); extern const fcml_cstring M_GETSEC = _FT("getsec"); extern const fcml_cstring M_HADDPD = _FT("haddpd"); extern const fcml_cstring M_HADDPS = _FT("haddps"); extern const fcml_cstring M_HLT = _FT("hlt"); extern const fcml_cstring M_HSUBPD = _FT("hsubpd"); extern const fcml_cstring M_HSUBPS = _FT("hsubps"); extern const fcml_cstring M_IDIV = _FT("idiv"); extern const fcml_cstring M_IDIVB = _FT("idivb"); extern const fcml_cstring M_IDIVL = _FT("idivl"); extern const fcml_cstring M_IDIVQ = _FT("idivq"); extern const fcml_cstring M_IDIVW = _FT("idivw"); extern const fcml_cstring M_IMUL = _FT("imul"); extern const fcml_cstring M_IMULB = _FT("imulb"); extern const fcml_cstring M_IMULL = _FT("imull"); extern const fcml_cstring M_IMULQ = _FT("imulq"); extern const fcml_cstring M_IMULW = _FT("imulw"); extern const fcml_cstring M_IN = _FT("in"); extern const fcml_cstring M_INC = _FT("inc"); extern const fcml_cstring M_INCB = _FT("incb"); extern const fcml_cstring M_INCL = _FT("incl"); extern const fcml_cstring M_INCQ = _FT("incq"); extern const fcml_cstring M_INCW = _FT("incw"); extern const fcml_cstring M_INSB = _FT("insb"); extern const fcml_cstring M_INSERTPS = _FT("insertps"); extern const fcml_cstring M_INSERTQ = _FT("insertq"); extern const fcml_cstring M_INSL = _FT("insl"); extern const fcml_cstring M_INSW = _FT("insw"); extern const fcml_cstring M_INT = _FT("int"); extern const fcml_cstring M_INT3 = _FT("int3"); extern const fcml_cstring M_INTO = _FT("into"); extern const fcml_cstring M_INVD = _FT("invd"); extern const fcml_cstring M_INVEPT = _FT("invept"); extern const fcml_cstring M_INVLPG = _FT("invlpg"); extern const fcml_cstring M_INVLPGA = _FT("invlpga"); extern const fcml_cstring M_INVPCID = _FT("invpcid"); extern const fcml_cstring M_INVVPID = _FT("invvpid"); extern const fcml_cstring M_IRET = _FT("iret"); extern const fcml_cstring M_IRETQ = _FT("iretq"); extern const fcml_cstring M_IRETW = _FT("iretw"); extern const fcml_cstring M_JO = _FT("jo"); extern const fcml_cstring M_JNO = _FT("jno"); extern const fcml_cstring M_JB = _FT("jb"); extern const fcml_cstring M_JNB = _FT("jnb"); extern const fcml_cstring M_JE = _FT("je"); extern const fcml_cstring M_JNE = _FT("jne"); extern const fcml_cstring M_JBE = _FT("jbe"); extern const fcml_cstring M_JNBE = _FT("jnbe"); extern const fcml_cstring M_JS = _FT("js"); extern const fcml_cstring M_JNS = _FT("jns"); extern const fcml_cstring M_JP = _FT("jp"); extern const fcml_cstring M_JNP = _FT("jnp"); extern const fcml_cstring M_JL = _FT("jl"); extern const fcml_cstring M_JNL = _FT("jnl"); extern const fcml_cstring M_JLE = _FT("jle"); extern const fcml_cstring M_JNLE = _FT("jnle"); extern const fcml_cstring M_JNAE = _FT("jnae"); extern const fcml_cstring M_JAE = _FT("jae"); extern const fcml_cstring M_JZ = _FT("jz"); extern const fcml_cstring M_JNZ = _FT("jnz"); extern const fcml_cstring M_JNA = _FT("jna"); extern const fcml_cstring M_JA = _FT("ja"); extern const fcml_cstring M_JPE = _FT("jpe"); extern const fcml_cstring M_JPO = _FT("jpo"); extern const fcml_cstring M_JNGE = _FT("jnge"); extern const fcml_cstring M_JGE = _FT("jge"); extern const fcml_cstring M_JNG = _FT("jng"); extern const fcml_cstring M_JG = _FT("jg"); extern const fcml_cstring M_JC = _FT("jc"); extern const fcml_cstring M_JNC = _FT("jnc"); extern const fcml_cstring M_JCXZ = _FT("jcxz"); extern const fcml_cstring M_JECXZ = _FT("jecxz"); extern const fcml_cstring M_JMP = _FT("jmp"); extern const fcml_cstring M_JMPQ = _FT("jmpq"); extern const fcml_cstring M_JMPW = _FT("jmpw"); extern const fcml_cstring M_JRCXZ = _FT("jrcxz"); extern const fcml_cstring M_LAHF = _FT("lahf"); extern const fcml_cstring M_LAR = _FT("lar"); extern const fcml_cstring M_LCALL = _FT("lcall"); extern const fcml_cstring M_LCALLQ = _FT("lcallq"); extern const fcml_cstring M_LCALLW = _FT("lcallw"); extern const fcml_cstring M_LDDQU = _FT("lddqu"); extern const fcml_cstring M_LDMXCSR = _FT("ldmxcsr"); extern const fcml_cstring M_LDS = _FT("lds"); extern const fcml_cstring M_LEA = _FT("lea"); extern const fcml_cstring M_LEAVE = _FT("leave"); extern const fcml_cstring M_LES = _FT("les"); extern const fcml_cstring M_LFENCE = _FT("lfence"); extern const fcml_cstring M_LFS = _FT("lfs"); extern const fcml_cstring M_LGDT = _FT("lgdt"); extern const fcml_cstring M_LGS = _FT("lgs"); extern const fcml_cstring M_LIDT = _FT("lidt"); extern const fcml_cstring M_LJMP = _FT("ljmp"); extern const fcml_cstring M_LJMPL = _FT("ljmpl"); extern const fcml_cstring M_LJMPQ = _FT("ljmpq"); extern const fcml_cstring M_LJMPW = _FT("ljmpw"); extern const fcml_cstring M_LLDT = _FT("lldt"); extern const fcml_cstring M_LLWPCB = _FT("llwpcb"); extern const fcml_cstring M_LMSW = _FT("lmsw"); extern const fcml_cstring M_LODS = _FT("lods"); extern const fcml_cstring M_LODSB = _FT("lodsb"); extern const fcml_cstring M_LODSL = _FT("lodsl"); extern const fcml_cstring M_LODSQ = _FT("lodsq"); extern const fcml_cstring M_LODSW = _FT("lodsw"); extern const fcml_cstring M_LOOP = _FT("loop"); extern const fcml_cstring M_LOOPE = _FT("loope"); extern const fcml_cstring M_LOOPNE = _FT("loopne"); extern const fcml_cstring M_LOOPNZ = _FT("loopnz"); extern const fcml_cstring M_LOOPZ = _FT("loopz"); extern const fcml_cstring M_LRET = _FT("lret"); extern const fcml_cstring M_LRETQ = _FT("lretq"); extern const fcml_cstring M_LRETW = _FT("lretw"); extern const fcml_cstring M_LSL = _FT("lsl"); extern const fcml_cstring M_LSS = _FT("lss"); extern const fcml_cstring M_LTR = _FT("ltr"); extern const fcml_cstring M_LWPINS = _FT("lwpins"); extern const fcml_cstring M_LWPVAL = _FT("lwpval"); extern const fcml_cstring M_LZCNT = _FT("lzcnt"); extern const fcml_cstring M_MASKMOVDQU = _FT("maskmovdqu"); extern const fcml_cstring M_MASKMOVQ = _FT("maskmovq"); extern const fcml_cstring M_MAXPD = _FT("maxpd"); extern const fcml_cstring M_MAXPS = _FT("maxps"); extern const fcml_cstring M_MAXSD = _FT("maxsd"); extern const fcml_cstring M_MAXSS = _FT("maxss"); extern const fcml_cstring M_MFENCE = _FT("mfence"); extern const fcml_cstring M_MINPD = _FT("minpd"); extern const fcml_cstring M_MINPS = _FT("minps"); extern const fcml_cstring M_MINSD = _FT("minsd"); extern const fcml_cstring M_MINSS = _FT("minss"); extern const fcml_cstring M_MONITOR = _FT("monitor"); extern const fcml_cstring M_MOV = _FT("mov"); extern const fcml_cstring M_MOVABS = _FT("movabs"); extern const fcml_cstring M_MOVAPD = _FT("movapd"); extern const fcml_cstring M_MOVAPS = _FT("movaps"); extern const fcml_cstring M_MOVB = _FT("movb"); extern const fcml_cstring M_MOVBE = _FT("movbe"); extern const fcml_cstring M_MOVD = _FT("movd"); extern const fcml_cstring M_MOVDDUP = _FT("movddup"); extern const fcml_cstring M_MOVDQ2Q = _FT("movdq2q"); extern const fcml_cstring M_MOVDQA = _FT("movdqa"); extern const fcml_cstring M_MOVDQU = _FT("movdqu"); extern const fcml_cstring M_MOVHLPS = _FT("movhlps"); extern const fcml_cstring M_MOVHPD = _FT("movhpd"); extern const fcml_cstring M_MOVHPS = _FT("movhps"); extern const fcml_cstring M_MOVL = _FT("movl"); extern const fcml_cstring M_MOVLHPS = _FT("movlhps"); extern const fcml_cstring M_MOVLPD = _FT("movlpd"); extern const fcml_cstring M_MOVLPS = _FT("movlps"); extern const fcml_cstring M_MOVMSKPD = _FT("movmskpd"); extern const fcml_cstring M_MOVMSKPS = _FT("movmskps"); extern const fcml_cstring M_MOVNTDQ = _FT("movntdq"); extern const fcml_cstring M_MOVNTDQA = _FT("movntdqa"); extern const fcml_cstring M_MOVNTI = _FT("movnti"); extern const fcml_cstring M_MOVNTPD = _FT("movntpd"); extern const fcml_cstring M_MOVNTPS = _FT("movntps"); extern const fcml_cstring M_MOVNTQ = _FT("movntq"); extern const fcml_cstring M_MOVNTSD = _FT("movntsd"); extern const fcml_cstring M_MOVNTSS = _FT("movntss"); extern const fcml_cstring M_MOVQ = _FT("movq"); extern const fcml_cstring M_MOVQ2DQ = _FT("movq2dq"); extern const fcml_cstring M_MOVS = _FT("movs"); extern const fcml_cstring M_MOVSB = _FT("movsb"); extern const fcml_cstring M_MOVSBL = _FT("movsbl"); extern const fcml_cstring M_MOVSBQ = _FT("movsbq"); extern const fcml_cstring M_MOVSBW = _FT("movsbw"); extern const fcml_cstring M_MOVSD = _FT("movsd"); extern const fcml_cstring M_MOVSHDUP = _FT("movshdup"); extern const fcml_cstring M_MOVSL = _FT("movsl"); extern const fcml_cstring M_MOVSLDUP = _FT("movsldup"); extern const fcml_cstring M_MOVSQ = _FT("movsq"); extern const fcml_cstring M_MOVSS = _FT("movss"); extern const fcml_cstring M_MOVSW = _FT("movsw"); extern const fcml_cstring M_MOVSWL = _FT("movswl"); extern const fcml_cstring M_MOVSWQ = _FT("movswq"); extern const fcml_cstring M_MOVSWW = _FT("movsww"); extern const fcml_cstring M_MOVSXD = _FT("movsxd"); extern const fcml_cstring M_MOVUPD = _FT("movupd"); extern const fcml_cstring M_MOVUPS = _FT("movups"); extern const fcml_cstring M_MOVW = _FT("movw"); extern const fcml_cstring M_MOVZBL = _FT("movzbl"); extern const fcml_cstring M_MOVZBQ = _FT("movzbq"); extern const fcml_cstring M_MOVZBW = _FT("movzbw"); extern const fcml_cstring M_MOVZWL = _FT("movzwl"); extern const fcml_cstring M_MOVZWQ = _FT("movzwq"); extern const fcml_cstring M_MOVZWW = _FT("movzww"); extern const fcml_cstring M_MPSADBW = _FT("mpsadbw"); extern const fcml_cstring M_MUL = _FT("mul"); extern const fcml_cstring M_MULB = _FT("mulb"); extern const fcml_cstring M_MULL = _FT("mull"); extern const fcml_cstring M_MULPD = _FT("mulpd"); extern const fcml_cstring M_MULPS = _FT("mulps"); extern const fcml_cstring M_MULQ = _FT("mulq"); extern const fcml_cstring M_MULSD = _FT("mulsd"); extern const fcml_cstring M_MULSS = _FT("mulss"); extern const fcml_cstring M_MULW = _FT("mulw"); extern const fcml_cstring M_MULX = _FT("mulx"); extern const fcml_cstring M_MWAIT = _FT("mwait"); extern const fcml_cstring M_NEG = _FT("neg"); extern const fcml_cstring M_NEGB = _FT("negb"); extern const fcml_cstring M_NEGL = _FT("negl"); extern const fcml_cstring M_NEGQ = _FT("negq"); extern const fcml_cstring M_NEGW = _FT("negw"); extern const fcml_cstring M_NOP = _FT("nop"); extern const fcml_cstring M_NOPL = _FT("nopl"); extern const fcml_cstring M_NOPQ = _FT("nopq"); extern const fcml_cstring M_NOPW = _FT("nopw"); extern const fcml_cstring M_NOT = _FT("not"); extern const fcml_cstring M_NOTB = _FT("notb"); extern const fcml_cstring M_NOTL = _FT("notl"); extern const fcml_cstring M_NOTQ = _FT("notq"); extern const fcml_cstring M_NOTW = _FT("notw"); extern const fcml_cstring M_OR = _FT("or"); extern const fcml_cstring M_ORB = _FT("orb"); extern const fcml_cstring M_ORL = _FT("orl"); extern const fcml_cstring M_ORPD = _FT("orpd"); extern const fcml_cstring M_ORPS = _FT("orps"); extern const fcml_cstring M_ORQ = _FT("orq"); extern const fcml_cstring M_ORW = _FT("orw"); extern const fcml_cstring M_OUT = _FT("out"); extern const fcml_cstring M_OUTSB = _FT("outsb"); extern const fcml_cstring M_OUTSL = _FT("outsl"); extern const fcml_cstring M_OUTSW = _FT("outsw"); extern const fcml_cstring M_PABSB = _FT("pabsb"); extern const fcml_cstring M_PABSD = _FT("pabsd"); extern const fcml_cstring M_PABSW = _FT("pabsw"); extern const fcml_cstring M_PACKSSDW = _FT("packssdw"); extern const fcml_cstring M_PACKSSWB = _FT("packsswb"); extern const fcml_cstring M_PACKUSDW = _FT("packusdw"); extern const fcml_cstring M_PACKUSWB = _FT("packuswb"); extern const fcml_cstring M_PADDB = _FT("paddb"); extern const fcml_cstring M_PADDD = _FT("paddd"); extern const fcml_cstring M_PADDQ = _FT("paddq"); extern const fcml_cstring M_PADDSB = _FT("paddsb"); extern const fcml_cstring M_PADDSW = _FT("paddsw"); extern const fcml_cstring M_PADDUSB = _FT("paddusb"); extern const fcml_cstring M_PADDUSW = _FT("paddusw"); extern const fcml_cstring M_PADDW = _FT("paddw"); extern const fcml_cstring M_PALIGNR = _FT("palignr"); extern const fcml_cstring M_PAND = _FT("pand"); extern const fcml_cstring M_PANDN = _FT("pandn"); extern const fcml_cstring M_PAUSE = _FT("pause"); extern const fcml_cstring M_PAVGB = _FT("pavgb"); extern const fcml_cstring M_PAVGUSB = _FT("pavgusb"); extern const fcml_cstring M_PAVGW = _FT("pavgw"); extern const fcml_cstring M_PBLENDVB = _FT("pblendvb"); extern const fcml_cstring M_PBLENDW = _FT("pblendw"); extern const fcml_cstring M_PCLMULQDQ = _FT("pclmulqdq"); extern const fcml_cstring M_PCMPEQB = _FT("pcmpeqb"); extern const fcml_cstring M_PCMPEQD = _FT("pcmpeqd"); extern const fcml_cstring M_PCMPEQQ = _FT("pcmpeqq"); extern const fcml_cstring M_PCMPEQW = _FT("pcmpeqw"); extern const fcml_cstring M_PCMPESTRI = _FT("pcmpestri"); extern const fcml_cstring M_PCMPESTRM = _FT("pcmpestrm"); extern const fcml_cstring M_PCMPGTB = _FT("pcmpgtb"); extern const fcml_cstring M_PCMPGTD = _FT("pcmpgtd"); extern const fcml_cstring M_PCMPGTQ = _FT("pcmpgtq"); extern const fcml_cstring M_PCMPGTW = _FT("pcmpgtw"); extern const fcml_cstring M_PCMPISTRI = _FT("pcmpistri"); extern const fcml_cstring M_PCMPISTRM = _FT("pcmpistrm"); extern const fcml_cstring M_PDEP = _FT("pdep"); extern const fcml_cstring M_PEXT = _FT("pext"); extern const fcml_cstring M_PEXTRB = _FT("pextrb"); extern const fcml_cstring M_PEXTRD = _FT("pextrd"); extern const fcml_cstring M_PEXTRQ = _FT("pextrq"); extern const fcml_cstring M_PEXTRW = _FT("pextrw"); extern const fcml_cstring M_PF2ID = _FT("pf2id"); extern const fcml_cstring M_PF2IW = _FT("pf2iw"); extern const fcml_cstring M_PFACC = _FT("pfacc"); extern const fcml_cstring M_PFADD = _FT("pfadd"); extern const fcml_cstring M_PFCMPEQ = _FT("pfcmpeq"); extern const fcml_cstring M_PFCMPGE = _FT("pfcmpge"); extern const fcml_cstring M_PFCMPGT = _FT("pfcmpgt"); extern const fcml_cstring M_PFMAX = _FT("pfmax"); extern const fcml_cstring M_PFMIN = _FT("pfmin"); extern const fcml_cstring M_PFMUL = _FT("pfmul"); extern const fcml_cstring M_PFNACC = _FT("pfnacc"); extern const fcml_cstring M_PFPNACC = _FT("pfpnacc"); extern const fcml_cstring M_PFRCP = _FT("pfrcp"); extern const fcml_cstring M_PFRCPIT1 = _FT("pfrcpit1"); extern const fcml_cstring M_PFRCPIT2 = _FT("pfrcpit2"); extern const fcml_cstring M_PFRSQIT1 = _FT("pfrsqit1"); extern const fcml_cstring M_PFRSQRT = _FT("pfrsqrt"); extern const fcml_cstring M_PFSUB = _FT("pfsub"); extern const fcml_cstring M_PFSUBR = _FT("pfsubr"); extern const fcml_cstring M_PHADDD = _FT("phaddd"); extern const fcml_cstring M_PHADDSW = _FT("phaddsw"); extern const fcml_cstring M_PHADDW = _FT("phaddw"); extern const fcml_cstring M_PHMINPOSUW = _FT("phminposuw"); extern const fcml_cstring M_PHSUBD = _FT("phsubd"); extern const fcml_cstring M_PHSUBSW = _FT("phsubsw"); extern const fcml_cstring M_PHSUBW = _FT("phsubw"); extern const fcml_cstring M_PI2FD = _FT("pi2fd"); extern const fcml_cstring M_PI2FW = _FT("pi2fw"); extern const fcml_cstring M_PINSRB = _FT("pinsrb"); extern const fcml_cstring M_PINSRD = _FT("pinsrd"); extern const fcml_cstring M_PINSRQ = _FT("pinsrq"); extern const fcml_cstring M_PINSRW = _FT("pinsrw"); extern const fcml_cstring M_PMADDUBSW = _FT("pmaddubsw"); extern const fcml_cstring M_PMADDWD = _FT("pmaddwd"); extern const fcml_cstring M_PMAXSB = _FT("pmaxsb"); extern const fcml_cstring M_PMAXSD = _FT("pmaxsd"); extern const fcml_cstring M_PMAXSW = _FT("pmaxsw"); extern const fcml_cstring M_PMAXUB = _FT("pmaxub"); extern const fcml_cstring M_PMAXUD = _FT("pmaxud"); extern const fcml_cstring M_PMAXUW = _FT("pmaxuw"); extern const fcml_cstring M_PMINSB = _FT("pminsb"); extern const fcml_cstring M_PMINSD = _FT("pminsd"); extern const fcml_cstring M_PMINSW = _FT("pminsw"); extern const fcml_cstring M_PMINUB = _FT("pminub"); extern const fcml_cstring M_PMINUD = _FT("pminud"); extern const fcml_cstring M_PMINUW = _FT("pminuw"); extern const fcml_cstring M_PMOVMSKB = _FT("pmovmskb"); extern const fcml_cstring M_PMOVSXBD = _FT("pmovsxbd"); extern const fcml_cstring M_PMOVSXBQ = _FT("pmovsxbq"); extern const fcml_cstring M_PMOVSXBW = _FT("pmovsxbw"); extern const fcml_cstring M_PMOVSXDQ = _FT("pmovsxdq"); extern const fcml_cstring M_PMOVSXWD = _FT("pmovsxwd"); extern const fcml_cstring M_PMOVSXWQ = _FT("pmovsxwq"); extern const fcml_cstring M_PMOVZXBD = _FT("pmovzxbd"); extern const fcml_cstring M_PMOVZXBQ = _FT("pmovzxbq"); extern const fcml_cstring M_PMOVZXBW = _FT("pmovzxbw"); extern const fcml_cstring M_PMOVZXDQ = _FT("pmovzxdq"); extern const fcml_cstring M_PMOVZXWD = _FT("pmovzxwd"); extern const fcml_cstring M_PMOVZXWQ = _FT("pmovzxwq"); extern const fcml_cstring M_PMULDQ = _FT("pmuldq"); extern const fcml_cstring M_PMULHRSW = _FT("pmulhrsw"); extern const fcml_cstring M_PMULHRW = _FT("pmulhrw"); extern const fcml_cstring M_PMULHUW = _FT("pmulhuw"); extern const fcml_cstring M_PMULHW = _FT("pmulhw"); extern const fcml_cstring M_PMULLD = _FT("pmulld"); extern const fcml_cstring M_PMULLW = _FT("pmullw"); extern const fcml_cstring M_PMULUDQ = _FT("pmuludq"); extern const fcml_cstring M_POP = _FT("pop"); extern const fcml_cstring M_POPA = _FT("popa"); extern const fcml_cstring M_POPAW = _FT("popaw"); extern const fcml_cstring M_POPCNT = _FT("popcnt"); extern const fcml_cstring M_POPF = _FT("popf"); extern const fcml_cstring M_POPFQ = _FT("popfq"); extern const fcml_cstring M_POPFW = _FT("popfw"); extern const fcml_cstring M_POPL = _FT("popl"); extern const fcml_cstring M_POPQ = _FT("popq"); extern const fcml_cstring M_POPW = _FT("popw"); extern const fcml_cstring M_POR = _FT("por"); extern const fcml_cstring M_PREFETCH = _FT("prefetch"); extern const fcml_cstring M_PREFETCHNTA = _FT("prefetchnta"); extern const fcml_cstring M_PREFETCHT0 = _FT("prefetcht0"); extern const fcml_cstring M_PREFETCHT1 = _FT("prefetcht1"); extern const fcml_cstring M_PREFETCHT2 = _FT("prefetcht2"); extern const fcml_cstring M_PREFETCHW = _FT("prefetchw"); extern const fcml_cstring M_PSADBW = _FT("psadbw"); extern const fcml_cstring M_PSHUFB = _FT("pshufb"); extern const fcml_cstring M_PSHUFD = _FT("pshufd"); extern const fcml_cstring M_PSHUFHW = _FT("pshufhw"); extern const fcml_cstring M_PSHUFLW = _FT("pshuflw"); extern const fcml_cstring M_PSHUFW = _FT("pshufw"); extern const fcml_cstring M_PSIGNB = _FT("psignb"); extern const fcml_cstring M_PSIGND = _FT("psignd"); extern const fcml_cstring M_PSIGNW = _FT("psignw"); extern const fcml_cstring M_PSLLD = _FT("pslld"); extern const fcml_cstring M_PSLLDQ = _FT("pslldq"); extern const fcml_cstring M_PSLLQ = _FT("psllq"); extern const fcml_cstring M_PSLLW = _FT("psllw"); extern const fcml_cstring M_PSRAD = _FT("psrad"); extern const fcml_cstring M_PSRAW = _FT("psraw"); extern const fcml_cstring M_PSRLD = _FT("psrld"); extern const fcml_cstring M_PSRLDQ = _FT("psrldq"); extern const fcml_cstring M_PSRLQ = _FT("psrlq"); extern const fcml_cstring M_PSRLW = _FT("psrlw"); extern const fcml_cstring M_PSUBB = _FT("psubb"); extern const fcml_cstring M_PSUBD = _FT("psubd"); extern const fcml_cstring M_PSUBQ = _FT("psubq"); extern const fcml_cstring M_PSUBSB = _FT("psubsb"); extern const fcml_cstring M_PSUBSW = _FT("psubsw"); extern const fcml_cstring M_PSUBUSB = _FT("psubusb"); extern const fcml_cstring M_PSUBUSW = _FT("psubusw"); extern const fcml_cstring M_PSUBW = _FT("psubw"); extern const fcml_cstring M_PSWAPD = _FT("pswapd"); extern const fcml_cstring M_PTEST = _FT("ptest"); extern const fcml_cstring M_PUNPCKHBW = _FT("punpckhbw"); extern const fcml_cstring M_PUNPCKHDQ = _FT("punpckhdq"); extern const fcml_cstring M_PUNPCKHQDQ = _FT("punpckhqdq"); extern const fcml_cstring M_PUNPCKHWD = _FT("punpckhwd"); extern const fcml_cstring M_PUNPCKLBW = _FT("punpcklbw"); extern const fcml_cstring M_PUNPCKLDQ = _FT("punpckldq"); extern const fcml_cstring M_PUNPCKLQDQ = _FT("punpcklqdq"); extern const fcml_cstring M_PUNPCKLWD = _FT("punpcklwd"); extern const fcml_cstring M_PUSH = _FT("push"); extern const fcml_cstring M_PUSHA = _FT("pusha"); extern const fcml_cstring M_PUSHAW = _FT("pushaw"); extern const fcml_cstring M_PUSHB = _FT("pushb"); extern const fcml_cstring M_PUSHF = _FT("pushf"); extern const fcml_cstring M_PUSHFQ = _FT("pushfq"); extern const fcml_cstring M_PUSHFW = _FT("pushfw"); extern const fcml_cstring M_PUSHL = _FT("pushl"); extern const fcml_cstring M_PUSHQ = _FT("pushq"); extern const fcml_cstring M_PUSHW = _FT("pushw"); extern const fcml_cstring M_PXOR = _FT("pxor"); extern const fcml_cstring M_RCL = _FT("rcl"); extern const fcml_cstring M_RCLB = _FT("rclb"); extern const fcml_cstring M_RCLL = _FT("rcll"); extern const fcml_cstring M_RCLQ = _FT("rclq"); extern const fcml_cstring M_RCLW = _FT("rclw"); extern const fcml_cstring M_RCPPS = _FT("rcpps"); extern const fcml_cstring M_RCPSS = _FT("rcpss"); extern const fcml_cstring M_RCR = _FT("rcr"); extern const fcml_cstring M_RCRB = _FT("rcrb"); extern const fcml_cstring M_RCRL = _FT("rcrl"); extern const fcml_cstring M_RCRQ = _FT("rcrq"); extern const fcml_cstring M_RCRW = _FT("rcrw"); extern const fcml_cstring M_RDFSBASE = _FT("rdfsbase"); extern const fcml_cstring M_RDGSBASE = _FT("rdgsbase"); extern const fcml_cstring M_RDMSR = _FT("rdmsr"); extern const fcml_cstring M_RDPMC = _FT("rdpmc"); extern const fcml_cstring M_RDRAND = _FT("rdrand"); extern const fcml_cstring M_RDSEED = _FT("rdseed"); extern const fcml_cstring M_RDTSC = _FT("rdtsc"); extern const fcml_cstring M_RDTSCP = _FT("rdtscp"); extern const fcml_cstring M_RET = _FT("ret"); extern const fcml_cstring M_RETQ = _FT("retq"); extern const fcml_cstring M_RETW = _FT("retw"); extern const fcml_cstring M_ROL = _FT("rol"); extern const fcml_cstring M_ROLB = _FT("rolb"); extern const fcml_cstring M_ROLL = _FT("roll"); extern const fcml_cstring M_ROLQ = _FT("rolq"); extern const fcml_cstring M_ROLW = _FT("rolw"); extern const fcml_cstring M_ROR = _FT("ror"); extern const fcml_cstring M_RORB = _FT("rorb"); extern const fcml_cstring M_RORL = _FT("rorl"); extern const fcml_cstring M_RORQ = _FT("rorq"); extern const fcml_cstring M_RORW = _FT("rorw"); extern const fcml_cstring M_RORX = _FT("rorx"); extern const fcml_cstring M_ROUNDPD = _FT("roundpd"); extern const fcml_cstring M_ROUNDPS = _FT("roundps"); extern const fcml_cstring M_ROUNDSD = _FT("roundsd"); extern const fcml_cstring M_ROUNDSS = _FT("roundss"); extern const fcml_cstring M_RSM = _FT("rsm"); extern const fcml_cstring M_RSQRTPS = _FT("rsqrtps"); extern const fcml_cstring M_RSQRTSS = _FT("rsqrtss"); extern const fcml_cstring M_SAHF = _FT("sahf"); extern const fcml_cstring M_SAL = _FT("sal"); extern const fcml_cstring M_SALB = _FT("salb"); extern const fcml_cstring M_SALL = _FT("sall"); extern const fcml_cstring M_SALQ = _FT("salq"); extern const fcml_cstring M_SALW = _FT("salw"); extern const fcml_cstring M_SAR = _FT("sar"); extern const fcml_cstring M_SARB = _FT("sarb"); extern const fcml_cstring M_SARL = _FT("sarl"); extern const fcml_cstring M_SARQ = _FT("sarq"); extern const fcml_cstring M_SARW = _FT("sarw"); extern const fcml_cstring M_SARX = _FT("sarx"); extern const fcml_cstring M_SBB = _FT("sbb"); extern const fcml_cstring M_SBBB = _FT("sbbb"); extern const fcml_cstring M_SBBL = _FT("sbbl"); extern const fcml_cstring M_SBBQ = _FT("sbbq"); extern const fcml_cstring M_SBBW = _FT("sbbw"); extern const fcml_cstring M_SCAS = _FT("scas"); extern const fcml_cstring M_SCASB = _FT("scasb"); extern const fcml_cstring M_SCASL = _FT("scasl"); extern const fcml_cstring M_SCASQ = _FT("scasq"); extern const fcml_cstring M_SCASW = _FT("scasw"); extern const fcml_cstring M_SETO = _FT("seto"); extern const fcml_cstring M_SETNO = _FT("setno"); extern const fcml_cstring M_SETB = _FT("setb"); extern const fcml_cstring M_SETNB = _FT("setnb"); extern const fcml_cstring M_SETE = _FT("sete"); extern const fcml_cstring M_SETNE = _FT("setne"); extern const fcml_cstring M_SETBE = _FT("setbe"); extern const fcml_cstring M_SETNBE = _FT("setnbe"); extern const fcml_cstring M_SETS = _FT("sets"); extern const fcml_cstring M_SETNS = _FT("setns"); extern const fcml_cstring M_SETP = _FT("setp"); extern const fcml_cstring M_SETNP = _FT("setnp"); extern const fcml_cstring M_SETL = _FT("setl"); extern const fcml_cstring M_SETNL = _FT("setnl"); extern const fcml_cstring M_SETLE = _FT("setle"); extern const fcml_cstring M_SETNLE = _FT("setnle"); extern const fcml_cstring M_SETNAE = _FT("setnae"); extern const fcml_cstring M_SETAE = _FT("setae"); extern const fcml_cstring M_SETZ = _FT("setz"); extern const fcml_cstring M_SETNZ = _FT("setnz"); extern const fcml_cstring M_SETNA = _FT("setna"); extern const fcml_cstring M_SETA = _FT("seta"); extern const fcml_cstring M_SETPE = _FT("setpe"); extern const fcml_cstring M_SETPO = _FT("setpo"); extern const fcml_cstring M_SETNGE = _FT("setnge"); extern const fcml_cstring M_SETGE = _FT("setge"); extern const fcml_cstring M_SETNG = _FT("setng"); extern const fcml_cstring M_SETG = _FT("setg"); extern const fcml_cstring M_SETC = _FT("setc"); extern const fcml_cstring M_SETNC = _FT("setnc"); extern const fcml_cstring M_SFENCE = _FT("sfence"); extern const fcml_cstring M_SGDT = _FT("sgdt"); extern const fcml_cstring M_SHL = _FT("shl"); extern const fcml_cstring M_SHLB = _FT("shlb"); extern const fcml_cstring M_SHLD = _FT("shld"); extern const fcml_cstring M_SHLL = _FT("shll"); extern const fcml_cstring M_SHLQ = _FT("shlq"); extern const fcml_cstring M_SHLW = _FT("shlw"); extern const fcml_cstring M_SHLX = _FT("shlx"); extern const fcml_cstring M_SHR = _FT("shr"); extern const fcml_cstring M_SHRB = _FT("shrb"); extern const fcml_cstring M_SHRD = _FT("shrd"); extern const fcml_cstring M_SHRL = _FT("shrl"); extern const fcml_cstring M_SHRQ = _FT("shrq"); extern const fcml_cstring M_SHRW = _FT("shrw"); extern const fcml_cstring M_SHRX = _FT("shrx"); extern const fcml_cstring M_SHUFPD = _FT("shufpd"); extern const fcml_cstring M_SHUFPS = _FT("shufps"); extern const fcml_cstring M_SIDT = _FT("sidt"); extern const fcml_cstring M_SKINIT = _FT("skinit"); extern const fcml_cstring M_SLDT = _FT("sldt"); extern const fcml_cstring M_SLWPCB = _FT("slwpcb"); extern const fcml_cstring M_SMSW = _FT("smsw"); extern const fcml_cstring M_SQRTPD = _FT("sqrtpd"); extern const fcml_cstring M_SQRTPS = _FT("sqrtps"); extern const fcml_cstring M_SQRTSD = _FT("sqrtsd"); extern const fcml_cstring M_SQRTSS = _FT("sqrtss"); extern const fcml_cstring M_STAC = _FT("stac"); extern const fcml_cstring M_STC = _FT("stc"); extern const fcml_cstring M_STD = _FT("std"); extern const fcml_cstring M_STGI = _FT("stgi"); extern const fcml_cstring M_STI = _FT("sti"); extern const fcml_cstring M_STMXCSR = _FT("stmxcsr"); extern const fcml_cstring M_STOS = _FT("stos"); extern const fcml_cstring M_STOSB = _FT("stosb"); extern const fcml_cstring M_STOSL = _FT("stosl"); extern const fcml_cstring M_STOSQ = _FT("stosq"); extern const fcml_cstring M_STOSW = _FT("stosw"); extern const fcml_cstring M_STR = _FT("str"); extern const fcml_cstring M_SUB = _FT("sub"); extern const fcml_cstring M_SUBB = _FT("subb"); extern const fcml_cstring M_SUBL = _FT("subl"); extern const fcml_cstring M_SUBPD = _FT("subpd"); extern const fcml_cstring M_SUBPS = _FT("subps"); extern const fcml_cstring M_SUBQ = _FT("subq"); extern const fcml_cstring M_SUBSD = _FT("subsd"); extern const fcml_cstring M_SUBSS = _FT("subss"); extern const fcml_cstring M_SUBW = _FT("subw"); extern const fcml_cstring M_SWAPGS = _FT("swapgs"); extern const fcml_cstring M_SYSCALL = _FT("syscall"); extern const fcml_cstring M_SYSENTER = _FT("sysenter"); extern const fcml_cstring M_SYSEXIT = _FT("sysexit"); extern const fcml_cstring M_SYSRET = _FT("sysret"); extern const fcml_cstring M_T1MSKC = _FT("t1mskc"); extern const fcml_cstring M_TEST = _FT("test"); extern const fcml_cstring M_TESTB = _FT("testb"); extern const fcml_cstring M_TESTL = _FT("testl"); extern const fcml_cstring M_TESTQ = _FT("testq"); extern const fcml_cstring M_TESTW = _FT("testw"); extern const fcml_cstring M_TZCNT = _FT("tzcnt"); extern const fcml_cstring M_TZMSK = _FT("tzmsk"); extern const fcml_cstring M_UCOMISD = _FT("ucomisd"); extern const fcml_cstring M_UCOMISS = _FT("ucomiss"); extern const fcml_cstring M_UD2 = _FT("ud2"); extern const fcml_cstring M_UNPCKHPD = _FT("unpckhpd"); extern const fcml_cstring M_UNPCKHPS = _FT("unpckhps"); extern const fcml_cstring M_UNPCKLPD = _FT("unpcklpd"); extern const fcml_cstring M_UNPCKLPS = _FT("unpcklps"); extern const fcml_cstring M_VADDPD = _FT("vaddpd"); extern const fcml_cstring M_VADDPS = _FT("vaddps"); extern const fcml_cstring M_VADDSD = _FT("vaddsd"); extern const fcml_cstring M_VADDSS = _FT("vaddss"); extern const fcml_cstring M_VADDSUBPD = _FT("vaddsubpd"); extern const fcml_cstring M_VADDSUBPS = _FT("vaddsubps"); extern const fcml_cstring M_VAESDEC = _FT("vaesdec"); extern const fcml_cstring M_VAESDECLAST = _FT("vaesdeclast"); extern const fcml_cstring M_VAESENC = _FT("vaesenc"); extern const fcml_cstring M_VAESENCLAST = _FT("vaesenclast"); extern const fcml_cstring M_VAESIMC = _FT("vaesimc"); extern const fcml_cstring M_VAESKEYGENASSIST = _FT("vaeskeygenassist"); extern const fcml_cstring M_VANDNPD = _FT("vandnpd"); extern const fcml_cstring M_VANDNPS = _FT("vandnps"); extern const fcml_cstring M_VANDPD = _FT("vandpd"); extern const fcml_cstring M_VANDPS = _FT("vandps"); extern const fcml_cstring M_VBLENDPD = _FT("vblendpd"); extern const fcml_cstring M_VBLENDPS = _FT("vblendps"); extern const fcml_cstring M_VBLENDVPD = _FT("vblendvpd"); extern const fcml_cstring M_VBLENDVPS = _FT("vblendvps"); extern const fcml_cstring M_VBROADCASTF128 = _FT("vbroadcastf128"); extern const fcml_cstring M_VBROADCASTI128 = _FT("vbroadcasti128"); extern const fcml_cstring M_VBROADCASTSD = _FT("vbroadcastsd"); extern const fcml_cstring M_VBROADCASTSS = _FT("vbroadcastss"); extern const fcml_cstring M_VCMPEQ_OSSD = _FT("vcmpeq_ossd"); extern const fcml_cstring M_VCMPEQ_OSSS = _FT("vcmpeq_osss"); extern const fcml_cstring M_VCMPEQSD = _FT("vcmpeqsd"); extern const fcml_cstring M_VCMPEQSS = _FT("vcmpeqss"); extern const fcml_cstring M_VCMPEQ_UQSD = _FT("vcmpeq_uqsd"); extern const fcml_cstring M_VCMPEQ_UQSS = _FT("vcmpeq_uqss"); extern const fcml_cstring M_VCMPEQ_USSD = _FT("vcmpeq_ussd"); extern const fcml_cstring M_VCMPEQ_USSS = _FT("vcmpeq_usss"); extern const fcml_cstring M_VCMPFALSE_OSSD = _FT("vcmpfalse_ossd"); extern const fcml_cstring M_VCMPFALSE_OSSS = _FT("vcmpfalse_osss"); extern const fcml_cstring M_VCMPFALSESD = _FT("vcmpfalsesd"); extern const fcml_cstring M_VCMPFALSESS = _FT("vcmpfalsess"); extern const fcml_cstring M_VCMPGE_OQSD = _FT("vcmpge_oqsd"); extern const fcml_cstring M_VCMPGE_OQSS = _FT("vcmpge_oqss"); extern const fcml_cstring M_VCMPGESD = _FT("vcmpgesd"); extern const fcml_cstring M_VCMPGESS = _FT("vcmpgess"); extern const fcml_cstring M_VCMPGT_OQSD = _FT("vcmpgt_oqsd"); extern const fcml_cstring M_VCMPGT_OQSS = _FT("vcmpgt_oqss"); extern const fcml_cstring M_VCMPGTSD = _FT("vcmpgtsd"); extern const fcml_cstring M_VCMPGTSS = _FT("vcmpgtss"); extern const fcml_cstring M_VCMPLE_OQSD = _FT("vcmple_oqsd"); extern const fcml_cstring M_VCMPLE_OQSS = _FT("vcmple_oqss"); extern const fcml_cstring M_VCMPLESD = _FT("vcmplesd"); extern const fcml_cstring M_VCMPLESS = _FT("vcmpless"); extern const fcml_cstring M_VCMPLT_OQSD = _FT("vcmplt_oqsd"); extern const fcml_cstring M_VCMPLT_OQSS = _FT("vcmplt_oqss"); extern const fcml_cstring M_VCMPLTSD = _FT("vcmpltsd"); extern const fcml_cstring M_VCMPLTSS = _FT("vcmpltss"); extern const fcml_cstring M_VCMPNEQ_OQSD = _FT("vcmpneq_oqsd"); extern const fcml_cstring M_VCMPNEQ_OQSS = _FT("vcmpneq_oqss"); extern const fcml_cstring M_VCMPNEQ_OSSD = _FT("vcmpneq_ossd"); extern const fcml_cstring M_VCMPNEQ_OSSS = _FT("vcmpneq_osss"); extern const fcml_cstring M_VCMPNEQSD = _FT("vcmpneqsd"); extern const fcml_cstring M_VCMPNEQSS = _FT("vcmpneqss"); extern const fcml_cstring M_VCMPNEQ_USSD = _FT("vcmpneq_ussd"); extern const fcml_cstring M_VCMPNEQ_USSS = _FT("vcmpneq_usss"); extern const fcml_cstring M_VCMPNGESD = _FT("vcmpngesd"); extern const fcml_cstring M_VCMPNGESS = _FT("vcmpngess"); extern const fcml_cstring M_VCMPNGE_UQSD = _FT("vcmpnge_uqsd"); extern const fcml_cstring M_VCMPNGE_UQSS = _FT("vcmpnge_uqss"); extern const fcml_cstring M_VCMPNGTSD = _FT("vcmpngtsd"); extern const fcml_cstring M_VCMPNGTSS = _FT("vcmpngtss"); extern const fcml_cstring M_VCMPNGT_UQSD = _FT("vcmpngt_uqsd"); extern const fcml_cstring M_VCMPNGT_UQSS = _FT("vcmpngt_uqss"); extern const fcml_cstring M_VCMPNLESD = _FT("vcmpnlesd"); extern const fcml_cstring M_VCMPNLESS = _FT("vcmpnless"); extern const fcml_cstring M_VCMPNLE_UQSD = _FT("vcmpnle_uqsd"); extern const fcml_cstring M_VCMPNLE_UQSS = _FT("vcmpnle_uqss"); extern const fcml_cstring M_VCMPNLTSD = _FT("vcmpnltsd"); extern const fcml_cstring M_VCMPNLTSS = _FT("vcmpnltss"); extern const fcml_cstring M_VCMPNLT_UQSD = _FT("vcmpnlt_uqsd"); extern const fcml_cstring M_VCMPNLT_UQSS = _FT("vcmpnlt_uqss"); extern const fcml_cstring M_VCMPORDSD = _FT("vcmpordsd"); extern const fcml_cstring M_VCMPORDSS = _FT("vcmpordss"); extern const fcml_cstring M_VCMPORD_SSD = _FT("vcmpord_ssd"); extern const fcml_cstring M_VCMPORD_SSS = _FT("vcmpord_sss"); extern const fcml_cstring M_VCMPPD = _FT("vcmppd"); extern const fcml_cstring M_VCMPPS = _FT("vcmpps"); extern const fcml_cstring M_VCMPSD = _FT("vcmpsd"); extern const fcml_cstring M_VCMPSS = _FT("vcmpss"); extern const fcml_cstring M_VCMPTRUESD = _FT("vcmptruesd"); extern const fcml_cstring M_VCMPTRUESS = _FT("vcmptruess"); extern const fcml_cstring M_VCMPTRUE_USSD = _FT("vcmptrue_ussd"); extern const fcml_cstring M_VCMPTRUE_USSS = _FT("vcmptrue_usss"); extern const fcml_cstring M_VCMPUNORDSD = _FT("vcmpunordsd"); extern const fcml_cstring M_VCMPUNORDSS = _FT("vcmpunordss"); extern const fcml_cstring M_VCMPUNORD_SSD = _FT("vcmpunord_ssd"); extern const fcml_cstring M_VCMPUNORD_SSS = _FT("vcmpunord_sss"); extern const fcml_cstring M_VCOMISD = _FT("vcomisd"); extern const fcml_cstring M_VCOMISS = _FT("vcomiss"); extern const fcml_cstring M_VCVTDQ2PD = _FT("vcvtdq2pd"); extern const fcml_cstring M_VCVTDQ2PS = _FT("vcvtdq2ps"); extern const fcml_cstring M_VCVTPD2DQ = _FT("vcvtpd2dq"); extern const fcml_cstring M_VCVTPD2PSX = _FT("vcvtpd2psx"); extern const fcml_cstring M_VCVTPD2PSY = _FT("vcvtpd2psy"); extern const fcml_cstring M_VCVTPH2PS = _FT("vcvtph2ps"); extern const fcml_cstring M_VCVTPS2DQ = _FT("vcvtps2dq"); extern const fcml_cstring M_VCVTPS2PD = _FT("vcvtps2pd"); extern const fcml_cstring M_VCVTPS2PH = _FT("vcvtps2ph"); extern const fcml_cstring M_VCVTSD2SI = _FT("vcvtsd2si"); extern const fcml_cstring M_VCVTSD2SS = _FT("vcvtsd2ss"); extern const fcml_cstring M_VCVTSI2SDL = _FT("vcvtsi2sdl"); extern const fcml_cstring M_VCVTSI2SDQ = _FT("vcvtsi2sdq"); extern const fcml_cstring M_VCVTSI2SSL = _FT("vcvtsi2ssl"); extern const fcml_cstring M_VCVTSI2SSQ = _FT("vcvtsi2ssq"); extern const fcml_cstring M_VCVTSS2SD = _FT("vcvtss2sd"); extern const fcml_cstring M_VCVTSS2SI = _FT("vcvtss2si"); extern const fcml_cstring M_VCVTTPD2DQX = _FT("vcvttpd2dqx"); extern const fcml_cstring M_VCVTTPD2DQY = _FT("vcvttpd2dqy"); extern const fcml_cstring M_VCVTTPS2DQ = _FT("vcvttps2dq"); extern const fcml_cstring M_VCVTTSD2SI = _FT("vcvttsd2si"); extern const fcml_cstring M_VCVTTSS2SI = _FT("vcvttss2si"); extern const fcml_cstring M_VDIVPD = _FT("vdivpd"); extern const fcml_cstring M_VDIVPS = _FT("vdivps"); extern const fcml_cstring M_VDIVSD = _FT("vdivsd"); extern const fcml_cstring M_VDIVSS = _FT("vdivss"); extern const fcml_cstring M_VDPPD = _FT("vdppd"); extern const fcml_cstring M_VDPPS = _FT("vdpps"); extern const fcml_cstring M_VERR = _FT("verr"); extern const fcml_cstring M_VERW = _FT("verw"); extern const fcml_cstring M_VEXTRACTF128 = _FT("vextractf128"); extern const fcml_cstring M_VEXTRACTI128 = _FT("vextracti128"); extern const fcml_cstring M_VEXTRACTPS = _FT("vextractps"); extern const fcml_cstring M_VFMADD132PD = _FT("vfmadd132pd"); extern const fcml_cstring M_VFMADD132PS = _FT("vfmadd132ps"); extern const fcml_cstring M_VFMADD132SD = _FT("vfmadd132sd"); extern const fcml_cstring M_VFMADD132SS = _FT("vfmadd132ss"); extern const fcml_cstring M_VFMADD213PD = _FT("vfmadd213pd"); extern const fcml_cstring M_VFMADD213PS = _FT("vfmadd213ps"); extern const fcml_cstring M_VFMADD213SD = _FT("vfmadd213sd"); extern const fcml_cstring M_VFMADD213SS = _FT("vfmadd213ss"); extern const fcml_cstring M_VFMADD231PD = _FT("vfmadd231pd"); extern const fcml_cstring M_VFMADD231PS = _FT("vfmadd231ps"); extern const fcml_cstring M_VFMADD231SD = _FT("vfmadd231sd"); extern const fcml_cstring M_VFMADD231SS = _FT("vfmadd231ss"); extern const fcml_cstring M_VFMADDPD = _FT("vfmaddpd"); extern const fcml_cstring M_VFMADDPS = _FT("vfmaddps"); extern const fcml_cstring M_VFMADDSD = _FT("vfmaddsd"); extern const fcml_cstring M_VFMADDSS = _FT("vfmaddss"); extern const fcml_cstring M_VFMADDSUB132PD = _FT("vfmaddsub132pd"); extern const fcml_cstring M_VFMADDSUB132PS = _FT("vfmaddsub132ps"); extern const fcml_cstring M_VFMADDSUB213PD = _FT("vfmaddsub213pd"); extern const fcml_cstring M_VFMADDSUB213PS = _FT("vfmaddsub213ps"); extern const fcml_cstring M_VFMADDSUB231PD = _FT("vfmaddsub231pd"); extern const fcml_cstring M_VFMADDSUB231PS = _FT("vfmaddsub231ps"); extern const fcml_cstring M_VFMADDSUBPD = _FT("vfmaddsubpd"); extern const fcml_cstring M_VFMADDSUBPS = _FT("vfmaddsubps"); extern const fcml_cstring M_VFMSUB132PD = _FT("vfmsub132pd"); extern const fcml_cstring M_VFMSUB132PS = _FT("vfmsub132ps"); extern const fcml_cstring M_VFMSUB132SD = _FT("vfmsub132sd"); extern const fcml_cstring M_VFMSUB132SS = _FT("vfmsub132ss"); extern const fcml_cstring M_VFMSUB213PD = _FT("vfmsub213pd"); extern const fcml_cstring M_VFMSUB213PS = _FT("vfmsub213ps"); extern const fcml_cstring M_VFMSUB213SD = _FT("vfmsub213sd"); extern const fcml_cstring M_VFMSUB213SS = _FT("vfmsub213ss"); extern const fcml_cstring M_VFMSUB231PD = _FT("vfmsub231pd"); extern const fcml_cstring M_VFMSUB231PS = _FT("vfmsub231ps"); extern const fcml_cstring M_VFMSUB231SD = _FT("vfmsub231sd"); extern const fcml_cstring M_VFMSUB231SS = _FT("vfmsub231ss"); extern const fcml_cstring M_VFMSUBADD132PD = _FT("vfmsubadd132pd"); extern const fcml_cstring M_VFMSUBADD132PS = _FT("vfmsubadd132ps"); extern const fcml_cstring M_VFMSUBADD213PD = _FT("vfmsubadd213pd"); extern const fcml_cstring M_VFMSUBADD213PS = _FT("vfmsubadd213ps"); extern const fcml_cstring M_VFMSUBADD231PD = _FT("vfmsubadd231pd"); extern const fcml_cstring M_VFMSUBADD231PS = _FT("vfmsubadd231ps"); extern const fcml_cstring M_VFMSUBADDPD = _FT("vfmsubaddpd"); extern const fcml_cstring M_VFMSUBADDPS = _FT("vfmsubaddps"); extern const fcml_cstring M_VFMSUBPD = _FT("vfmsubpd"); extern const fcml_cstring M_VFMSUBPS = _FT("vfmsubps"); extern const fcml_cstring M_VFMSUBSD = _FT("vfmsubsd"); extern const fcml_cstring M_VFMSUBSS = _FT("vfmsubss"); extern const fcml_cstring M_VFNMADD132PD = _FT("vfnmadd132pd"); extern const fcml_cstring M_VFNMADD132PS = _FT("vfnmadd132ps"); extern const fcml_cstring M_VFNMADD132SD = _FT("vfnmadd132sd"); extern const fcml_cstring M_VFNMADD132SS = _FT("vfnmadd132ss"); extern const fcml_cstring M_VFNMADD213PD = _FT("vfnmadd213pd"); extern const fcml_cstring M_VFNMADD213PS = _FT("vfnmadd213ps"); extern const fcml_cstring M_VFNMADD213SD = _FT("vfnmadd213sd"); extern const fcml_cstring M_VFNMADD213SS = _FT("vfnmadd213ss"); extern const fcml_cstring M_VFNMADD231PD = _FT("vfnmadd231pd"); extern const fcml_cstring M_VFNMADD231PS = _FT("vfnmadd231ps"); extern const fcml_cstring M_VFNMADD231SD = _FT("vfnmadd231sd"); extern const fcml_cstring M_VFNMADD231SS = _FT("vfnmadd231ss"); extern const fcml_cstring M_VFNMADDPD = _FT("vfnmaddpd"); extern const fcml_cstring M_VFNMADDPS = _FT("vfnmaddps"); extern const fcml_cstring M_VFNMADDSD = _FT("vfnmaddsd"); extern const fcml_cstring M_VFNMADDSS = _FT("vfnmaddss"); extern const fcml_cstring M_VFNMSUB132PD = _FT("vfnmsub132pd"); extern const fcml_cstring M_VFNMSUB132PS = _FT("vfnmsub132ps"); extern const fcml_cstring M_VFNMSUB132SD = _FT("vfnmsub132sd"); extern const fcml_cstring M_VFNMSUB132SS = _FT("vfnmsub132ss"); extern const fcml_cstring M_VFNMSUB213PD = _FT("vfnmsub213pd"); extern const fcml_cstring M_VFNMSUB213PS = _FT("vfnmsub213ps"); extern const fcml_cstring M_VFNMSUB213SD = _FT("vfnmsub213sd"); extern const fcml_cstring M_VFNMSUB213SS = _FT("vfnmsub213ss"); extern const fcml_cstring M_VFNMSUB231PD = _FT("vfnmsub231pd"); extern const fcml_cstring M_VFNMSUB231PS = _FT("vfnmsub231ps"); extern const fcml_cstring M_VFNMSUB231SD = _FT("vfnmsub231sd"); extern const fcml_cstring M_VFNMSUB231SS = _FT("vfnmsub231ss"); extern const fcml_cstring M_VFNMSUBPD = _FT("vfnmsubpd"); extern const fcml_cstring M_VFNMSUBPS = _FT("vfnmsubps"); extern const fcml_cstring M_VFNMSUBSD = _FT("vfnmsubsd"); extern const fcml_cstring M_VFNMSUBSS = _FT("vfnmsubss"); extern const fcml_cstring M_VFRCZPD = _FT("vfrczpd"); extern const fcml_cstring M_VFRCZPS = _FT("vfrczps"); extern const fcml_cstring M_VFRCZSD = _FT("vfrczsd"); extern const fcml_cstring M_VFRCZSS = _FT("vfrczss"); extern const fcml_cstring M_VGATHERDPD = _FT("vgatherdpd"); extern const fcml_cstring M_VGATHERDPS = _FT("vgatherdps"); extern const fcml_cstring M_VGATHERQPD = _FT("vgatherqpd"); extern const fcml_cstring M_VGATHERQPS = _FT("vgatherqps"); extern const fcml_cstring M_VHADDPD = _FT("vhaddpd"); extern const fcml_cstring M_VHADDPS = _FT("vhaddps"); extern const fcml_cstring M_VHSUBPD = _FT("vhsubpd"); extern const fcml_cstring M_VHSUBPS = _FT("vhsubps"); extern const fcml_cstring M_VINSERTF128 = _FT("vinsertf128"); extern const fcml_cstring M_VINSERTI128 = _FT("vinserti128"); extern const fcml_cstring M_VINSERTPS = _FT("vinsertps"); extern const fcml_cstring M_VLDDQU = _FT("vlddqu"); extern const fcml_cstring M_VLDMXCSR = _FT("vldmxcsr"); extern const fcml_cstring M_VMASKMOVDQU = _FT("vmaskmovdqu"); extern const fcml_cstring M_VMASKMOVPD = _FT("vmaskmovpd"); extern const fcml_cstring M_VMASKMOVPS = _FT("vmaskmovps"); extern const fcml_cstring M_VMAXPD = _FT("vmaxpd"); extern const fcml_cstring M_VMAXPS = _FT("vmaxps"); extern const fcml_cstring M_VMAXSD = _FT("vmaxsd"); extern const fcml_cstring M_VMAXSS = _FT("vmaxss"); extern const fcml_cstring M_VMCALL = _FT("vmcall"); extern const fcml_cstring M_VMCLEAR = _FT("vmclear"); extern const fcml_cstring M_VMFUNC = _FT("vmfunc"); extern const fcml_cstring M_VMINPD = _FT("vminpd"); extern const fcml_cstring M_VMINPS = _FT("vminps"); extern const fcml_cstring M_VMINSD = _FT("vminsd"); extern const fcml_cstring M_VMINSS = _FT("vminss"); extern const fcml_cstring M_VMLAUNCH = _FT("vmlaunch"); extern const fcml_cstring M_VMLOAD = _FT("vmload"); extern const fcml_cstring M_VMMCALL = _FT("vmmcall"); extern const fcml_cstring M_VMOVAPD = _FT("vmovapd"); extern const fcml_cstring M_VMOVAPS = _FT("vmovaps"); extern const fcml_cstring M_VMOVD = _FT("vmovd"); extern const fcml_cstring M_VMOVDDUP = _FT("vmovddup"); extern const fcml_cstring M_VMOVDQA = _FT("vmovdqa"); extern const fcml_cstring M_VMOVDQU = _FT("vmovdqu"); extern const fcml_cstring M_VMOVHLPS = _FT("vmovhlps"); extern const fcml_cstring M_VMOVHPD = _FT("vmovhpd"); extern const fcml_cstring M_VMOVHPS = _FT("vmovhps"); extern const fcml_cstring M_VMOVLHPS = _FT("vmovlhps"); extern const fcml_cstring M_VMOVLPD = _FT("vmovlpd"); extern const fcml_cstring M_VMOVLPS = _FT("vmovlps"); extern const fcml_cstring M_VMOVMSKPD = _FT("vmovmskpd"); extern const fcml_cstring M_VMOVMSKPS = _FT("vmovmskps"); extern const fcml_cstring M_VMOVNTDQ = _FT("vmovntdq"); extern const fcml_cstring M_VMOVNTDQA = _FT("vmovntdqa"); extern const fcml_cstring M_VMOVNTPD = _FT("vmovntpd"); extern const fcml_cstring M_VMOVNTPS = _FT("vmovntps"); extern const fcml_cstring M_VMOVQ = _FT("vmovq"); extern const fcml_cstring M_VMOVSD = _FT("vmovsd"); extern const fcml_cstring M_VMOVSHDUP = _FT("vmovshdup"); extern const fcml_cstring M_VMOVSLDUP = _FT("vmovsldup"); extern const fcml_cstring M_VMOVSS = _FT("vmovss"); extern const fcml_cstring M_VMOVUPD = _FT("vmovupd"); extern const fcml_cstring M_VMOVUPS = _FT("vmovups"); extern const fcml_cstring M_VMPSADBW = _FT("vmpsadbw"); extern const fcml_cstring M_VMPTRLD = _FT("vmptrld"); extern const fcml_cstring M_VMPTRST = _FT("vmptrst"); extern const fcml_cstring M_VMREAD = _FT("vmread"); extern const fcml_cstring M_VMRESUME = _FT("vmresume"); extern const fcml_cstring M_VMRUN = _FT("vmrun"); extern const fcml_cstring M_VMSAVE = _FT("vmsave"); extern const fcml_cstring M_VMULPD = _FT("vmulpd"); extern const fcml_cstring M_VMULPS = _FT("vmulps"); extern const fcml_cstring M_VMULSD = _FT("vmulsd"); extern const fcml_cstring M_VMULSS = _FT("vmulss"); extern const fcml_cstring M_VMWRITE = _FT("vmwrite"); extern const fcml_cstring M_VMXOFF = _FT("vmxoff"); extern const fcml_cstring M_VMXON = _FT("vmxon"); extern const fcml_cstring M_VORPD = _FT("vorpd"); extern const fcml_cstring M_VORPS = _FT("vorps"); extern const fcml_cstring M_VPABSB = _FT("vpabsb"); extern const fcml_cstring M_VPABSD = _FT("vpabsd"); extern const fcml_cstring M_VPABSW = _FT("vpabsw"); extern const fcml_cstring M_VPACKSSDW = _FT("vpackssdw"); extern const fcml_cstring M_VPACKSSWB = _FT("vpacksswb"); extern const fcml_cstring M_VPACKUSDW = _FT("vpackusdw"); extern const fcml_cstring M_VPACKUSWB = _FT("vpackuswb"); extern const fcml_cstring M_VPADDB = _FT("vpaddb"); extern const fcml_cstring M_VPADDD = _FT("vpaddd"); extern const fcml_cstring M_VPADDQ = _FT("vpaddq"); extern const fcml_cstring M_VPADDSB = _FT("vpaddsb"); extern const fcml_cstring M_VPADDSW = _FT("vpaddsw"); extern const fcml_cstring M_VPADDUSB = _FT("vpaddusb"); extern const fcml_cstring M_VPADDUSW = _FT("vpaddusw"); extern const fcml_cstring M_VPADDW = _FT("vpaddw"); extern const fcml_cstring M_VPALIGNR = _FT("vpalignr"); extern const fcml_cstring M_VPAND = _FT("vpand"); extern const fcml_cstring M_VPANDN = _FT("vpandn"); extern const fcml_cstring M_VPAVGB = _FT("vpavgb"); extern const fcml_cstring M_VPAVGW = _FT("vpavgw"); extern const fcml_cstring M_VPBLENDD = _FT("vpblendd"); extern const fcml_cstring M_VPBLENDVB = _FT("vpblendvb"); extern const fcml_cstring M_VPBLENDW = _FT("vpblendw"); extern const fcml_cstring M_VPBROADCASTB = _FT("vpbroadcastb"); extern const fcml_cstring M_VPBROADCASTD = _FT("vpbroadcastd"); extern const fcml_cstring M_VPBROADCASTQ = _FT("vpbroadcastq"); extern const fcml_cstring M_VPBROADCASTW = _FT("vpbroadcastw"); extern const fcml_cstring M_VPCLMULQDQ = _FT("vpclmulqdq"); extern const fcml_cstring M_VPCMOV = _FT("vpcmov"); extern const fcml_cstring M_VPCMPEQB = _FT("vpcmpeqb"); extern const fcml_cstring M_VPCMPEQD = _FT("vpcmpeqd"); extern const fcml_cstring M_VPCMPEQQ = _FT("vpcmpeqq"); extern const fcml_cstring M_VPCMPEQW = _FT("vpcmpeqw"); extern const fcml_cstring M_VPCMPESTRI = _FT("vpcmpestri"); extern const fcml_cstring M_VPCMPESTRM = _FT("vpcmpestrm"); extern const fcml_cstring M_VPCMPGTB = _FT("vpcmpgtb"); extern const fcml_cstring M_VPCMPGTD = _FT("vpcmpgtd"); extern const fcml_cstring M_VPCMPGTQ = _FT("vpcmpgtq"); extern const fcml_cstring M_VPCMPGTW = _FT("vpcmpgtw"); extern const fcml_cstring M_VPCMPISTRI = _FT("vpcmpistri"); extern const fcml_cstring M_VPCMPISTRM = _FT("vpcmpistrm"); extern const fcml_cstring M_VPCOMB = _FT("vpcomb"); extern const fcml_cstring M_VPCOMD = _FT("vpcomd"); extern const fcml_cstring M_VPCOMEQB = _FT("vpcomeqb"); extern const fcml_cstring M_VPCOMEQD = _FT("vpcomeqd"); extern const fcml_cstring M_VPCOMEQQ = _FT("vpcomeqq"); extern const fcml_cstring M_VPCOMEQUB = _FT("vpcomequb"); extern const fcml_cstring M_VPCOMEQUD = _FT("vpcomequd"); extern const fcml_cstring M_VPCOMEQUQ = _FT("vpcomequq"); extern const fcml_cstring M_VPCOMEQUW = _FT("vpcomequw"); extern const fcml_cstring M_VPCOMEQW = _FT("vpcomeqw"); extern const fcml_cstring M_VPCOMFALSEB = _FT("vpcomfalseb"); extern const fcml_cstring M_VPCOMFALSED = _FT("vpcomfalsed"); extern const fcml_cstring M_VPCOMFALSEQ = _FT("vpcomfalseq"); extern const fcml_cstring M_VPCOMFALSEUB = _FT("vpcomfalseub"); extern const fcml_cstring M_VPCOMFALSEUD = _FT("vpcomfalseud"); extern const fcml_cstring M_VPCOMFALSEUQ = _FT("vpcomfalseuq"); extern const fcml_cstring M_VPCOMFALSEUW = _FT("vpcomfalseuw"); extern const fcml_cstring M_VPCOMFALSEW = _FT("vpcomfalsew"); extern const fcml_cstring M_VPCOMGEB = _FT("vpcomgeb"); extern const fcml_cstring M_VPCOMGED = _FT("vpcomged"); extern const fcml_cstring M_VPCOMGEQ = _FT("vpcomgeq"); extern const fcml_cstring M_VPCOMGEUB = _FT("vpcomgeub"); extern const fcml_cstring M_VPCOMGEUD = _FT("vpcomgeud"); extern const fcml_cstring M_VPCOMGEUQ = _FT("vpcomgeuq"); extern const fcml_cstring M_VPCOMGEUW = _FT("vpcomgeuw"); extern const fcml_cstring M_VPCOMGEW = _FT("vpcomgew"); extern const fcml_cstring M_VPCOMGTB = _FT("vpcomgtb"); extern const fcml_cstring M_VPCOMGTD = _FT("vpcomgtd"); extern const fcml_cstring M_VPCOMGTQ = _FT("vpcomgtq"); extern const fcml_cstring M_VPCOMGTUB = _FT("vpcomgtub"); extern const fcml_cstring M_VPCOMGTUD = _FT("vpcomgtud"); extern const fcml_cstring M_VPCOMGTUQ = _FT("vpcomgtuq"); extern const fcml_cstring M_VPCOMGTUW = _FT("vpcomgtuw"); extern const fcml_cstring M_VPCOMGTW = _FT("vpcomgtw"); extern const fcml_cstring M_VPCOMLEB = _FT("vpcomleb"); extern const fcml_cstring M_VPCOMLED = _FT("vpcomled"); extern const fcml_cstring M_VPCOMLEQ = _FT("vpcomleq"); extern const fcml_cstring M_VPCOMLEUB = _FT("vpcomleub"); extern const fcml_cstring M_VPCOMLEUD = _FT("vpcomleud"); extern const fcml_cstring M_VPCOMLEUQ = _FT("vpcomleuq"); extern const fcml_cstring M_VPCOMLEUW = _FT("vpcomleuw"); extern const fcml_cstring M_VPCOMLEW = _FT("vpcomlew"); extern const fcml_cstring M_VPCOMLTB = _FT("vpcomltb"); extern const fcml_cstring M_VPCOMLTD = _FT("vpcomltd"); extern const fcml_cstring M_VPCOMLTQ = _FT("vpcomltq"); extern const fcml_cstring M_VPCOMLTUB = _FT("vpcomltub"); extern const fcml_cstring M_VPCOMLTUD = _FT("vpcomltud"); extern const fcml_cstring M_VPCOMLTUQ = _FT("vpcomltuq"); extern const fcml_cstring M_VPCOMLTUW = _FT("vpcomltuw"); extern const fcml_cstring M_VPCOMLTW = _FT("vpcomltw"); extern const fcml_cstring M_VPCOMNEQB = _FT("vpcomneqb"); extern const fcml_cstring M_VPCOMNEQD = _FT("vpcomneqd"); extern const fcml_cstring M_VPCOMNEQQ = _FT("vpcomneqq"); extern const fcml_cstring M_VPCOMNEQUB = _FT("vpcomnequb"); extern const fcml_cstring M_VPCOMNEQUD = _FT("vpcomnequd"); extern const fcml_cstring M_VPCOMNEQUQ = _FT("vpcomnequq"); extern const fcml_cstring M_VPCOMNEQUW = _FT("vpcomnequw"); extern const fcml_cstring M_VPCOMNEQW = _FT("vpcomneqw"); extern const fcml_cstring M_VPCOMQ = _FT("vpcomq"); extern const fcml_cstring M_VPCOMTRUEB = _FT("vpcomtrueb"); extern const fcml_cstring M_VPCOMTRUED = _FT("vpcomtrued"); extern const fcml_cstring M_VPCOMTRUEQ = _FT("vpcomtrueq"); extern const fcml_cstring M_VPCOMTRUEUB = _FT("vpcomtrueub"); extern const fcml_cstring M_VPCOMTRUEUD = _FT("vpcomtrueud"); extern const fcml_cstring M_VPCOMTRUEUQ = _FT("vpcomtrueuq"); extern const fcml_cstring M_VPCOMTRUEUW = _FT("vpcomtrueuw"); extern const fcml_cstring M_VPCOMTRUEW = _FT("vpcomtruew"); extern const fcml_cstring M_VPCOMUB = _FT("vpcomub"); extern const fcml_cstring M_VPCOMUD = _FT("vpcomud"); extern const fcml_cstring M_VPCOMUQ = _FT("vpcomuq"); extern const fcml_cstring M_VPCOMUW = _FT("vpcomuw"); extern const fcml_cstring M_VPCOMW = _FT("vpcomw"); extern const fcml_cstring M_VPERM2F128 = _FT("vperm2f128"); extern const fcml_cstring M_VPERM2I128 = _FT("vperm2i128"); extern const fcml_cstring M_VPERMD = _FT("vpermd"); extern const fcml_cstring M_VPERMIL2PD = _FT("vpermil2pd"); extern const fcml_cstring M_VPERMIL2PS = _FT("vpermil2ps"); extern const fcml_cstring M_VPERMILPD = _FT("vpermilpd"); extern const fcml_cstring M_VPERMILPS = _FT("vpermilps"); extern const fcml_cstring M_VPERMPD = _FT("vpermpd"); extern const fcml_cstring M_VPERMPS = _FT("vpermps"); extern const fcml_cstring M_VPERMQ = _FT("vpermq"); extern const fcml_cstring M_VPEXTRB = _FT("vpextrb"); extern const fcml_cstring M_VPEXTRD = _FT("vpextrd"); extern const fcml_cstring M_VPEXTRQ = _FT("vpextrq"); extern const fcml_cstring M_VPEXTRW = _FT("vpextrw"); extern const fcml_cstring M_VPGATHERDD = _FT("vpgatherdd"); extern const fcml_cstring M_VPGATHERDQ = _FT("vpgatherdq"); extern const fcml_cstring M_VPGATHERQD = _FT("vpgatherqd"); extern const fcml_cstring M_VPGATHERQQ = _FT("vpgatherqq"); extern const fcml_cstring M_VPHADDBD = _FT("vphaddbd"); extern const fcml_cstring M_VPHADDBQ = _FT("vphaddbq"); extern const fcml_cstring M_VPHADDBW = _FT("vphaddbw"); extern const fcml_cstring M_VPHADDD = _FT("vphaddd"); extern const fcml_cstring M_VPHADDDQ = _FT("vphadddq"); extern const fcml_cstring M_VPHADDSW = _FT("vphaddsw"); extern const fcml_cstring M_VPHADDUBD = _FT("vphaddubd"); extern const fcml_cstring M_VPHADDUBQ = _FT("vphaddubq"); extern const fcml_cstring M_VPHADDUBW = _FT("vphaddubw"); extern const fcml_cstring M_VPHADDUDQ = _FT("vphaddudq"); extern const fcml_cstring M_VPHADDUWD = _FT("vphadduwd"); extern const fcml_cstring M_VPHADDUWQ = _FT("vphadduwq"); extern const fcml_cstring M_VPHADDW = _FT("vphaddw"); extern const fcml_cstring M_VPHADDWD = _FT("vphaddwd"); extern const fcml_cstring M_VPHADDWQ = _FT("vphaddwq"); extern const fcml_cstring M_VPHMINPOSUW = _FT("vphminposuw"); extern const fcml_cstring M_VPHSUBBW = _FT("vphsubbw"); extern const fcml_cstring M_VPHSUBD = _FT("vphsubd"); extern const fcml_cstring M_VPHSUBDQ = _FT("vphsubdq"); extern const fcml_cstring M_VPHSUBSW = _FT("vphsubsw"); extern const fcml_cstring M_VPHSUBW = _FT("vphsubw"); extern const fcml_cstring M_VPHSUBWD = _FT("vphsubwd"); extern const fcml_cstring M_VPINSRB = _FT("vpinsrb"); extern const fcml_cstring M_VPINSRD = _FT("vpinsrd"); extern const fcml_cstring M_VPINSRQ = _FT("vpinsrq"); extern const fcml_cstring M_VPINSRW = _FT("vpinsrw"); extern const fcml_cstring M_VPMACSDD = _FT("vpmacsdd"); extern const fcml_cstring M_VPMACSDQH = _FT("vpmacsdqh"); extern const fcml_cstring M_VPMACSDQL = _FT("vpmacsdql"); extern const fcml_cstring M_VPMACSSDD = _FT("vpmacssdd"); extern const fcml_cstring M_VPMACSSDQH = _FT("vpmacssdqh"); extern const fcml_cstring M_VPMACSSDQL = _FT("vpmacssdql"); extern const fcml_cstring M_VPMACSSWD = _FT("vpmacsswd"); extern const fcml_cstring M_VPMACSSWW = _FT("vpmacssww"); extern const fcml_cstring M_VPMACSWD = _FT("vpmacswd"); extern const fcml_cstring M_VPMACSWW = _FT("vpmacsww"); extern const fcml_cstring M_VPMADCSSWD = _FT("vpmadcsswd"); extern const fcml_cstring M_VPMADCSWD = _FT("vpmadcswd"); extern const fcml_cstring M_VPMADDUBSW = _FT("vpmaddubsw"); extern const fcml_cstring M_VPMADDWD = _FT("vpmaddwd"); extern const fcml_cstring M_VPMASKMOV = _FT("vpmaskmov"); extern const fcml_cstring M_VPMASKMOVD = _FT("vpmaskmovd"); extern const fcml_cstring M_VPMASKMOVQ = _FT("vpmaskmovq"); extern const fcml_cstring M_VPMAXSB = _FT("vpmaxsb"); extern const fcml_cstring M_VPMAXSD = _FT("vpmaxsd"); extern const fcml_cstring M_VPMAXSW = _FT("vpmaxsw"); extern const fcml_cstring M_VPMAXUB = _FT("vpmaxub"); extern const fcml_cstring M_VPMAXUD = _FT("vpmaxud"); extern const fcml_cstring M_VPMAXUW = _FT("vpmaxuw"); extern const fcml_cstring M_VPMINSB = _FT("vpminsb"); extern const fcml_cstring M_VPMINSD = _FT("vpminsd"); extern const fcml_cstring M_VPMINSW = _FT("vpminsw"); extern const fcml_cstring M_VPMINUB = _FT("vpminub"); extern const fcml_cstring M_VPMINUD = _FT("vpminud"); extern const fcml_cstring M_VPMINUW = _FT("vpminuw"); extern const fcml_cstring M_VPMOVMSKB = _FT("vpmovmskb"); extern const fcml_cstring M_VPMOVSXBD = _FT("vpmovsxbd"); extern const fcml_cstring M_VPMOVSXBQ = _FT("vpmovsxbq"); extern const fcml_cstring M_VPMOVSXBW = _FT("vpmovsxbw"); extern const fcml_cstring M_VPMOVSXDQ = _FT("vpmovsxdq"); extern const fcml_cstring M_VPMOVSXWD = _FT("vpmovsxwd"); extern const fcml_cstring M_VPMOVSXWQ = _FT("vpmovsxwq"); extern const fcml_cstring M_VPMOVZXBD = _FT("vpmovzxbd"); extern const fcml_cstring M_VPMOVZXBQ = _FT("vpmovzxbq"); extern const fcml_cstring M_VPMOVZXBW = _FT("vpmovzxbw"); extern const fcml_cstring M_VPMOVZXDQ = _FT("vpmovzxdq"); extern const fcml_cstring M_VPMOVZXWD = _FT("vpmovzxwd"); extern const fcml_cstring M_VPMOVZXWQ = _FT("vpmovzxwq"); extern const fcml_cstring M_VPMULDQ = _FT("vpmuldq"); extern const fcml_cstring M_VPMULHRSW = _FT("vpmulhrsw"); extern const fcml_cstring M_VPMULHUW = _FT("vpmulhuw"); extern const fcml_cstring M_VPMULHW = _FT("vpmulhw"); extern const fcml_cstring M_VPMULLD = _FT("vpmulld"); extern const fcml_cstring M_VPMULLW = _FT("vpmullw"); extern const fcml_cstring M_VPMULUDQ = _FT("vpmuludq"); extern const fcml_cstring M_VPOR = _FT("vpor"); extern const fcml_cstring M_VPPERM = _FT("vpperm"); extern const fcml_cstring M_VPROTB = _FT("vprotb"); extern const fcml_cstring M_VPROTD = _FT("vprotd"); extern const fcml_cstring M_VPROTQ = _FT("vprotq"); extern const fcml_cstring M_VPROTW = _FT("vprotw"); extern const fcml_cstring M_VPSADBW = _FT("vpsadbw"); extern const fcml_cstring M_VPSHAB = _FT("vpshab"); extern const fcml_cstring M_VPSHAD = _FT("vpshad"); extern const fcml_cstring M_VPSHAQ = _FT("vpshaq"); extern const fcml_cstring M_VPSHAW = _FT("vpshaw"); extern const fcml_cstring M_VPSHLB = _FT("vpshlb"); extern const fcml_cstring M_VPSHLD = _FT("vpshld"); extern const fcml_cstring M_VPSHLQ = _FT("vpshlq"); extern const fcml_cstring M_VPSHLW = _FT("vpshlw"); extern const fcml_cstring M_VPSHUFB = _FT("vpshufb"); extern const fcml_cstring M_VPSHUFD = _FT("vpshufd"); extern const fcml_cstring M_VPSHUFHW = _FT("vpshufhw"); extern const fcml_cstring M_VPSHUFLW = _FT("vpshuflw"); extern const fcml_cstring M_VPSIGNB = _FT("vpsignb"); extern const fcml_cstring M_VPSIGND = _FT("vpsignd"); extern const fcml_cstring M_VPSIGNW = _FT("vpsignw"); extern const fcml_cstring M_VPSLLD = _FT("vpslld"); extern const fcml_cstring M_VPSLLDQ = _FT("vpslldq"); extern const fcml_cstring M_VPSLLQ = _FT("vpsllq"); extern const fcml_cstring M_VPSLLVD = _FT("vpsllvd"); extern const fcml_cstring M_VPSLLVQ = _FT("vpsllvq"); extern const fcml_cstring M_VPSLLW = _FT("vpsllw"); extern const fcml_cstring M_VPSRAD = _FT("vpsrad"); extern const fcml_cstring M_VPSRAVD = _FT("vpsravd"); extern const fcml_cstring M_VPSRAW = _FT("vpsraw"); extern const fcml_cstring M_VPSRLD = _FT("vpsrld"); extern const fcml_cstring M_VPSRLDQ = _FT("vpsrldq"); extern const fcml_cstring M_VPSRLQ = _FT("vpsrlq"); extern const fcml_cstring M_VPSRLVD = _FT("vpsrlvd"); extern const fcml_cstring M_VPSRLVQ = _FT("vpsrlvq"); extern const fcml_cstring M_VPSRLW = _FT("vpsrlw"); extern const fcml_cstring M_VPSUBB = _FT("vpsubb"); extern const fcml_cstring M_VPSUBD = _FT("vpsubd"); extern const fcml_cstring M_VPSUBQ = _FT("vpsubq"); extern const fcml_cstring M_VPSUBSB = _FT("vpsubsb"); extern const fcml_cstring M_VPSUBSW = _FT("vpsubsw"); extern const fcml_cstring M_VPSUBUSB = _FT("vpsubusb"); extern const fcml_cstring M_VPSUBUSW = _FT("vpsubusw"); extern const fcml_cstring M_VPSUBW = _FT("vpsubw"); extern const fcml_cstring M_VPTEST = _FT("vptest"); extern const fcml_cstring M_VPUNPCKHBW = _FT("vpunpckhbw"); extern const fcml_cstring M_VPUNPCKHDQ = _FT("vpunpckhdq"); extern const fcml_cstring M_VPUNPCKHQDQ = _FT("vpunpckhqdq"); extern const fcml_cstring M_VPUNPCKHWD = _FT("vpunpckhwd"); extern const fcml_cstring M_VPUNPCKLBW = _FT("vpunpcklbw"); extern const fcml_cstring M_VPUNPCKLDQ = _FT("vpunpckldq"); extern const fcml_cstring M_VPUNPCKLQDQ = _FT("vpunpcklqdq"); extern const fcml_cstring M_VPUNPCKLWD = _FT("vpunpcklwd"); extern const fcml_cstring M_VPXOR = _FT("vpxor"); extern const fcml_cstring M_VRCPPS = _FT("vrcpps"); extern const fcml_cstring M_VRCPSS = _FT("vrcpss"); extern const fcml_cstring M_VROUNDPD = _FT("vroundpd"); extern const fcml_cstring M_VROUNDPS = _FT("vroundps"); extern const fcml_cstring M_VROUNDSD = _FT("vroundsd"); extern const fcml_cstring M_VROUNDSS = _FT("vroundss"); extern const fcml_cstring M_VRSQRTPS = _FT("vrsqrtps"); extern const fcml_cstring M_VRSQRTSS = _FT("vrsqrtss"); extern const fcml_cstring M_VSHUFPD = _FT("vshufpd"); extern const fcml_cstring M_VSHUFPS = _FT("vshufps"); extern const fcml_cstring M_VSQRTPD = _FT("vsqrtpd"); extern const fcml_cstring M_VSQRTPS = _FT("vsqrtps"); extern const fcml_cstring M_VSQRTSD = _FT("vsqrtsd"); extern const fcml_cstring M_VSQRTSS = _FT("vsqrtss"); extern const fcml_cstring M_VSTMXCSR = _FT("vstmxcsr"); extern const fcml_cstring M_VSUBPD = _FT("vsubpd"); extern const fcml_cstring M_VSUBPS = _FT("vsubps"); extern const fcml_cstring M_VSUBSD = _FT("vsubsd"); extern const fcml_cstring M_VSUBSS = _FT("vsubss"); extern const fcml_cstring M_VTESTPD = _FT("vtestpd"); extern const fcml_cstring M_VTESTPS = _FT("vtestps"); extern const fcml_cstring M_VUCOMISD = _FT("vucomisd"); extern const fcml_cstring M_VUCOMISS = _FT("vucomiss"); extern const fcml_cstring M_VUNPCKHPD = _FT("vunpckhpd"); extern const fcml_cstring M_VUNPCKHPS = _FT("vunpckhps"); extern const fcml_cstring M_VUNPCKLPD = _FT("vunpcklpd"); extern const fcml_cstring M_VUNPCKLPS = _FT("vunpcklps"); extern const fcml_cstring M_VXORPD = _FT("vxorpd"); extern const fcml_cstring M_VXORPS = _FT("vxorps"); extern const fcml_cstring M_VZEROALL = _FT("vzeroall"); extern const fcml_cstring M_VZEROUPPER = _FT("vzeroupper"); extern const fcml_cstring M_WAIT = _FT("wait"); extern const fcml_cstring M_WBINVD = _FT("wbinvd"); extern const fcml_cstring M_WRFSBASE = _FT("wrfsbase"); extern const fcml_cstring M_WRGSBASE = _FT("wrgsbase"); extern const fcml_cstring M_WRMSR = _FT("wrmsr"); extern const fcml_cstring M_XABORT = _FT("xabort"); extern const fcml_cstring M_XADD = _FT("xadd"); extern const fcml_cstring M_XBEGIN = _FT("xbegin"); extern const fcml_cstring M_XCHG = _FT("xchg"); extern const fcml_cstring M_XEND = _FT("xend"); extern const fcml_cstring M_XGETBV = _FT("xgetbv"); extern const fcml_cstring M_XLAT = _FT("xlat"); extern const fcml_cstring M_XLATB = _FT("xlatb"); extern const fcml_cstring M_XOR = _FT("xor"); extern const fcml_cstring M_XORB = _FT("xorb"); extern const fcml_cstring M_XORL = _FT("xorl"); extern const fcml_cstring M_XORPD = _FT("xorpd"); extern const fcml_cstring M_XORPS = _FT("xorps"); extern const fcml_cstring M_XORQ = _FT("xorq"); extern const fcml_cstring M_XORW = _FT("xorw"); extern const fcml_cstring M_XRSTOR = _FT("xrstor"); extern const fcml_cstring M_XRSTOR64 = _FT("xrstor64"); extern const fcml_cstring M_XSAVE = _FT("xsave"); extern const fcml_cstring M_XSAVE64 = _FT("xsave64"); extern const fcml_cstring M_XSAVEOPT = _FT("xsaveopt"); extern const fcml_cstring M_XSAVEOPT64 = _FT("xsaveopt64"); extern const fcml_cstring M_XSETBV = _FT("xsetbv"); extern const fcml_cstring M_XTEST = _FT("xtest"); } } fcml-1.1.1/include/fcml_disassembler.h0000644000175000017500000003036312560745216014643 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_disassembler.h * Structures and functions declarations related to FCML disassembler. * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_DISASSEMBLER_H_ #define FCML_DISASSEMBLER_H_ #include "fcml_lib_export.h" #include "fcml_instructions.h" #include "fcml_types.h" #include "fcml_errors.h" #include "fcml_common.h" #include "fcml_dialect.h" #ifdef __cplusplus extern "C" { #endif /** Maximal number of instruction prefixes. */ #define FCML_DASM_PREFIXES_COUNT 12 /** First group of conditional suffixes (See FCML manual). */ #define FCML_DASM_CONDITIONAL_GROUP_1 0x00 /** Second group of conditional suffixes (See FCML manual). */ #define FCML_DASM_CONDITIONAL_GROUP_2 0x01 /** This structure and type declaration represents an abstract disassembler. */ typedef struct fcml_st_disassembler fcml_st_disassembler; /** Disassembler configuration. */ typedef struct fcml_st_disassembler_conf { /** Set to true in order to make disassembler to increment IP address by length of the disassembled instruction. */ fcml_bool increment_ip; /** True if optional error and warning messages should be collected during processing. */ fcml_bool enable_error_messages; /** True if suffixes for carry flag has to be used by disassembler.*/ fcml_bool carry_flag_conditional_suffix; /** There are two groups of suffixes for conditional instructions, you can choose which one should be used. */ fcml_uint8_t conditional_group; /** Set to true in order to use short forms. * For instance 'cmpsb' will be used instead of 'cmps byte ptr [si],byte ptr [di]' */ fcml_bool short_forms; /** True if displacement should be sign extended to effective address size; otherwise false. */ fcml_bool extend_disp_to_asa; /** If set to true assembler will return FCML_CEH_GEC_UNKNOWN_INSTRUCTION * error code if instruction is not known. */ fcml_bool fail_if_unknown_instruction; } fcml_st_disassembler_conf; /** Disassembler context. */ typedef struct fcml_st_disassembler_context { /** Disassembler used to decode instructions. */ fcml_st_disassembler *disassembler; /** Disassembler configuration. */ fcml_st_disassembler_conf configuration; /** Instruction entry point configuration. */ fcml_st_entry_point entry_point; /** Pointer to the encoded instruction. */ fcml_ptr code; /** Size of the code in the buffer above. */ fcml_usize code_length; } fcml_st_disassembler_context; /* Prefixes */ /** Available types of instruction prefixes. For more information see Intel/AMD Architecture Manual. */ typedef enum fcml_en_prefix_types { FCML_PT_GROUP_UNKNOWN = 0, FCML_PT_GROUP_1 = 1, FCML_PT_GROUP_2, FCML_PT_GROUP_3, FCML_PT_GROUP_4, FCML_PT_REX, FCML_PT_VEX, FCML_PT_XOP, } fcml_en_prefix_types; /** Describes one decoded prefix. */ typedef struct fcml_st_instruction_prefix { /** Prefix itself as raw byte. */ fcml_uint8_t prefix; /** Type of the prefix. */ fcml_en_prefix_types prefix_type; /** FCML_TRUE if prefix is treated as mandatory one. */ fcml_bool mandatory_prefix; /** Place for additional bytes of VEX/XOP prefix. */ fcml_uint8_t vex_xop_bytes[2]; } fcml_st_instruction_prefix; /** Contains some additional information about all decoded instruction prefixes. */ typedef struct fcml_st_prefixes_details { /** Array with decoded prefixes. */ fcml_st_instruction_prefix prefixes[FCML_DASM_PREFIXES_COUNT]; /** Number of decoded prefixes. */ fcml_int prefixes_count; /** Number of bytes used by all decoded prefixes. */ fcml_int prefixes_bytes_count; /** FCML_TRUE if branch prefix exists. */ fcml_bool is_branch; /** FCML_TRUE if nobranch prefix exists. */ fcml_bool is_nobranch; /** FCML_TRUE if lock explicit prefix exists. */ fcml_bool is_lock; /** FCML_TRUE if rep explicit prefix exists. */ fcml_bool is_rep; /** FCML_TRUE if repne explicit prefix exists. */ fcml_bool is_repne; /** FCML_TRUE if xrelease explicit prefix exists. */ fcml_bool is_xrelease; /** FCML_TRUE if xacquire explicit prefix exists. */ fcml_bool is_xacquire; /** FCML_TRUE if VEX prefix exists. */ fcml_bool is_vex; /** FCML_TRUE if XOP prefix exists. */ fcml_bool is_xop; /** FCML_TRUE if REX prefix exists. */ fcml_bool is_rex; /** Various fields encoded inside decoded prefixes.*/ fcml_uint8_t vex_xop_first_byte; /** R field of REX,XOP or VEX prefix. */ fcml_uint8_t r; /** X field of REX,XOP or VEX prefix. */ fcml_uint8_t x; /** B field of REX,XOP or VEX prefix. */ fcml_uint8_t b; /** W field of REX,XOP or VEX prefix. */ fcml_uint8_t w; /** L field of XOP or VEX prefix. */ fcml_uint8_t l; /** m-mmmm field of XOP or VEX prefix. */ fcml_uint8_t mmmm; /** vvvv field of XOP or VEX prefix. */ fcml_uint8_t vvvv; /** pp field of XOP or VEX prefix. */ fcml_uint8_t pp; } fcml_st_prefixes_details; /** Some additional disassembler specific information about decoded operands. */ typedef struct fcml_st_operand_details { /** Instruction operand access mode READ, WRITE or both. */ fcml_en_access_mode access_mode; } fcml_st_operand_details; /** Some basic information about decoded ModR/M and SIB bytes. */ typedef struct fcml_st_decoded_modrm_details { /** ModR/M byte if exists.*/ fcml_uint8_t modrm; /** SIB byte if exists.*/ fcml_nuint8_t sib; /** True if RIP encoding is used by decoded instruction. This flag is used only in 64 bit mode. */ fcml_bool is_rip; /** True if ModR/M exists. */ fcml_bool is_modrm; } fcml_st_decoded_modrm_details; /** Additional instruction details provided by disassembler. */ typedef struct fcml_st_instruction_details { /** True if this is a shortcut. * A good example of such instruction is 'cmpsb' as opposed to 'cmps byte ptr [si],byte ptr [di]'. * It is very important to take this information into consideration when instruction * models are analyzed because there is no operands in the GIM for shortcuts. */ fcml_bool is_shortcut; /** True if given instruction is a short form of pseudo-ops instructions. See 'vcmpunordsd' for instance. */ fcml_bool is_pseudo_op; /** Code of the disassembled instruction. */ fcml_uint8_t instruction_code[FCML_INSTRUCTION_SIZE]; /** Instruction size in bytes. */ fcml_usize instruction_size; /** Some additional information about decoded instruction prefixes. */ fcml_st_prefixes_details prefixes_details; /** All disassembler specific information about operands going there. */ fcml_st_operand_details operand_details[FCML_OPERANDS_COUNT]; /** Details about decoded ModR/M and SIB bytes. */ fcml_st_decoded_modrm_details modrm_details; /** Opcode field 's'. * This is set only for informational purpose only and you should not use it for any critical functionality. */ fcml_bool opcode_field_s_bit; /** Opcode field 'w'. * This is set only for informational purpose only and you should not use it for any critical functionality. */ fcml_bool opcode_field_w_bit; /** Instruction code/number. @see fcml_instructions.h header file. */ fcml_en_instruction instruction; /** Pseudo operation code. */ fcml_en_pseudo_operations pseudo_op; /** Code of the instruction form/addressing mode of the instruction above. */ fcml_uint16_t addr_mode; /** Instruction group. */ fcml_uint64_t instruction_group; } fcml_st_instruction_details; /** Reusable disassembler result holder. */ typedef struct fcml_st_disassembler_result { /** All errors and warnings messages going here. */ fcml_st_ceh_error_container errors; /** Additional disassembler specific information about decoded instruction. */ fcml_st_instruction_details instruction_details; /** Decoded instruction in its generic form.*/ fcml_st_instruction instruction; } fcml_st_disassembler_result; /** * Initializes disassembler instance. * Initializes disassembler instance for given dialect. Disassembler initialized in * such a way is dialect dependent and generates generic instruction models compliant * to the syntax supported by the dialect (Intel, AT&T). Every disassembler instance has * to be freed using fcml_fn_disassembler_free() function as soon as it is not needed anymore. * * @param dialect Dialect for newly created disassembler. * @param[out] disassembler Initialized disassembler instance. * @return Error code or FCML_CEH_GEC_NO_ERROR. * @see fcml_fn_disassembler_free */ LIB_EXPORT fcml_ceh_error LIB_CALL fcml_fn_disassembler_init( const fcml_st_dialect *dialect, fcml_st_disassembler **disassembler ); /** * Disassembles one instruction from provided code buffer. * Disassembles the first instruction available in the provided code buffer * using disassembler instance, configuration and entry point accessible through * the disassembler context. Disassembled instruction model as well as potential * errors are returned in reusable result holder given in the second parameter. * Result holder has to be allocated by the user and appropriately prepared * using fcml_fn_disassembler_result_prepare() function. As long as the * instruction context and the result holder are not shared across multiple * function calls disassembling process is thread safe. * * @param context Disassembler context. * @param result Appropriately prepared result holder. * @return Error code or FCML_CEH_GEC_NO_ERROR. * @see fcml_fn_disassembler_result_free */ LIB_EXPORT fcml_ceh_error LIB_CALL fcml_fn_disassemble( fcml_st_disassembler_context *context, fcml_st_disassembler_result *result ); /** * Prepares reusable result holder for disassembler. * Every instance of fcml_st_disassembler_result structure is reusable from the disassembler's * point of view, so it has to be prepared in the right way in order to allow disassembler to * reuse it correctly. It is up to the library user to allocate space for the holder itself. * This function is only responsible for cleaning the structure correctly and preparing it * for first disassembling process. Notice that disassembler has to clean the result holder * at the beginning so you can not pass an uninitialized memory block because it can even * cause a crash due to illegal memory access. * * @param result Result holder instance to be prepared. * @see fcml_fn_disassembler_result_free */ LIB_EXPORT void LIB_CALL fcml_fn_disassembler_result_prepare( fcml_st_disassembler_result *result ); /** * Cleans result holder. * Frees all memory blocks allocated by the disassembler and held inside the result holder * (Instructions, errors etc.). Notice that result holder itself is not freed and can be * even safety reused after calling this function. In fact this function is also called * internally by assembler in order to clean result holder before reusing it. * * @param result Result holder to clean. */ LIB_EXPORT void LIB_CALL fcml_fn_disassembler_result_free( fcml_st_disassembler_result *result ); /** * Frees disassembler instance. * Every disassembler instance manages some resources internally and as such it has * to be deallocated as soon as it is not needed anymore. * @param disassembler Disassembler to be freed. */ LIB_EXPORT void LIB_CALL fcml_fn_disassembler_free( fcml_st_disassembler *disassembler ); #ifdef __cplusplus } #endif #endif /* FCML_DISASSEMBLER_H_ */ fcml-1.1.1/include/fcml_intel_dialect.h0000644000175000017500000000361712560745216014770 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_intel_dialect.h * Intel dialect implementation. * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_ASM_DIALECT_INTEL_H_ #define FCML_ASM_DIALECT_INTEL_H_ #include "fcml_lib_export.h" #include "fcml_errors.h" #include "fcml_dialect.h" #ifdef __cplusplus extern "C" { #endif /** Default combination of the configuration flags.*/ #define FCML_INTEL_DIALECT_CF_DEFAULT 0 /** * Initializes Intel dialect. * Prepares new instance of Intel dialect for given set of configuration flags. * Every dialect has to be freed using fcml_fn_dialect_free() function. * * @param config_flags Configuration flags dedicated to the dialect. * @param[out] dialect Prepared dialect instance. * @return Error code or FCML_CEH_GEC_NO_ERROR. * @see fcml_fn_dialect_free */ LIB_EXPORT fcml_ceh_error LIB_CALL fcml_fn_dialect_init_intel( fcml_uint32_t config_flags, fcml_st_dialect **dialect ); #ifdef __cplusplus } #endif #endif /* FCML_ASM_DIALECT_INTEL_H_ */ fcml-1.1.1/include/fcml_parser.h0000644000175000017500000001464112560745216013463 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_parser.h * Structures and functions declarations related to FCML parsers * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_PARSER_H_ #define FCML_PARSER_H_ #include "fcml_lib_export.h" #include "fcml_types.h" #include "fcml_errors.h" #include "fcml_common.h" #include "fcml_dialect.h" #include "fcml_symbols.h" #ifdef __cplusplus extern "C" { #endif /** Maximal number of character for parsed instruction. */ #define FCML_PARSER_MAX_INSTRUCTION_LEN 1024 /** Parser configuration. */ typedef struct fcml_st_parser_config { /** Set to true in order to ignore all undefined symbols. * In such a case every unknown symbol is treated as 0. */ fcml_bool ignore_undefined_symbols; /** Disables symbols support. * It set to true every defined label will cause an error. */ fcml_bool disable_symbols_declaration; /** Set to true in order to allow overriding existing labels. * If set to false parser returns "Symbol already exists" error when symbol already exists. */ fcml_bool override_labels; /** By default parser ignores all symbol declarations * if there is no symbol table provided in the parser * context. By setting this value to true you can force * the parser to allocate new symbol table when needed. * Remember that you are then responsible for freeing it, * so this functionality can be a bit dangerous because * you have to check the existence of the symbol table * every time it should be deallocated. */ fcml_bool alloc_symbol_table_if_needed; // TODO: Support has to be implemented yet. /** Enables textual error messages. */ fcml_bool enable_error_messages; } fcml_st_parser_config; /** Parser runtime context. */ typedef struct fcml_st_parser_context { /** Dialect to be used by parser. Defines supported instructions syntax. */ fcml_st_dialect *dialect; /** Parser configuration. */ fcml_st_parser_config configuration; /** Instruction pointer. RIP/EIP register value used as a value for newly declared symbols. * This value is never changed by the parser. */ fcml_ip ip; /** Symbol table. It holds symbols added by the user as * well as symbols allocated by the parsers (labels). It is * very important to free this container on your own * because even if it is not allocated by the user it can be * set by the parser when the first symbol definition is found. * So the most safe way to manage it is to always use * "fcml_fn_symbol_table_free" function as soon as context * if going to be freed. */ fcml_st_symbol_table symbol_table; } fcml_st_parser_context; /** Reusable result holder */ typedef struct fcml_st_parser_result { /** Parsing errors and warnings going here. */ fcml_st_ceh_error_container errors; /** Defined symbol if there is any. * Remember that this symbol is also stored in the context's symbol table. * It is the symbol table that is the owner and that is responsible * for freeing it. */ fcml_st_symbol *symbol; /** Parsed instruction as generic instruction model. */ fcml_st_instruction *instruction; } fcml_st_parser_result; /** * Parses given instruction into the generic instruction model. * Parses the textual representation of the instruction using dialect and * configuration provided by the parser context. Parsed instruction is returned in the * reusable result holder. Result holder has to be allocated by the * user and appropriately prepared using fcml_fn_parser_result_prepare() * function. As long as the instruction context and the result holder * are not shared across multiple function calls parsing process is * thread safe. * * Remember that textual representation of the instruction has to be written * using syntax supported by the dialect parser is going to use. * * @param context Parser runtime context. * @param instruction textual representation of the instruction to be parsed. * @param result Reusable result holder. * @return Error code or FCML_CEH_GEC_NO_ERROR. */ LIB_EXPORT fcml_ceh_error LIB_CALL fcml_fn_parse( fcml_st_parser_context *context, const fcml_string instruction, fcml_st_parser_result *result ); /** * Prepares reusable result holder for parser. * Every instance of fcml_st_parser_result structure is reusable from the parser's * point of view, so it has to be prepared in the right way in order to allow parser to * reuse it correctly. It is up to the library user to allocate space for the holder itself. * This function is only responsible for cleaning the structure correctly and preparing it * for the first parsing process. Notice that parser has to clean the result holder at the * beginning so you can not pass an uninitialized memory block because it can even cause * a crash due to illegal memory access. * * @param result Result holder instance to be prepared. */ LIB_EXPORT void LIB_CALL fcml_fn_parser_result_prepare( fcml_st_parser_result *result ); /** * Cleans result holder. * Frees all memory blocks allocated by the parser and held inside the result holder (Instructions, errors etc.). * Notice that result holder itself is not freed and can be even safety reused after call to this function. * In fact this function is also called internally by the parser in order to clean result holder before * reusing it. * @param result Result holder to clean. */ LIB_EXPORT void LIB_CALL fcml_fn_parser_result_free( fcml_st_parser_result *result ); #ifdef __cplusplus } #endif #endif /* FCML_PARSER_H_ */ fcml-1.1.1/include/fcml_gas_dialect.hpp0000644000175000017500000000354412560745216014766 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_gas_dialect.hpp * C++ wrapper for the AT&T dialect. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_GAS_DIALECT_HPP_ #define FCML_GAS_DIALECT_HPP_ #include "fcml_dialect.hpp" #include "fcml_gas_dialect.h" namespace fcml { /** Wraps the AT&T dialect. * @since 1.1.0 */ class GASDialect: public Dialect { public: /** * Creates AT&T dialect. * * @param flags Optional flags. * @since 1.1.0 */ GASDialect( fcml_uint32_t flags = FCML_GAS_DIALECT_CF_DEFAULT ) { fcml_st_dialect *dialect; fcml_ceh_error error = ::fcml_fn_dialect_init_gas( flags, &dialect ); if ( error ) { throw InitException( FCML_TEXT( "Can not initialize the AT&T dialect." ), error ); } setDialect( dialect ); } /** * Virtual destructor. * @since 1.1.0 */ virtual ~GASDialect() { } }; } #endif /* FCML_GAS_DIALECT_HPP_ */ fcml-1.1.1/include/fcml_common.hpp0000644000175000017500000073502712560745216014027 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_common.hpp * C++ wrappers common classes. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_COMMON_HPP_ #define FCML_COMMON_HPP_ #include #include #include #include #include #include #include #include #include "fcml_types.h" #include "fcml_common.h" #include "fcml_common_utils.h" #include "fcml_errors.h" namespace fcml { #define FCML_TO_CPP_BOOL( x ) ( (x) ? true : false ) /** * By using this type definition here, it will be definitely much * easier to support UNICODE in future releases. * @since 1.1.0 */ typedef std::basic_string fcml_cstring; /** * String output stream. * @since 1.1.0 */ typedef std::basic_ostringstream fcml_costream; /** * Exposes API responsible for environment specific operations, even if standard CPP library is used * to implement them. * * @since 1.1.0 * @remarks Internal API, not intended to be used outside. */ class Env { public: /** * @throw std::bad_alloc * @since 1.1.0 */ static fcml_string strDup( const fcml_string str ) { if ( !str ) { return NULL; } #if defined(FCML_MSCC) fcml_string newStr = _strdup( str ); #else fcml_string newStr = strdup( str ); #endif if ( !newStr ) { throw std::bad_alloc(); } return newStr; } static void strFree( fcml_string str ) { free( str ); } }; /** * A base iterator interface. * @since 1.1.0 */ template class Iterator { public: Iterator() {} virtual ~Iterator() {} /** * Gets true if there is an another element in the iterator. */ virtual bool hasNext() = 0; /** * Gets a next element from the iterator. */ virtual T next() = 0; }; /** Wrapper for nullable value types. * @since 1.1.0 */ template class Nullable { public: Nullable( const T& value, bool is_not_null = false ) : _value( value ), _is_not_null( is_not_null ) { } Nullable() : _is_not_null( false ) { } bool isNotNull() const { return _is_not_null; } void setNotNull(bool isNull) { _is_not_null = isNull; } T getValue() const { return _value; } T& getValue() { return _value; } void setValue(const T& value) { this->_value = value; } private: /** Value. */ T _value; /** Information if value is set or not. */ bool _is_not_null; }; /** * Base exception for all exceptions exposed by FCML library. * @since 1.1.0 */ class BaseException { public: BaseException( fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR ) { this->_error = error; } BaseException( const fcml_cstring &msg, fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR ) { this->_msg = msg; this->_error = error; } BaseException( const BaseException &cpy ) { this->_msg = cpy._msg; this->_error = cpy._error; } virtual ~BaseException() { } BaseException& operator=( const BaseException &exc ) { if ( &exc != this ) { this->_msg = exc._msg; this->_error = exc._error; } return *this; } public: const fcml_cstring getMsg() const { return _msg; } const fcml_ceh_error& getError() const { return _error; } private: void* operator new( size_t size ) { return ::operator new( size ); } private: /** Error message. */ fcml_cstring _msg; /** Error code */ fcml_ceh_error _error; }; /** * Component can not be initialized correctly. * @since 1.1.0 */ class InitException: public BaseException { public: InitException( const fcml_cstring &msg, fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR ) : BaseException( msg, error ) { } }; /** * Bad arguments. * @since 1.1.0 */ class BadArgumentException: public BaseException { public: BadArgumentException( const fcml_cstring &msg, fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR ) : BaseException( msg, error ) { } }; /** * Illegal state exception. * @since 1.1.0 */ class IllegalStateException: public BaseException { public: IllegalStateException( const fcml_cstring &msg, fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR ) : BaseException( msg, error ) { } }; /** * Illegal argument exception. * @since 1.1.0 */ class IllegalArgumentException: public BaseException { public: IllegalArgumentException( const fcml_cstring &msg, fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR ) : BaseException( msg, error ) { } }; /** * Operation is not supported. * @since 1.1.0 */ class OperationNotSupportedException: public BaseException { public: OperationNotSupportedException( const fcml_cstring &msg ) : BaseException( msg ) { } OperationNotSupportedException() { } }; /** * Object which shouldn't be copied can inherit from this class. * @since 1.1.0 */ class NonCopyable { protected: NonCopyable() { } private: /** * @throw OperationNotSupportedException */ NonCopyable( const NonCopyable &cpy ) { throw OperationNotSupportedException(); } /** * @throw OperationNotSupportedException */ NonCopyable& operator=( const NonCopyable &exc ) { throw OperationNotSupportedException(); } }; /** Wraps instruction prefix and prepares factory methods for the hints. * The static method "create" is used here just to avoid the constructor overloading * what can be a bit problematic because fcml_prefix is an ordinal integer type. * @since 1.1.0 */ class InstructionPrefix { private: /** * Creates an instance of the instruction prefix for the given FCML prefix. * @param prefix The native FCML prefix. * @return Instruction prefix instance. */ static InstructionPrefix create( fcml_prefixes prefix ) { InstructionPrefix instructionPrefix; instructionPrefix._prefix = prefix; return instructionPrefix; } public: /** * Creates instruction prefix: LOCK. * @return Created instruction prefix. */ static const InstructionPrefix LOCK() { return create(FCML_PREFIX_LOCK); } /** * Creates instruction prefix: REPNE. * @return Created instruction prefix. */ static const InstructionPrefix REPNE() { return create(FCML_PREFIX_REPNE); } /** * Creates instruction prefix: REPNZ. * @return Created instruction prefix. */ static const InstructionPrefix REPNZ() { return create(FCML_PREFIX_REPNZ); } /** * Creates instruction prefix: REP. * @return Created instruction prefix. */ static const InstructionPrefix REP() { return create(FCML_PREFIX_REP); } /** * Creates instruction prefix: REPE. * @return Created instruction prefix. */ static const InstructionPrefix REPE() { return create(FCML_PREFIX_REPE); } /** * Creates instruction prefix: REPZ. * @return Created instruction prefix. */ static const InstructionPrefix REPZ() { return create(FCML_PREFIX_REPZ); } /** * Creates instruction prefix: XACQUIRE. * @return Created instruction prefix. */ static const InstructionPrefix XACQUIRE() { return create(FCML_PREFIX_XACQUIRE); } /** * Creates instruction prefix: XRELEASE. * @return Created instruction prefix. */ static const InstructionPrefix XRELEASE() { return create(FCML_PREFIX_XRELEASE); } /** * Creates instruction prefix: BRANCH_HINT. * @return Created instruction prefix. */ static const InstructionPrefix BRANCH_HINT() { return create(FCML_PREFIX_BRANCH_HINT); } /** * Creates instruction prefix: NOBRANCH_HINT. * @return Created instruction prefix. */ static const InstructionPrefix NOBRANCH_HINT() { return create(FCML_PREFIX_NOBRANCH_HINT); } public: fcml_prefixes _prefix; }; /** Wraps instruction hint and exposes factory methods for instruction hints. * @since 1.1.0 */ struct InstructionHint { private: /** * Creates an instruction level hints for given native FCML hints. * @param hints The hints set. */ InstructionHint(fcml_en_instruction_hints hints) : _hint(hints) { } public: /** * Creates instruction hint: NO_HINTS. * @return Instruction hint. */ static const InstructionHint NO_HINTS() { return InstructionHint(FCML_HINT_NO_HINTS); } /** * Creates instruction hint: NEAR_POINTER. * @return Instruction hint. */ static const InstructionHint NEAR_POINTER() { return InstructionHint(FCML_HINT_NEAR_POINTER); } /** * Creates instruction hint: FAR_POINTER. * @return Instruction hint. */ static const InstructionHint FAR_POINTER() { return InstructionHint(FCML_HINT_FAR_POINTER); } /** * Creates instruction hint: LONG_FORM_POINTER. * @return Instruction hint. */ static const InstructionHint LONG_FORM_POINTER() { return InstructionHint(FCML_HINT_LONG_FORM_POINTER); } /** * Creates instruction hint: INDIRECT_POINTER. * @return Instruction hint. */ static const InstructionHint INDIRECT_POINTER() { return InstructionHint(FCML_HINT_INDIRECT_POINTER); } /** * Creates instruction hint: DIRECT_POINTER. * @return Instruction hint. */ static const InstructionHint DIRECT_POINTER() { return InstructionHint(FCML_HINT_DIRECT_POINTER); } public: fcml_en_instruction_hints _hint; }; /** Wraps operand hint and exposes factory methods for instruction hints. * @since 1.1.0 */ struct OperandHint { private: OperandHint(fcml_en_operand_hints hint) : _hint(hint) { } public: /** * Creates operand level hint: UNDEFIEND. * @return Operand level hint. */ static const OperandHint UNDEFIEND() { return OperandHint(FCML_OP_HINT_UNDEFIEND); } /** * Creates operand level hint: MULTIMEDIA_INSTRUCTION. * @return Operand level hint. */ static const OperandHint MULTIMEDIA() { return OperandHint(FCML_OP_HINT_MULTIMEDIA_INSTRUCTION); } /** * Creates operand level hint: DISPLACEMENT_RELATIVE_ADDRESS. * @return Operand level hint. */ static const OperandHint DISPLACEMENT_RELATIVE_ADDRESS() { return OperandHint(FCML_OP_HINT_DISPLACEMENT_RELATIVE_ADDRESS); } /** * Creates operand level hint: PSEUDO_OPCODE. * @return Operand level hint. */ static const OperandHint PSEUDO_OPCODE() { return OperandHint(FCML_OP_HINT_PSEUDO_OPCODE); } /** * Creates operand level hint: ABSOLUTE_ADDRESSING. * @return Operand level hint. */ static const OperandHint ABSOLUTE_ADDRESSING() { return OperandHint(FCML_OP_HINT_ABSOLUTE_ADDRESSING); } /** * Creates operand level hint: RELATIVE_ADDRESSING. * @return Operand level hint. */ static const OperandHint RELATIVE_ADDRESSING() { return OperandHint(FCML_OP_HINT_RELATIVE_ADDRESSING); } /** * Creates operand level hint: SIB_ENCODING. * @return Operand level hint. */ static const OperandHint SIB_ENCODING() { return OperandHint(FCML_OP_HINT_SIB_ENCODING); } public: fcml_en_operand_hints _hint; }; /** * Holds instruction pointer, processor operating mode and memory segment flags. * @since 1.1.0 */ class EntryPoint { public: /** * Supported operating modes. * @since 1.1.0 */ enum OperatingMode { OM_16_BIT = FCML_OM_16_BIT, OM_32_BIT = FCML_OM_32_BIT, OM_64_BIT = FCML_OM_64_BIT }; /** * Creates an empty entry point instance. * @since 1.1.0 */ EntryPoint() : _opMode(OM_32_BIT), _addressSizeAttribute(FCML_DS_32), _operandSizeAttribute(FCML_DS_32), _ip(0) { } /** * Creates an entry point instance for given processor operating mode, instruction pointer and optionally size attributes. * @param opMode The processor operating mode. * @param ip The instruction pointer. * @param addressSizeAttribute The optional address size attribute. * @param operandSizeAttribute The optional operand size attribute. * @since 1.1.0 */ EntryPoint(OperatingMode opMode, fcml_ip ip = 0, fcml_usize addressSizeAttribute = FCML_DS_UNDEF, fcml_usize operandSizeAttribute = FCML_DS_UNDEF ) : _opMode(opMode), _addressSizeAttribute(addressSizeAttribute), _operandSizeAttribute(operandSizeAttribute), _ip(ip) { } virtual ~EntryPoint() { } public: /** * Checks if two entry points are equal. * * @param ep The source entry point. * @return True if they are equal; otherwise false. * @since 1.1.0 */ bool operator==( const EntryPoint &ep ) const { return _opMode == ep._opMode && _ip == ep._ip && _operandSizeAttribute == ep._operandSizeAttribute && _addressSizeAttribute == ep._addressSizeAttribute; } /** * Checks if two entry points are not equal. * * @param ep The source entry point. * @return True if they are not equal; otherwise false. * @since 1.1.0 */ bool operator!=( const EntryPoint &ep ) const { return !(ep == *this); } public: /** * Gets address size attribute held by the entry point. * * @return Address size attribute. * @since 1.1.0 */ fcml_usize getAddressSizeAttribute() const { return _addressSizeAttribute; } /** * Sets a new address size attribute for the entry point. * * @param addressSizeAttribute The address size attribute. * @since 1.1.0 */ void setAddressSizeAttribute( fcml_usize addressSizeAttribute ) { _addressSizeAttribute = addressSizeAttribute; } /** * Gets operand size attribute held by the entry point. * * @return Operand size attribute. * @since 1.1.0 */ fcml_usize getOperandSizeAttribute() const { return _operandSizeAttribute; } /** * Sets a new operand size attribute for the entry point. * * @param operandSizeAttribute The operand size attribute. * @since 1.1.0 */ void setOperandSizeAttribute( fcml_usize operandSizeAttribute ) { _operandSizeAttribute = operandSizeAttribute; } /** * Gets instruction pointer held by the entry point. * * @return Instruction pointer. * @since 1.1.0 */ fcml_ip getIP() const { return _ip; } /** * Sets a new instruction pointer for the entry point. * * @param ip The new instruction pointer. * @since 1.1.0 */ void setIP( fcml_ip ip ) { _ip = ip; } /** * Gets processor operating mode. * * @return Processor operating mode. * @since 1.1.0 */ OperatingMode getOpMode() const { return _opMode; } /** * Sets a new processor operating mode for the entry point. * * @param opMode The new processor operating mode. * @since 1.1.0 */ void setOpMode( OperatingMode opMode ) { _opMode = opMode; } /** * Increments the instruction pointer by given number of bytes. * * @param ip Number for bytes the instruction pointer should be incremented by. * @since 1.1.0 */ void incrementIP( fcml_ip ip ) { _ip += ip; } private: /** Processor operating mode */ OperatingMode _opMode; /** Size of the address size attribute. */ fcml_usize _addressSizeAttribute; /** Size of the operand size attribute. */ fcml_usize _operandSizeAttribute; /** Instruction pointer. Content of the EIP/RIP register. */ fcml_ip _ip; }; /** * Represents integer value. * @since 1.1.0 */ class Integer { public: /** @since 1.1.0 */ Integer() : _size( FCML_DS_64 ), _isSigned( FCML_FALSE ), _vint8( 0 ), _vint16( 0 ), _vint32( 0 ), _vint64( 0 ) { } /** @since 1.1.0 */ Integer( fcml_int8_t value ) : _size( FCML_DS_8 ), _isSigned( FCML_TRUE ), _vint8( value ), _vint16( 0 ), _vint32( 0 ), _vint64( 0 ) { } /** @since 1.1.0 */ Integer( fcml_int16_t value ) : _size( FCML_DS_16 ), _isSigned( FCML_TRUE ), _vint8( 0 ), _vint16( value ), _vint32( 0 ), _vint64( 0 ) { } /** @since 1.1.0 */ Integer( fcml_int32_t value ) : _size( FCML_DS_32 ), _isSigned( FCML_TRUE ), _vint8( 0 ), _vint16( 0 ), _vint32( value ), _vint64( 0 ) { } /** @since 1.1.0 */ Integer( fcml_int64_t value ) : _size( FCML_DS_64 ), _isSigned( FCML_TRUE ), _vint8( 0 ), _vint16( 0 ), _vint32( 0 ), _vint64( value ) { } /** @since 1.1.0 */ Integer( fcml_uint8_t value ) : _size( FCML_DS_8 ), _isSigned( FCML_FALSE ), _vint8( static_cast( value ) ), _vint16( 0 ), _vint32( 0 ), _vint64( 0 ) { } /** @since 1.1.0 */ Integer( fcml_uint16_t value ) : _size( FCML_DS_16 ), _isSigned( FCML_FALSE ), _vint8( 0 ), _vint16( static_cast( value ) ), _vint32( 0 ), _vint64( 0 ) { } /** @since 1.1.0 */ Integer( fcml_uint32_t value ) : _size( FCML_DS_32 ), _isSigned( FCML_FALSE ), _vint8( 0 ), _vint16( 0 ), _vint32( static_cast( value ) ), _vint64( 0 ) { } /** @since 1.1.0 */ Integer( fcml_uint64_t value ) : _size( FCML_DS_64 ), _isSigned( FCML_FALSE ), _vint8( 0 ), _vint16( 0 ), _vint32( 0 ), _vint64( static_cast( value ) ) { } /** @since 1.1.0 */ virtual ~Integer() { } public: /** @since 1.1.0 */ fcml_int16_t getInt16() const { return _vint16; } /** @since 1.1.0 */ Integer& setInt16( fcml_int16_t int16 ) { _vint16 = int16; return *this; } /** @since 1.1.0 */ fcml_int32_t getInt32() const { return _vint32; } /** @since 1.1.0 */ Integer& setInt32( fcml_int32_t int32 ) { _vint32 = int32; return *this; } /** @since 1.1.0 */ fcml_int64_t getInt64() const { return _vint64; } /** @since 1.1.0 */ Integer& setInt64( fcml_int64_t int64 ) { _vint64 = int64; return *this; } /** @since 1.1.0 */ fcml_int8_t getInt8() const { return _vint8; } /** @since 1.1.0 */ Integer& setInt8( fcml_int8_t int8 ) { _vint8 = int8; return *this; } /** @since 1.1.0 */ fcml_bool isSigned() const { return _isSigned; } /** @since 1.1.0 */ Integer& setSigned( fcml_bool isSigned ) { _isSigned = isSigned; return *this; } /** @since 1.1.0 */ fcml_usize getSize() const { return _size; } /** @since 1.1.0 */ Integer& setSize( fcml_usize size ) { _size = size; return *this; } /** * Checks if the integer is equal to the passed value. * * @param value The source value to be compared with the integer. * @return True if values are equal; otherwise false. * @since 1.1.0 */ bool operator==( const fcml_uint8_t value ) const { return _isSigned ? static_cast( *this ) == static_cast( value ) : static_cast( *this ) == static_cast( value ); } /** * Checks if the integer is equal to the passed value. * * @param value The source value to be compared with the integer. * @return True if values are equal; otherwise false. * @since 1.1.0 */ bool operator==( const fcml_int8_t value ) const { return _isSigned ? static_cast( *this ) == static_cast( value ) : static_cast( *this ) == static_cast( value ); } /** * Checks if the integer is equal to the passed value. * * @param value The source value to be compared with the integer. * @return True if values are equal; otherwise false. * @since 1.1.0 */ bool operator==( const fcml_uint16_t value ) const { return _isSigned ? static_cast( *this ) == static_cast( value ) : static_cast( *this ) == static_cast( value ); } /** * Checks if the integer is equal to the passed value. * * @param value The source value to be compared with the integer. * @return True if values are equal; otherwise false. * @since 1.1.0 */ bool operator==( const fcml_int16_t value ) const { return _isSigned ? static_cast( *this ) == static_cast( value ) : static_cast( *this ) == static_cast( value ); } /** * Checks if the integer is equal to the passed value. * * @param value The source value to be compared with the integer. * @return True if values are equal; otherwise false. * @since 1.1.0 */ bool operator==( const fcml_uint32_t value ) const { return _isSigned ? static_cast( *this ) == static_cast( value ) : static_cast( *this ) == static_cast( value ); } /** * Checks if the integer is equal to the passed value. * * @param value The source value to be compared with the integer. * @return True if values are equal; otherwise false. * @since 1.1.0 */ bool operator==( const fcml_int32_t value ) const { return _isSigned ? static_cast( *this ) == static_cast( value ) : static_cast( *this ) == static_cast( value ); } /** * Checks if the integer is equal to the passed value. * * @param value The source value to be compared with the integer. * @return True if values are equal; otherwise false. * @since 1.1.0 */ bool operator==( const fcml_uint64_t value ) const { return _isSigned ? static_cast( *this ) == static_cast( value ) : static_cast( *this ) == static_cast( value ); } /** * Checks if the integer is equal to the passed value. * * @param value The source value to be compared with the integer. * @return True if values are equal; otherwise false. * @since 1.1.0 */ bool operator==( const fcml_int64_t value ) const { return _isSigned ? static_cast( *this ) == static_cast( value ) : static_cast( *this ) == static_cast( value ); } /** * Checks if the integer is equal to the passed value. * * @param value The source value to be compared with the integer. * @return True if values are equal; otherwise false. * @since 1.1.0 */ bool operator==( const Integer &value ) const { return _isSigned ? static_cast( *this ) == static_cast( value ) : static_cast( *this ) == static_cast( value ); } /** * Checks if the integer is not equal to the passed value. * * @param value The source value to be compared with the integer. * @return True if values are not equal; otherwise false. * @since 1.1.0 */ bool operator!=( const fcml_uint8_t value ) const { return _isSigned ? static_cast( *this ) != static_cast( value ) : static_cast( *this ) != static_cast( value ); } /** * Checks if the integer is not equal to the passed value. * * @param value The source value to be compared with the integer. * @return True if values are not equal; otherwise false. * @since 1.1.0 */ bool operator!=( const fcml_int8_t value ) const { return _isSigned ? static_cast( *this ) != static_cast( value ) : static_cast( *this ) != static_cast( value ); } /** * Checks if the integer is not equal to the passed value. * * @param value The source value to be compared with the integer. * @return True if values are not equal; otherwise false. * @since 1.1.0 */ bool operator!=( const fcml_uint16_t value ) const { return _isSigned ? static_cast( *this ) != static_cast( value ) : static_cast( *this ) != static_cast( value ); } /** * Checks if the integer is not equal to the passed value. * * @param value The source value to be compared with the integer. * @return True if values are not equal; otherwise false. * @since 1.1.0 */ bool operator!=( const fcml_int16_t value ) const { return _isSigned ? static_cast( *this ) != static_cast( value ) : static_cast( *this ) != static_cast( value ); } /** * Checks if the integer is not equal to the passed value. * * @param value The source value to be compared with the integer. * @return True if values are not equal; otherwise false. * @since 1.1.0 */ bool operator!=( const fcml_uint32_t value ) const { return _isSigned ? static_cast( *this ) != static_cast( value ) : static_cast( *this ) != static_cast( value ); } /** * Checks if the integer is not equal to the passed value. * * @param value The source value to be compared with the integer. * @return True if values are not equal; otherwise false. * @since 1.1.0 */ bool operator!=( const fcml_int32_t value ) const { return _isSigned ? static_cast( *this ) != static_cast( value ) : static_cast( *this ) != static_cast( value ); } /** * Checks if the integer is not equal to the passed value. * * @param value The source value to be compared with the integer. * @return True if values are not equal; otherwise false. * @since 1.1.0 */ bool operator!=( const fcml_uint64_t value ) const { return _isSigned ? static_cast( *this ) != static_cast( value ) : static_cast( *this ) != static_cast( value ); } /** * Checks if the integer is not equal to the passed value. * * @param value The source value to be compared with the integer. * @return True if values are not equal; otherwise false. * @since 1.1.0 */ bool operator!=( const fcml_int64_t value ) const { return _isSigned ? static_cast( *this ) != static_cast( value ) : static_cast( *this ) != static_cast( value ); } /** * Checks if the integer is not equal to the passed value. * * @param value The source value to be compared with the integer. * @return True if values are not equal; otherwise false. * @since 1.1.0 */ bool operator!=( const Integer &value ) const { return _isSigned ? static_cast( *this ) != static_cast( value ) : static_cast( *this ) != static_cast( value ); } /** * A casting operator. * @since 1.1.0 * @throw BadArgumentException Wrong data size. */ operator fcml_int8_t() const { fcml_int8_t result; switch ( _size ) { case FCML_DS_8: result = static_cast( _isSigned ? _vint8 : (fcml_uint8_t)_vint8 ); break; case FCML_DS_16: result = static_cast( _isSigned ? _vint16 : (fcml_uint16_t)_vint16 ); break; case FCML_DS_32: result = static_cast( _isSigned ? _vint32 : (fcml_uint32_t)_vint32 ); break; case FCML_DS_64: result = static_cast( _isSigned ? _vint64 : (fcml_uint64_t)_vint64 ); break; default: throw BadArgumentException( FCML_TEXT( "Wrong size." ) ); } return result; } /** * A casting operator. * @since 1.1.0 * @throw BadArgumentException Wrong indeger size. */ operator fcml_uint8_t() const { fcml_uint8_t result; switch ( _size ) { case FCML_DS_8: result = static_cast( _isSigned ? _vint8 : (fcml_uint8_t)_vint8 ); break; case FCML_DS_16: result = static_cast( _isSigned ? _vint16 : (fcml_uint16_t)_vint16 ); break; case FCML_DS_32: result = static_cast( _isSigned ? _vint32 : (fcml_uint32_t)_vint32 ); break; case FCML_DS_64: result = static_cast( _isSigned ? _vint64 : (fcml_uint64_t)_vint64 ); break; default: throw BadArgumentException( FCML_TEXT( "Wrong size." ) ); } return result; } /** * A casting operator. * @since 1.1.0 * @throw BadArgumentException Wrong integer size. */ operator fcml_int16_t() const { fcml_int16_t result; switch ( _size ) { case FCML_DS_8: result = static_cast( _isSigned ? _vint8 : (fcml_uint8_t)_vint8 ); break; case FCML_DS_16: result = static_cast( _isSigned ? _vint16 : (fcml_uint16_t)_vint16 ); break; case FCML_DS_32: result = static_cast( _isSigned ? _vint32 : (fcml_uint32_t)_vint32 ); break; case FCML_DS_64: result = static_cast( _isSigned ? _vint64 : (fcml_uint64_t)_vint64 ); break; default: throw BadArgumentException( FCML_TEXT( "Wrong size." ) ); } return result; } /** * A casting operator. * @since 1.1.0 * @throw BadArgumentException Wrong integer size. */ operator fcml_uint16_t() const { fcml_uint16_t result; switch ( _size ) { case FCML_DS_8: result = static_cast( _isSigned ? _vint8 : (fcml_uint8_t)_vint8 ); break; case FCML_DS_16: result = static_cast( _isSigned ? _vint16 : (fcml_uint16_t)_vint16 ); break; case FCML_DS_32: result = static_cast( _isSigned ? _vint32 : (fcml_uint32_t)_vint32 ); break; case FCML_DS_64: result = static_cast( _isSigned ? _vint64 : (fcml_uint64_t)_vint64 ); break; default: throw BadArgumentException( FCML_TEXT( "Wrong size." ) ); } return result; } /** * A casting operator. * @since 1.1.0 * @throw BadArgumentException Wrong integer size. */ operator fcml_int32_t() const { fcml_int32_t result; switch ( _size ) { case FCML_DS_8: result = static_cast( _isSigned ? _vint8 : (fcml_uint8_t)_vint8 ); break; case FCML_DS_16: result = static_cast( _isSigned ? _vint16 : (fcml_uint16_t)_vint16 ); break; case FCML_DS_32: result = static_cast( _isSigned ? _vint32 : (fcml_uint32_t)_vint32 ); break; case FCML_DS_64: result = static_cast( _isSigned ? _vint64 : (fcml_uint64_t)_vint64 ); break; default: throw BadArgumentException( FCML_TEXT( "Wrong size." ) ); } return result; } /** * A casting operator. * @since 1.1.0 * @throw BadArgumentException Wrong integer size. */ operator fcml_uint32_t() const { fcml_uint32_t result; switch ( _size ) { case FCML_DS_8: result = static_cast( _isSigned ? _vint8 : (fcml_uint8_t)_vint8 ); break; case FCML_DS_16: result = static_cast( _isSigned ? _vint16 : (fcml_uint16_t)_vint16 ); break; case FCML_DS_32: result = static_cast( _isSigned ? _vint32 : (fcml_uint32_t)_vint32 ); break; case FCML_DS_64: result = static_cast( _isSigned ? _vint64 : (fcml_uint64_t)_vint64 ); break; default: throw BadArgumentException( FCML_TEXT( "Wrong size." ) ); } return result; } /** * A casting operator. * @since 1.1.0 * @throw BadArgumentException Wrong integer size. */ operator fcml_int64_t() const { fcml_int64_t result; switch ( _size ) { case FCML_DS_8: result = static_cast( _isSigned ? _vint8 : (fcml_uint8_t)_vint8 ); break; case FCML_DS_16: result = static_cast( _isSigned ? _vint16 : (fcml_uint16_t)_vint16 ); break; case FCML_DS_32: result = static_cast( _isSigned ? _vint32 : (fcml_uint32_t)_vint32 ); break; case FCML_DS_64: result = static_cast( _isSigned ? _vint64 : (fcml_uint64_t)_vint64 ); break; default: throw BadArgumentException( FCML_TEXT( "Wrong size." ) ); } return result; } /** * A casting operator. * @since 1.1.0 * @throw BadArgumentException Wrong integer size. */ operator fcml_uint64_t() const { fcml_uint64_t result; switch ( _size ) { case FCML_DS_8: result = static_cast( _isSigned ? _vint8 : (fcml_uint8_t)_vint8 ); break; case FCML_DS_16: result = static_cast( _isSigned ? _vint16 : (fcml_uint16_t)_vint16 ); break; case FCML_DS_32: result = static_cast( _isSigned ? _vint32 : (fcml_uint32_t)_vint32 ); break; case FCML_DS_64: result = static_cast( _isSigned ? _vint64 : (fcml_uint64_t)_vint64 ); break; default: throw BadArgumentException( FCML_TEXT( "Wrong size." ) ); } return result; } /** * Addition assignment. * @since 1.1.0 */ Integer& operator +=( const Integer &arg ) { plus( *this, arg ); return ( *this ); } /** * Multiplication assignment. * @since 1.1.0 */ Integer& operator *=( const Integer &arg ) { mul( *this, arg ); return ( *this ); } /** * Division assignment. * @since 1.1.0 */ Integer& operator /=( const Integer &arg ) { div( *this, arg ); return ( *this ); } /** * Subtraction assignment. * @since 1.1.0 */ Integer& operator -=( const Integer &arg ) { minus( *this, arg ); return ( *this ); } /** * Addition operator. * @since 1.1.0 */ Integer operator+( const Integer &src ) const { const Integer &thisRef = *this; Integer result( thisRef ); plus( result, src ); return result; } /** * Subtraction operator. * @since 1.1.0 */ Integer operator-( const Integer &src ) const { const Integer &thisRef = *this; Integer result( thisRef ); minus( result, src ); return result; } /** * Multiplication operator. * @since 1.1.0 */ Integer operator*( const Integer &src ) const { const Integer &thisRef = *this; Integer result( thisRef ); mul( result, src ); return result; } /** * Division operator. * @since 1.1.0 */ Integer operator/( const Integer &src ) const { const Integer &thisRef = *this; Integer result( thisRef ); div( result, src ); return result; } public: /** * Factory method which creates an instance fo the Integer for given parameter. * @param value The value for the newly created Integer. * @return The created Integer instance. * @since 1.1.0 */ static Integer int8( fcml_int8_t value ) { return Integer( value ); } /** * Factory method which creates an instance fo the Integer for given parameter. * @param value The value for the newly created Integer. * @return The created Integer instance. * @since 1.1.0 */ static Integer uint8( fcml_uint8_t value ) { return Integer( value ); } /** * Factory method which creates an instance fo the Integer for given parameter. * @param value The value for the newly created Integer. * @return The created Integer instance. * @since 1.1.0 */ static Integer int16( fcml_int16_t value ) { return Integer( value ); } /** * Factory method which creates an instance fo the Integer for given parameter. * @param value The value for the newly created Integer. * @return The created Integer instance. * @since 1.1.0 */ static Integer uint16( fcml_uint16_t value ) { return Integer( value ); } /** * Factory method which creates an insatnce fo the Integer for given parameter. * @param value The value for the newly created Integer. * @return The created Integer instance. * @since 1.1.0 */ static Integer int32( fcml_int32_t value ) { return Integer( value ); } /** * Factory method which creates an insatnce fo the Integer for given parameter. * @param value The value for the newly created Integer. * @return The created Integer instance. * @since 1.1.0 */ static Integer uint32( fcml_uint32_t value ) { return Integer( value ); } /** * Factory method which creates an insatnce fo the Integer for given parameter. * @param value The value for the newly created Integer. * @return The created Integer instance. * @since 1.1.0 */ static Integer int64( fcml_int64_t value ) { return Integer( value ); } /** * Factory method which creates an insatnce fo the Integer for given parameter. * @param value The value for the newly created Integer. * @return The created Integer instance. * @since 1.1.0 */ static Integer uint64( fcml_uint64_t value ) { return Integer( value ); } private: /** * @remark An internal API. * @since 1.1.0 */ void minus( Integer &result, const Integer &src ) const { callMathExpression( &doMinus, &doUMinus, result, src ); } /** * @remark An internal API. * @since 1.1.0 */ void mul( Integer &result, const Integer &src ) const { callMathExpression( &doMul, &doUMul, result, src ); } /** * @remark An internal API. * @since 1.1.0 */ void div( Integer &result, const Integer &src ) const { callMathExpression( &doDiv, &doUDiv, result, src ); } /** * @remark An internal API. * @since 1.1.0 */ void plus( Integer &result, const Integer &src ) const { callMathExpression( &doPlus, &doUPlus, result, src ); } private: /** * @remark An internal API. * @since 1.1.0 */ static fcml_int64_t doPlus( fcml_int64_t thisValue, fcml_int64_t thatValue ) { return thisValue + thatValue; } /** * @remark An internal API. * @since 1.1.0 */ static fcml_int64_t doMinus( fcml_int64_t thisValue, fcml_int64_t thatValue ) { return thisValue - thatValue; } /** * @remark An internal API. * @since 1.1.0 */ static fcml_int64_t doMul( fcml_int64_t thisValue, fcml_int64_t thatValue ) { return thisValue * thatValue; } /** * @remark An internal API. * @since 1.1.0 */ static fcml_int64_t doDiv( fcml_int64_t thisValue, fcml_int64_t thatValue ) { return thisValue / thatValue; } /** * @remark An internal API. * @since 1.1.0 */ static fcml_uint64_t doUPlus( fcml_uint64_t thisValue, fcml_uint64_t thatValue ) { return thisValue + thatValue; } /** * @remark An internal API. * @since 1.1.0 */ static fcml_uint64_t doUMinus( fcml_uint64_t thisValue, fcml_uint64_t thatValue ) { return thisValue - thatValue; } /** * @remark An internal API. * @since 1.1.0 */ static fcml_uint64_t doUMul( fcml_uint64_t thisValue, fcml_uint64_t thatValue ) { return thisValue * thatValue; } /** * @remark An internal API. * @since 1.1.0 */ static fcml_uint64_t doUDiv( fcml_uint64_t thisValue, fcml_uint64_t thatValue ) { return thisValue / thatValue; } /** * @remark An internal API. * @since 1.1.0 */ void callMathExpression( fcml_int64_t (*signedExpressionFn)( fcml_int64_t thisValue, fcml_int64_t thatValue ), fcml_uint64_t (*unsignedExpressionFn)( fcml_uint64_t thisValue, fcml_uint64_t thatValue ), Integer &result, const Integer &src ) const { if( _isSigned ) { fcml_int64_t thisValue; fcml_int64_t thatValue; // Prepare "that". It has to be converted to the same sign. switch( src._size ) { case FCML_DS_8: thatValue = src._isSigned ? src._vint8 : static_cast( src._vint8 ); break; case FCML_DS_16: thatValue = src._isSigned ? src._vint16 : static_cast( src._vint16 ); break; case FCML_DS_32: thatValue = src._isSigned ? src._vint32 : static_cast( src._vint32 ); break; case FCML_DS_64: thatValue = src._isSigned ? src._vint64 : static_cast( src._vint64 ); break; } // Now "this". switch( result._size ) { case FCML_DS_8: thisValue = result._isSigned ? result._vint8 : static_cast(result._vint8 ); thisValue = (*signedExpressionFn)( thisValue, thatValue ); result._vint8 = static_cast( thisValue ); break; case FCML_DS_16: thisValue = result._isSigned ? result._vint16 : static_cast( result._vint16 ); thisValue = (*signedExpressionFn)( thisValue, thatValue ); result._vint16 = static_cast( thisValue ); break; case FCML_DS_32: thisValue = result._isSigned ? result._vint32 : static_cast( result._vint32 ); thisValue = (*signedExpressionFn)( thisValue, thatValue ); result._vint32 = static_cast( thisValue ); break; case FCML_DS_64: thisValue = result._isSigned ? result._vint64 : static_cast( result._vint64 ); thisValue = (*signedExpressionFn)( thisValue, thatValue ); result._vint64 = thisValue; break; } } else { fcml_uint64_t thisValue; fcml_uint64_t thatValue; // Prepare "that". It has to be converted to the same sign. switch( src._size ) { case FCML_DS_8: thatValue = src._isSigned ? src._vint8 : static_cast( src._vint8 ); break; case FCML_DS_16: thatValue = src._isSigned ? src._vint16 : static_cast( src._vint16 ); break; case FCML_DS_32: thatValue = src._isSigned ? src._vint32 : static_cast( src._vint32 ); break; case FCML_DS_64: thatValue = src._isSigned ? src._vint64 : static_cast( src._vint64 ); break; } // Now "this". switch( result._size ) { case FCML_DS_8: thisValue = result._isSigned ? result._vint8 : static_cast( result._vint8 ); thisValue = (*unsignedExpressionFn)( thisValue, thatValue ); result._vint8 = static_cast( thisValue ); break; case FCML_DS_16: thisValue = result._isSigned ? result._vint16 : static_cast( result._vint16 ); thisValue = (*unsignedExpressionFn)( thisValue, thatValue ); result._vint16 = static_cast( thisValue ); break; case FCML_DS_32: thisValue = result._isSigned ? result._vint32 : static_cast( result._vint32 ); thisValue = (*unsignedExpressionFn)( thisValue, thatValue ); result._vint32 = static_cast( thisValue ); break; case FCML_DS_64: thisValue = result._isSigned ? result._vint64 : static_cast( result._vint64 ); thisValue = (*unsignedExpressionFn)( thisValue, thatValue ); result._vint64 = thisValue; break; } } } private: fcml_usize _size; fcml_bool _isSigned; fcml_int8_t _vint8; fcml_int16_t _vint16; fcml_int32_t _vint32; fcml_int64_t _vint64; }; /** * x86 - 64 register representation. * @since 1.1.0 */ class Register { public: /** Register types. * @since 1.1.0 */ enum RegisterType { /** Undefined register type. */ REG_UNDEFINED = FCML_REG_UNDEFINED, /** General purpose register. */ REG_GPR = FCML_REG_GPR, /** SIMD (SSE, MMX) register. */ REG_SIMD = FCML_REG_SIMD, /** FPU register. */ REG_FPU = FCML_REG_FPU, /** Segment register */ REG_SEG = FCML_REG_SEG, /** Control register. */ REG_CR = FCML_REG_CR, /** Debug register */ REG_DR = FCML_REG_DR, /** Instruction pointer register. Used for relative RIP addressing. */ REG_IP = FCML_REG_IP }; /** * Creates an empty register instance. * @since 1.1.0 */ Register() : _type(REG_UNDEFINED), _size(0), _reg(0), _x64_exp(FCML_FALSE) { } /** * Creates a register instance for given register structure. * @param reg The source register as the FCML structure. * @since 1.1.0 */ Register( const fcml_st_register ® ) : _type(static_cast( reg.type )), _size(reg.size), _reg(reg.reg), _x64_exp(reg.x64_exp? true : false) { } /** * Creates a register instance for given parameters. * @param reg The FCML register number. * @param size The register size. * @param type The register type. * @param x64_exp True if it's a 8-bit general purpose register for REX aware instruction. See manual. * @since 1.1.0 */ Register( fcml_uint8_t reg, fcml_usize size, RegisterType type = REG_GPR, fcml_bool x64_exp = FCML_FALSE ) : _type(type), _size(size), _reg(reg), _x64_exp(x64_exp?true:false) { } /** * @since 1.1.0 */ virtual ~Register() { } public: /** * Gets the register number. * @return The register number. * @since 1.1.0 */ fcml_uint8_t getReg() const { return _reg; } /** * Sets the register number. * @param reg The register number. * @since 1.1.0 */ void setReg( fcml_uint8_t reg ) { _reg = reg; } /** * Gets the register size. * @return The register size. * @since 1.1.0 */ fcml_usize getSize() const { return _size; } /** * Sets the register size. * @param size The register size. * @since 1.1.0 */ void setSize( fcml_usize size ) { _size = size; } /** * Gets the register type. * @return The register type. * @since 1.1.0 */ RegisterType getType() const { return _type; } /** * Sets the register type. * @param type The register type. * @since 1.1.0 */ void setType( RegisterType type ) { _type = type; } /** * Gets true if it's a 8-bit general purpose register for REX aware instruction. See manual. * @return True if it's a 8-bit general purpose register for REX aware instruction. See manual.. * @since 1.1.0 */ bool getX64Exp() const { return _x64_exp; } /** * Sets x64exp flag, see manual. * @param x64Exp The flag value. * @since 1.1.0 */ void setX64Exp( bool x64Exp ) { _x64_exp = x64Exp; } public: /** * Compares registers. * @param reg The source register. * @return True if registers are equal. * @since 1.1.0 */ bool operator==( const Register ® ) const { return _reg == reg._reg && _type == reg._type && _size == reg._size && _x64_exp == reg._x64_exp; } /** * Compares registers. * @param reg The source register. * @return True if registers are NOT equal. * @since 1.1.0 */ bool operator!=( const Register ® ) const { return !( reg == *this ); } public: /** * Factory method for an undefined register. * @return A register instance. * @since 1.1.0 */ static const Register UNDEF() { Register reg( 0, 0, Register::REG_UNDEFINED, FCML_FALSE ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register AL() { Register reg( ::fcml_reg_AL ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register AX() { Register reg( ::fcml_reg_AX ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register EAX() { Register reg( ::fcml_reg_EAX ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register RAX() { Register reg( ::fcml_reg_RAX ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register MM0() { Register reg( ::fcml_reg_MM0 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register XMM0() { Register reg( ::fcml_reg_XMM0 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register YMM0() { Register reg( ::fcml_reg_YMM0 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register CL() { Register reg( ::fcml_reg_CL ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register CX() { Register reg( ::fcml_reg_CX ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register ECX() { Register reg( ::fcml_reg_ECX ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register RCX() { Register reg( ::fcml_reg_RCX ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register MM1() { Register reg( ::fcml_reg_MM1 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register XMM1() { Register reg( ::fcml_reg_XMM1 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register YMM1() { Register reg( ::fcml_reg_YMM1 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register DL() { Register reg( ::fcml_reg_DL ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register DX() { Register reg( ::fcml_reg_DX ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register EDX() { Register reg( ::fcml_reg_EDX ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register RDX() { Register reg( ::fcml_reg_RDX ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register MM2() { Register reg( ::fcml_reg_MM2 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register XMM2() { Register reg( ::fcml_reg_XMM2 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register YMM2() { Register reg( ::fcml_reg_YMM2 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register BL() { Register reg( ::fcml_reg_BL ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register BX() { Register reg( ::fcml_reg_BX ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register EBX() { Register reg( ::fcml_reg_EBX ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register RBX() { Register reg( ::fcml_reg_RBX ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register MM3() { Register reg( ::fcml_reg_MM3 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register XMM3() { Register reg( ::fcml_reg_XMM3 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register YMM3() { Register reg( ::fcml_reg_YMM3 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register AH() { Register reg( ::fcml_reg_AH ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register SPL() { Register reg( ::fcml_reg_SPL ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register SP() { Register reg( ::fcml_reg_SP ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register ESP() { Register reg( ::fcml_reg_ESP ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register RSP() { Register reg( ::fcml_reg_RSP ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register MM4() { Register reg( ::fcml_reg_MM4 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register XMM4() { Register reg( ::fcml_reg_XMM4 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register YMM4() { Register reg( ::fcml_reg_YMM4 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register CH() { Register reg( ::fcml_reg_CH ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register BPL() { Register reg( ::fcml_reg_BPL ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register BP() { Register reg( ::fcml_reg_BP ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register EBP() { Register reg( ::fcml_reg_EBP ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register RBP() { Register reg( ::fcml_reg_RBP ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register MM5() { Register reg( ::fcml_reg_MM5 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register XMM5() { Register reg( ::fcml_reg_XMM5 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register YMM5() { Register reg( ::fcml_reg_YMM5 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register DH() { Register reg( ::fcml_reg_DH ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register SIL() { Register reg( ::fcml_reg_SIL ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register SI() { Register reg( ::fcml_reg_SI ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register ESI() { Register reg( ::fcml_reg_ESI ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register RSI() { Register reg( ::fcml_reg_RSI ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register MM6() { Register reg( ::fcml_reg_MM6 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register XMM6() { Register reg( ::fcml_reg_XMM6 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register YMM6() { Register reg( ::fcml_reg_YMM6 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register BH() { Register reg( ::fcml_reg_BH ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register DIL() { Register reg( ::fcml_reg_DIL ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register DI() { Register reg( ::fcml_reg_DI ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register EDI() { Register reg( ::fcml_reg_EDI ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register RDI() { Register reg( ::fcml_reg_RDI ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register MM7() { Register reg( ::fcml_reg_MM7 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register XMM7() { Register reg( ::fcml_reg_XMM7 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register YMM7() { Register reg( ::fcml_reg_YMM7 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R8L() { Register reg( ::fcml_reg_R8L ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R8W() { Register reg( ::fcml_reg_R8W ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R8D() { Register reg( ::fcml_reg_R8D ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R8() { Register reg( ::fcml_reg_R8 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register XMM8() { Register reg( ::fcml_reg_XMM8 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register YMM8() { Register reg( ::fcml_reg_YMM8 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R9L() { Register reg( ::fcml_reg_R9L ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R9W() { Register reg( ::fcml_reg_R9W ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R9D() { Register reg( ::fcml_reg_R9D ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R9() { Register reg( ::fcml_reg_R9 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register XMM9() { Register reg( ::fcml_reg_XMM9 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register YMM9() { Register reg( ::fcml_reg_YMM9 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R10L() { Register reg( ::fcml_reg_R10L ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R10W() { Register reg( ::fcml_reg_R10W ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R10D() { Register reg( ::fcml_reg_R10D ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R10() { Register reg( ::fcml_reg_R10 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register XMM10() { Register reg( ::fcml_reg_XMM10 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register YMM10() { Register reg( ::fcml_reg_YMM10 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R11L() { Register reg( ::fcml_reg_R11L ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R11W() { Register reg( ::fcml_reg_R11W ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R11D() { Register reg( ::fcml_reg_R11D ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R11() { Register reg( ::fcml_reg_R11 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register XMM11() { Register reg( ::fcml_reg_XMM11 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register YMM11() { Register reg( ::fcml_reg_YMM11 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R12L() { Register reg( ::fcml_reg_R12L ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R12W() { Register reg( ::fcml_reg_R12W ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R12D() { Register reg( ::fcml_reg_R12D ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R12() { Register reg( ::fcml_reg_R12 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register XMM12() { Register reg( ::fcml_reg_XMM12 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register YMM12() { Register reg( ::fcml_reg_YMM12 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R13L() { Register reg( ::fcml_reg_R13L ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R13W() { Register reg( ::fcml_reg_R13W ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R13D() { Register reg( ::fcml_reg_R13D ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R13() { Register reg( ::fcml_reg_R13 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register XMM13() { Register reg( ::fcml_reg_XMM13 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register YMM13() { Register reg( ::fcml_reg_YMM13 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R14L() { Register reg( ::fcml_reg_R14L ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R14W() { Register reg( ::fcml_reg_R14W ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R14D() { Register reg( ::fcml_reg_R14D ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R14() { Register reg( ::fcml_reg_R14 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register XMM14() { Register reg( ::fcml_reg_XMM14 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register YMM14() { Register reg( ::fcml_reg_YMM14 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R15L() { Register reg( ::fcml_reg_R15L ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R15W() { Register reg( ::fcml_reg_R15W ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R15D() { Register reg( ::fcml_reg_R15D ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register R15() { Register reg( ::fcml_reg_R15 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register XMM15() { Register reg( ::fcml_reg_XMM15 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register YMM15() { Register reg( ::fcml_reg_YMM15 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register ES() { Register reg( ::fcml_reg_ES ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register CS() { Register reg( ::fcml_reg_CS ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register SS() { Register reg( ::fcml_reg_SS ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register DS() { Register reg( ::fcml_reg_DS ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register FS() { Register reg( ::fcml_reg_FS ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register GS() { Register reg( ::fcml_reg_GS ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register ST0() { Register reg( ::fcml_reg_ST0 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register ST1() { Register reg( ::fcml_reg_ST1 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register ST2() { Register reg( ::fcml_reg_ST2 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register ST3() { Register reg( ::fcml_reg_ST3 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register ST4() { Register reg( ::fcml_reg_ST4 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register ST5() { Register reg( ::fcml_reg_ST5 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register ST6() { Register reg( ::fcml_reg_ST6 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register ST7() { Register reg( ::fcml_reg_ST7 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register CR0() { Register reg( ::fcml_reg_CR0 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register CR2() { Register reg( ::fcml_reg_CR2 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register CR3() { Register reg( ::fcml_reg_CR3 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register CR4() { Register reg( ::fcml_reg_CR4 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register CR8() { Register reg( ::fcml_reg_CR8 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register DR0() { Register reg( ::fcml_reg_DR0 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register DR1() { Register reg( ::fcml_reg_DR1 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register DR2() { Register reg( ::fcml_reg_DR2 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register DR3() { Register reg( ::fcml_reg_DR3 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register DR4() { Register reg( ::fcml_reg_DR4 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register DR5() { Register reg( ::fcml_reg_DR5 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register DR6() { Register reg( ::fcml_reg_DR6 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register DR7() { Register reg( ::fcml_reg_DR7 ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register IP() { Register reg( ::fcml_reg_IP ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register EIP() { Register reg( ::fcml_reg_EIP ); return reg; } /** * Factory method for a register. * @return A register instance. * @since 1.1.0 */ static const Register RIP() { Register reg( ::fcml_reg_RIP ); return reg; } private: /** Register type. */ RegisterType _type; /** Register size in bits. */ fcml_usize _size; /** Register itself as a positive integer. @see REGISTERS_GROUP */ fcml_uint8_t _reg; /** In case of SPL,BPL,SIL,DIL GPR registers has to be set to true. */ bool _x64_exp; }; /** * Describes far pointer. * @since 1.1.0 */ class FarPointer { public: /** * Creates an far pointer instance. * @since 1.1.0 */ FarPointer() : _segment(0), _offset_size(0), _offset16(0), _offset32(0) { } /** * Creates an far pointer instance. * @param segment A segment selector. * @param offset16 A 16-bit offset in the given segment. * @since 1.1.0 */ FarPointer( fcml_uint16_t segment, fcml_int16_t offset16 ) : _segment(segment), _offset_size(FCML_DS_16), _offset16(offset16), _offset32(0) { } /** * Creates an far pointer instance. * @param segment A segment selector. * @param offset32 A 32-bit offset in the given segment. * @since 1.1.0 */ FarPointer( fcml_uint16_t segment, fcml_int32_t offset32 ) : _segment(segment), _offset_size(FCML_DS_32), _offset16(0), _offset32(offset32) { } virtual ~FarPointer() { } public: /** * Compares two far pointers. * @param fp The far pointer to be compared with the current one. * @return True if they are equal. * @since 1.1.0 */ bool operator==( const FarPointer &fp ) const { fcml_int32_t thisOffset; switch( _offset_size ) { case FCML_DS_32: thisOffset = _offset32; break; case FCML_DS_16: thisOffset = _offset16; break; } fcml_int32_t thatOffset; switch( fp._offset_size ) { case FCML_DS_32: thatOffset = fp._offset32; break; case FCML_DS_16: thatOffset = fp._offset16; break; } return thisOffset == thatOffset; } /** * Compares two far pointers. * @param fp The far pointer to be compared with the current one. * @return True if they are NOT equal. * @since 1.1.0 */ bool operator!=( const FarPointer &fp) const { return !(fp == *this); } public: /** * Creates FarPointer instance for 16 bit segment and 16-bit offset. * * @param segment Segment selector. * @param offset 16-bit address. * @return FarPointer instance. * @since 1.1.0 */ static FarPointer off16( fcml_uint16_t segment, fcml_int16_t offset ) { return FarPointer(segment, offset); } /** * Creates FarPointer instance for 16 bit segment and 32-bit offset. * * @param segment Segment selector. * @param offset 32-bit address. * @return FarPointer instance. */ static FarPointer off32( fcml_uint16_t segment, fcml_int32_t offset ) { return FarPointer(segment, offset); } public: /** * Gets offset size. * * @return Offset size. * @since 1.1.0 */ fcml_usize getOffsetSize() const { return _offset_size; } /** * Sets offset size. * * @param offsetSize The new offset size to be set. * @since 1.1.0 */ void setOffsetSize( fcml_usize offsetSize ) { _offset_size = offsetSize; } /** * Gets the 16-bit offset. * * @return 16-bit offset. * @since 1.1.0 */ fcml_int16_t getOffset16() const { return _offset16; } /** * Sets 16-bit offset. * * @param offset16 Sets 16-bit offset. * @since 1.1.0 */ void setOffset16( fcml_int16_t offset16 ) { _offset16 = offset16; } /** * Gets 32-bit offset. * * @return 32-bit offset. * @since 1.1.0 */ fcml_int32_t getOffset32() const { return _offset32; } /** * Sets 32-bit offset. * * @param offset32 Sets 32-bit offset. * @since 1.1.0 */ void setOffset32( fcml_int32_t offset32 ) { _offset32 = offset32; } /** * Gets segment selector. * * @return 16-bit segment selector. * @since 1.1.0 */ fcml_uint16_t getSegment() const { return _segment; } /** * Sets segment selector. * * @param segment Segment selector. * @since 1.1.0 */ void setSegment( fcml_uint16_t segment ) { _segment = segment; } private: /** 16-bit Code segment. */ fcml_uint16_t _segment; /** Size of the offset. */ fcml_usize _offset_size; /** 16-bit offset. */ fcml_int16_t _offset16; /** 32-bit offset. */ fcml_int32_t _offset32; }; /** * Describes segment register. * @since 1.1.0 */ class SegmentSelector { public: /** * Creates an empty segment selector instance. * @since 1.1.0 */ SegmentSelector() : _segmentSelector(), _isDefaultReg(false) { } /** * Creates a segment selector instance for given parameters. * @param segmentSelector A segment register. * @param isDefaultReg Information if the register is the default one. * @since 1.1.0 */ SegmentSelector( const Register &segmentSelector, bool isDefaultReg = FCML_TRUE ) : _segmentSelector(segmentSelector), _isDefaultReg(isDefaultReg) { } virtual ~SegmentSelector() { } public: /** * Checks if two segment selector are equal. * @param segmentSelector The source segment selector. * @return True if they are equal. * @since 1.1.0 */ bool operator==( const SegmentSelector &segmentSelector ) const { // It really doesn't matter if it is the default segment register in a given context. return segmentSelector._segmentSelector == _segmentSelector; } /** * Checks if two segment selector are not equal. * @param segmentSelector The source segment selector. * @return True if they are NOT equal. * @since 1.1.0 */ bool operator!=( const SegmentSelector &segmentSelector ) const { return !(*this == segmentSelector); } /** * Casting operator. * @return The segment register. * @since 1.1.0 */ operator Register() const { return _segmentSelector; } /** * Copies one segment selector to another. * @param reg The source segment selector. * @return The destination segment selector. * @since 1.1.0 */ SegmentSelector& operator=( const SegmentSelector ® ) { if( ® != this ) { _isDefaultReg = reg._isDefaultReg; _segmentSelector = reg._segmentSelector; } return *this; } public: /** * Creates segment selector for the given register. * * @param segmentSelector Segment register. * @param isDefaultReg True if the register is the default one in the given context. * @return Prepared segment selector. * @since 1.1.0 */ static SegmentSelector seg( const Register &segmentSelector, bool isDefaultReg ) { return SegmentSelector( segmentSelector, isDefaultReg ); } public: /** * Returns true if a register stored in the segment selector is the default one * in the context the segment selector is used. * * @return True if register is the default one. * @since 1.1.0 */ bool isDefaultReg() const { return _isDefaultReg; } /** * Sets "default" flag for the segment selector. * * @param isDefaultReg True if the register is the default one in the given context. * @since 1.1.0 */ void setDefaultReg( bool isDefaultReg ) { _isDefaultReg = isDefaultReg; } /** * Gets constant segment register associated with the selector. * * @return Constant segment register. * @since 1.1.0 */ const Register& getSegmentSelector() const { return _segmentSelector; } /** * Gets segment register associated with the selector. * * @return Segment register. * @since 1.1.0 */ Register& getSegmentSelector() { return _segmentSelector; } /** * Sets segment register for the selector. * * @param segmentSelector Segment register. * @since 1.1.0 */ void setSegmentSelector( const Register& segmentSelector ) { _segmentSelector = segmentSelector; } private: /** Segment register. */ Register _segmentSelector; /** True if this is a default segment register. */ bool _isDefaultReg; }; /** * Describes effective address. * * It's a counterpart to the fcml_st_effective_address structure. * @since 1.1.0 */ class EffectiveAddress { public: /** * Creates an empry effective address. * @since 1.1.0 */ EffectiveAddress() : _scaleFactor(0){ } /** * Creates an effective address instance with the displacement only. * @param displacement The displacement value. * @since 1.1.0 */ EffectiveAddress( const Integer &displacement ) : _scaleFactor(0), _displacement(displacement) { } /** * Creates an effective address instance with the base register only. * @param base The base register. * @since 1.1.0 */ EffectiveAddress( const Register &base ) : _base(base), _scaleFactor(0) { } /** * Creates an effective address instance with the base register and displacement only. * @param base The base register. * @param displacement The displacement value. * @since 1.1.0 */ EffectiveAddress( const Register &base, const Integer &displacement ) : _base(base), _scaleFactor(0), _displacement(displacement) { } /** * Creates an effective address instance with the index register, scale factor and displacement. * @param index The index register. * @param scaleFactor The scale factor value. * @param displacement The displacement. * @since 1.1.0 */ EffectiveAddress( const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) : _index(index), _scaleFactor(scaleFactor), _displacement(displacement) { } /** * Creates an effective address instance with the base register and index register. * @param base The base register. * @param index The index register. * @since 1.1.0 */ EffectiveAddress( const Register &base, const Register &index ) : _base(base), _index(index), _scaleFactor(0) { } /** * Creates an effective address instance with the base register, index register and scale factor set. * @param base The base register. * @param index THe index register. * @param scaleFactor The scale factor. * @since 1.1.0 */ EffectiveAddress( const Register &base, const Register &index, fcml_uint8_t scaleFactor ) : _base(base), _index(index), _scaleFactor(scaleFactor) { } /** * Creates an effective address instance with the base register, index register, scale factor and displacement set. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor value. * @param displacement The displacement. * @since 1.1.0 */ EffectiveAddress( const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) : _base(base), _index(index), _scaleFactor(scaleFactor), _displacement(displacement) { } /** * @since 1.1.0 */ virtual ~EffectiveAddress() { } public: /** * Checks whether two effective addresses are equal or not. * @param address The source address to be compared. * @return True if they are equal. * @since 1.1.0 */ bool operator==( const EffectiveAddress &address ) const { if( &address == this ) { return true; } return _base == address._base && _index == address._index && _scaleFactor == address._scaleFactor && _displacement == address._displacement; } /** * Checks whether two effective addresses are equal or not. * @param address The source address to be compared. * @return True if they are NOT equal. * @since 1.1.0 */ bool operator!=( const EffectiveAddress &address ) const { return !(address == *this); } public: /** * Factory method which creates an effective address instance with the displacement only. * @param displacement The displacement value. * @since 1.1.0 */ static EffectiveAddress addr( const Integer &displacement ) { return EffectiveAddress( displacement ); } /** * Factory method which creates an effective address instance with the base register only. * @param base The base register. * @since 1.1.0 */ static EffectiveAddress addr( const Register &base ) { return EffectiveAddress( base ); } /** * Factory method which creates an effective address instance with the base register and displacement. * @param base The base register. * @param displacement The displacement value. * @since 1.1.0 */ static EffectiveAddress addr( const Register &base, const Integer &displacement ) { return EffectiveAddress( base, displacement ); } /** * Factory method which creates an effective address instance with the index register, scale factor and displacement. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @since 1.1.0 */ static EffectiveAddress addr( const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) { return EffectiveAddress( index, scaleFactor, displacement ); } /** * Factory method which creates an effective address instance with the base register and index register. * @param base The base register. * @param index The index register. * @since 1.1.0 */ static EffectiveAddress addr( const Register &base, const Register &index ) { return EffectiveAddress( base, index, 0 ); } /** * Factory method which creates an effective address instance with the base register, index register and scale factor. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @since 1.1.0 */ static EffectiveAddress addr( const Register &base, const Register &index, fcml_uint8_t scaleFactor ) { return EffectiveAddress( base, index, scaleFactor ); } /** * Factory method which creates an effective address instance with the base register, index register, scale factor and displacement. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @since 1.1.0 */ static EffectiveAddress addr( const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) { return EffectiveAddress( base, index, scaleFactor, displacement ); } public: /** * Gets the constant base register associated with the effective address. * * @return The constant base register. * @since 1.1.0 */ const Register& getBase() const { return _base; } /** * Gets the base register associated with the effective address. * * @return The base register. * @since 1.1.0 */ Register& getBase() { return _base; } /** * Sets a new base register for the effective address. * * @param base The new base register to be set. * @return Effective address itself. * @since 1.1.0 */ EffectiveAddress& setBase( const Register &base ) { _base = base; return *this; } /** * Gets the constant displacement associated with the effective address. * * @return The constant displacement. * @since 1.1.0 */ const Integer& getDisplacement() const { return _displacement; } /** * Gets the displacement associated with the effective address. * * @return The displacement. * @since 1.1.0 */ Integer& getDisplacement() { return _displacement; } /** * Sets a new displacement value for the effective address. * * @param displacement The new displacement for effective address. * @return The effective address itself. * @since 1.1.0 */ EffectiveAddress& setDisplacement( const Integer &displacement ) { _displacement = displacement; return *this; } /** * Gets the constant index register associated with the effective address. * * @return The index register. * @since 1.1.0 */ const Register& getIndex() const { return _index; } /** * Gets the index register associated with the effective address. * * @return The index register. * @since 1.1.0 */ Register& getIndex() { return _index; } /** * Sets a new index register for the effective address. * * @param index The new index register for the effective address. * @return The effective address itself. * @since 1.1.0 */ EffectiveAddress& setIndex( const Register &index ) { _index = index; return *this; } /** * Gets a scale factor value associated with the effective address. * * @return The scale factor. * @since 1.1.0 */ fcml_uint8_t getScaleFactor() const { return _scaleFactor; } /** * Sets a new scale factor for the effective address. * * @param scaleFactor The new scale factor value. * @return Effective address itself. * @since 1.1.0 */ EffectiveAddress& setScaleFactor( fcml_uint8_t scaleFactor ) { _scaleFactor = scaleFactor; return *this; } private: /** Base register. */ Register _base; /** Index register. */ Register _index; /** Scale factor. */ fcml_uint8_t _scaleFactor; /** Displacement. */ Integer _displacement; }; /** Address operand. * * It's a counterpart to the fcml_st_address structure. * @since 1.1.0 */ class Address { public: /** Addressing type, see fcml_en_address_form enumerator. * @since 1.1.0 */ enum AddressForm { /** Default value set if memory addressing hasn't been configured. */ AF_UNDEFINED = FCML_AF_UNDEFINED, /** Absolute offset (address). */ AF_OFFSET = FCML_AF_OFFSET, /** Effective address combined from address components like base register, index registers, factor, displacement etc... */ AF_COMBINED = FCML_AF_COMBINED }; /** * Creates an empty address. * @since 1.1.0 */ Address() : _size_operator( FCML_DS_UNDEF ), _address_form( AF_UNDEFINED ) { } /** * Creates an address instance with an offset and optional size operator set. * * @param offset Offset to be set for the address. * @param sizeOperator The optional size operator, set to FCML_DS_UNDEF by default. * @since 1.1.0 */ Address( const Integer &offset, fcml_usize sizeOperator = FCML_DS_UNDEF ) : _size_operator( sizeOperator ), _address_form( AF_OFFSET ), _offset( offset ) { } /** * Creates an address instance with an effective address and optional size operator set. * * @param effectiveAddress The effective address to be set for the address. * @param sizeOperator The optional size operator, set to FCML_DS_UNDEF by default. * @since 1.1.0 */ Address( const EffectiveAddress &effectiveAddress, fcml_usize sizeOperator = FCML_DS_UNDEF ) : _size_operator( sizeOperator ), _address_form( AF_COMBINED ), _effective_address( effectiveAddress ) { } /** * Creates an address instance with an effective address, segment selector and optional size operator set. * * @param effectiveAddress The effective address to be set for the address. * @param segmentSelector The segment selector. * @param sizeOperator The optional size operator, set to FCML_DS_UNDEF by default. * @since 1.1.0 */ Address( const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector, fcml_usize sizeOperator = FCML_DS_UNDEF ) : _size_operator( sizeOperator ), _address_form( AF_COMBINED ), _segment_selector( segmentSelector ), _effective_address( effectiveAddress ) { } /** @since 1.1.0 */ virtual ~Address() { } public: /** * Factory method which creates an effective address instance with the displacement only. * @param displacement The displacement value. * @param sizeOperator Size operator. * @since 1.1.0 */ static Address effective( const Integer &displacement, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return effective( EffectiveAddress( displacement ), sizeOperator ); } /** * Factory method which creates an effective address instance with the base register only. * @param base The base register. * @param sizeOperator Size operator. * @since 1.1.0 */ static Address effective( const Register &base, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return effective( EffectiveAddress( base ), sizeOperator ); } /** * Factory method which creates an effective address instance with the base register and displacement. * @param base The base register. * @param displacement The displacement value. * @param sizeOperator Size operator. * @since 1.1.0 */ static Address effective( const Register &base, const Integer &displacement, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return effective( EffectiveAddress( base, displacement ), sizeOperator ); } /** * Factory method which creates an effective address instance with the index register, scale factor and displacement. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @param sizeOperator Size operator. * @since 1.1.0 */ static Address effective( const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return effective( EffectiveAddress( index, scaleFactor, displacement ), sizeOperator ); } /** * Factory method which creates an effective address instance with the base register and index register. * @param base The base register. * @param index The index register. * @param sizeOperator Size operator. * @since 1.1.0 */ static Address effective( const Register &base, const Register &index, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return effective( EffectiveAddress( base, index, 0 ), sizeOperator ); } /** * Factory method which creates an effective address instance with the base register, index register and scale factor. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @param sizeOperator Size operator. * @since 1.1.0 */ static Address effective( const Register &base, const Register &index, fcml_uint8_t scaleFactor, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return effective( EffectiveAddress( base, index, scaleFactor ), sizeOperator ); } /** * Factory method which creates an effective address instance with the base register, index register, scale factor and displacement. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @param sizeOperator Size operator. * @since 1.1.0 */ static Address effective( const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return effective( EffectiveAddress( base, index, scaleFactor, displacement ), sizeOperator ); } public: /** * Checks if two addresses are equal or not. * @param address The address to be compared with the current one. * @return True if they are equal. * @since 1.1.0 */ bool operator==( const Address &address ) const { if( &address == this ) { return true; } return _size_operator == address._size_operator && _address_form == address._address_form && _segment_selector == address._segment_selector && _effective_address == address._effective_address && _offset == address._offset; } /** * Checks if two addresses are equal or not. * @param address The address to be compared with the current one. * @return True if they are NOT equal. * @since 1.1.0 */ bool operator!=( const Address &address ) const { return !(address == *this ); } public: /** * Factor method which creates an instance of the address for an effective address, segment selector and optional size operator. * * @param effectiveAddress The effective address to be set for the address. * @param segmentSelector The segment selector. * @param sizeOperator The optional size operator, set to FCML_DS_UNDEF by default. * @return The created address instance. * @since 1.1.0 */ static Address effective( const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return Address( effectiveAddress, segmentSelector, sizeOperator ); } /** * Factor method which creates an address instance with an effective address and optional size operator set. * * @param effectiveAddress The effective address to be set for the address. * @param sizeOperator The optional size operator, set to FCML_DS_UNDEF by default. * @return The created address instance. * @since 1.1.0 */ static Address effective( const EffectiveAddress &effectiveAddress, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return Address( effectiveAddress, sizeOperator ); } /** * Factor method which creates an address instance with an offset and optional size operator set. * * @param offset The offset to be set for the address. * @param sizeOperator The optional size operator, set to FCML_DS_UNDEF by default. * @return The created address instance. * @since 1.1.0 */ static Address offset( const Integer &offset, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return Address( offset, sizeOperator ); } public: /** * Returns true if address holds effective address. * * @return Returns true if address holds effective address. * @since 1.1.0 */ bool isEffectiveAddress() const { return _address_form == AF_COMBINED; } /** * Returns true if address holds an offset only. * * @return Returns true if address holds an offset only. * @since 1.1.0 */ bool isOffset() const { return _address_form == AF_OFFSET; } /** * Gets an address form. See fcml_en_address_form for more details. * * @return The address form. * @since 1.1.0 */ AddressForm getAddressForm() const { return _address_form; } /** * Sets a new address form for the effective address. * * @param addressForm The address form to be set for the effective address. * * @return Address itself. * @since 1.1.0 */ Address& setAddressForm( AddressForm addressForm ) { _address_form = addressForm; return *this; } /** * Gets reference to the constant effective address associated with the address. * * @return The constant effective address. * @since 1.1.0 */ const EffectiveAddress& getEffectiveAddress() const { return _effective_address; } /** * Gets reference to the effective address associated with the address. * * @return The effective address. * @since 1.1.0 */ EffectiveAddress& getEffectiveAddress() { return _effective_address; } /** * Sets a new effective address for the address. * * @param effectiveAddress The new address to be set for the effective address. * @return The address itself. * @since 1.1.0 */ Address& setEffectiveAddress( const EffectiveAddress& effectiveAddress ) { _effective_address = effectiveAddress; return *this; } /** * Gets the constant offset associated with the address. * * @return The offset associated with the address. * @since 1.1.0 */ const Integer& getOffset() const { return _offset; } /** * Gets the offset associated with the address. * * @return The offset associated with the address. * @since 1.1.0 */ Integer& getOffset() { return _offset; } /** * Sets a new offset for the address. * * @param offset The enw offset to be set for the address. * @return The address itself. * @since 1.1.0 */ Address& setOffset( const Integer &offset ) { this->_offset = offset; return *this; } /** * Gets the constant segment selector associated with the address. * * @return The segment selector associated with the address. * @since 1.1.0 */ const SegmentSelector& getSegmentSelector() const { return _segment_selector; } /** * Gets the segment selector associated with the address. * * @return The segment selector associated with the address. * @since 1.1.0 */ SegmentSelector& getSegmentSelector() { return _segment_selector; } /** * Sets a new segment selector for the address. * * @param segmentSelector The new segment selector for the address. * @return The address itself. * @since 1.1.0 */ Address& setSegmentSelector( const SegmentSelector &segmentSelector ) { _segment_selector = segmentSelector; return *this; } /** * Gets the size operator associated with the address. * * @return The size operator. * @since 1.1.0 */ fcml_usize getSizeOperator() const { return _size_operator; } /** * Sets a new size operator for the address. * * @param sizeOperator The size operator. * @since 1.1.0 */ Address& setSizeOperator( fcml_usize sizeOperator ) { _size_operator = sizeOperator; return *this; } private: /** Size of data accessed in memory.*/ fcml_usize _size_operator; /** Memory addressing format: absolute offset/effective address. @see fcml_en_effective_address_form*/ AddressForm _address_form; /** Segment register.*/ SegmentSelector _segment_selector; /** Memory address for FCML_AF_COMBINED form.*/ EffectiveAddress _effective_address; /** Memory address for FCML_AF_OFFSET form.*/ Integer _offset; }; /** Instruction operand. * @since 1.1.0 */ class Operand { public: /** See fcml_en_operand_type structure for more details. * @since 1.1.0 */ enum OperandType { /** Operand not used. */ OT_NONE = FCML_OT_NONE, /** Immediate integer value. */ OT_IMMEDIATE = FCML_OT_IMMEDIATE, /** Direct far pointer. */ OT_FAR_POINTER = FCML_OT_FAR_POINTER, /** Memory address. */ OT_ADDRESS = FCML_OT_ADDRESS, /** Processor register. */ OT_REGISTER = FCML_OT_REGISTER }; /** * Creates an undefined operand. * @since 1.1.0 */ Operand() : _hints( FCML_OP_HINT_UNDEFIEND ), _operandType( OT_NONE ) { } /** * Creates an immediate value operand for given integer. * * @param imm The immediate value as integer. * @param hints Optional operand level hints. * @since 1.1.0 */ Operand( const Integer &imm, fcml_hints hints = FCML_OP_HINT_UNDEFIEND ) : _hints( hints ), _operandType(OT_IMMEDIATE ), _immediate( imm ) { } /** * Creates a far pointer operand for given far pointer. * * @param pointer The far pointer for the operand. * @param hints Optional operand level hints. * @since 1.1.0 */ Operand( const FarPointer &pointer, fcml_hints hints = FCML_OP_HINT_UNDEFIEND ) : _hints( hints ), _operandType( OT_FAR_POINTER ), _farPointer( pointer ) { } /** * Creates an address operand for given address. * * @param address The address for the created operand. * @param hints Optional operand level hints. * @since 1.1.0 */ Operand( const Address &address, fcml_hints hints = FCML_OP_HINT_UNDEFIEND ) : _hints( hints ), _operandType( OT_ADDRESS ), _address( address ) { } /** * Creates a new register operand for given register. * * @param reg The register for the new operand being created. * @param hints Optional operand level hints. * @since 1.1.0 */ Operand( const Register ®, fcml_hints hints = FCML_OP_HINT_UNDEFIEND ) : _hints( hints ), _operandType( OT_REGISTER ), _register( reg ) { } public: /** * Checks if two operands are equal or not. * * @param op The operand to be compared with the current one. * @return True if the operands are equal. * @since 1.1.0 */ bool operator==( const Operand &op ) const { if( &op == this ) { return true; } bool equal = false; switch( _operandType ) { case OT_ADDRESS: equal = _address == op._address; break; case OT_FAR_POINTER: equal = _farPointer == op._farPointer; break; case OT_IMMEDIATE: equal = _immediate == op._immediate; break; case OT_REGISTER: equal = _register == op._register; break; case OT_NONE: equal = true; break; } return equal && op._hints == _hints; } /** * Checks if two operands are equal or not. * * @param op The operand to be compared with the current one. * @return True if the operands are NOT equal. * @since 1.1.0 */ bool operator!=( const Operand &op ) const { return !(op == *this); } public: /** * Converts operand to the undefined one. * @since 1.1.0 */ void undef() { _operandType = OT_NONE; } /** * Sets given immediate value for the operand and makes it to be an immediate operand. * * @param imm The immediate value. * @since 1.1.0 */ void imm( const Integer &imm ) { _operandType = OT_IMMEDIATE; _immediate = imm; } /** * Converts operand to the far pointer and sets the segment selector and offset for it. * * @param seg The segment selector. * @param addr Offset. * @since 1.1.0 */ void far_ptr( fcml_uint16_t seg, fcml_int16_t addr ) { _operandType = OT_FAR_POINTER; _farPointer = FarPointer( seg, addr ); } /** * Prepares far pointer operand for given components. * * @param seg The segment selector. * @param addr The offset. * @since 1.1.0 */ void far_ptr( fcml_uint16_t seg, fcml_int32_t addr ) { _operandType = OT_FAR_POINTER; _farPointer = FarPointer( seg, addr ); } /** * Prepares far pointer operand for given far pointer. * * @param pointer Far pointer to be set for the operand. * @since 1.1.0 */ void far_ptr( const FarPointer &pointer ) { _operandType = OT_FAR_POINTER; _farPointer = pointer; } /** * Prepares address operand for given address. * * @param address The address to be set for the operand. * @since 1.1.0 */ void addr( const Address &address ) { _operandType = OT_ADDRESS; _address = address; } /** * Prepares address operand for given offset. * * @param offset The offset to be set for the operand. * @param sizeOperator The size operator to be set for the address. * @since 1.1.0 */ void off( const Integer &offset, fcml_usize sizeOperator = FCML_DS_UNDEF ) { _operandType = OT_ADDRESS; _address = Address( offset, sizeOperator ); } /** * Prepares an address operand for given effective address and optional size operator. * * @param effectiveAddress The effective address. * @param sizeOperator The size operator. * @since 1.1.0 */ void addr( const EffectiveAddress &effectiveAddress, fcml_usize sizeOperator = FCML_DS_UNDEF ) { _operandType = OT_ADDRESS; _address = Address( effectiveAddress, sizeOperator ); } /** * Prepares address operator for given parameters. * * @param effectiveAddress The effective address. * @param segmentSelector The segment selector. * @param sizeOperator The size operator. * @since 1.1.0 */ void addr( const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector, fcml_usize sizeOperator = FCML_DS_UNDEF ) { _operandType = OT_ADDRESS; _address = Address( effectiveAddress, segmentSelector, sizeOperator ); } /** * Prepares operator for the given register. * * @param reg The register for the operator. * @since 1.1.0 */ void reg( const Register ® ) { _operandType = OT_REGISTER; _register = reg; } /** * Prepares an register operator for given register compounds. * * @param reg A register number. * @param size A register size. * @param type A register type. * @param x64_exp An optional marker for the SPL, BPL, SIL etc. registers. See manual for more information. * @since 1.1.0 */ void reg( fcml_uint8_t reg, fcml_usize size, Register::RegisterType type = Register::REG_GPR, fcml_bool x64_exp = FCML_FALSE ) { _operandType = OT_REGISTER; _register = Register( reg, size, type, x64_exp ); } public: /** * Returns true if operand is an immediate value operand. * * @return True if operand is an immediate value operand. * @since 1.1.0 */ bool isImm() const { return _operandType == OT_IMMEDIATE; } /** * Returns true if operand is a register operand. * * @return True if operand is a register operand. * @since 1.1.0 */ bool isReg() const { return _operandType == OT_REGISTER; } /** * Returns true if operand is an address operand. * * @return True if operand is an address operand. * @since 1.1.0 */ bool isAddr() const { return _operandType == OT_ADDRESS; } /** * Returns true if operand is a far pointer operand. * * @return True if operand is a far pointer operand. * @since 1.1.0 */ bool isFar() const { return _operandType == OT_FAR_POINTER; } /** * Gets reference to the constant address associated with the operand. * * @return The reference to the address. * @since 1.1.0 */ const Address& getAddress() const { return _address; } /** * Gets reference to the address associated with the operand. * * @return The reference to the address. * @since 1.1.0 */ Address& getAddress() { return _address; } /** * Sets a new address for the operand. * * @param address The new address. * @return The operand itself. * @since 1.1.0 */ Operand& setAddress( const Address &address ) { _address = address; return *this; } /** * Gets a reference to the constant far pointer instance associated with the address. * * @return The far pointer instance associated with the address. * @since 1.1.0 */ const FarPointer& getFarPointer() const { return _farPointer; } /** * Gets a reference to the far pointer instance associated with the address. * * @return The far pointer instance associated with the address. * @since 1.1.0 */ FarPointer& getFarPointer() { return _farPointer; } /** * Sets a new far pointer for the operand. * * @param farPointer The new far pointer instance. * @return The operand itself. * @since 1.1.0 */ Operand& setFarPointer( const FarPointer &farPointer ) { _farPointer = farPointer; return *this; } /** * Gets a reference to the constant immediate value associated with the operand. * * @return The immediate value. * @since 1.1.0 */ const Integer& getImmediate() const { return _immediate; } /** * Gets a reference to the immediate value associated with the operand. * * @return The immediate value. * @since 1.1.0 */ Integer& getImmediate() { return _immediate; } /** * Sets a new immediate value for the address. * * @param immediate The new immediate value. * @return The operand itself. * @since 1.1.0 */ Operand& setImmediate( const Integer &immediate ) { _immediate = immediate; return *this; } /** * Gets operand type. * * @return The operand type. * @since 1.1.0 */ OperandType getOperandType() const { return _operandType; } /** * Sets a new operand type. * * @param operandType The new operand type. * @return The operand itself. * @since 1.1.0 */ Operand& setOperandType( OperandType operandType ) { _operandType = operandType; return *this; } /** * Returns a reference to the constant register associated with the operand. * * @return The reference to the register associated with the operand. * @since 1.1.0 */ const Register& getRegister() const { return _register; } /** * Returns a reference to the register associated with the operand. * * @return The reference to the register associated with the operand. * @since 1.1.0 */ Register& getRegister() { return _register; } /** * Sets a new register for the operand. * * @param reg The new register. * @return The operand itself. * @since 1.1.0 */ Operand& setRegister( const Register ® ) { this->_register = reg; return *this; } /** * Gets hits associated with the operand. * * @return The hits associated with the operand. * @since 1.1.0 */ fcml_hints getHints() const { return _hints; } /** * Sets new operand level hits for the operand. * * @param hints The new hits to be set. * @return The operand itself. * @since 1.1.0 */ Operand& setHints( fcml_hints hints ) { _hints = hints; return *this; } // Hints /** * Returns information if the operand is multimedia one or not. For more details about the * multimedia operand head over to the manual pages. * * @return true if it's a multimedia operand. * @since 1.1.0 */ bool isMultimedia() const { return _hints & FCML_OP_HINT_MULTIMEDIA_INSTRUCTION; } /** * Returns true if it's an displacement relative address. * * @return True if it's an displacement relative address. * @since 1.1.0 */ bool isDisRelativeAddress() const { return ( _hints & FCML_OP_HINT_DISPLACEMENT_RELATIVE_ADDRESS ) ? true : false; } /** * Returns true if it's pseudo opcode operand. More information * about pseudo opcodes in the manual. * * @return True if it's pseudo opcode operand. * @since 1.1.0 */ bool isPseudoOpcode() const { return ( _hints & FCML_OP_HINT_PSEUDO_OPCODE ) ? true : false; } /** * Returns true if it's an absolute offset being set in the operand. * * @return True in case of absolute addressing being used. * @since 1.1.0 */ bool isAbsoluteAddressing() const { return ( _hints & FCML_OP_HINT_ABSOLUTE_ADDRESSING ) ? true : false; } /** * Returns true is relative addressing is used. * * @return True in case of relative addressing. * @since 1.1.0 */ bool isRelativeAddressing() const { return ( _hints & FCML_OP_HINT_RELATIVE_ADDRESSING ) ? true : false; } /** * Returns true if the SIB byte is used. * * @return True if the SIB byte is used. * @since 1.1.0 */ bool isSIBEncoding() const { return ( _hints & FCML_OP_HINT_SIB_ENCODING ) ? true : false; } public: /** * A casting operator. * @since 1.1.0 */ operator const Integer&() const { return _immediate; } /** * A casting operator. * @since 1.1.0 */ operator const FarPointer&() const { return _farPointer; } /** * A casting operator. * @since 1.1.0 */ operator const Address&() const { return _address; } /** * A casting operator. * @since 1.1.0 */ operator const Register&() const { return _register; } private: /** Operand hints */ fcml_hints _hints; /** Operand type */ OperandType _operandType; /** Describes immediate operand */ Integer _immediate; /** Describes far pointer. */ FarPointer _farPointer; /* Describes address. */ Address _address; /* Describes register. */ Register _register; }; /** Operand builder. * A builder that exposes various factory methods that can be used to create * several types of the instruction operands. These methods are very simple * so no API documentation has been provided for now. Just take a look at * the source code. * * @since 1.1.0 */ class OB { public: /** * Factory method which builds an empty operand. * @return The empty operand. * @since 1.1.0 */ static Operand undef() { return Operand(); } /** * Factory method which builds an immediate operand. * @return The immediate operand. * @since 1.1.0 */ static Operand imm( const Integer &imm ) { return Operand( imm ); } /** * Factory method which builds a far pointer operand. * @param seg A segment selector. * @param addr An 16-bit offset value. * @return The far pointer operand. * @since 1.1.0 */ static Operand far_ptr( fcml_uint16_t seg, fcml_int16_t addr ) { return Operand( FarPointer( seg, addr ) ); } /** * Factory method which builds a far pointer operand. * @param seg A segment selector. * @param addr An 32-bit offset value. * @return The far pointer operand. * @since 1.1.0 */ static Operand far_ptr( fcml_uint16_t seg, fcml_int32_t addr ) { return Operand( FarPointer( seg, addr ) ); } /** * Factory method which builds a far pointer operand. * @param pointer A far pointer instance. * @return The far pointer operand. * @since 1.1.0 */ static Operand far_ptr( const FarPointer &pointer ) { return Operand( pointer ); } /** * Factory method which builds an address operand. * @param address An address instance. * @return The address operand. * @since 1.1.0 */ static Operand addr( const Address &address ) { return Operand( address ); } /** * Factory method which builds an address operand. * @param offset An offset instance. * @param sizeOperator An optional size operator. * @return The address operand. * @since 1.1.0 */ static Operand off( const Integer &offset, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return Operand( Address( offset, sizeOperator ) ); } /** * Factory method which builds an offset based address operand with byte size operator. * @param offset An offset instance. * @return The address operand. * @since 1.1.0 */ static Operand offb( const Integer &offset ) { return Operand( Address( offset, FCML_DS_8 ) ); } /** * Factory method which builds an offset based address operand with word size operator. * @param offset An offset instance. * @return The address operand. * @since 1.1.0 */ static Operand offw( const Integer &offset ) { return Operand( Address( offset, FCML_DS_16 ) ); } /** * Factory method which builds an offset based address operand with double word size operator. * @param offset An offset instance. * @return The address operand. * @since 1.1.0 */ static Operand offd( const Integer &offset ) { return Operand( Address( offset, FCML_DS_32 ) ); } /** * Factory method which builds an offset based address operand with quadro word size operator. * @param offset An offset instance. * @return The address operand. * @since 1.1.0 */ static Operand offq( const Integer &offset ) { return Operand( Address( offset, FCML_DS_64 ) ); } /** * Factory method which creates address type operand for given effective address and optional size operator. * @param effectiveAddress The effective address. * @param sizeOperator The optional size operator. * @return The created operator. * @since 1.1.0 */ static Operand addr( const EffectiveAddress &effectiveAddress, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return Operand( Address( effectiveAddress, sizeOperator ) ); } /** * Factory method which creates address type operand for given effective address and byte size operator. * @param effectiveAddress The effective address. * @return The created operator. * @since 1.1.0 */ static Operand addrb( const EffectiveAddress &effectiveAddress ) { return Operand( Address( effectiveAddress, FCML_DS_8 ) ); } /** * Factory method which creates address type operand for given effective address and word size operator. * @param effectiveAddress The effective address. * @return The created operator. * @since 1.1.0 */ static Operand addrw( const EffectiveAddress &effectiveAddress ) { return Operand( Address( effectiveAddress, FCML_DS_16 ) ); } /** * Factory method which creates address type operand for given effective address and double word size operator. * @param effectiveAddress The effective address. * @return The created operator. * @since 1.1.0 */ static Operand addrd( const EffectiveAddress &effectiveAddress ) { return Operand( Address( effectiveAddress, FCML_DS_32 ) ); } /** * Factory method which creates address type operand for given effective address and quadro word size operator. * @param effectiveAddress The effective address. * @return The created operator. * @since 1.1.0 */ static Operand addrq( const EffectiveAddress &effectiveAddress ) { return Operand( Address( effectiveAddress, FCML_DS_64 ) ); } /** * Factory method which creates address type operand for given segment selector, effective address and optional size operator. * @param effectiveAddress The effective address. * @param segmentSelector The segment selector. * @param sizeOperator The optional size operator. * @return The created operator. * @since 1.1.0 */ static Operand addr( const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return Operand( Address( effectiveAddress, segmentSelector, sizeOperator ) ); } /** * Factory method which creates address type operand for given effective address and byte size operator. * @param effectiveAddress The effective address. * @param segmentSelector The segment selector. * @return The created operator. * @since 1.1.0 */ static Operand addrb( const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector ) { return Operand( Address( effectiveAddress, segmentSelector, FCML_DS_8 ) ); } /** * Factory method which creates address type operand for given effective address and word size operator. * @param effectiveAddress The effective address. * @param segmentSelector The segment selector. * @return The created operator. * @since 1.1.0 */ static Operand addrw( const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector ) { return Operand( Address( effectiveAddress, segmentSelector, FCML_DS_16 ) ); } /** * Factory method which creates address type operand for given effective address and double word size operator. * @param effectiveAddress The effective address. * @param segmentSelector The segment selector. * @return The created operator. * @since 1.1.0 */ static Operand addrd( const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector ) { return Operand( Address( effectiveAddress, segmentSelector, FCML_DS_32 ) ); } /** * Factory method which creates address type operand for given effective address and quadro word size operator. * @param effectiveAddress The effective address. * @param segmentSelector The segment selector. * @return The created operator. * @since 1.1.0 */ static Operand addrq( const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector ) { return Operand( Address( effectiveAddress, segmentSelector, FCML_DS_64 ) ); } /** * Factory method which creates an register based operator for given register. * @param reg The register. * @return The created operator. * @since 1.1.0 */ static Operand reg( const Register ® ) { return Operand( reg ); } /** * Factory method which creates an register based operator for given parameters. * @param reg The FCML register number. * @param size The register size. * @param type The register type. * @param x64_exp See manual for more information. * @return The created operator. * @since 1.1.0 */ static Operand reg( fcml_uint8_t reg, fcml_usize size, Register::RegisterType type = Register::REG_GPR, fcml_bool x64_exp = FCML_FALSE ) { return Operand( Register( reg, size, type, x64_exp ) ); } /** * Factory method which creates an effective address based operator for a displacement and optional size operator. * @param displacement The displacement value. * @param sizeOperator The size operator. * @return The created operator. * @since 1.1.0 */ static Operand eff( const Integer &displacement, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return addr( EffectiveAddress( displacement ), sizeOperator ); } /** * Factory method which creates an effective address based operator for a displacement and byte size operator. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ static Operand effb( const Integer &displacement ) { return addr( EffectiveAddress( displacement ), FCML_DS_8 ); } /** * Factory method which creates an effective address based operator for a displacement and word size operator. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ static Operand effw( const Integer &displacement ) { return addr( EffectiveAddress( displacement ), FCML_DS_16 ); } /** * Factory method which creates an effective address based operator for a displacement and double word size operator. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ static Operand effd( const Integer &displacement ) { return addr( EffectiveAddress( displacement ), FCML_DS_32 ); } /** * Factory method which creates an effective address based operator for a displacement and quadro byte size operator. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ static Operand effq( const Integer &displacement ) { return addr( EffectiveAddress( displacement ), FCML_DS_64 ); } /** * Factory method which creates an effective address based operator for a base register and optional size operator. * @param base The base register. * @param sizeOperator The optional size operator. * @return The created operator. * @since 1.1.0 */ static Operand eff( const Register &base, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return addr( EffectiveAddress( base ), sizeOperator ); } /** * Factory method which creates an effective address based operator for a base register and byte size operator. * @param base The base register. * @return The created operator. * @since 1.1.0 */ static Operand effb( const Register &base ) { return addr( EffectiveAddress( base ), FCML_DS_8 ); } /** * Factory method which creates an effective address based operator for a base register and word size operator. * @param base The base register. * @return The created operator. * @since 1.1.0 */ static Operand effw( const Register &base ) { return addr( EffectiveAddress( base ), FCML_DS_16 ); } /** * Factory method which creates an effective address based operator for a base register and double word size operator. * @param base The base register. * @return The created operator. * @since 1.1.0 */ static Operand effd( const Register &base ) { return addr( EffectiveAddress( base ), FCML_DS_32 ); } /** * Factory method which creates an effective address based operator for a base register and quadro word size operator. * @param base The base register. * @return The created operator. * @since 1.1.0 */ static Operand effq( const Register &base ) { return addr( EffectiveAddress( base ), FCML_DS_64 ); } /** * Factory method which creates an effective address based operator for a base register, displacement and optional size operator. * @param base The base register. * @param displacement The displacement value. * @param sizeOperator The optional size operator. * @return The created operator. * @since 1.1.0 */ static Operand eff( const Register &base, const Integer &displacement, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return addr( EffectiveAddress( base, displacement ), sizeOperator ); } /** * Factory method which creates an effective address based operator for a base register, displacement and byte size operator. * @param base The base register. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ static Operand effb( const Register &base, const Integer &displacement ) { return addr( EffectiveAddress( base, displacement ), FCML_DS_8 ); } /** * Factory method which creates an effective address based operator for a base register, displacement and word size operator. * @param base The base register. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ static Operand effw( const Register &base, const Integer &displacement ) { return addr( EffectiveAddress( base, displacement ), FCML_DS_16 ); } /** * Factory method which creates an effective address based operator for a base register, displacement and double word size operator. * @param base The base register. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ static Operand effd( const Register &base, const Integer &displacement ) { return addr( EffectiveAddress( base, displacement ), FCML_DS_32 ); } /** * Factory method which creates an effective address based operator for a base register, displacement and quadro word size operator. * @param base The base register. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ static Operand effq( const Register &base, const Integer &displacement ) { return addr( EffectiveAddress( base, displacement ), FCML_DS_64 ); } /** * Factory method which creates an effective address based operator for an index register, scaleFactor, displacement and optional size operator. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @param sizeOperator The optional size operator. * @return The created operator. * @since 1.1.0 */ static Operand eff( const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return addr( EffectiveAddress( index, scaleFactor, displacement ), sizeOperator ); } /** * Factory method which creates an effective address based operator for an index register, scaleFactor, displacement and byte size operator. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ static Operand effb( const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) { return addr( EffectiveAddress( index, scaleFactor, displacement ), FCML_DS_8 ); } /** * Factory method which creates an effective address based operator for an index register, scaleFactor, displacement and word size operator. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ static Operand effw( const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) { return addr( EffectiveAddress( index, scaleFactor, displacement ), FCML_DS_16 ); } /** * Factory method which creates an effective address based operator for an index register, scaleFactor, displacement and double word size operator. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ static Operand effd( const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) { return addr( EffectiveAddress( index, scaleFactor, displacement ), FCML_DS_32 ); } /** * Factory method which creates an effective address based operator for an index register, scaleFactor, displacement and quadro word size operator. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ static Operand effq( const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) { return addr( EffectiveAddress( index, scaleFactor, displacement ), FCML_DS_64 ); } /** * Factory method which creates an effective address based operator for a base register, index register and optional size operator. * @param base The base register. * @param index The index register. * @param sizeOperator The optional size operator. * @return The created operator. * @since 1.1.0 */ static Operand eff( const Register &base, const Register &index, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return addr( EffectiveAddress( base, index ), sizeOperator ); } /** * Factory method which creates an effective address based operator for a base register, index register and byte size operator. * @param base The base register. * @param index The index register. * @return The created operator. * @since 1.1.0 */ static Operand effb( const Register &base, const Register &index ) { return addr( EffectiveAddress( base, index ), FCML_DS_8 ); } /** * Factory method which creates an effective address based operator for a base register, index register and word size operator. * @param base The base register. * @param index The index register. * @return The created operator. * @since 1.1.0 */ static Operand effw( const Register &base, const Register &index ) { return addr( EffectiveAddress( base, index ), FCML_DS_16 ); } /** * Factory method which creates an effective address based operator for a base register, index register and double word size operator. * @param base The base register. * @param index The index register. * @return The created operator. * @since 1.1.0 */ static Operand effd( const Register &base, const Register &index ) { return addr( EffectiveAddress( base, index ), FCML_DS_32 ); } /** * Factory method which creates an effective address based operator for a base register, index register and quadro word size operator. * @param base The base register. * @param index The index register. * @return The created operator. * @since 1.1.0 */ static Operand effq( const Register &base, const Register &index ) { return addr( EffectiveAddress( base, index ), FCML_DS_64 ); } /** * Factory method which creates an effective address based operator for a base register, index register, scale factor and optional size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @param sizeOperator The optional size operator. * @return The created operator. * @since 1.1.0 */ static Operand eff( const Register &base, const Register &index, fcml_uint8_t scaleFactor, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return addr( EffectiveAddress( base, index, scaleFactor ), sizeOperator ); } /** * Factory method which creates an effective address based operator for a base register, index register, scale factor and byte size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @return The created operator. * @since 1.1.0 */ static Operand effb( const Register &base, const Register &index, fcml_uint8_t scaleFactor ) { return addr( EffectiveAddress( base, index, scaleFactor ), FCML_DS_8 ); } /** * Factory method which creates an effective address based operator for a base register, index register, scale factor and word size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @return The created operator. * @since 1.1.0 */ static Operand effw( const Register &base, const Register &index, fcml_uint8_t scaleFactor ) { return addr( EffectiveAddress( base, index, scaleFactor ), FCML_DS_16 ); } /** * Factory method which creates an effective address based operator for a base register, index register, scale factor and double word size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @return The created operator. * @since 1.1.0 */ static Operand effd( const Register &base, const Register &index, fcml_uint8_t scaleFactor ) { return addr( EffectiveAddress( base, index, scaleFactor ), FCML_DS_32 ); } /** * Factory method which creates an effective address based operator for a base register, index register, scale factor and quadro word size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @return The created operator. * @since 1.1.0 */ static Operand effq( const Register &base, const Register &index, fcml_uint8_t scaleFactor ) { return addr( EffectiveAddress( base, index, scaleFactor ), FCML_DS_64 ); } /** * Factory method which creates an effective address based operator for a base register, index register, scale factor and optional size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @param sizeOperator The optional size operator. * @return The created operator. * @since 1.1.0 */ static Operand eff( const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement, fcml_usize sizeOperator = FCML_DS_UNDEF ) { return addr( EffectiveAddress( base, index, scaleFactor, displacement ), sizeOperator ); } /** * Factory method which creates an effective address based operator for a base register, index register, scale factor and byte size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ static Operand effb( const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) { return addr( EffectiveAddress( base, index, scaleFactor, displacement ), FCML_DS_8 ); } /** * Factory method which creates an effective address based operator for a base register, index register, scale factor and word size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ static Operand effw( const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) { return addr( EffectiveAddress( base, index, scaleFactor, displacement ), FCML_DS_16 ); } /** * Factory method which creates an effective address based operator for a base register, index register, scale factor and double word size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ static Operand effd( const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) { return addr( EffectiveAddress( base, index, scaleFactor, displacement ), FCML_DS_32 ); } /** * Factory method which creates an effective address based operator for a base register, index register, scale factor and quardo word size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ static Operand effq( const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) { return addr( EffectiveAddress( base, index, scaleFactor, displacement ), FCML_DS_64 ); } }; /** Instruction condition. * * It's counterpart to the fcml_st_condition structure. * * @since 1.1.0 */ class Condition { public: /** See fcml_st_condition for more details. * @since 1.1.0 */ enum ConditionType { /** 0 Overflow*/ CONDITION_O = FCML_CONDITION_O, /** 1 Below*/ CONDITION_B = FCML_CONDITION_B, /** 2 Equal*/ CONDITION_E = FCML_CONDITION_E, /** 3 Below or equal*/ CONDITION_BE = FCML_CONDITION_BE, /** 4 Sign*/ CONDITION_S = FCML_CONDITION_S, /** 5 Parity*/ CONDITION_P = FCML_CONDITION_P, /** 6 Less than*/ CONDITION_L = FCML_CONDITION_L, /** 7 Less than or equal to*/ CONDITION_LE = FCML_CONDITION_LE }; /** * Creates an empty condition. * @since 1.1.0 */ Condition() : _conditionType(CONDITION_O), _isNegation(false) { } /** * Creates a condition for given parameters. * * @param type A condition type. * @param negation True in order to negate condition. * @since 1.1.0 */ Condition( ConditionType type, bool negation = false ) : _conditionType( type ), _isNegation( negation ) { } public: /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isO() const { return check( CONDITION_O ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition O() { const Condition condition( CONDITION_O ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isNO() const { return check( CONDITION_O, true ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition NO() { const Condition condition( CONDITION_O ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isB() const { return check( CONDITION_B ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition B() { const Condition condition( CONDITION_B ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isNB() const { return check( CONDITION_B, true ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition NB() { const Condition condition( CONDITION_B, true ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isNAE() const { return check( CONDITION_B ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition NAE() { const Condition condition( CONDITION_B ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isAE() const { return check( CONDITION_B, true ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition AE() { const Condition condition( CONDITION_B, true ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isC() const { return check( CONDITION_B ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition C() { const Condition condition( CONDITION_B ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isNC() const { return check( CONDITION_B, true ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition NC() { const Condition condition( CONDITION_B, true ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isE() const { return check( CONDITION_E ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition E() { const Condition condition( CONDITION_E ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isZ() const { return check( CONDITION_E ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition Z() { const Condition condition( CONDITION_E ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isNE() const { return check( CONDITION_E, true ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition NE() { const Condition condition( CONDITION_E, true ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isNZ() const { return check( CONDITION_E, true ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition NZ() { const Condition condition( CONDITION_E, true ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isBE() const { return check( CONDITION_BE ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition BE() { const Condition condition( CONDITION_BE ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isNA() const { return check( CONDITION_BE ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition NA() { const Condition condition( CONDITION_BE ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isNBE() const { return check( CONDITION_BE, true ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition NBE() { const Condition condition( CONDITION_BE, true ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isA() const { return check( CONDITION_BE, true ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition A() { const Condition condition( CONDITION_BE, true ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isS() const { return check( CONDITION_S ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition S() { const Condition condition( CONDITION_S ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isNS() const { return check( CONDITION_S, true ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition NS() { const Condition condition( CONDITION_S, true ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isP() const { return check( CONDITION_P ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition P() { const Condition condition( CONDITION_P ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isPE() const { return check( CONDITION_P ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition PE() { const Condition condition( CONDITION_P ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isNP() const { return check( CONDITION_P, true ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition NP() { const Condition condition( CONDITION_P, true ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isPO() const { return check( CONDITION_P, true ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition PO() { const Condition condition( CONDITION_P, true ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isL() const { return check( CONDITION_L ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition L() { const Condition condition( CONDITION_L ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isNGE() const { return check( CONDITION_L ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition NGE() { const Condition condition( CONDITION_L ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isNL() const { return check( CONDITION_L, true ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition NL() { const Condition condition( CONDITION_L, true ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isGE() const { return check( CONDITION_L, true ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition GE() { const Condition condition( CONDITION_L, true ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isLE() const { return check( CONDITION_LE ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition LE() { const Condition condition( CONDITION_LE ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isNG() const { return check( CONDITION_LE ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition NG() { const Condition condition( CONDITION_LE ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isNLE() const { return check( CONDITION_LE, true ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition NLE() { const Condition condition( CONDITION_LE, true ); return condition; } /** * Gets true the condition is of a given type. * @return True the condition is of a given type. * @since 1.1.0 */ bool isG() const { return check( CONDITION_LE, true ); } /** * Factory method which creates a condition of a given type. * @return The condition with a type described by the method name. * @since 1.1.0 */ static const Condition G() { const Condition condition( CONDITION_LE, true ); return condition; } public: /** * Checks if two condition are equal. * * @param cond The condition to be compared to the current one. * @return True if they are equal. * @since 1.1.0 */ bool operator==( const Condition &cond ) const { return cond._conditionType == _conditionType && cond._isNegation == _isNegation; } /** * Checks if two condition are equal. * * @param cond The condition to be compared to the current one. * @return True if they are NOT equal. * @since 1.1.0 */ bool operator!=( const Condition &cond ) const { return !(*this == cond); } public: /** * Gets a type of the condition. * * @return The type of the condition. * @since 1.1.0 */ ConditionType getConditionType() const { return _conditionType; } /** * Sets condition type. * * @param conditionType The condition type to be set. * @since 1.1.0 */ Condition& setConditionType( ConditionType conditionType ) { _conditionType = conditionType; return *this; } /** * Returns true if condition is negated. * * @return True if condition is negated. * @since 1.1.0 */ bool isNegation() const { return _isNegation; } /** * Sets negation flag for the condition. * * @param isNegation The negation flag. * @since 1.1.0 */ Condition& setNegation( bool isNegation ) { _isNegation = isNegation; return *this; } private: /** * Checks if the condition is of given type and negation flag. * * @param type The condition type. * @param negation The negation flag. * @return True if the condition has the same type and negation set. * @since 1.1.0 */ bool check( ConditionType type, bool negation = false ) const { return _conditionType == type && _isNegation == negation; } private: /* Condition type.*/ ConditionType _conditionType; /* True if condition should be negated.*/ bool _isNegation; }; /** Describes an instruction. * * It's counterpart to the fcml_st_instruction structure. * @since 1.1.0 */ class Instruction { public: /** * Creates an empty instruction. * @since 1.1.0 */ Instruction() : _prefixes(0), _hints(FCML_HINT_NO_HINTS), _isConditional(false), _operandsCount(0) { } /** * Creates an empty instruction for given mnemonic. * * @param mnemonic The mnemonic for the newly created instruction. * @since 1.1.0 */ Instruction( const fcml_cstring &mnemonic ) : _prefixes(0), _hints(FCML_HINT_NO_HINTS), _mnemonic(mnemonic), _isConditional(false), _operandsCount(0) { } public: /** * Adds a new operand to the instruction. * * @param operand The operand to be added to the instruction. * @throw IllegalStateException No more operands allowed. * @since 1.1.0 */ void add( const Operand &operand ) { if( _operandsCount == FCML_OPERANDS_COUNT ) { throw IllegalStateException( FCML_TEXT( "No more operands allowed." ) ); } _operands[_operandsCount++] = operand; } /** * Sets a new oeprand for the instruction at given index. * * @param operand The operand to be set. * @param index The index operand should be set at. * @throw IllegalStateException Operand's number exceeds maximal number of operands allowed. * @since 1.1.0 */ void setOperand( const Operand &operand, fcml_int index ) { if( index >= FCML_OPERANDS_COUNT ) { throw IllegalStateException( FCML_TEXT( "Operand's number exceeds maximal number of operands allowed." ) ); } _operands[index] = operand; } /** * Gets reference to the constant operand at given index. * * @param index The operand index. * @return The operand available at given index. * @since 1.1.0 */ const Operand & operator[]( fcml_int index ) const { checkArrayAccess(index); return _operands[index]; } /** * Gets reference to the operand at given index. * * @param index The operand index. * @return The operand available at given index. * @since 1.1.0 */ Operand & operator[]( fcml_int index ) { checkArrayAccess(index); return _operands[index]; } /** * Cleans the instruction by removing all operands from it. * @since 1.1.0 */ void clean() { for( int i = 0; i < FCML_OPERANDS_COUNT; i++ ) { // Clean the operand. _operands[i] = Operand(); } _operandsCount = 0; } public: /** * Gets a pointer to the constant condition associated with the instruction. * * @return A reference to the condition. * @since 1.1.0 */ const Condition& getCondition() const { return _condition; } /** * Gets a pointer to the condition associated with the instruction. * * @return A reference to the condition. * @since 1.1.0 */ Condition& getCondition() { return _condition; } /** * Sets a new condition for the instruction. * * @param condition The condition to be set for the instruction. * @return The instruction itself. * @since 1.1.0 */ Instruction& setCondition( const Condition &condition ) { _condition = condition; return *this; } /** * Gets instruction level hits associated with the instruction. * * @return The instruction level hits associated with the instruction. * @since 1.1.0 */ fcml_hints getHints() const { return _hints; } /** * Sets new instruction hints. * * @param hints The hints to be set. * @return The instruction itself. * @since 1.1.0 */ Instruction& setHints( fcml_hints hints ) { _hints = hints; return *this; } /** * Gets true if it's a conditional instruction. * * @return True in case of the conditional instruction. * @since 1.1.0 */ bool isConditional() const { return _isConditional; } /** * Sets conditional flag for the instruction. * * @param isConditional Set to true in order to mark instruction as conditional one. * @return The instruction itself. * @since 1.1.0 */ Instruction& setConditional( bool isConditional ) { _isConditional = isConditional; return *this; } /** * Gets the mnemonic associated with the instruction. * * @return The mnemonic associated with the instruction. * @since 1.1.0 */ const fcml_cstring& getMnemonic() const { return _mnemonic; } /** * Sets a new mnemonic for the instruction. * * @param mnemonic The new mnemonic. * @return The instruction itself. * @since 1.1.0 */ Instruction& setMnemonic( const fcml_cstring &mnemonic ) { _mnemonic = mnemonic; return *this; } /** * Gets number of operands associated with the instruction. * * @return The number of operands in the instruction. * @since 1.1.0 */ fcml_int getOperandsCount() const { return _operandsCount; } /** * Sets number of operands available in the instruction. * * @param operandsCount Number of operands. * @return The number of instructions. * @since 1.1.0 */ Instruction& setOperandsCount( fcml_int operandsCount ) { _operandsCount = operandsCount; return *this; } /** * Gets prefixes associated with the instruction. * * @return The prefixes. * @since 1.1.0 */ fcml_prefixes getPrefixes() const { return _prefixes; } /** * Sets a new set of prefixes for the instruction. * * @param prefixes The set of prefixes to be set for the instruction. * @return The instruction itself. * @since 1.1.0 */ Instruction& setPrefixes( fcml_prefixes prefixes ) { _prefixes = prefixes; return *this; } public: // Helper methods to identify prefixes and hints. /** * Returns true if lock prefix is set. * @return True if lock prefix is set. * @since 1.1.0 */ bool isLock() const { return ( _prefixes & FCML_PREFIX_LOCK ) ? true : false; } /** * Returns true if repne prefix is set. * @return True if repne prefix is set. * @since 1.1.0 */ bool isRepne() const { return ( _prefixes & FCML_PREFIX_REPNE ) ? true : false; } /** * Returns true if lock repnz is set. * @return True if lock repnz is set. * @since 1.1.0 */ bool isRepnz() const { return ( _prefixes & FCML_PREFIX_REPNZ ) ? true : false; } /** * Returns true if rep prefix is set. * @return True if rep prefix is set. * @since 1.1.0 */ bool isRep() const { return ( _prefixes & FCML_PREFIX_REP ) ? true : false; } /** * Returns true if repe prefix is set. * @return True if repe prefix is set. * @since 1.1.0 */ bool isRepe() const { return ( _prefixes & FCML_PREFIX_REPE ) ? true : false; } /** * Returns true if repz prefix is set. * @return True if repz prefix is set. * @since 1.1.0 */ bool isRepz() const { return ( _prefixes & FCML_PREFIX_REPZ ) ? true : false; } /** * Returns true if xacquire prefix is set. * @return True if xacquire prefix is set. * @since 1.1.0 */ bool isXAcquire() const { return ( _prefixes & FCML_PREFIX_XACQUIRE ) ? true : false; } /** * Returns true if xrelease prefix is set. * @return True if xrelease prefix is set. * @since 1.1.0 */ bool isXRelease() const { return ( _prefixes & FCML_PREFIX_XRELEASE ) ? true : false; } /** * Returns true if branch_hint prefix is set. * @return True if branch_hint prefix is set. * @since 1.1.0 */ bool isBranchHint() const { return ( _prefixes & FCML_PREFIX_BRANCH_HINT ) ? true : false; } /** * Returns true if no_branch_hint prefix is set. * @return True if no_branch_hint prefix is set. * @since 1.1.0 */ bool isNoBranchHint() const { return ( _prefixes & FCML_PREFIX_NOBRANCH_HINT ) ? true : false; } /** * Returns true if far pointer hint is set. * @return True if far pointer hint is set. * @since 1.1.0 */ bool isFarPointer() const { return ( _hints & FCML_HINT_FAR_POINTER ) ? true : false; } /** * Returns true if near pointer hint is set. * @return True if near pointer hint is set. * @since 1.1.0 */ bool isNearPointer() const { return ( _hints & FCML_HINT_NEAR_POINTER ) ? true : false; } /** * Returns true if long form pointer hint is set. See manual for more information about this hint. * @return True if long form pointer hint is set. * @since 1.1.0 */ bool isLongFormPointer() const { return ( _hints & FCML_HINT_LONG_FORM_POINTER ) ? true : false; } /** * Returns true if indirect pointer hint is set. * @return True if indirect pointer hint is set. * @since 1.1.0 */ bool isIndirectPointer() const { return ( _hints & FCML_HINT_INDIRECT_POINTER ) ? true : false; } /** * Returns true if direct pointer hint is set. * @return True if direct pointer hint is set. * @since 1.1.0 */ bool isDirectPointer() const { return ( _hints & FCML_HINT_DIRECT_POINTER ) ? true : false; } private: /** * Throws if given operand index is wrong. * @throw BadArgumentException Index exceeds the allowed number of operands. * @remarks An internal API, not intended to be used outside. */ void checkArrayAccess( fcml_int index) const { if( index < 0 || index >= FCML_OPERANDS_COUNT ) { throw BadArgumentException( FCML_TEXT( "Index exceeds the allowed number of operands." ) ); } } private: /** Describes explicit instruction prefixes. @ref PREFIX_GROUP "List of explicit prefixes." */ fcml_prefixes _prefixes; /** Holds instruction level hints. */ fcml_hints _hints; /** Dialect-dependent instruction mnemonic. @see fcml_en_instruction_hints */ fcml_cstring _mnemonic; /** True for conditional instructions. */ bool _isConditional; /** Describes condition used by assembled/disassembled conditional instruction. */ Condition _condition; /** Fixed size array of instruction operands. */ Operand _operands[FCML_OPERANDS_COUNT]; /** Number of operands defined for instruction. */ fcml_int _operandsCount; }; /** An instruction builder. * * A classic builder that can be used to prepare instruction in a * more convenient way than doing it manually using setters. * * @since 1.1.0 */ class IB { public: /** Creates builder for the given mnemonic. * * @param mnemonic Mnemonic for the instruction being created. * @since 1.1.0 */ IB( const fcml_cstring &mnemonic ) : _hints(FCML_HINT_NO_HINTS), _prefixes(0), _mnemonic(mnemonic), _operandsCount(0) { } /** * Creates builder for the given mnemonic and prefixes. * * @param prefixes The prefixes for the new instruction. * @param mnemonic Mnemonic for the instruction being created. * @since 1.1.0 */ IB( fcml_prefixes prefixes, const fcml_cstring &mnemonic ) : _hints(FCML_HINT_NO_HINTS), _prefixes(prefixes), _mnemonic(mnemonic), _operandsCount(0) { } /** * Creates an instruction builder for given mnemonic and hints. * * @param mnemonic The instruction mnemonic. * @param hints The instruction hints. * @since 1.1.0 */ IB( const fcml_cstring &mnemonic, fcml_hints hints) : _hints(hints), _prefixes(0), _mnemonic(mnemonic), _operandsCount(0) { } /** * Creates an instruction builder for given prefixes, mnemonic and hints. * * @param prefixes The instruction prefixes. * @param mnemonic The instruction mnemonic. * @param hints The instruction hints. * @since 1.1.0 */ IB( fcml_prefixes prefixes, const fcml_cstring &mnemonic, fcml_hints hints ) : _hints(hints), _prefixes(prefixes), _mnemonic(mnemonic), _operandsCount(0) { } /** * Converts builder to the instruction instance. * @since 1.1.0 * @return The built instruction. */ operator Instruction() const { return build(); } /** * Builds an instruction instance for the current state of the builder. * * @return The built instruction instance. * @since 1.1.0 */ Instruction build() const { Instruction instruction(_mnemonic); instruction.setHints(_hints); instruction.setPrefixes(_prefixes); instruction.setOperandsCount(_operandsCount); for( int i = 0; i < FCML_OPERANDS_COUNT; i++ ) { instruction.setOperand( _operands[i], i ); } return instruction; } /** * Sets a next operand for the instruction. * * @param operand The next operand to be added to the instruction. * @throw IllegalStateException No more operands allowed. * @since 1.1.0 */ void op( const Operand &operand ) { if( _operandsCount == FCML_OPERANDS_COUNT ) { throw IllegalStateException( FCML_TEXT( "No more operands allowed." ) ); } _operands[_operandsCount++] = operand; } /** * Factory method that can be used to create instruction builder. * * @param mnemonic The mnemonic for the instruction builder. * @return Instruction builder instance. * @since 1.1.0 */ static IB inst( const fcml_cstring &mnemonic ) { return IB(mnemonic); } // Hints. /** * Creates a hint instance described by the name of the method. Such a hint can be then used * together with shift operator overridden by the builder in order to set an appropriate hint * for the instruction being built. * @return The hint indicator for the builder. * @since 1.1.0 */ static const InstructionHint FAR_PTR() { return InstructionHint::FAR_POINTER(); } /** * Sets a hint described by the name of the method for the instruction being built. * @return The instruction builder with the appropriate hint set. * @since 1.1.0 */ IB& farPtr() { _hints |= FCML_HINT_FAR_POINTER; return *this; } /** * Creates a hint instance described by the name of the method. Such a hint can be then used * together with shift operator overridden by the builder in order to set an appropriate hint * for the instruction being built. * @return The hint indicator for the builder. * @since 1.1.0 */ static const InstructionHint NEAR_PTR() { return InstructionHint::NEAR_POINTER(); } /** * Sets a hint described by the name of the method for the instruction being built. * @return The instruction builder with the appropriate hint set. * @since 1.1.0 */ IB& nearPtr() { _hints |= FCML_HINT_NEAR_POINTER; return *this; } /** * Creates a hint instance described by the name of the method. Such a hint can be then used * together with shift operator overridden by the builder in order to set an appropriate hint * for the instruction being built. * @return The hint indicator for the builder. * @since 1.1.0 */ static const InstructionHint LONG_FORM_PTR() { return InstructionHint::LONG_FORM_POINTER(); } /** * Sets a hint described by the name of the method for the instruction being built. * @return The instruction builder with the appropriate hint set. * @since 1.1.0 */ IB& longFormPtr() { _hints |= FCML_HINT_LONG_FORM_POINTER; return *this; } /** * Creates a hint instance described by the name of the method. Such a hint can be then used * together with shift operator overridden by the builder in order to set an appropriate hint * for the instruction being built. * @return The hint indicator for the builder. * @since 1.1.0 */ static const InstructionHint INDIRECT_PTR() { return InstructionHint::INDIRECT_POINTER(); } /** * Sets a hint described by the name of the method for the instruction being built. * @return The instruction builder with the appropriate hint set. * @since 1.1.0 */ IB& indirectPtr() { _hints |= FCML_HINT_INDIRECT_POINTER; return *this; } /** * Creates a hint instance described by the name of the method. Such a hint can be then used * together with shift operator overridden by the builder in order to set an appropriate hint * for the instruction being built. * @return The hint indicator for the builder. * @since 1.1.0 */ static const InstructionHint DIRECT_PTR() { return InstructionHint::DIRECT_POINTER(); } /** * Sets a hint described by the name of the method for the instruction being built. * @return The instruction builder with the appropriate hint set. * @since 1.1.0 */ IB& directPtr() { _hints |= FCML_HINT_DIRECT_POINTER; return *this; } // Prefixes. /** * Creates a prefix instance described by the name of the method. Such a prefix can be then used * together with the shift operator overridden by the builder in order to set an appropriate prefix * for the instruction being built. * @return The prefix indicator for the builder. * @since 1.1.0 */ static const InstructionPrefix LOCK() { return InstructionPrefix::LOCK(); } /** * Sets a prefix described by the name of the method for the instruction being built. * @return The instruction builder with the appropriate prefix set. * @since 1.1.0 */ IB& lock() { _prefixes |= FCML_PREFIX_LOCK; return *this; } /** * Creates a prefix instance described by the name of the method. Such a prefix can be then used * together with the shift operator overridden by the builder in order to set an appropriate prefix * for the instruction being built. * @return The prefix indicator for the builder. * @since 1.1.0 */ static const InstructionPrefix REPNE() { return InstructionPrefix::REPNE(); } /** * Sets a prefix described by the name of the method for the instruction being built. * @return The instruction builder with the appropriate prefix set. * @since 1.1.0 */ IB& repne() { _prefixes |= FCML_PREFIX_REPNE; return *this; } /** * Creates a prefix instance described by the name of the method. Such a prefix can be then used * together with the shift operator overridden by the builder in order to set an appropriate prefix * for the instruction being built. * @return The prefix indicator for the builder. * @since 1.1.0 */ static const InstructionPrefix REPNZ() { return InstructionPrefix::REPNZ(); } /** * Sets a prefix described by the name of the method for the instruction being built. * @return The instruction builder with the appropriate prefix set. * @since 1.1.0 */ IB& repnz() { _prefixes |= FCML_PREFIX_REPNZ; return *this; } /** * Creates a prefix instance described by the name of the method. Such a prefix can be then used * together with the shift operator overridden by the builder in order to set an appropriate prefix * for the instruction being built. * @return The prefix indicator for the builder. * @since 1.1.0 */ static const InstructionPrefix REP() { return InstructionPrefix::REP(); } /** * Sets a prefix described by the name of the method for the instruction being built. * @return The instruction builder with the appropriate prefix set. * @since 1.1.0 */ IB& rep() { _prefixes |= FCML_PREFIX_REP; return *this; } /** * Creates a prefix instance described by the name of the method. Such a prefix can be then used * together with the shift operator overridden by the builder in order to set an appropriate prefix * for the instruction being built. * @return The prefix indicator for the builder. * @since 1.1.0 */ static const InstructionPrefix REPE() { return InstructionPrefix::REPE(); } /** * Sets a prefix described by the name of the method for the instruction being built. * @return The instruction builder with the appropriate prefix set. * @since 1.1.0 */ IB& repe() { _prefixes |= FCML_PREFIX_REPE; return *this; } /** * Creates a prefix instance described by the name of the method. Such a prefix can be then used * together with the shift operator overridden by the builder in order to set an appropriate prefix * for the instruction being built. * @return The prefix indicator for the builder. * @since 1.1.0 */ static const InstructionPrefix REPZ() { return InstructionPrefix::REPZ(); } /** * Sets a prefix described by the name of the method for the instruction being built. * @return The instruction builder with the appropriate prefix set. * @since 1.1.0 */ IB& repz() { _prefixes |= FCML_PREFIX_REPZ; return *this; } /** * Creates a prefix instance described by the name of the method. Such a prefix can be then used * together with the shift operator overridden by the builder in order to set an appropriate prefix * for the instruction being built. * @return The prefix indicator for the builder. * @since 1.1.0 */ static const InstructionPrefix XACQUIRE() { return InstructionPrefix::XACQUIRE(); } /** * Sets a prefix described by the name of the method for the instruction being built. * @return The instruction builder with the appropriate prefix set. * @since 1.1.0 */ IB& xacquire() { _prefixes |= FCML_PREFIX_XACQUIRE; return *this; } /** * Creates a prefix instance described by the name of the method. Such a prefix can be then used * together with the shift operator overridden by the builder in order to set an appropriate prefix * for the instruction being built. * @return The prefix indicator for the builder. * @since 1.1.0 */ static const InstructionPrefix XRELEASE() { return InstructionPrefix::XRELEASE(); } /** * Sets a prefix described by the name of the method for the instruction being built. * @return The instruction builder with the appropriate prefix set. * @since 1.1.0 */ IB& xrelease() { _prefixes |= FCML_PREFIX_XRELEASE; return *this; } /** * Creates a prefix instance described by the name of the method. Such a prefix can be then used * together with the shift operator overridden by the builder in order to set an appropriate prefix * for the instruction being built. * @return The prefix indicator for the builder. * @since 1.1.0 */ static const InstructionPrefix BRANCH() { return InstructionPrefix::BRANCH_HINT(); } /** * Sets a prefix described by the name of the method for the instruction being built. * @return The instruction builder with the appropriate prefix set. * @since 1.1.0 */ IB& branchHint() { _prefixes |= FCML_PREFIX_BRANCH_HINT; return *this; } /** * Creates a prefix instance described by the name of the method. Such a prefix can be then used * together with the shift operator overridden by the builder in order to set an appropriate prefix * for the instruction being built. * @return The prefix indicator for the builder. * @since 1.1.0 */ static const InstructionPrefix NO_BRANCH() { return InstructionPrefix::NOBRANCH_HINT(); } /** * Sets a prefix described by the name of the method for the instruction being built. * @return The instruction builder with the appropriate prefix set. * @since 1.1.0 */ IB& nobranchHint() { _prefixes |= FCML_PREFIX_NOBRANCH_HINT; return *this; } /** * Gets multimedia hint for the operand. * @return The multimedia hint. */ static const OperandHint OP_MULTIMEDIA_HINT() { return OperandHint::MULTIMEDIA(); } /** * Gets relative address hint for the operand. * @return The multimedia hint. */ static const OperandHint OP_RELATIVE_ADDRESSING() { return OperandHint::RELATIVE_ADDRESSING(); } /** * Gets absolute hint for the operand. * @return The multimedia hint. */ static const OperandHint OP_ABSOLUTE_ADDRESSING() { return OperandHint::ABSOLUTE_ADDRESSING(); } /** * Gets SIB encoding hint for the operand. * @return The SIB encoding hint. */ static const OperandHint OP_SIB_ENCODING() { return OperandHint::SIB_ENCODING(); } /** * Marks the lastly added operand as a multimedia one. * @return The instruction builder itself. */ IB& operandMultimediaHint() { set( OP_MULTIMEDIA_HINT() ); return *this; } /** * Marks the lastly added address operand as a relative one. * @return The instruction builder itself. */ IB& operandRelativeHint() { set( OP_MULTIMEDIA_HINT() ); return *this; } /** * Marks the lastly added address operand as a absolute one. * @return The instruction builder itself. */ IB& operandAbsoluteHint() { set( OP_MULTIMEDIA_HINT() ); return *this; } /** * Sets preferred encoding to SIB for the lastly added ModR/M operand. * @return The instruction builder itself. */ IB& operandSIBEncodingHint() { set( OP_MULTIMEDIA_HINT() ); return *this; } // Operands. /** * Adds an immediate operand. * @return The immediate operand. * @since 1.1.0 */ IB& imm( const Integer &imm ) { sanityCheck(); _operands[_operandsCount++].imm(imm); return *this; } /** * Adds a far pointer operand. * @param seg A segment selector. * @param addr An 16-bit offset value. * @return The far pointer operand. * @since 1.1.0 */ IB& far_ptr( fcml_uint16_t seg, fcml_int16_t addr ) { sanityCheck(); _operands[_operandsCount++].far_ptr(seg, addr); return *this; } /** * Adds a far pointer operand. * @param seg A segment selector. * @param addr An 32-bit offset value. * @return The far pointer operand. * @since 1.1.0 */ IB& far_ptr( fcml_uint16_t seg, fcml_int32_t addr ) { sanityCheck(); _operands[_operandsCount++].far_ptr(seg, addr); return *this; } /** * Adds a far pointer operand. * @param pointer A far pointer instance. * @return The far pointer operand. * @since 1.1.0 */ IB& far_ptr( const FarPointer &pointer ) { sanityCheck(); _operands[_operandsCount++].far_ptr( pointer ); return *this; } /** * Adds an address operand. * @param address An address instance. * @return The address operand. * @since 1.1.0 */ IB& addr( const Address &address ) { sanityCheck(); _operands[_operandsCount++].addr(address); return *this; } /** * Adds an offset operand. * @param offset An offset instance. * @param sizeOperator An optional size operator. * @return The address operand. * @since 1.1.0 */ IB& off( const Integer &offset, fcml_usize sizeOperator = FCML_DS_UNDEF ) { sanityCheck(); _operands[_operandsCount++].off( offset, sizeOperator ); return *this; } /** * Adds an offset based address operand with byte size operator. * @param offset An offset instance. * @return The address operand. * @since 1.1.0 */ IB& offb( const Integer &offset ) { sanityCheck(); _operands[_operandsCount++].off( offset, FCML_DS_8 ); return *this; } /** * Adds an offset based address operand with word size operator. * @param offset An offset instance. * @return The address operand. * @since 1.1.0 */ IB& offw( const Integer &offset ) { sanityCheck(); _operands[_operandsCount++].off( offset, FCML_DS_16 ); return *this; } /** * Adds an offset based address operand with double word size operator. * @param offset An offset instance. * @return The address operand. * @since 1.1.0 */ IB& offd( const Integer &offset ) { sanityCheck(); _operands[_operandsCount++].off( offset, FCML_DS_32 ); return *this; } /** * Adds an offset based address operand with quadro word size operator. * @param offset An offset instance. * @return The address operand. * @since 1.1.0 */ IB& offq( const Integer &offset ) { sanityCheck(); _operands[_operandsCount++].off( offset, FCML_DS_64 ); return *this; } /** * Adds an address type operand for given effective address and optional size operator. * @param effectiveAddress The effective address. * @param sizeOperator The optional size operator. * @return The created operator. * @since 1.1.0 */ IB& addr( const EffectiveAddress &effectiveAddress, fcml_usize sizeOperator = FCML_DS_UNDEF ) { sanityCheck(); _operands[_operandsCount++].addr( effectiveAddress, sizeOperator ); return *this; } /** * Adds an address type operand for given effective address and byte size operator. * @param effectiveAddress The effective address. * @return The created operator. * @since 1.1.0 */ IB& addrb( const EffectiveAddress &effectiveAddress ) { sanityCheck(); _operands[_operandsCount++].addr( effectiveAddress, FCML_DS_8 ); return *this; } /** * Adds an address type operand for given effective address and word size operator. * @param effectiveAddress The effective address. * @return The created operator. * @since 1.1.0 */ IB& addrw( const EffectiveAddress &effectiveAddress ) { sanityCheck(); _operands[_operandsCount++].addr( effectiveAddress, FCML_DS_16 ); return *this; } /** * Adds an address type operand for given effective address and double word size operator. * @param effectiveAddress The effective address. * @return The created operator. * @since 1.1.0 */ IB& addrd( const EffectiveAddress &effectiveAddress ) { sanityCheck(); _operands[_operandsCount++].addr( effectiveAddress, FCML_DS_32 ); return *this; } /** * Adds an address type operand for given effective address and quadro word size operator. * @param effectiveAddress The effective address. * @return The created operator. * @since 1.1.0 */ IB& addrq( const EffectiveAddress &effectiveAddress ) { sanityCheck(); _operands[_operandsCount++].addr( effectiveAddress, FCML_DS_64 ); return *this; } /** * Adds an address type operand for given segment selector, effective address and optional size operator. * @param effectiveAddress The effective address. * @param segmentSelector The segment selector. * @param sizeOperator The optional size operator. * @return The created operator. * @since 1.1.0 */ IB& addr( const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector, fcml_usize sizeOperator = FCML_DS_UNDEF ) { sanityCheck(); _operands[_operandsCount++].addr( effectiveAddress, segmentSelector, sizeOperator ); return *this; } /** * Adds an address type operand for given effective address and byte size operator. * @param effectiveAddress The effective address. * @param segmentSelector The segment selector. * @return The created operator. * @since 1.1.0 */ IB& addrb( const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector ) { sanityCheck(); _operands[_operandsCount++].addr( effectiveAddress, segmentSelector, FCML_DS_8 ); return *this; } /** * Adds an address type operand for given effective address and byte size operator. * @param effectiveAddress The effective address. * @param segmentSelector The segment selector. * @return The created operator. * @since 1.1.0 */ IB& addrw( const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector ) { sanityCheck(); _operands[_operandsCount++].addr( effectiveAddress, segmentSelector, FCML_DS_8 ); return *this; } /** * Adds an address type operand for given effective address and double word size operator. * @param effectiveAddress The effective address. * @param segmentSelector The segment selector. * @return The created operator. * @since 1.1.0 */ IB& addrd( const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector ) { sanityCheck(); _operands[_operandsCount++].addr( effectiveAddress, segmentSelector, FCML_DS_8 ); return *this; } /** * Adds an address type operand for given effective address and quadro word size operator. * @param effectiveAddress The effective address. * @param segmentSelector The segment selector. * @return The created operator. * @since 1.1.0 */ IB& addrq( const EffectiveAddress &effectiveAddress, const SegmentSelector &segmentSelector ) { sanityCheck(); _operands[_operandsCount++].addr( effectiveAddress, segmentSelector, FCML_DS_8 ); return *this; } /** * Adds an an register based operator for given register. * @param reg The register. * @return The created operator. * @since 1.1.0 */ IB& reg( const Register ® ) { sanityCheck(); _operands[_operandsCount++].reg( reg ); return *this; } /** * Adds an an register based operator for given parameters. * @param reg The FCML register number. * @param size The register size. * @param type The register type. * @param x64_exp See manual for more information. * @return The created operator. * @since 1.1.0 */ IB& reg( fcml_uint8_t reg, fcml_usize size, Register::RegisterType type = Register::REG_GPR, fcml_bool x64_exp = FCML_FALSE ) { sanityCheck(); _operands[_operandsCount++].reg( Register( reg, size, type, x64_exp ) ); return *this; } /** * Adds an an effective address based operator for a displacement and optional size operator. * @param displacement The displacement value. * @param sizeOperator The size operator. * @return The created operator. * @since 1.1.0 */ IB& eff( const Integer &displacement, fcml_usize sizeOperator = FCML_DS_UNDEF ) { next().addr( EffectiveAddress(displacement), sizeOperator ); return *this; } /** * Adds an an effective address based operator for a displacement and byte size operator. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ IB& effb( const Integer &displacement ) { next().addr( EffectiveAddress(displacement), FCML_DS_8 ); return *this; } /** * Adds an an effective address based operator for a displacement and word size operator. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ IB& effw( const Integer &displacement ) { next().addr( EffectiveAddress(displacement), FCML_DS_16 ); return *this; } /** * Adds an an effective address based operator for a displacement and double word size operator. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ IB& effd( const Integer &displacement ) { next().addr( EffectiveAddress(displacement), FCML_DS_32 ); return *this; } /** * Adds an an effective address based operator for a displacement and quadro byte size operator. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ IB& effq( const Integer &displacement ) { next().addr( EffectiveAddress(displacement), FCML_DS_64 ); return *this; } /** * Adds an an effective address based operator for a base register and optional size operator. * @param base The base register. * @param sizeOperator The optional size operator. * @return The created operator. * @since 1.1.0 */ IB& eff( const Register &base, fcml_usize sizeOperator = FCML_DS_UNDEF ) { next().addr( EffectiveAddress(base), sizeOperator ); return *this; } /** * Adds an an effective address based operator for a base register and byte size operator. * @param base The base register. * @return The created operator. * @since 1.1.0 */ IB& effb( const Register &base ) { next().addr( EffectiveAddress(base), FCML_DS_8 ); return *this; } /** * Adds an an effective address based operator for a base register and word size operator. * @param base The base register. * @return The created operator. * @since 1.1.0 */ IB& effw( const Register &base ) { next().addr( EffectiveAddress(base), FCML_DS_16 ); return *this; } /** * Adds an an effective address based operator for a base register and double word size operator. * @param base The base register. * @return The created operator. * @since 1.1.0 */ IB& effd( const Register &base ) { next().addr( EffectiveAddress(base), FCML_DS_32 ); return *this; } /** * Adds an an effective address based operator for a base register and quadro word size operator. * @param base The base register. * @return The created operator. * @since 1.1.0 */ IB& effq( const Register &base ) { next().addr( EffectiveAddress(base), FCML_DS_64 ); return *this; } /** * Adds an an effective address based operator for a base register, displacement and optional size operator. * @param base The base register. * @param displacement The displacement value. * @param sizeOperator The optional size operator. * @return The created operator. * @since 1.1.0 */ IB& eff( const Register &base, const Integer &displacement, fcml_usize sizeOperator = FCML_DS_UNDEF ) { next().addr( EffectiveAddress( base, displacement ), sizeOperator ); return *this; } /** * Adds an an effective address based operator for a base register, displacement and byte size operator. * @param base The base register. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ IB& effb( const Register &base, const Integer &displacement ) { next().addr( EffectiveAddress( base, displacement ), FCML_DS_8 ); return *this; } /** * Adds an an effective address based operator for a base register, displacement and word size operator. * @param base The base register. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ IB& effw( const Register &base, const Integer &displacement ) { next().addr( EffectiveAddress( base, displacement ), FCML_DS_16 ); return *this; } /** * Adds an an effective address based operator for a base register, displacement and double word size operator. * @param base The base register. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ IB& effd( const Register &base, const Integer &displacement ) { next().addr( EffectiveAddress( base, displacement ), FCML_DS_32 ); return *this; } /** * Adds an an effective address based operator for a base register, displacement and quadro word size operator. * @param base The base register. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ IB& effq( const Register &base, const Integer &displacement ) { next().addr( EffectiveAddress( base, displacement ), FCML_DS_64 ); return *this; } /** * Adds an an effective address based operator for an index register, scaleFactor, displacement and optional size operator. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @param sizeOperator The optional size operator. * @return The created operator. * @since 1.1.0 */ IB& eff( const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement, fcml_usize sizeOperator = FCML_DS_UNDEF ) { next().addr( EffectiveAddress( index, scaleFactor, displacement ), sizeOperator ); return *this; } /** * Adds an an effective address based operator for an index register, scaleFactor, displacement and byte size operator. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ IB& effb( const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) { next().addr( EffectiveAddress( index, scaleFactor, displacement ), FCML_DS_8 ); return *this; } /** * Adds an an effective address based operator for an index register, scaleFactor, displacement and word size operator. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ IB& effw( const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) { next().addr( EffectiveAddress( index, scaleFactor, displacement ), FCML_DS_16 ); return *this; } /** * Adds an an effective address based operator for an index register, scaleFactor, displacement and double word size operator. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ IB& effd( const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) { next().addr( EffectiveAddress( index, scaleFactor, displacement ), FCML_DS_32 ); return *this; } /** * Adds an an effective address based operator for an index register, scaleFactor, displacement and quadro word size operator. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ IB& effq( const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) { next().addr( EffectiveAddress( index, scaleFactor, displacement ), FCML_DS_64 ); return *this; } /** * Adds an an effective address based operator for a base register, index register and optional size operator. * @param base The base register. * @param index The index register. * @param sizeOperator The optional size operator. * @return The created operator. * @since 1.1.0 */ IB& eff( const Register &base, const Register &index, fcml_usize sizeOperator = FCML_DS_UNDEF ) { next().addr( EffectiveAddress( base, index ), sizeOperator ); return *this; } /** * Adds an an effective address based operator for a base register, index register and byte size operator. * @param base The base register. * @param index The index register. * @return The created operator. * @since 1.1.0 */ IB& effb( const Register &base, const Register &index ) { next().addr( EffectiveAddress( base, index ), FCML_DS_8 ); return *this; } /** * Adds an an effective address based operator for a base register, index register and word size operator. * @param base The base register. * @param index The index register. * @return The created operator. * @since 1.1.0 */ IB& effw( const Register &base, const Register &index ) { next().addr( EffectiveAddress( base, index ), FCML_DS_16 ); return *this; } /** * Adds an an effective address based operator for a base register, index register and double word size operator. * @param base The base register. * @param index The index register. * @return The created operator. * @since 1.1.0 */ IB& effd( const Register &base, const Register &index ) { next().addr( EffectiveAddress( base, index ), FCML_DS_32 ); return *this; } /** * Adds an an effective address based operator for a base register, index register and quadro word size operator. * @param base The base register. * @param index The index register. * @return The created operator. * @since 1.1.0 */ IB& effq( const Register &base, const Register &index ) { next().addr( EffectiveAddress( base, index ), FCML_DS_64 ); return *this; } /** * Adds an an effective address based operator for a base register, index register, scale factor and optional size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @param sizeOperator The optional size operator. * @return The created operator. * @since 1.1.0 */ IB& eff( const Register &base, const Register &index, fcml_uint8_t scaleFactor, fcml_usize sizeOperator = FCML_DS_UNDEF ) { next().addr( EffectiveAddress( base, index, scaleFactor ), sizeOperator ); return *this; } /** * Adds an an effective address based operator for a base register, index register, scale factor and byte size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @return The created operator. * @since 1.1.0 */ IB& effb( const Register &base, const Register &index, fcml_uint8_t scaleFactor ) { next().addr( EffectiveAddress( base, index, scaleFactor ), FCML_DS_8 ); return *this; } /** * Adds an an effective address based operator for a base register, index register, scale factor and word size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @return The created operator. * @since 1.1.0 */ IB& effw( const Register &base, const Register &index, fcml_uint8_t scaleFactor ) { next().addr( EffectiveAddress( base, index, scaleFactor ), FCML_DS_16 ); return *this; } /** * Adds an an effective address based operator for a base register, index register, scale factor and double word size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @return The created operator. * @since 1.1.0 */ IB& effd( const Register &base, const Register &index, fcml_uint8_t scaleFactor ) { next().addr( EffectiveAddress( base, index, scaleFactor ), FCML_DS_32 ); return *this; } /** * Adds an an effective address based operator for a base register, index register, scale factor and quadro word size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @return The created operator. * @since 1.1.0 */ IB& effq( const Register &base, const Register &index, fcml_uint8_t scaleFactor ) { next().addr( EffectiveAddress( base, index, scaleFactor ), FCML_DS_64 ); return *this; } /** * Adds an an effective address based operator for a base register, index register, scale factor and optional size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @param sizeOperator The optional size operator. * @return The created operator. * @since 1.1.0 */ IB& eff( const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement, fcml_usize sizeOperator = FCML_DS_UNDEF ) { next().addr( EffectiveAddress( base, index, scaleFactor, displacement ), sizeOperator ); return *this; } /** * Adds an an effective address based operator for a base register, index register, scale factor and byte size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ IB& effb( const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) { next().addr( EffectiveAddress( base, index, scaleFactor, displacement ), FCML_DS_8 ); return *this; } /** * Adds an an effective address based operator for a base register, index register, scale factor and word size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ IB& effw( const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) { next().addr( EffectiveAddress( base, index, scaleFactor, displacement ), FCML_DS_16 ); return *this; } /** * Adds an an effective address based operator for a base register, index register, scale factor and double word size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ IB& effd( const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) { next().addr( EffectiveAddress( base, index, scaleFactor, displacement ), FCML_DS_32 ); return *this; } /** * Adds an an effective address based operator for a base register, index register, scale factor and quardo word size operator. * @param base The base register. * @param index The index register. * @param scaleFactor The scale factor. * @param displacement The displacement value. * @return The created operator. * @since 1.1.0 */ IB& effq( const Register &base, const Register &index, fcml_uint8_t scaleFactor, const Integer &displacement ) { next().addr( EffectiveAddress( base, index, scaleFactor, displacement ), FCML_DS_64 ); return *this; } /** * Adds an operand to the instruction being built. * @param operand The operand to be added. * @return The instruction builder with the new operand added to it. * @since 1.1.0 */ IB& operator <<(const Operand &operand) { next() = operand; return *this; } /** * Adds a prefix to the instruction being built. * @param prefix The prefix to be added. * @return The instruction builder with the new prefix set for it. * @since 1.1.0 */ IB& operator <<(const InstructionPrefix &prefix) { return set(prefix); } /** * Adds an instruction level hint to the instruction being built. * @param hint The hint to be added. * @return The instruction builder with the new hint added to it. * @since 1.1.0 */ IB& operator <<(const InstructionHint &hint) { return set( hint ); } /** * Adds an operand level hint to the instruction being built. * @param hint The hint to be added. * @return The instruction builder with the new hint added to it. * @since 1.1.0 */ IB& operator <<(const OperandHint &hint) { return set( hint ); } /** * Adds a prefix to the instruction being built. * @param prefix The prefix to be added. * @return The instruction builder with the new prefix set for it. * @since 1.1.0 */ IB& set( const InstructionPrefix &prefix ) { _prefixes |= prefix._prefix; return *this; } /** * Adds an instruction level hint to the instruction being built. * @param hint The hint to be added. * @return The instruction builder with the new hint added to it. * @since 1.1.0 */ IB& set( const InstructionHint &hint ) { _hints |= hint._hint; return *this; } /** * Adds an operand level hint to the instruction being built. * @param hint The hint to be added. * @return The instruction builder with the new hint added to it. * @since 1.1.0 */ IB& set( const OperandHint &hint ) { if( _operandsCount == 0 ) { throw IllegalStateException( FCML_TEXT( "There are no operands yet for the current instruction.." ) ); } _operands[_operandsCount-1].setHints( _operands[_operandsCount-1].getHints() | hint._hint ); return *this; } private: /** * Gets the next instruction operand. * @return A reference to the next instruction operand. * @since 1.1.0 */ Operand& next() { sanityCheck(); return _operands[_operandsCount++]; } /** * Throws exception if there is no more space for new operands in the builder. * @throw IllegalStateException Operand's number exceeds maximal number of operands allowed. * @since 1.1.0 */ void sanityCheck() const { if( _operandsCount == FCML_OPERANDS_COUNT ) { throw IllegalStateException( FCML_TEXT( "Operand's number exceeds maximal number of operands allowed." ) ); } } private: /** Instruction hints. */ fcml_hints _hints; /** Instruction prefixes.*/ fcml_prefixes _prefixes; /** Instruction mnemonic. */ fcml_cstring _mnemonic; /** Number of operands available in the builder. */ fcml_int _operandsCount; /** Operands for the built instruction. */ Operand _operands[FCML_OPERANDS_COUNT]; }; /** Two way conversion for common types. * @since 1.1.0 * @remarks Internal API, not intended to be used outside. */ class TypeConverter { public: static void convert( const fcml_st_entry_point &src, EntryPoint &dest ) { dest.setIP( src.ip ); dest.setOpMode( static_cast( src.op_mode ) ); dest.setAddressSizeAttribute( src.address_size_attribute ); dest.setOperandSizeAttribute( src.operand_size_attribute ); } static void convert( const EntryPoint &src, fcml_st_entry_point &dest ) { dest.ip = src.getIP(); dest.op_mode = static_cast( src.getOpMode() ); dest.address_size_attribute = src.getAddressSizeAttribute(); dest.operand_size_attribute = src.getOperandSizeAttribute(); } static void convert( const fcml_st_integer &src, Integer &dest ) { dest.setInt8( src.int8 ); dest.setInt16( src.int16 ); dest.setInt32( src.int32 ); dest.setInt64( src.int64 ); dest.setSigned( src.is_signed ); dest.setSize( src.size ); } static void convert( const Integer &src, fcml_st_integer &dest ) { dest.int8 = src.getInt8(); dest.int16 = src.getInt16(); dest.int32 = src.getInt32(); dest.int64 = src.getInt64(); dest.is_signed = src.isSigned(); dest.size = src.getSize(); } static void convert( const fcml_st_offset &src, Integer &dest ) { dest.setInt16( src.off16 ); dest.setInt32( src.off32 ); dest.setInt64( src.off64 ); dest.setSigned( src.is_signed ); dest.setSize( src.size ); } static void convert( const Integer &src, fcml_st_offset &dest ) { dest.off16 = src.getSize() == FCML_DS_8 ? src.getInt8() : src.getInt16(); dest.off32 = src.getInt32(); dest.off64 = src.getInt64(); dest.is_signed = src.isSigned(); dest.size = src.getSize(); } static void convert( const fcml_st_register &src, Register &dest ) { dest.setReg( src.reg ); dest.setSize( src.size ); dest.setType( static_cast( src.type ) ); dest.setX64Exp( src.x64_exp ? true : false ); } static void convert( const Register &src, fcml_st_register &dest ) { dest.reg = src.getReg(); dest.size = src.getSize(); dest.type = static_cast( src.getType() ); dest.x64_exp = src.getX64Exp(); } static void convert( const fcml_st_far_pointer &src, FarPointer &dest ) { dest.setOffset16( src.offset16 ); dest.setOffset32( src.offset32 ); dest.setOffsetSize( src.offset_size ); dest.setSegment( src.segment ); } static void convert( const FarPointer &src, fcml_st_far_pointer &dest ) { dest.offset16 = src.getOffset16(); dest.offset32 = src.getOffset32(); dest.offset_size = src.getOffsetSize(); dest.segment = src.getSegment(); } static void convert( const fcml_st_segment_selector &src, SegmentSelector &dest ) { dest.setDefaultReg( src.is_default_reg ? true : false ); convert( src.segment_selector, dest.getSegmentSelector() ); } static void convert( const SegmentSelector &src, fcml_st_segment_selector &dest ) { dest.is_default_reg = src.isDefaultReg(); convert( src.getSegmentSelector(), dest.segment_selector ); } static void convert( const fcml_st_effective_address &src, EffectiveAddress &dest ) { convert( src.base, dest.getBase() ); convert( src.index, dest.getIndex() ); convert( src.displacement, dest.getDisplacement() ); dest.setScaleFactor(src.scale_factor); } static void convert( const EffectiveAddress &src, fcml_st_effective_address &dest ) { convert( src.getBase(), dest.base ); convert( src.getIndex(), dest.index ); convert( src.getDisplacement(), dest.displacement ); dest.scale_factor = src.getScaleFactor(); } static void convert( const fcml_st_address &src, Address &dest ) { dest.setAddressForm( static_cast( src.address_form ) ); dest.setSizeOperator( src.size_operator ); convert( src.segment_selector, dest.getSegmentSelector() ); convert( src.effective_address, dest.getEffectiveAddress() ); convert( src.offset, dest.getOffset() ); } static void convert( const Address &src, fcml_st_address &dest ) { dest.address_form = static_cast( src.getAddressForm() ); dest.size_operator = src.getSizeOperator(); convert( src.getSegmentSelector(), dest.segment_selector ); convert( src.getEffectiveAddress(), dest.effective_address ); convert( src.getOffset(), dest.offset ); } static void convert( const fcml_st_operand &src, Operand &dest ) { dest.setHints( src.hints ); dest.setOperandType( static_cast( src.type ) ); convert( src.reg, dest.getRegister() ); convert( src.address, dest.getAddress() ); convert( src.far_pointer, dest.getFarPointer() ); convert( src.immediate, dest.getImmediate() ); } static void convert( const Operand &src, fcml_st_operand &dest ) { dest.hints = src.getHints(); dest.type = static_cast( src.getOperandType() ); convert( src.getAddress(), dest.address ); convert( src.getFarPointer(), dest.far_pointer ); convert( src.getImmediate(), dest.immediate ); convert( src.getRegister(), dest.reg ); } static void convert( const fcml_st_condition &src, Condition &dest ) { dest.setConditionType( static_cast( src.condition_type ) ); dest.setNegation( src.is_negation ? true : false ); } static void convert( const Condition &src, fcml_st_condition &dest ) { dest.condition_type = static_cast( src.getConditionType() ); dest.is_negation = src.isNegation(); } static void convert( const fcml_st_instruction &src, Instruction &dest ) { dest.setMnemonic( src.mnemonic ); convert( src.condition, dest.getCondition() ); dest.setHints( src.hints ); dest.setPrefixes( src.prefixes ); dest.setConditional( src.is_conditional ? true : false ); for( int i = 0; i < FCML_OPERANDS_COUNT; i++ ) { convert( src.operands[i], dest[i] ); } dest.setOperandsCount(src.operands_count); } static void convert( const Instruction &src, fcml_st_instruction &dest ) { // Bear in mind that you are responsible for freeing mnemonic duplicated here. dest.mnemonic = Env::strDup( src.getMnemonic().c_str() ); convert( src.getCondition(), dest.condition ); dest.hints = src.getHints(); dest.prefixes = src.getPrefixes(); dest.is_conditional = src.isConditional(); for( int i = 0; i < FCML_OPERANDS_COUNT; i++ ) { convert( src[i], dest.operands[i] ); } dest.operands_count = src.getOperandsCount(); } static void free( fcml_st_instruction &instruction ) { if( instruction.mnemonic ) { Env::strFree( instruction.mnemonic ); instruction.mnemonic = NULL; } } }; } #endif //FCML_COMMON_HPP_ fcml-1.1.1/include/fcml_lag_assembler.h0000644000175000017500000001177012560745216014767 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_lag_assembler.h * Experimental multiline load-and-go assembler implementation. * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_LAG_ASSEMBLER_H_ #define FCML_LAG_ASSEMBLER_H_ #include "fcml_symbols.h" #include "fcml_assembler.h" #ifdef __cplusplus extern "C" { #endif /** Result holder for load-and-go assembler. */ typedef struct fcml_st_lag_assembler_result { /** Error and warning messages from one-line assembler. */ fcml_st_ceh_error_container errors; /** Number of line where assembler failed. */ fcml_int error_line; /** Chain of assembled instructions.*/ fcml_st_assembled_instruction *instructions; } fcml_st_lag_assembler_result; /** Load-and-go assembler runtime context. */ typedef struct fcml_st_lag_assembler_context { /** Assembler instance that should be used to assemble instructions. */ fcml_st_assembler *assembler; /** Assembler behavior can be configured here.*/ fcml_st_assembler_conf configuration; /** Instruction entry point configuration. */ fcml_st_entry_point entry_point; /** Symbols table. */ fcml_st_symbol_table symbol_table; } fcml_st_lag_assembler_context; /** * Multipass load-and-go assembler. * Assembles all instructions given in the NULL terminated source_code array of strings. * Every instruction has to be represented as one string in the source array. Like every multipass * assembler implementation it passes through the source code multiple times in order to generate * optimal code. Assembler also supports symbols that can be provided using symbol table * available in the context. Context should be initialized the same way as in case of one line assembler. * The only difference here is the symbol table itself which can be initialized using fcml_fn_symbol_table_alloc() * function. Symbols can be also declared directly in the source code and accessed * through the same symbols table when processing is done (Only if you provide valid symbol table through the context). * Reusable result holder has to be prepared using fcml_fn_lag_assembler_result_prepare() function. As long as the context * and the result holder are not shared across multiple calls function is thread safe. * * @param context Assembler context. * @param source_code NULL terminated array of the instructions. * @param result Reusable result holder. * @return Error code or FCML_CEH_GEC_NO_ERROR. * @warning This is an experimental implementation and it still needs some testing. * @see fcml_fn_lag_assembler_result_prepare * @see fcml_fn_symbol_table_alloc */ LIB_EXPORT fcml_ceh_error LIB_CALL fcml_fn_lag_assemble( fcml_st_lag_assembler_context *context, const fcml_string *source_code, fcml_st_lag_assembler_result *result ); /** * Prepares reusable result holder for assembler. * Every instance of fcml_st_lag_assembler_result structure is reusable from the assembler's * point of view, so it has to be prepared in the right way in order to allow assembler to * reuse it correctly. It is up to the library user to allocate space for the holder itself. * This function is only responsible for cleaning the structure correctly and preparing it * for first assembling process. Notice that assembler has to clean the result holder at the * beginning so you can not pass an uninitialized memory block because it can even cause * a crash due to illegal memory access. * * @param result Result holder instance to be prepared. */ LIB_EXPORT void LIB_CALL fcml_fn_lag_assembler_result_prepare( fcml_st_lag_assembler_result *result ); /** * Cleans result holder. * Frees all memory blocks allocated by the assembler and held inside the result holder (Instructions, errors etc.). * Notice that result holder itself is not freed and can be even safety reused after call to this function. * In fact this function is also called internally by assembler in order to clean result holder before * reusing it. * @param result Result holder to clean. */ LIB_EXPORT void LIB_CALL fcml_fn_lag_assembler_result_free( fcml_st_lag_assembler_result *result ); #ifdef __cplusplus } #endif #endif /* FCML_LAG_ASSEMBLER_H_ */ fcml-1.1.1/include/fcml_env.h0000644000175000017500000000647712560745216012767 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_env.h * API for environment configuration. * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_ENV_H_ #define FCML_ENV_H_ #include "fcml_types.h" #ifdef __cplusplus extern "C" { #endif /** Memory allocator handler function pointer declaration. * Memory allocation handlers are used to allocate requested memory in * environment specific way. * @param size Size of the memory to allocate. * @return The allocated memory block or NULL in case of out of memory. */ typedef fcml_ptr (*fcml_fp_env_memory_alloc_handler)( fcml_usize size ); /** Memory reallocator handler function pointer declaration. * Memory reallocation handlers are used to reallocate requested memory in * environment specific way. * @param ptr The memory block to be reallocated. * @param size Size of the memory to allocate. * @return The reallocated memory block or NULL in case of out of memory. */ typedef fcml_ptr (*fcml_fp_env_memory_realloc_handler)( fcml_ptr ptr, fcml_usize size ); /** Memory deallocator handler function pointer declaration. * Memory deallocation handlers are used to free requested memory blocks in * environment specific way. * @param memory_block The memory block to free. */ typedef void (*fcml_fp_env_memory_free_handler)( fcml_ptr memory_block ); /** * Registers the new dedicated handler responsible for allocating memory for the sake * of internal FCML implementation. * @param handler New memory allocation handler. * @return The replaced memory handler. */ LIB_EXPORT fcml_fp_env_memory_alloc_handler LIB_CALL fcml_fn_env_register_memory_alloc_handler( fcml_fp_env_memory_alloc_handler handler ); /** * Registers the new dedicated handler responsible for reallocating memory for the sake * of internal FCML implementation. * @param handler New memory reallocation handler. * @return The replaced memory handler. */ LIB_EXPORT fcml_fp_env_memory_realloc_handler LIB_CALL fcml_fn_env_register_memory_realloc_handler( fcml_fp_env_memory_realloc_handler handler ); /** * Registers the new dedicated handler responsible for deallocating the memory for the sake * of internal FCML implementation. * @param handler New memory deallocation handler. * @return The replaced memory handler. */ LIB_EXPORT fcml_fp_env_memory_free_handler LIB_CALL fcml_fn_env_register_memory_free_handler( fcml_fp_env_memory_free_handler handler ); #ifdef __cplusplus } #endif #endif /* FCML_ENV_H_ */ fcml-1.1.1/include/fcml_assembler.h0000644000175000017500000002225112560745216014140 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_assembler.h * Structures and functions declarations related to one-line FCML assembler. * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_ASSEMBLER_H_ #define FCML_ASSEMBLER_H_ #include "fcml_lib_export.h" #include "fcml_types.h" #include "fcml_errors.h" #include "fcml_common.h" #include "fcml_dialect.h" #include "fcml_optimizers.h" #include "fcml_choosers.h" #ifdef __cplusplus extern "C" { #endif /** Abstract assembler representation. */ typedef struct fcml_st_assembler fcml_st_assembler; /** * Assembler runtime configuration. */ typedef struct fcml_st_assembler_conf { /** Set to true in order to force assembler to increment IP address by length of the assembled instruction. */ fcml_bool increment_ip; /** True if optional error and warning messages should be collected during processing. */ fcml_bool enable_error_messages; /** If there are SIB and "ModR/M only" encodings available, choose the SIB based one. */ fcml_bool choose_sib_encoding; /** If memory address can be encoded as relative or absolute value choose the absolute addressing. It works in 64 bit mode only. */ fcml_bool choose_abs_encoding; /** Sometimes REX prefix is useless so it is just omitted in the final machine code. By setting this flag to true you can force this prefix to be added anyway. */ fcml_bool force_rex_prefix; /** Every 2 byte VEX/XOP prefix can be encoded using three byte form. Setting this flag to true forces it. */ fcml_bool force_three_byte_VEX; /** Optimizer implementation that should be used by assembler. Setting it to NULL causes assembler to use default one. */ fcml_fnp_asm_optimizer optimizer; /** This field is passed to the chosen optimizer. It can be used to configure its behavior. */ fcml_uint16_t optimizer_flags; /** instruction chooser implementation that should be used by assembler to choose most appropriate instruction encoding. * Setting this value to NULL cause assembler to use default instruction chooser. */ fcml_fnp_asm_instruction_chooser chooser; } fcml_st_assembler_conf; /** * Encoded instruction. * Every instruction might be encoded to more than one binary form. * This chain holds all forms assembler was able to assemble instruction to. */ typedef struct fcml_st_assembled_instruction { /** Next assembled instruction in the chain. */ struct fcml_st_assembled_instruction *next; /** Warning messages related to assembled instruction.*/ fcml_st_ceh_error_container warnings; /** Instruction machine code.*/ fcml_uint8_t *code; /** Instruction code length in bytes.*/ fcml_usize code_length; #ifdef FCML_DEBUG fcml_uint8_t __def_index; #endif } fcml_st_assembled_instruction; /** Assembler result. */ typedef struct fcml_st_assembler_result { /** Error and warning messages from assembler.*/ fcml_st_ceh_error_container errors; /** Chain of assembled instructions. */ fcml_st_assembled_instruction *instructions; /** Instruction chosen by used instruction chooser; otherwise NULL.*/ fcml_st_assembled_instruction *chosen_instruction; /** Number of encoded instruction forms. */ fcml_usize number_of_instructions; } fcml_st_assembler_result; /** Assembler runtime context. */ typedef struct fcml_st_assembler_context { /** Assembler instance that should be used to assemble instructions. */ fcml_st_assembler *assembler; /** Assembler behaviour can be configured here.*/ fcml_st_assembler_conf configuration; /** Instruction entry point configuration. */ fcml_st_entry_point entry_point; } fcml_st_assembler_context; /** * Initializes assembler for given dialect. * Initializes assembler instance for given dialect (Intel, AT&T). Assembler * initialized in such a way is dialect dependent and supports GIM with the * syntax supported by it. Every assembler instance has to be freed using * fcml_fn_assembler_free() function as soon as it is not needed anymore. * * @param dialect Dialect instance. * @param[out] assembler Initialized assembler instance. * @return Error code or FCML_CEH_GEC_NO_ERROR. * @see fcml_fn_assembler_free */ LIB_EXPORT fcml_ceh_error LIB_CALL fcml_fn_assembler_init( const fcml_st_dialect *dialect, fcml_st_assembler **assembler ); /** * Assembles one instruction encoded in the generic instruction model. * Instruction is proceeded using configuration and assembler provided * in given fcml_st_assembler_context instance. Assembled code as well * as potential errors or warnings are accessible via provided reusable * result holder instance. Result holder has to be allocated by the * user and appropriately prepared using fcml_fn_assembler_result_prepare() * function. As long as the instruction context and the result holder * are not shared across multiple function calls assembling process is * thread safe. * * @param context Assembler context (Assembler, Entry Point, Configuration). * @param instruction Instruction encoded as generic instruction model (Dialect dependent). * @param result Result holder (Remember to prepare it appropriately). * @return Error code or FCML_CEH_GEC_NO_ERROR. * @see fcml_fn_assembler_result_prepare fcml_fn_assembler_init */ LIB_EXPORT fcml_ceh_error LIB_CALL fcml_fn_assemble( fcml_st_assembler_context *context, const fcml_st_instruction *instruction, fcml_st_assembler_result *result ); /** * Prepares reusable result holder for assembler. * Every instance of fcml_st_assembler_result structure is reusable from the assembler's * point of view, so it has to be prepared in the right way in order to allow assembler to * reuse it correctly. It is up to the library user to allocate space for the holder itself. * This function is only responsible for cleaning the structure correctly and preparing it * for the first assembling process. Notice that assembler has to clean the result holder at the * beginning so you can not pass an uninitialized memory block because it can even cause * a crash due to illegal memory access. * * @param result Result holder instance to be prepared. */ LIB_EXPORT void LIB_CALL fcml_fn_assembler_result_prepare( fcml_st_assembler_result *result ); /** * Cleans result holder. * Frees all memory blocks allocated by the assembler and held inside the result holder (Instructions, errors etc.). * Notice that result holder itself is not freed and can be even safety reused after call to this function. * In fact this function is also called internally by the assembler in order to clean result holder before * reusing it. * @param result Result holder to clean. */ LIB_EXPORT void LIB_CALL fcml_fn_assembler_result_free( fcml_st_assembler_result *result ); /** * Frees assembled instruction. * Take into account that it does not free whole chain recursively but only the one instruction you have provided. * @param instruction Instruction to be freed. */ LIB_EXPORT void LIB_CALL fcml_fn_assembler_instruction_free( fcml_st_assembled_instruction *instruction ); /** * Detaches given instruction from the instructions chain. * Removes given assembled instruction from the provided chain in order * to prevent premature freeing of memory while assembler cleans result holder * reusing it. Detached instructions are not automatically deallocated by * fcml_fn_assemble() or fcml_fn_assembler_result_free() functions, so * it is up to you to free it using fcml_fn_assembler_instruction_free() * function when it is not needed anymore. Function may be useful * when you need to store assembled instructions across multiple calls * to the assembler if you reuse the same result holder. If there is only one * instruction in the chain its pointer will be set to NULL after detaching it. * @param chain Pointer to the instructions chain pointer. * @param instruction Instruction to be detached from the chain. * */ LIB_EXPORT void LIB_CALL fcml_fn_assembler_instruction_detach( fcml_st_assembled_instruction **chain, fcml_st_assembled_instruction *instruction ); /** * Frees assembler instance. * Every assembler instance manages some resources internally and as such it has * to be deallocated as soon as it is not needed anymore. * @param assembler Assembler to be freed. */ LIB_EXPORT void LIB_CALL fcml_fn_assembler_free( fcml_st_assembler *assembler ); #ifdef __cplusplus } #endif #endif /* FCML_ASSEMBLER_H_ */ fcml-1.1.1/include/fcml_gas_mnemonics.h0000644000175000017500000016360712560745216015020 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_gas_mnemonics.h * Declarations of AT&T mnemonics for C. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_GAS_MNEMONICS_H_ #define FCML_GAS_MNEMONICS_H_ #include "fcml_types.h" #define M_AAA FCML_TEXT("aaa") #define M_AAD FCML_TEXT("aad") #define M_AAM FCML_TEXT("aam") #define M_AAS FCML_TEXT("aas") #define M_ADC FCML_TEXT("adc") #define M_ADCB FCML_TEXT("adcb") #define M_ADCL FCML_TEXT("adcl") #define M_ADCQ FCML_TEXT("adcq") #define M_ADCW FCML_TEXT("adcw") #define M_ADCX FCML_TEXT("adcx") #define M_ADD FCML_TEXT("add") #define M_ADDB FCML_TEXT("addb") #define M_ADDL FCML_TEXT("addl") #define M_ADDPD FCML_TEXT("addpd") #define M_ADDPS FCML_TEXT("addps") #define M_ADDQ FCML_TEXT("addq") #define M_ADDSD FCML_TEXT("addsd") #define M_ADDSS FCML_TEXT("addss") #define M_ADDSUBPD FCML_TEXT("addsubpd") #define M_ADDSUBPS FCML_TEXT("addsubps") #define M_ADDW FCML_TEXT("addw") #define M_ADOX FCML_TEXT("adox") #define M_AESDEC FCML_TEXT("aesdec") #define M_AESDECLAST FCML_TEXT("aesdeclast") #define M_AESENC FCML_TEXT("aesenc") #define M_AESENCLAST FCML_TEXT("aesenclast") #define M_AESIMC FCML_TEXT("aesimc") #define M_AESKEYGENASSIST FCML_TEXT("aeskeygenassist") #define M_AND FCML_TEXT("and") #define M_ANDB FCML_TEXT("andb") #define M_ANDL FCML_TEXT("andl") #define M_ANDN FCML_TEXT("andn") #define M_ANDNPD FCML_TEXT("andnpd") #define M_ANDNPS FCML_TEXT("andnps") #define M_ANDPD FCML_TEXT("andpd") #define M_ANDPS FCML_TEXT("andps") #define M_ANDQ FCML_TEXT("andq") #define M_ANDW FCML_TEXT("andw") #define M_ARPL FCML_TEXT("arpl") #define M_BEXR FCML_TEXT("bexr") #define M_BEXTR FCML_TEXT("bextr") #define M_BLCFILL FCML_TEXT("blcfill") #define M_BLCI FCML_TEXT("blci") #define M_BLCIC FCML_TEXT("blcic") #define M_BLCMSK FCML_TEXT("blcmsk") #define M_BLCS FCML_TEXT("blcs") #define M_BLENDPD FCML_TEXT("blendpd") #define M_BLENDPS FCML_TEXT("blendps") #define M_BLENDVPD FCML_TEXT("blendvpd") #define M_BLENDVPS FCML_TEXT("blendvps") #define M_BLSFILL FCML_TEXT("blsfill") #define M_BLSI FCML_TEXT("blsi") #define M_BLSIC FCML_TEXT("blsic") #define M_BLSMSK FCML_TEXT("blsmsk") #define M_BLSR FCML_TEXT("blsr") #define M_BOUND FCML_TEXT("bound") #define M_BSF FCML_TEXT("bsf") #define M_BSR FCML_TEXT("bsr") #define M_BSWAP FCML_TEXT("bswap") #define M_BT FCML_TEXT("bt") #define M_BTC FCML_TEXT("btc") #define M_BTCL FCML_TEXT("btcl") #define M_BTCQ FCML_TEXT("btcq") #define M_BTCW FCML_TEXT("btcw") #define M_BTL FCML_TEXT("btl") #define M_BTQ FCML_TEXT("btq") #define M_BTR FCML_TEXT("btr") #define M_BTRL FCML_TEXT("btrl") #define M_BTRQ FCML_TEXT("btrq") #define M_BTRW FCML_TEXT("btrw") #define M_BTS FCML_TEXT("bts") #define M_BTSL FCML_TEXT("btsl") #define M_BTSQ FCML_TEXT("btsq") #define M_BTSW FCML_TEXT("btsw") #define M_BTW FCML_TEXT("btw") #define M_BZHI FCML_TEXT("bzhi") #define M_CALL FCML_TEXT("call") #define M_CALLQ FCML_TEXT("callq") #define M_CALLW FCML_TEXT("callw") #define M_CBTW FCML_TEXT("cbtw") #define M_CLAC FCML_TEXT("clac") #define M_CLC FCML_TEXT("clc") #define M_CLD FCML_TEXT("cld") #define M_CLFLUSH FCML_TEXT("clflush") #define M_CLGI FCML_TEXT("clgi") #define M_CLI FCML_TEXT("cli") #define M_CLTD FCML_TEXT("cltd") #define M_CLTQ FCML_TEXT("cltq") #define M_CLTS FCML_TEXT("clts") #define M_CMC FCML_TEXT("cmc") #define M_CMOVO FCML_TEXT("cmovo"); #define M_CMOVNO FCML_TEXT("cmovno"); #define M_CMOVB FCML_TEXT("cmovb"); #define M_CMOVNB FCML_TEXT("cmovnb"); #define M_CMOVE FCML_TEXT("cmove"); #define M_CMOVNE FCML_TEXT("cmovne"); #define M_CMOVBE FCML_TEXT("cmovbe"); #define M_CMOVNBE FCML_TEXT("cmovnbe"); #define M_CMOVS FCML_TEXT("cmovs"); #define M_CMOVNS FCML_TEXT("cmovns"); #define M_CMOVP FCML_TEXT("cmovp"); #define M_CMOVNP FCML_TEXT("cmovnp"); #define M_CMOVL FCML_TEXT("cmovl"); #define M_CMOVNL FCML_TEXT("cmovnl"); #define M_CMOVLE FCML_TEXT("cmovle"); #define M_CMOVNLE FCML_TEXT("cmovnle"); #define M_CMOVNAE FCML_TEXT("cmovnae"); #define M_CMOVAE FCML_TEXT("cmovae"); #define M_CMOVZ FCML_TEXT("cmovz"); #define M_CMOVNZ FCML_TEXT("cmovnz"); #define M_CMOVNA FCML_TEXT("cmovna"); #define M_CMOVA FCML_TEXT("cmova"); #define M_CMOVPE FCML_TEXT("cmovpe"); #define M_CMOVPO FCML_TEXT("cmovpo"); #define M_CMOVNGE FCML_TEXT("cmovnge"); #define M_CMOVGE FCML_TEXT("cmovge"); #define M_CMOVNG FCML_TEXT("cmovng"); #define M_CMOVG FCML_TEXT("cmovg"); #define M_CMOVC FCML_TEXT("cmovc"); #define M_CMOVNC FCML_TEXT("cmovnc"); #define M_CMP FCML_TEXT("cmp") #define M_CMPB FCML_TEXT("cmpb") #define M_CMPEQSD FCML_TEXT("cmpeqsd") #define M_CMPEQSS FCML_TEXT("cmpeqss") #define M_CMPL FCML_TEXT("cmpl") #define M_CMPLESD FCML_TEXT("cmplesd") #define M_CMPLESS FCML_TEXT("cmpless") #define M_CMPLTSD FCML_TEXT("cmpltsd") #define M_CMPLTSS FCML_TEXT("cmpltss") #define M_CMPNEQSD FCML_TEXT("cmpneqsd") #define M_CMPNEQSS FCML_TEXT("cmpneqss") #define M_CMPNLESD FCML_TEXT("cmpnlesd") #define M_CMPNLESS FCML_TEXT("cmpnless") #define M_CMPNLTSD FCML_TEXT("cmpnltsd") #define M_CMPNLTSS FCML_TEXT("cmpnltss") #define M_CMPORDSD FCML_TEXT("cmpordsd") #define M_CMPORDSS FCML_TEXT("cmpordss") #define M_CMPPD FCML_TEXT("cmppd") #define M_CMPPS FCML_TEXT("cmpps") #define M_CMPQ FCML_TEXT("cmpq") #define M_CMPSB FCML_TEXT("cmpsb") #define M_CMPSD FCML_TEXT("cmpsd") #define M_CMPSL FCML_TEXT("cmpsl") #define M_CMPSQ FCML_TEXT("cmpsq") #define M_CMPSS FCML_TEXT("cmpss") #define M_CMPSW FCML_TEXT("cmpsw") #define M_CMPUNORDSD FCML_TEXT("cmpunordsd") #define M_CMPUNORDSS FCML_TEXT("cmpunordss") #define M_CMPW FCML_TEXT("cmpw") #define M_CMPXCHG FCML_TEXT("cmpxchg") #define M_CMPXCHG16B FCML_TEXT("cmpxchg16b") #define M_CMPXCHG8B FCML_TEXT("cmpxchg8b") #define M_COMISD FCML_TEXT("comisd") #define M_COMISS FCML_TEXT("comiss") #define M_CPUID FCML_TEXT("cpuid") #define M_CQTO FCML_TEXT("cqto") #define M_CRC32B FCML_TEXT("crc32b") #define M_CRC32L FCML_TEXT("crc32l") #define M_CRC32Q FCML_TEXT("crc32q") #define M_CRC32W FCML_TEXT("crc32w") #define M_CVTDQ2PD FCML_TEXT("cvtdq2pd") #define M_CVTDQ2PS FCML_TEXT("cvtdq2ps") #define M_CVTPD2DQ FCML_TEXT("cvtpd2dq") #define M_CVTPD2PI FCML_TEXT("cvtpd2pi") #define M_CVTPD2PS FCML_TEXT("cvtpd2ps") #define M_CVTPI2PD FCML_TEXT("cvtpi2pd") #define M_CVTPI2PS FCML_TEXT("cvtpi2ps") #define M_CVTPS2DQ FCML_TEXT("cvtps2dq") #define M_CVTPS2PD FCML_TEXT("cvtps2pd") #define M_CVTPS2PI FCML_TEXT("cvtps2pi") #define M_CVTSD2SI FCML_TEXT("cvtsd2si") #define M_CVTSD2SS FCML_TEXT("cvtsd2ss") #define M_CVTSI2SDL FCML_TEXT("cvtsi2sdl") #define M_CVTSI2SDQ FCML_TEXT("cvtsi2sdq") #define M_CVTSI2SSL FCML_TEXT("cvtsi2ssl") #define M_CVTSI2SSQ FCML_TEXT("cvtsi2ssq") #define M_CVTSS2SD FCML_TEXT("cvtss2sd") #define M_CVTSS2SI FCML_TEXT("cvtss2si") #define M_CVTTPD2DQ FCML_TEXT("cvttpd2dq") #define M_CVTTPD2PI FCML_TEXT("cvttpd2pi") #define M_CVTTPS2DQ FCML_TEXT("cvttps2dq") #define M_CVTTPS2PI FCML_TEXT("cvttps2pi") #define M_CVTTSD2SI FCML_TEXT("cvttsd2si") #define M_CVTTSS2SI FCML_TEXT("cvttss2si") #define M_CWTD FCML_TEXT("cwtd") #define M_CWTL FCML_TEXT("cwtl") #define M_DAA FCML_TEXT("daa") #define M_DAS FCML_TEXT("das") #define M_DEC FCML_TEXT("dec") #define M_DECB FCML_TEXT("decb") #define M_DECL FCML_TEXT("decl") #define M_DECQ FCML_TEXT("decq") #define M_DECW FCML_TEXT("decw") #define M_DIV FCML_TEXT("div") #define M_DIVB FCML_TEXT("divb") #define M_DIVL FCML_TEXT("divl") #define M_DIVPD FCML_TEXT("divpd") #define M_DIVPS FCML_TEXT("divps") #define M_DIVQ FCML_TEXT("divq") #define M_DIVSD FCML_TEXT("divsd") #define M_DIVSS FCML_TEXT("divss") #define M_DIVW FCML_TEXT("divw") #define M_DPPD FCML_TEXT("dppd") #define M_DPPS FCML_TEXT("dpps") #define M_EMMS FCML_TEXT("emms") #define M_ENTER FCML_TEXT("enter") #define M_ENTERQ FCML_TEXT("enterq") #define M_EXTRACTPS FCML_TEXT("extractps") #define M_EXTRQ FCML_TEXT("extrq") #define M_F2XM1 FCML_TEXT("f2xm1") #define M_FABS FCML_TEXT("fabs") #define M_FADD FCML_TEXT("fadd") #define M_FADDL FCML_TEXT("faddl") #define M_FADDP FCML_TEXT("faddp") #define M_FADDS FCML_TEXT("fadds") #define M_FBLD FCML_TEXT("fbld") #define M_FBSTP FCML_TEXT("fbstp") #define M_FCHS FCML_TEXT("fchs") #define M_FCLEX FCML_TEXT("fclex") #define M_FCMOVB FCML_TEXT("fcmovb") #define M_FCMOVBE FCML_TEXT("fcmovbe") #define M_FCMOVE FCML_TEXT("fcmove") #define M_FCMOVNB FCML_TEXT("fcmovnb") #define M_FCMOVNBE FCML_TEXT("fcmovnbe") #define M_FCMOVNE FCML_TEXT("fcmovne") #define M_FCMOVNU FCML_TEXT("fcmovnu") #define M_FCMOVU FCML_TEXT("fcmovu") #define M_FCOM FCML_TEXT("fcom") #define M_FCOMI FCML_TEXT("fcomi") #define M_FCOMIP FCML_TEXT("fcomip") #define M_FCOML FCML_TEXT("fcoml") #define M_FCOMP FCML_TEXT("fcomp") #define M_FCOMPL FCML_TEXT("fcompl") #define M_FCOMPP FCML_TEXT("fcompp") #define M_FCOMPS FCML_TEXT("fcomps") #define M_FCOMS FCML_TEXT("fcoms") #define M_FCOS FCML_TEXT("fcos") #define M_FDECSTP FCML_TEXT("fdecstp") #define M_FDIV FCML_TEXT("fdiv") #define M_FDIVL FCML_TEXT("fdivl") #define M_FDIVP FCML_TEXT("fdivp") #define M_FDIVR FCML_TEXT("fdivr") #define M_FDIVRL FCML_TEXT("fdivrl") #define M_FDIVRP FCML_TEXT("fdivrp") #define M_FDIVRS FCML_TEXT("fdivrs") #define M_FDIVS FCML_TEXT("fdivs") #define M_FEMMS FCML_TEXT("femms") #define M_FFREE FCML_TEXT("ffree") #define M_FIADD FCML_TEXT("fiadd") #define M_FIADDL FCML_TEXT("fiaddl") #define M_FICOM FCML_TEXT("ficom") #define M_FICOML FCML_TEXT("ficoml") #define M_FICOMP FCML_TEXT("ficomp") #define M_FICOMPL FCML_TEXT("ficompl") #define M_FIDIV FCML_TEXT("fidiv") #define M_FIDIVL FCML_TEXT("fidivl") #define M_FIDIVR FCML_TEXT("fidivr") #define M_FIDIVRL FCML_TEXT("fidivrl") #define M_FILD FCML_TEXT("fild") #define M_FILDL FCML_TEXT("fildl") #define M_FILDLL FCML_TEXT("fildll") #define M_FIMUL FCML_TEXT("fimul") #define M_FIMULL FCML_TEXT("fimull") #define M_FINCSTP FCML_TEXT("fincstp") #define M_FINIT FCML_TEXT("finit") #define M_FIST FCML_TEXT("fist") #define M_FISTL FCML_TEXT("fistl") #define M_FISTP FCML_TEXT("fistp") #define M_FISTPL FCML_TEXT("fistpl") #define M_FISTPLL FCML_TEXT("fistpll") #define M_FISTTP FCML_TEXT("fisttp") #define M_FISTTPL FCML_TEXT("fisttpl") #define M_FISTTPLL FCML_TEXT("fisttpll") #define M_FISUB FCML_TEXT("fisub") #define M_FISUBL FCML_TEXT("fisubl") #define M_FISUBR FCML_TEXT("fisubr") #define M_FISUBRL FCML_TEXT("fisubrl") #define M_FLD FCML_TEXT("fld") #define M_FLD1 FCML_TEXT("fld1") #define M_FLDCW FCML_TEXT("fldcw") #define M_FLDENV FCML_TEXT("fldenv") #define M_FLDENVS FCML_TEXT("fldenvs") #define M_FLDL FCML_TEXT("fldl") #define M_FLDL2E FCML_TEXT("fldl2e") #define M_FLDL2T FCML_TEXT("fldl2t") #define M_FLDLG2 FCML_TEXT("fldlg2") #define M_FLDLN2 FCML_TEXT("fldln2") #define M_FLDPI FCML_TEXT("fldpi") #define M_FLDS FCML_TEXT("flds") #define M_FLDT FCML_TEXT("fldt") #define M_FLDZ FCML_TEXT("fldz") #define M_FMUL FCML_TEXT("fmul") #define M_FMULL FCML_TEXT("fmull") #define M_FMULP FCML_TEXT("fmulp") #define M_FMULS FCML_TEXT("fmuls") #define M_FNCLEX FCML_TEXT("fnclex") #define M_FNINIT FCML_TEXT("fninit") #define M_FNOP FCML_TEXT("fnop") #define M_FNSAVE FCML_TEXT("fnsave") #define M_FNSAVES FCML_TEXT("fnsaves") #define M_FNSTCW FCML_TEXT("fnstcw") #define M_FNSTENV FCML_TEXT("fnstenv") #define M_FNSTENVS FCML_TEXT("fnstenvs") #define M_FNSTSW FCML_TEXT("fnstsw") #define M_FPATAN FCML_TEXT("fpatan") #define M_FPREM FCML_TEXT("fprem") #define M_FPREM1 FCML_TEXT("fprem1") #define M_FPTAN FCML_TEXT("fptan") #define M_FRNDINT FCML_TEXT("frndint") #define M_FRSTOR FCML_TEXT("frstor") #define M_FRSTORS FCML_TEXT("frstors") #define M_FSAVE FCML_TEXT("fsave") #define M_FSAVES FCML_TEXT("fsaves") #define M_FSCALE FCML_TEXT("fscale") #define M_FSIN FCML_TEXT("fsin") #define M_FSINCOS FCML_TEXT("fsincos") #define M_FSQRT FCML_TEXT("fsqrt") #define M_FST FCML_TEXT("fst") #define M_FSTCW FCML_TEXT("fstcw") #define M_FSTENV FCML_TEXT("fstenv") #define M_FSTENVS FCML_TEXT("fstenvs") #define M_FSTL FCML_TEXT("fstl") #define M_FSTP FCML_TEXT("fstp") #define M_FSTPL FCML_TEXT("fstpl") #define M_FSTPS FCML_TEXT("fstps") #define M_FSTPT FCML_TEXT("fstpt") #define M_FSTS FCML_TEXT("fsts") #define M_FSTSW FCML_TEXT("fstsw") #define M_FSUB FCML_TEXT("fsub") #define M_FSUBL FCML_TEXT("fsubl") #define M_FSUBP FCML_TEXT("fsubp") #define M_FSUBR FCML_TEXT("fsubr") #define M_FSUBRL FCML_TEXT("fsubrl") #define M_FSUBRP FCML_TEXT("fsubrp") #define M_FSUBRS FCML_TEXT("fsubrs") #define M_FSUBS FCML_TEXT("fsubs") #define M_FTST FCML_TEXT("ftst") #define M_FUCOM FCML_TEXT("fucom") #define M_FUCOMI FCML_TEXT("fucomi") #define M_FUCOMIP FCML_TEXT("fucomip") #define M_FUCOMP FCML_TEXT("fucomp") #define M_FUCOMPP FCML_TEXT("fucompp") #define M_FWAIT FCML_TEXT("fwait") #define M_FXAM FCML_TEXT("fxam") #define M_FXCH FCML_TEXT("fxch") #define M_FXRSTOR FCML_TEXT("fxrstor") #define M_FXRSTOR64 FCML_TEXT("fxrstor64") #define M_FXSAVE FCML_TEXT("fxsave") #define M_FXSAVE64 FCML_TEXT("fxsave64") #define M_FXTRACT FCML_TEXT("fxtract") #define M_FYL2X FCML_TEXT("fyl2x") #define M_FYL2XP1 FCML_TEXT("fyl2xp1") #define M_GETSEC FCML_TEXT("getsec") #define M_HADDPD FCML_TEXT("haddpd") #define M_HADDPS FCML_TEXT("haddps") #define M_HLT FCML_TEXT("hlt") #define M_HSUBPD FCML_TEXT("hsubpd") #define M_HSUBPS FCML_TEXT("hsubps") #define M_IDIV FCML_TEXT("idiv") #define M_IDIVB FCML_TEXT("idivb") #define M_IDIVL FCML_TEXT("idivl") #define M_IDIVQ FCML_TEXT("idivq") #define M_IDIVW FCML_TEXT("idivw") #define M_IMUL FCML_TEXT("imul") #define M_IMULB FCML_TEXT("imulb") #define M_IMULL FCML_TEXT("imull") #define M_IMULQ FCML_TEXT("imulq") #define M_IMULW FCML_TEXT("imulw") #define M_IN FCML_TEXT("in") #define M_INC FCML_TEXT("inc") #define M_INCB FCML_TEXT("incb") #define M_INCL FCML_TEXT("incl") #define M_INCQ FCML_TEXT("incq") #define M_INCW FCML_TEXT("incw") #define M_INSB FCML_TEXT("insb") #define M_INSERTPS FCML_TEXT("insertps") #define M_INSERTQ FCML_TEXT("insertq") #define M_INSL FCML_TEXT("insl") #define M_INSW FCML_TEXT("insw") #define M_INT FCML_TEXT("int") #define M_INT3 FCML_TEXT("int3") #define M_INTO FCML_TEXT("into") #define M_INVD FCML_TEXT("invd") #define M_INVEPT FCML_TEXT("invept") #define M_INVLPG FCML_TEXT("invlpg") #define M_INVLPGA FCML_TEXT("invlpga") #define M_INVPCID FCML_TEXT("invpcid") #define M_INVVPID FCML_TEXT("invvpid") #define M_IRET FCML_TEXT("iret") #define M_IRETQ FCML_TEXT("iretq") #define M_IRETW FCML_TEXT("iretw") #define M_JO FCML_TEXT("jo"); #define M_JNO FCML_TEXT("jno"); #define M_JB FCML_TEXT("jb"); #define M_JNB FCML_TEXT("jnb"); #define M_JE FCML_TEXT("je"); #define M_JNE FCML_TEXT("jne"); #define M_JBE FCML_TEXT("jbe"); #define M_JNBE FCML_TEXT("jnbe"); #define M_JS FCML_TEXT("js"); #define M_JNS FCML_TEXT("jns"); #define M_JP FCML_TEXT("jp"); #define M_JNP FCML_TEXT("jnp"); #define M_JL FCML_TEXT("jl"); #define M_JNL FCML_TEXT("jnl"); #define M_JLE FCML_TEXT("jle"); #define M_JNLE FCML_TEXT("jnle"); #define M_JNAE FCML_TEXT("jnae"); #define M_JAE FCML_TEXT("jae"); #define M_JZ FCML_TEXT("jz"); #define M_JNZ FCML_TEXT("jnz"); #define M_JNA FCML_TEXT("jna"); #define M_JA FCML_TEXT("ja"); #define M_JPE FCML_TEXT("jpe"); #define M_JPO FCML_TEXT("jpo"); #define M_JNGE FCML_TEXT("jnge"); #define M_JGE FCML_TEXT("jge"); #define M_JNG FCML_TEXT("jng"); #define M_JG FCML_TEXT("jg"); #define M_JC FCML_TEXT("jc"); #define M_JNC FCML_TEXT("jnc"); #define M_JCXZ FCML_TEXT("jcxz") #define M_JECXZ FCML_TEXT("jecxz") #define M_JMP FCML_TEXT("jmp") #define M_JMPQ FCML_TEXT("jmpq") #define M_JMPW FCML_TEXT("jmpw") #define M_JRCXZ FCML_TEXT("jrcxz") #define M_LAHF FCML_TEXT("lahf") #define M_LAR FCML_TEXT("lar") #define M_LCALL FCML_TEXT("lcall") #define M_LCALLQ FCML_TEXT("lcallq") #define M_LCALLW FCML_TEXT("lcallw") #define M_LDDQU FCML_TEXT("lddqu") #define M_LDMXCSR FCML_TEXT("ldmxcsr") #define M_LDS FCML_TEXT("lds") #define M_LEA FCML_TEXT("lea") #define M_LEAVE FCML_TEXT("leave") #define M_LES FCML_TEXT("les") #define M_LFENCE FCML_TEXT("lfence") #define M_LFS FCML_TEXT("lfs") #define M_LGDT FCML_TEXT("lgdt") #define M_LGS FCML_TEXT("lgs") #define M_LIDT FCML_TEXT("lidt") #define M_LJMP FCML_TEXT("ljmp") #define M_LJMPL FCML_TEXT("ljmpl") #define M_LJMPQ FCML_TEXT("ljmpq") #define M_LJMPW FCML_TEXT("ljmpw") #define M_LLDT FCML_TEXT("lldt") #define M_LLWPCB FCML_TEXT("llwpcb") #define M_LMSW FCML_TEXT("lmsw") #define M_LODS FCML_TEXT("lods") #define M_LODSB FCML_TEXT("lodsb") #define M_LODSL FCML_TEXT("lodsl") #define M_LODSQ FCML_TEXT("lodsq") #define M_LODSW FCML_TEXT("lodsw") #define M_LOOP FCML_TEXT("loop") #define M_LOOPE FCML_TEXT("loope") #define M_LOOPNE FCML_TEXT("loopne") #define M_LOOPNZ FCML_TEXT("loopnz") #define M_LOOPZ FCML_TEXT("loopz") #define M_LRET FCML_TEXT("lret") #define M_LRETQ FCML_TEXT("lretq") #define M_LRETW FCML_TEXT("lretw") #define M_LSL FCML_TEXT("lsl") #define M_LSS FCML_TEXT("lss") #define M_LTR FCML_TEXT("ltr") #define M_LWPINS FCML_TEXT("lwpins") #define M_LWPVAL FCML_TEXT("lwpval") #define M_LZCNT FCML_TEXT("lzcnt") #define M_MASKMOVDQU FCML_TEXT("maskmovdqu") #define M_MASKMOVQ FCML_TEXT("maskmovq") #define M_MAXPD FCML_TEXT("maxpd") #define M_MAXPS FCML_TEXT("maxps") #define M_MAXSD FCML_TEXT("maxsd") #define M_MAXSS FCML_TEXT("maxss") #define M_MFENCE FCML_TEXT("mfence") #define M_MINPD FCML_TEXT("minpd") #define M_MINPS FCML_TEXT("minps") #define M_MINSD FCML_TEXT("minsd") #define M_MINSS FCML_TEXT("minss") #define M_MONITOR FCML_TEXT("monitor") #define M_MOV FCML_TEXT("mov") #define M_MOVABS FCML_TEXT("movabs") #define M_MOVAPD FCML_TEXT("movapd") #define M_MOVAPS FCML_TEXT("movaps") #define M_MOVB FCML_TEXT("movb") #define M_MOVBE FCML_TEXT("movbe") #define M_MOVD FCML_TEXT("movd") #define M_MOVDDUP FCML_TEXT("movddup") #define M_MOVDQ2Q FCML_TEXT("movdq2q") #define M_MOVDQA FCML_TEXT("movdqa") #define M_MOVDQU FCML_TEXT("movdqu") #define M_MOVHLPS FCML_TEXT("movhlps") #define M_MOVHPD FCML_TEXT("movhpd") #define M_MOVHPS FCML_TEXT("movhps") #define M_MOVL FCML_TEXT("movl") #define M_MOVLHPS FCML_TEXT("movlhps") #define M_MOVLPD FCML_TEXT("movlpd") #define M_MOVLPS FCML_TEXT("movlps") #define M_MOVMSKPD FCML_TEXT("movmskpd") #define M_MOVMSKPS FCML_TEXT("movmskps") #define M_MOVNTDQ FCML_TEXT("movntdq") #define M_MOVNTDQA FCML_TEXT("movntdqa") #define M_MOVNTI FCML_TEXT("movnti") #define M_MOVNTPD FCML_TEXT("movntpd") #define M_MOVNTPS FCML_TEXT("movntps") #define M_MOVNTQ FCML_TEXT("movntq") #define M_MOVNTSD FCML_TEXT("movntsd") #define M_MOVNTSS FCML_TEXT("movntss") #define M_MOVQ FCML_TEXT("movq") #define M_MOVQ2DQ FCML_TEXT("movq2dq") #define M_MOVS FCML_TEXT("movs") #define M_MOVSB FCML_TEXT("movsb") #define M_MOVSBL FCML_TEXT("movsbl") #define M_MOVSBQ FCML_TEXT("movsbq") #define M_MOVSBW FCML_TEXT("movsbw") #define M_MOVSD FCML_TEXT("movsd") #define M_MOVSHDUP FCML_TEXT("movshdup") #define M_MOVSL FCML_TEXT("movsl") #define M_MOVSLDUP FCML_TEXT("movsldup") #define M_MOVSQ FCML_TEXT("movsq") #define M_MOVSS FCML_TEXT("movss") #define M_MOVSW FCML_TEXT("movsw") #define M_MOVSWL FCML_TEXT("movswl") #define M_MOVSWQ FCML_TEXT("movswq") #define M_MOVSWW FCML_TEXT("movsww") #define M_MOVSXD FCML_TEXT("movsxd") #define M_MOVUPD FCML_TEXT("movupd") #define M_MOVUPS FCML_TEXT("movups") #define M_MOVW FCML_TEXT("movw") #define M_MOVZBL FCML_TEXT("movzbl") #define M_MOVZBQ FCML_TEXT("movzbq") #define M_MOVZBW FCML_TEXT("movzbw") #define M_MOVZWL FCML_TEXT("movzwl") #define M_MOVZWQ FCML_TEXT("movzwq") #define M_MOVZWW FCML_TEXT("movzww") #define M_MPSADBW FCML_TEXT("mpsadbw") #define M_MUL FCML_TEXT("mul") #define M_MULB FCML_TEXT("mulb") #define M_MULL FCML_TEXT("mull") #define M_MULPD FCML_TEXT("mulpd") #define M_MULPS FCML_TEXT("mulps") #define M_MULQ FCML_TEXT("mulq") #define M_MULSD FCML_TEXT("mulsd") #define M_MULSS FCML_TEXT("mulss") #define M_MULW FCML_TEXT("mulw") #define M_MULX FCML_TEXT("mulx") #define M_MWAIT FCML_TEXT("mwait") #define M_NEG FCML_TEXT("neg") #define M_NEGB FCML_TEXT("negb") #define M_NEGL FCML_TEXT("negl") #define M_NEGQ FCML_TEXT("negq") #define M_NEGW FCML_TEXT("negw") #define M_NOP FCML_TEXT("nop") #define M_NOPL FCML_TEXT("nopl") #define M_NOPQ FCML_TEXT("nopq") #define M_NOPW FCML_TEXT("nopw") #define M_NOT FCML_TEXT("not") #define M_NOTB FCML_TEXT("notb") #define M_NOTL FCML_TEXT("notl") #define M_NOTQ FCML_TEXT("notq") #define M_NOTW FCML_TEXT("notw") #define M_OR FCML_TEXT("or") #define M_ORB FCML_TEXT("orb") #define M_ORL FCML_TEXT("orl") #define M_ORPD FCML_TEXT("orpd") #define M_ORPS FCML_TEXT("orps") #define M_ORQ FCML_TEXT("orq") #define M_ORW FCML_TEXT("orw") #define M_OUT FCML_TEXT("out") #define M_OUTSB FCML_TEXT("outsb") #define M_OUTSL FCML_TEXT("outsl") #define M_OUTSW FCML_TEXT("outsw") #define M_PABSB FCML_TEXT("pabsb") #define M_PABSD FCML_TEXT("pabsd") #define M_PABSW FCML_TEXT("pabsw") #define M_PACKSSDW FCML_TEXT("packssdw") #define M_PACKSSWB FCML_TEXT("packsswb") #define M_PACKUSDW FCML_TEXT("packusdw") #define M_PACKUSWB FCML_TEXT("packuswb") #define M_PADDB FCML_TEXT("paddb") #define M_PADDD FCML_TEXT("paddd") #define M_PADDQ FCML_TEXT("paddq") #define M_PADDSB FCML_TEXT("paddsb") #define M_PADDSW FCML_TEXT("paddsw") #define M_PADDUSB FCML_TEXT("paddusb") #define M_PADDUSW FCML_TEXT("paddusw") #define M_PADDW FCML_TEXT("paddw") #define M_PALIGNR FCML_TEXT("palignr") #define M_PAND FCML_TEXT("pand") #define M_PANDN FCML_TEXT("pandn") #define M_PAUSE FCML_TEXT("pause") #define M_PAVGB FCML_TEXT("pavgb") #define M_PAVGUSB FCML_TEXT("pavgusb") #define M_PAVGW FCML_TEXT("pavgw") #define M_PBLENDVB FCML_TEXT("pblendvb") #define M_PBLENDW FCML_TEXT("pblendw") #define M_PCLMULQDQ FCML_TEXT("pclmulqdq") #define M_PCMPEQB FCML_TEXT("pcmpeqb") #define M_PCMPEQD FCML_TEXT("pcmpeqd") #define M_PCMPEQQ FCML_TEXT("pcmpeqq") #define M_PCMPEQW FCML_TEXT("pcmpeqw") #define M_PCMPESTRI FCML_TEXT("pcmpestri") #define M_PCMPESTRM FCML_TEXT("pcmpestrm") #define M_PCMPGTB FCML_TEXT("pcmpgtb") #define M_PCMPGTD FCML_TEXT("pcmpgtd") #define M_PCMPGTQ FCML_TEXT("pcmpgtq") #define M_PCMPGTW FCML_TEXT("pcmpgtw") #define M_PCMPISTRI FCML_TEXT("pcmpistri") #define M_PCMPISTRM FCML_TEXT("pcmpistrm") #define M_PDEP FCML_TEXT("pdep") #define M_PEXT FCML_TEXT("pext") #define M_PEXTRB FCML_TEXT("pextrb") #define M_PEXTRD FCML_TEXT("pextrd") #define M_PEXTRQ FCML_TEXT("pextrq") #define M_PEXTRW FCML_TEXT("pextrw") #define M_PF2ID FCML_TEXT("pf2id") #define M_PF2IW FCML_TEXT("pf2iw") #define M_PFACC FCML_TEXT("pfacc") #define M_PFADD FCML_TEXT("pfadd") #define M_PFCMPEQ FCML_TEXT("pfcmpeq") #define M_PFCMPGE FCML_TEXT("pfcmpge") #define M_PFCMPGT FCML_TEXT("pfcmpgt") #define M_PFMAX FCML_TEXT("pfmax") #define M_PFMIN FCML_TEXT("pfmin") #define M_PFMUL FCML_TEXT("pfmul") #define M_PFNACC FCML_TEXT("pfnacc") #define M_PFPNACC FCML_TEXT("pfpnacc") #define M_PFRCP FCML_TEXT("pfrcp") #define M_PFRCPIT1 FCML_TEXT("pfrcpit1") #define M_PFRCPIT2 FCML_TEXT("pfrcpit2") #define M_PFRSQIT1 FCML_TEXT("pfrsqit1") #define M_PFRSQRT FCML_TEXT("pfrsqrt") #define M_PFSUB FCML_TEXT("pfsub") #define M_PFSUBR FCML_TEXT("pfsubr") #define M_PHADDD FCML_TEXT("phaddd") #define M_PHADDSW FCML_TEXT("phaddsw") #define M_PHADDW FCML_TEXT("phaddw") #define M_PHMINPOSUW FCML_TEXT("phminposuw") #define M_PHSUBD FCML_TEXT("phsubd") #define M_PHSUBSW FCML_TEXT("phsubsw") #define M_PHSUBW FCML_TEXT("phsubw") #define M_PI2FD FCML_TEXT("pi2fd") #define M_PI2FW FCML_TEXT("pi2fw") #define M_PINSRB FCML_TEXT("pinsrb") #define M_PINSRD FCML_TEXT("pinsrd") #define M_PINSRQ FCML_TEXT("pinsrq") #define M_PINSRW FCML_TEXT("pinsrw") #define M_PMADDUBSW FCML_TEXT("pmaddubsw") #define M_PMADDWD FCML_TEXT("pmaddwd") #define M_PMAXSB FCML_TEXT("pmaxsb") #define M_PMAXSD FCML_TEXT("pmaxsd") #define M_PMAXSW FCML_TEXT("pmaxsw") #define M_PMAXUB FCML_TEXT("pmaxub") #define M_PMAXUD FCML_TEXT("pmaxud") #define M_PMAXUW FCML_TEXT("pmaxuw") #define M_PMINSB FCML_TEXT("pminsb") #define M_PMINSD FCML_TEXT("pminsd") #define M_PMINSW FCML_TEXT("pminsw") #define M_PMINUB FCML_TEXT("pminub") #define M_PMINUD FCML_TEXT("pminud") #define M_PMINUW FCML_TEXT("pminuw") #define M_PMOVMSKB FCML_TEXT("pmovmskb") #define M_PMOVSXBD FCML_TEXT("pmovsxbd") #define M_PMOVSXBQ FCML_TEXT("pmovsxbq") #define M_PMOVSXBW FCML_TEXT("pmovsxbw") #define M_PMOVSXDQ FCML_TEXT("pmovsxdq") #define M_PMOVSXWD FCML_TEXT("pmovsxwd") #define M_PMOVSXWQ FCML_TEXT("pmovsxwq") #define M_PMOVZXBD FCML_TEXT("pmovzxbd") #define M_PMOVZXBQ FCML_TEXT("pmovzxbq") #define M_PMOVZXBW FCML_TEXT("pmovzxbw") #define M_PMOVZXDQ FCML_TEXT("pmovzxdq") #define M_PMOVZXWD FCML_TEXT("pmovzxwd") #define M_PMOVZXWQ FCML_TEXT("pmovzxwq") #define M_PMULDQ FCML_TEXT("pmuldq") #define M_PMULHRSW FCML_TEXT("pmulhrsw") #define M_PMULHRW FCML_TEXT("pmulhrw") #define M_PMULHUW FCML_TEXT("pmulhuw") #define M_PMULHW FCML_TEXT("pmulhw") #define M_PMULLD FCML_TEXT("pmulld") #define M_PMULLW FCML_TEXT("pmullw") #define M_PMULUDQ FCML_TEXT("pmuludq") #define M_POP FCML_TEXT("pop") #define M_POPA FCML_TEXT("popa") #define M_POPAW FCML_TEXT("popaw") #define M_POPCNT FCML_TEXT("popcnt") #define M_POPF FCML_TEXT("popf") #define M_POPFQ FCML_TEXT("popfq") #define M_POPFW FCML_TEXT("popfw") #define M_POPL FCML_TEXT("popl") #define M_POPQ FCML_TEXT("popq") #define M_POPW FCML_TEXT("popw") #define M_POR FCML_TEXT("por") #define M_PREFETCH FCML_TEXT("prefetch") #define M_PREFETCHNTA FCML_TEXT("prefetchnta") #define M_PREFETCHT0 FCML_TEXT("prefetcht0") #define M_PREFETCHT1 FCML_TEXT("prefetcht1") #define M_PREFETCHT2 FCML_TEXT("prefetcht2") #define M_PREFETCHW FCML_TEXT("prefetchw") #define M_PSADBW FCML_TEXT("psadbw") #define M_PSHUFB FCML_TEXT("pshufb") #define M_PSHUFD FCML_TEXT("pshufd") #define M_PSHUFHW FCML_TEXT("pshufhw") #define M_PSHUFLW FCML_TEXT("pshuflw") #define M_PSHUFW FCML_TEXT("pshufw") #define M_PSIGNB FCML_TEXT("psignb") #define M_PSIGND FCML_TEXT("psignd") #define M_PSIGNW FCML_TEXT("psignw") #define M_PSLLD FCML_TEXT("pslld") #define M_PSLLDQ FCML_TEXT("pslldq") #define M_PSLLQ FCML_TEXT("psllq") #define M_PSLLW FCML_TEXT("psllw") #define M_PSRAD FCML_TEXT("psrad") #define M_PSRAW FCML_TEXT("psraw") #define M_PSRLD FCML_TEXT("psrld") #define M_PSRLDQ FCML_TEXT("psrldq") #define M_PSRLQ FCML_TEXT("psrlq") #define M_PSRLW FCML_TEXT("psrlw") #define M_PSUBB FCML_TEXT("psubb") #define M_PSUBD FCML_TEXT("psubd") #define M_PSUBQ FCML_TEXT("psubq") #define M_PSUBSB FCML_TEXT("psubsb") #define M_PSUBSW FCML_TEXT("psubsw") #define M_PSUBUSB FCML_TEXT("psubusb") #define M_PSUBUSW FCML_TEXT("psubusw") #define M_PSUBW FCML_TEXT("psubw") #define M_PSWAPD FCML_TEXT("pswapd") #define M_PTEST FCML_TEXT("ptest") #define M_PUNPCKHBW FCML_TEXT("punpckhbw") #define M_PUNPCKHDQ FCML_TEXT("punpckhdq") #define M_PUNPCKHQDQ FCML_TEXT("punpckhqdq") #define M_PUNPCKHWD FCML_TEXT("punpckhwd") #define M_PUNPCKLBW FCML_TEXT("punpcklbw") #define M_PUNPCKLDQ FCML_TEXT("punpckldq") #define M_PUNPCKLQDQ FCML_TEXT("punpcklqdq") #define M_PUNPCKLWD FCML_TEXT("punpcklwd") #define M_PUSH FCML_TEXT("push") #define M_PUSHA FCML_TEXT("pusha") #define M_PUSHAW FCML_TEXT("pushaw") #define M_PUSHB FCML_TEXT("pushb") #define M_PUSHF FCML_TEXT("pushf") #define M_PUSHFQ FCML_TEXT("pushfq") #define M_PUSHFW FCML_TEXT("pushfw") #define M_PUSHL FCML_TEXT("pushl") #define M_PUSHQ FCML_TEXT("pushq") #define M_PUSHW FCML_TEXT("pushw") #define M_PXOR FCML_TEXT("pxor") #define M_RCL FCML_TEXT("rcl") #define M_RCLB FCML_TEXT("rclb") #define M_RCLL FCML_TEXT("rcll") #define M_RCLQ FCML_TEXT("rclq") #define M_RCLW FCML_TEXT("rclw") #define M_RCPPS FCML_TEXT("rcpps") #define M_RCPSS FCML_TEXT("rcpss") #define M_RCR FCML_TEXT("rcr") #define M_RCRB FCML_TEXT("rcrb") #define M_RCRL FCML_TEXT("rcrl") #define M_RCRQ FCML_TEXT("rcrq") #define M_RCRW FCML_TEXT("rcrw") #define M_RDFSBASE FCML_TEXT("rdfsbase") #define M_RDGSBASE FCML_TEXT("rdgsbase") #define M_RDMSR FCML_TEXT("rdmsr") #define M_RDPMC FCML_TEXT("rdpmc") #define M_RDRAND FCML_TEXT("rdrand") #define M_RDSEED FCML_TEXT("rdseed") #define M_RDTSC FCML_TEXT("rdtsc") #define M_RDTSCP FCML_TEXT("rdtscp") #define M_RET FCML_TEXT("ret") #define M_RETQ FCML_TEXT("retq") #define M_RETW FCML_TEXT("retw") #define M_ROL FCML_TEXT("rol") #define M_ROLB FCML_TEXT("rolb") #define M_ROLL FCML_TEXT("roll") #define M_ROLQ FCML_TEXT("rolq") #define M_ROLW FCML_TEXT("rolw") #define M_ROR FCML_TEXT("ror") #define M_RORB FCML_TEXT("rorb") #define M_RORL FCML_TEXT("rorl") #define M_RORQ FCML_TEXT("rorq") #define M_RORW FCML_TEXT("rorw") #define M_RORX FCML_TEXT("rorx") #define M_ROUNDPD FCML_TEXT("roundpd") #define M_ROUNDPS FCML_TEXT("roundps") #define M_ROUNDSD FCML_TEXT("roundsd") #define M_ROUNDSS FCML_TEXT("roundss") #define M_RSM FCML_TEXT("rsm") #define M_RSQRTPS FCML_TEXT("rsqrtps") #define M_RSQRTSS FCML_TEXT("rsqrtss") #define M_SAHF FCML_TEXT("sahf") #define M_SAL FCML_TEXT("sal") #define M_SALB FCML_TEXT("salb") #define M_SALL FCML_TEXT("sall") #define M_SALQ FCML_TEXT("salq") #define M_SALW FCML_TEXT("salw") #define M_SAR FCML_TEXT("sar") #define M_SARB FCML_TEXT("sarb") #define M_SARL FCML_TEXT("sarl") #define M_SARQ FCML_TEXT("sarq") #define M_SARW FCML_TEXT("sarw") #define M_SARX FCML_TEXT("sarx") #define M_SBB FCML_TEXT("sbb") #define M_SBBB FCML_TEXT("sbbb") #define M_SBBL FCML_TEXT("sbbl") #define M_SBBQ FCML_TEXT("sbbq") #define M_SBBW FCML_TEXT("sbbw") #define M_SCAS FCML_TEXT("scas") #define M_SCASB FCML_TEXT("scasb") #define M_SCASL FCML_TEXT("scasl") #define M_SCASQ FCML_TEXT("scasq") #define M_SCASW FCML_TEXT("scasw") #define M_SETO FCML_TEXT("seto"); #define M_SETNO FCML_TEXT("setno"); #define M_SETB FCML_TEXT("setb"); #define M_SETNB FCML_TEXT("setnb"); #define M_SETE FCML_TEXT("sete"); #define M_SETNE FCML_TEXT("setne"); #define M_SETBE FCML_TEXT("setbe"); #define M_SETNBE FCML_TEXT("setnbe"); #define M_SETS FCML_TEXT("sets"); #define M_SETNS FCML_TEXT("setns"); #define M_SETP FCML_TEXT("setp"); #define M_SETNP FCML_TEXT("setnp"); #define M_SETL FCML_TEXT("setl"); #define M_SETNL FCML_TEXT("setnl"); #define M_SETLE FCML_TEXT("setle"); #define M_SETNLE FCML_TEXT("setnle"); #define M_SETNAE FCML_TEXT("setnae"); #define M_SETAE FCML_TEXT("setae"); #define M_SETZ FCML_TEXT("setz"); #define M_SETNZ FCML_TEXT("setnz"); #define M_SETNA FCML_TEXT("setna"); #define M_SETA FCML_TEXT("seta"); #define M_SETPE FCML_TEXT("setpe"); #define M_SETPO FCML_TEXT("setpo"); #define M_SETNGE FCML_TEXT("setnge"); #define M_SETGE FCML_TEXT("setge"); #define M_SETNG FCML_TEXT("setng"); #define M_SETG FCML_TEXT("setg"); #define M_SETC FCML_TEXT("setc"); #define M_SETNC FCML_TEXT("setnc"); #define M_SFENCE FCML_TEXT("sfence") #define M_SGDT FCML_TEXT("sgdt") #define M_SHL FCML_TEXT("shl") #define M_SHLB FCML_TEXT("shlb") #define M_SHLD FCML_TEXT("shld") #define M_SHLL FCML_TEXT("shll") #define M_SHLQ FCML_TEXT("shlq") #define M_SHLW FCML_TEXT("shlw") #define M_SHLX FCML_TEXT("shlx") #define M_SHR FCML_TEXT("shr") #define M_SHRB FCML_TEXT("shrb") #define M_SHRD FCML_TEXT("shrd") #define M_SHRL FCML_TEXT("shrl") #define M_SHRQ FCML_TEXT("shrq") #define M_SHRW FCML_TEXT("shrw") #define M_SHRX FCML_TEXT("shrx") #define M_SHUFPD FCML_TEXT("shufpd") #define M_SHUFPS FCML_TEXT("shufps") #define M_SIDT FCML_TEXT("sidt") #define M_SKINIT FCML_TEXT("skinit") #define M_SLDT FCML_TEXT("sldt") #define M_SLWPCB FCML_TEXT("slwpcb") #define M_SMSW FCML_TEXT("smsw") #define M_SQRTPD FCML_TEXT("sqrtpd") #define M_SQRTPS FCML_TEXT("sqrtps") #define M_SQRTSD FCML_TEXT("sqrtsd") #define M_SQRTSS FCML_TEXT("sqrtss") #define M_STAC FCML_TEXT("stac") #define M_STC FCML_TEXT("stc") #define M_STD FCML_TEXT("std") #define M_STGI FCML_TEXT("stgi") #define M_STI FCML_TEXT("sti") #define M_STMXCSR FCML_TEXT("stmxcsr") #define M_STOS FCML_TEXT("stos") #define M_STOSB FCML_TEXT("stosb") #define M_STOSL FCML_TEXT("stosl") #define M_STOSQ FCML_TEXT("stosq") #define M_STOSW FCML_TEXT("stosw") #define M_STR FCML_TEXT("str") #define M_SUB FCML_TEXT("sub") #define M_SUBB FCML_TEXT("subb") #define M_SUBL FCML_TEXT("subl") #define M_SUBPD FCML_TEXT("subpd") #define M_SUBPS FCML_TEXT("subps") #define M_SUBQ FCML_TEXT("subq") #define M_SUBSD FCML_TEXT("subsd") #define M_SUBSS FCML_TEXT("subss") #define M_SUBW FCML_TEXT("subw") #define M_SWAPGS FCML_TEXT("swapgs") #define M_SYSCALL FCML_TEXT("syscall") #define M_SYSENTER FCML_TEXT("sysenter") #define M_SYSEXIT FCML_TEXT("sysexit") #define M_SYSRET FCML_TEXT("sysret") #define M_T1MSKC FCML_TEXT("t1mskc") #define M_TEST FCML_TEXT("test") #define M_TESTB FCML_TEXT("testb") #define M_TESTL FCML_TEXT("testl") #define M_TESTQ FCML_TEXT("testq") #define M_TESTW FCML_TEXT("testw") #define M_TZCNT FCML_TEXT("tzcnt") #define M_TZMSK FCML_TEXT("tzmsk") #define M_UCOMISD FCML_TEXT("ucomisd") #define M_UCOMISS FCML_TEXT("ucomiss") #define M_UD2 FCML_TEXT("ud2") #define M_UNPCKHPD FCML_TEXT("unpckhpd") #define M_UNPCKHPS FCML_TEXT("unpckhps") #define M_UNPCKLPD FCML_TEXT("unpcklpd") #define M_UNPCKLPS FCML_TEXT("unpcklps") #define M_VADDPD FCML_TEXT("vaddpd") #define M_VADDPS FCML_TEXT("vaddps") #define M_VADDSD FCML_TEXT("vaddsd") #define M_VADDSS FCML_TEXT("vaddss") #define M_VADDSUBPD FCML_TEXT("vaddsubpd") #define M_VADDSUBPS FCML_TEXT("vaddsubps") #define M_VAESDEC FCML_TEXT("vaesdec") #define M_VAESDECLAST FCML_TEXT("vaesdeclast") #define M_VAESENC FCML_TEXT("vaesenc") #define M_VAESENCLAST FCML_TEXT("vaesenclast") #define M_VAESIMC FCML_TEXT("vaesimc") #define M_VAESKEYGENASSIST FCML_TEXT("vaeskeygenassist") #define M_VANDNPD FCML_TEXT("vandnpd") #define M_VANDNPS FCML_TEXT("vandnps") #define M_VANDPD FCML_TEXT("vandpd") #define M_VANDPS FCML_TEXT("vandps") #define M_VBLENDPD FCML_TEXT("vblendpd") #define M_VBLENDPS FCML_TEXT("vblendps") #define M_VBLENDVPD FCML_TEXT("vblendvpd") #define M_VBLENDVPS FCML_TEXT("vblendvps") #define M_VBROADCASTF128 FCML_TEXT("vbroadcastf128") #define M_VBROADCASTI128 FCML_TEXT("vbroadcasti128") #define M_VBROADCASTSD FCML_TEXT("vbroadcastsd") #define M_VBROADCASTSS FCML_TEXT("vbroadcastss") #define M_VCMPEQ_OSSD FCML_TEXT("vcmpeq_ossd") #define M_VCMPEQ_OSSS FCML_TEXT("vcmpeq_osss") #define M_VCMPEQSD FCML_TEXT("vcmpeqsd") #define M_VCMPEQSS FCML_TEXT("vcmpeqss") #define M_VCMPEQ_UQSD FCML_TEXT("vcmpeq_uqsd") #define M_VCMPEQ_UQSS FCML_TEXT("vcmpeq_uqss") #define M_VCMPEQ_USSD FCML_TEXT("vcmpeq_ussd") #define M_VCMPEQ_USSS FCML_TEXT("vcmpeq_usss") #define M_VCMPFALSE_OSSD FCML_TEXT("vcmpfalse_ossd") #define M_VCMPFALSE_OSSS FCML_TEXT("vcmpfalse_osss") #define M_VCMPFALSESD FCML_TEXT("vcmpfalsesd") #define M_VCMPFALSESS FCML_TEXT("vcmpfalsess") #define M_VCMPGE_OQSD FCML_TEXT("vcmpge_oqsd") #define M_VCMPGE_OQSS FCML_TEXT("vcmpge_oqss") #define M_VCMPGESD FCML_TEXT("vcmpgesd") #define M_VCMPGESS FCML_TEXT("vcmpgess") #define M_VCMPGT_OQSD FCML_TEXT("vcmpgt_oqsd") #define M_VCMPGT_OQSS FCML_TEXT("vcmpgt_oqss") #define M_VCMPGTSD FCML_TEXT("vcmpgtsd") #define M_VCMPGTSS FCML_TEXT("vcmpgtss") #define M_VCMPLE_OQSD FCML_TEXT("vcmple_oqsd") #define M_VCMPLE_OQSS FCML_TEXT("vcmple_oqss") #define M_VCMPLESD FCML_TEXT("vcmplesd") #define M_VCMPLESS FCML_TEXT("vcmpless") #define M_VCMPLT_OQSD FCML_TEXT("vcmplt_oqsd") #define M_VCMPLT_OQSS FCML_TEXT("vcmplt_oqss") #define M_VCMPLTSD FCML_TEXT("vcmpltsd") #define M_VCMPLTSS FCML_TEXT("vcmpltss") #define M_VCMPNEQ_OQSD FCML_TEXT("vcmpneq_oqsd") #define M_VCMPNEQ_OQSS FCML_TEXT("vcmpneq_oqss") #define M_VCMPNEQ_OSSD FCML_TEXT("vcmpneq_ossd") #define M_VCMPNEQ_OSSS FCML_TEXT("vcmpneq_osss") #define M_VCMPNEQSD FCML_TEXT("vcmpneqsd") #define M_VCMPNEQSS FCML_TEXT("vcmpneqss") #define M_VCMPNEQ_USSD FCML_TEXT("vcmpneq_ussd") #define M_VCMPNEQ_USSS FCML_TEXT("vcmpneq_usss") #define M_VCMPNGESD FCML_TEXT("vcmpngesd") #define M_VCMPNGESS FCML_TEXT("vcmpngess") #define M_VCMPNGE_UQSD FCML_TEXT("vcmpnge_uqsd") #define M_VCMPNGE_UQSS FCML_TEXT("vcmpnge_uqss") #define M_VCMPNGTSD FCML_TEXT("vcmpngtsd") #define M_VCMPNGTSS FCML_TEXT("vcmpngtss") #define M_VCMPNGT_UQSD FCML_TEXT("vcmpngt_uqsd") #define M_VCMPNGT_UQSS FCML_TEXT("vcmpngt_uqss") #define M_VCMPNLESD FCML_TEXT("vcmpnlesd") #define M_VCMPNLESS FCML_TEXT("vcmpnless") #define M_VCMPNLE_UQSD FCML_TEXT("vcmpnle_uqsd") #define M_VCMPNLE_UQSS FCML_TEXT("vcmpnle_uqss") #define M_VCMPNLTSD FCML_TEXT("vcmpnltsd") #define M_VCMPNLTSS FCML_TEXT("vcmpnltss") #define M_VCMPNLT_UQSD FCML_TEXT("vcmpnlt_uqsd") #define M_VCMPNLT_UQSS FCML_TEXT("vcmpnlt_uqss") #define M_VCMPORDSD FCML_TEXT("vcmpordsd") #define M_VCMPORDSS FCML_TEXT("vcmpordss") #define M_VCMPORD_SSD FCML_TEXT("vcmpord_ssd") #define M_VCMPORD_SSS FCML_TEXT("vcmpord_sss") #define M_VCMPPD FCML_TEXT("vcmppd") #define M_VCMPPS FCML_TEXT("vcmpps") #define M_VCMPSD FCML_TEXT("vcmpsd") #define M_VCMPSS FCML_TEXT("vcmpss") #define M_VCMPTRUESD FCML_TEXT("vcmptruesd") #define M_VCMPTRUESS FCML_TEXT("vcmptruess") #define M_VCMPTRUE_USSD FCML_TEXT("vcmptrue_ussd") #define M_VCMPTRUE_USSS FCML_TEXT("vcmptrue_usss") #define M_VCMPUNORDSD FCML_TEXT("vcmpunordsd") #define M_VCMPUNORDSS FCML_TEXT("vcmpunordss") #define M_VCMPUNORD_SSD FCML_TEXT("vcmpunord_ssd") #define M_VCMPUNORD_SSS FCML_TEXT("vcmpunord_sss") #define M_VCOMISD FCML_TEXT("vcomisd") #define M_VCOMISS FCML_TEXT("vcomiss") #define M_VCVTDQ2PD FCML_TEXT("vcvtdq2pd") #define M_VCVTDQ2PS FCML_TEXT("vcvtdq2ps") #define M_VCVTPD2DQ FCML_TEXT("vcvtpd2dq") #define M_VCVTPD2PSX FCML_TEXT("vcvtpd2psx") #define M_VCVTPD2PSY FCML_TEXT("vcvtpd2psy") #define M_VCVTPH2PS FCML_TEXT("vcvtph2ps") #define M_VCVTPS2DQ FCML_TEXT("vcvtps2dq") #define M_VCVTPS2PD FCML_TEXT("vcvtps2pd") #define M_VCVTPS2PH FCML_TEXT("vcvtps2ph") #define M_VCVTSD2SI FCML_TEXT("vcvtsd2si") #define M_VCVTSD2SS FCML_TEXT("vcvtsd2ss") #define M_VCVTSI2SDL FCML_TEXT("vcvtsi2sdl") #define M_VCVTSI2SDQ FCML_TEXT("vcvtsi2sdq") #define M_VCVTSI2SSL FCML_TEXT("vcvtsi2ssl") #define M_VCVTSI2SSQ FCML_TEXT("vcvtsi2ssq") #define M_VCVTSS2SD FCML_TEXT("vcvtss2sd") #define M_VCVTSS2SI FCML_TEXT("vcvtss2si") #define M_VCVTTPD2DQX FCML_TEXT("vcvttpd2dqx") #define M_VCVTTPD2DQY FCML_TEXT("vcvttpd2dqy") #define M_VCVTTPS2DQ FCML_TEXT("vcvttps2dq") #define M_VCVTTSD2SI FCML_TEXT("vcvttsd2si") #define M_VCVTTSS2SI FCML_TEXT("vcvttss2si") #define M_VDIVPD FCML_TEXT("vdivpd") #define M_VDIVPS FCML_TEXT("vdivps") #define M_VDIVSD FCML_TEXT("vdivsd") #define M_VDIVSS FCML_TEXT("vdivss") #define M_VDPPD FCML_TEXT("vdppd") #define M_VDPPS FCML_TEXT("vdpps") #define M_VERR FCML_TEXT("verr") #define M_VERW FCML_TEXT("verw") #define M_VEXTRACTF128 FCML_TEXT("vextractf128") #define M_VEXTRACTI128 FCML_TEXT("vextracti128") #define M_VEXTRACTPS FCML_TEXT("vextractps") #define M_VFMADD132PD FCML_TEXT("vfmadd132pd") #define M_VFMADD132PS FCML_TEXT("vfmadd132ps") #define M_VFMADD132SD FCML_TEXT("vfmadd132sd") #define M_VFMADD132SS FCML_TEXT("vfmadd132ss") #define M_VFMADD213PD FCML_TEXT("vfmadd213pd") #define M_VFMADD213PS FCML_TEXT("vfmadd213ps") #define M_VFMADD213SD FCML_TEXT("vfmadd213sd") #define M_VFMADD213SS FCML_TEXT("vfmadd213ss") #define M_VFMADD231PD FCML_TEXT("vfmadd231pd") #define M_VFMADD231PS FCML_TEXT("vfmadd231ps") #define M_VFMADD231SD FCML_TEXT("vfmadd231sd") #define M_VFMADD231SS FCML_TEXT("vfmadd231ss") #define M_VFMADDPD FCML_TEXT("vfmaddpd") #define M_VFMADDPS FCML_TEXT("vfmaddps") #define M_VFMADDSD FCML_TEXT("vfmaddsd") #define M_VFMADDSS FCML_TEXT("vfmaddss") #define M_VFMADDSUB132PD FCML_TEXT("vfmaddsub132pd") #define M_VFMADDSUB132PS FCML_TEXT("vfmaddsub132ps") #define M_VFMADDSUB213PD FCML_TEXT("vfmaddsub213pd") #define M_VFMADDSUB213PS FCML_TEXT("vfmaddsub213ps") #define M_VFMADDSUB231PD FCML_TEXT("vfmaddsub231pd") #define M_VFMADDSUB231PS FCML_TEXT("vfmaddsub231ps") #define M_VFMADDSUBPD FCML_TEXT("vfmaddsubpd") #define M_VFMADDSUBPS FCML_TEXT("vfmaddsubps") #define M_VFMSUB132PD FCML_TEXT("vfmsub132pd") #define M_VFMSUB132PS FCML_TEXT("vfmsub132ps") #define M_VFMSUB132SD FCML_TEXT("vfmsub132sd") #define M_VFMSUB132SS FCML_TEXT("vfmsub132ss") #define M_VFMSUB213PD FCML_TEXT("vfmsub213pd") #define M_VFMSUB213PS FCML_TEXT("vfmsub213ps") #define M_VFMSUB213SD FCML_TEXT("vfmsub213sd") #define M_VFMSUB213SS FCML_TEXT("vfmsub213ss") #define M_VFMSUB231PD FCML_TEXT("vfmsub231pd") #define M_VFMSUB231PS FCML_TEXT("vfmsub231ps") #define M_VFMSUB231SD FCML_TEXT("vfmsub231sd") #define M_VFMSUB231SS FCML_TEXT("vfmsub231ss") #define M_VFMSUBADD132PD FCML_TEXT("vfmsubadd132pd") #define M_VFMSUBADD132PS FCML_TEXT("vfmsubadd132ps") #define M_VFMSUBADD213PD FCML_TEXT("vfmsubadd213pd") #define M_VFMSUBADD213PS FCML_TEXT("vfmsubadd213ps") #define M_VFMSUBADD231PD FCML_TEXT("vfmsubadd231pd") #define M_VFMSUBADD231PS FCML_TEXT("vfmsubadd231ps") #define M_VFMSUBADDPD FCML_TEXT("vfmsubaddpd") #define M_VFMSUBADDPS FCML_TEXT("vfmsubaddps") #define M_VFMSUBPD FCML_TEXT("vfmsubpd") #define M_VFMSUBPS FCML_TEXT("vfmsubps") #define M_VFMSUBSD FCML_TEXT("vfmsubsd") #define M_VFMSUBSS FCML_TEXT("vfmsubss") #define M_VFNMADD132PD FCML_TEXT("vfnmadd132pd") #define M_VFNMADD132PS FCML_TEXT("vfnmadd132ps") #define M_VFNMADD132SD FCML_TEXT("vfnmadd132sd") #define M_VFNMADD132SS FCML_TEXT("vfnmadd132ss") #define M_VFNMADD213PD FCML_TEXT("vfnmadd213pd") #define M_VFNMADD213PS FCML_TEXT("vfnmadd213ps") #define M_VFNMADD213SD FCML_TEXT("vfnmadd213sd") #define M_VFNMADD213SS FCML_TEXT("vfnmadd213ss") #define M_VFNMADD231PD FCML_TEXT("vfnmadd231pd") #define M_VFNMADD231PS FCML_TEXT("vfnmadd231ps") #define M_VFNMADD231SD FCML_TEXT("vfnmadd231sd") #define M_VFNMADD231SS FCML_TEXT("vfnmadd231ss") #define M_VFNMADDPD FCML_TEXT("vfnmaddpd") #define M_VFNMADDPS FCML_TEXT("vfnmaddps") #define M_VFNMADDSD FCML_TEXT("vfnmaddsd") #define M_VFNMADDSS FCML_TEXT("vfnmaddss") #define M_VFNMSUB132PD FCML_TEXT("vfnmsub132pd") #define M_VFNMSUB132PS FCML_TEXT("vfnmsub132ps") #define M_VFNMSUB132SD FCML_TEXT("vfnmsub132sd") #define M_VFNMSUB132SS FCML_TEXT("vfnmsub132ss") #define M_VFNMSUB213PD FCML_TEXT("vfnmsub213pd") #define M_VFNMSUB213PS FCML_TEXT("vfnmsub213ps") #define M_VFNMSUB213SD FCML_TEXT("vfnmsub213sd") #define M_VFNMSUB213SS FCML_TEXT("vfnmsub213ss") #define M_VFNMSUB231PD FCML_TEXT("vfnmsub231pd") #define M_VFNMSUB231PS FCML_TEXT("vfnmsub231ps") #define M_VFNMSUB231SD FCML_TEXT("vfnmsub231sd") #define M_VFNMSUB231SS FCML_TEXT("vfnmsub231ss") #define M_VFNMSUBPD FCML_TEXT("vfnmsubpd") #define M_VFNMSUBPS FCML_TEXT("vfnmsubps") #define M_VFNMSUBSD FCML_TEXT("vfnmsubsd") #define M_VFNMSUBSS FCML_TEXT("vfnmsubss") #define M_VFRCZPD FCML_TEXT("vfrczpd") #define M_VFRCZPS FCML_TEXT("vfrczps") #define M_VFRCZSD FCML_TEXT("vfrczsd") #define M_VFRCZSS FCML_TEXT("vfrczss") #define M_VGATHERDPD FCML_TEXT("vgatherdpd") #define M_VGATHERDPS FCML_TEXT("vgatherdps") #define M_VGATHERQPD FCML_TEXT("vgatherqpd") #define M_VGATHERQPS FCML_TEXT("vgatherqps") #define M_VHADDPD FCML_TEXT("vhaddpd") #define M_VHADDPS FCML_TEXT("vhaddps") #define M_VHSUBPD FCML_TEXT("vhsubpd") #define M_VHSUBPS FCML_TEXT("vhsubps") #define M_VINSERTF128 FCML_TEXT("vinsertf128") #define M_VINSERTI128 FCML_TEXT("vinserti128") #define M_VINSERTPS FCML_TEXT("vinsertps") #define M_VLDDQU FCML_TEXT("vlddqu") #define M_VLDMXCSR FCML_TEXT("vldmxcsr") #define M_VMASKMOVDQU FCML_TEXT("vmaskmovdqu") #define M_VMASKMOVPD FCML_TEXT("vmaskmovpd") #define M_VMASKMOVPS FCML_TEXT("vmaskmovps") #define M_VMAXPD FCML_TEXT("vmaxpd") #define M_VMAXPS FCML_TEXT("vmaxps") #define M_VMAXSD FCML_TEXT("vmaxsd") #define M_VMAXSS FCML_TEXT("vmaxss") #define M_VMCALL FCML_TEXT("vmcall") #define M_VMCLEAR FCML_TEXT("vmclear") #define M_VMFUNC FCML_TEXT("vmfunc") #define M_VMINPD FCML_TEXT("vminpd") #define M_VMINPS FCML_TEXT("vminps") #define M_VMINSD FCML_TEXT("vminsd") #define M_VMINSS FCML_TEXT("vminss") #define M_VMLAUNCH FCML_TEXT("vmlaunch") #define M_VMLOAD FCML_TEXT("vmload") #define M_VMMCALL FCML_TEXT("vmmcall") #define M_VMOVAPD FCML_TEXT("vmovapd") #define M_VMOVAPS FCML_TEXT("vmovaps") #define M_VMOVD FCML_TEXT("vmovd") #define M_VMOVDDUP FCML_TEXT("vmovddup") #define M_VMOVDQA FCML_TEXT("vmovdqa") #define M_VMOVDQU FCML_TEXT("vmovdqu") #define M_VMOVHLPS FCML_TEXT("vmovhlps") #define M_VMOVHPD FCML_TEXT("vmovhpd") #define M_VMOVHPS FCML_TEXT("vmovhps") #define M_VMOVLHPS FCML_TEXT("vmovlhps") #define M_VMOVLPD FCML_TEXT("vmovlpd") #define M_VMOVLPS FCML_TEXT("vmovlps") #define M_VMOVMSKPD FCML_TEXT("vmovmskpd") #define M_VMOVMSKPS FCML_TEXT("vmovmskps") #define M_VMOVNTDQ FCML_TEXT("vmovntdq") #define M_VMOVNTDQA FCML_TEXT("vmovntdqa") #define M_VMOVNTPD FCML_TEXT("vmovntpd") #define M_VMOVNTPS FCML_TEXT("vmovntps") #define M_VMOVQ FCML_TEXT("vmovq") #define M_VMOVSD FCML_TEXT("vmovsd") #define M_VMOVSHDUP FCML_TEXT("vmovshdup") #define M_VMOVSLDUP FCML_TEXT("vmovsldup") #define M_VMOVSS FCML_TEXT("vmovss") #define M_VMOVUPD FCML_TEXT("vmovupd") #define M_VMOVUPS FCML_TEXT("vmovups") #define M_VMPSADBW FCML_TEXT("vmpsadbw") #define M_VMPTRLD FCML_TEXT("vmptrld") #define M_VMPTRST FCML_TEXT("vmptrst") #define M_VMREAD FCML_TEXT("vmread") #define M_VMRESUME FCML_TEXT("vmresume") #define M_VMRUN FCML_TEXT("vmrun") #define M_VMSAVE FCML_TEXT("vmsave") #define M_VMULPD FCML_TEXT("vmulpd") #define M_VMULPS FCML_TEXT("vmulps") #define M_VMULSD FCML_TEXT("vmulsd") #define M_VMULSS FCML_TEXT("vmulss") #define M_VMWRITE FCML_TEXT("vmwrite") #define M_VMXOFF FCML_TEXT("vmxoff") #define M_VMXON FCML_TEXT("vmxon") #define M_VORPD FCML_TEXT("vorpd") #define M_VORPS FCML_TEXT("vorps") #define M_VPABSB FCML_TEXT("vpabsb") #define M_VPABSD FCML_TEXT("vpabsd") #define M_VPABSW FCML_TEXT("vpabsw") #define M_VPACKSSDW FCML_TEXT("vpackssdw") #define M_VPACKSSWB FCML_TEXT("vpacksswb") #define M_VPACKUSDW FCML_TEXT("vpackusdw") #define M_VPACKUSWB FCML_TEXT("vpackuswb") #define M_VPADDB FCML_TEXT("vpaddb") #define M_VPADDD FCML_TEXT("vpaddd") #define M_VPADDQ FCML_TEXT("vpaddq") #define M_VPADDSB FCML_TEXT("vpaddsb") #define M_VPADDSW FCML_TEXT("vpaddsw") #define M_VPADDUSB FCML_TEXT("vpaddusb") #define M_VPADDUSW FCML_TEXT("vpaddusw") #define M_VPADDW FCML_TEXT("vpaddw") #define M_VPALIGNR FCML_TEXT("vpalignr") #define M_VPAND FCML_TEXT("vpand") #define M_VPANDN FCML_TEXT("vpandn") #define M_VPAVGB FCML_TEXT("vpavgb") #define M_VPAVGW FCML_TEXT("vpavgw") #define M_VPBLENDD FCML_TEXT("vpblendd") #define M_VPBLENDVB FCML_TEXT("vpblendvb") #define M_VPBLENDW FCML_TEXT("vpblendw") #define M_VPBROADCASTB FCML_TEXT("vpbroadcastb") #define M_VPBROADCASTD FCML_TEXT("vpbroadcastd") #define M_VPBROADCASTQ FCML_TEXT("vpbroadcastq") #define M_VPBROADCASTW FCML_TEXT("vpbroadcastw") #define M_VPCLMULQDQ FCML_TEXT("vpclmulqdq") #define M_VPCMOV FCML_TEXT("vpcmov") #define M_VPCMPEQB FCML_TEXT("vpcmpeqb") #define M_VPCMPEQD FCML_TEXT("vpcmpeqd") #define M_VPCMPEQQ FCML_TEXT("vpcmpeqq") #define M_VPCMPEQW FCML_TEXT("vpcmpeqw") #define M_VPCMPESTRI FCML_TEXT("vpcmpestri") #define M_VPCMPESTRM FCML_TEXT("vpcmpestrm") #define M_VPCMPGTB FCML_TEXT("vpcmpgtb") #define M_VPCMPGTD FCML_TEXT("vpcmpgtd") #define M_VPCMPGTQ FCML_TEXT("vpcmpgtq") #define M_VPCMPGTW FCML_TEXT("vpcmpgtw") #define M_VPCMPISTRI FCML_TEXT("vpcmpistri") #define M_VPCMPISTRM FCML_TEXT("vpcmpistrm") #define M_VPCOMB FCML_TEXT("vpcomb") #define M_VPCOMD FCML_TEXT("vpcomd") #define M_VPCOMEQB FCML_TEXT("vpcomeqb") #define M_VPCOMEQD FCML_TEXT("vpcomeqd") #define M_VPCOMEQQ FCML_TEXT("vpcomeqq") #define M_VPCOMEQUB FCML_TEXT("vpcomequb") #define M_VPCOMEQUD FCML_TEXT("vpcomequd") #define M_VPCOMEQUQ FCML_TEXT("vpcomequq") #define M_VPCOMEQUW FCML_TEXT("vpcomequw") #define M_VPCOMEQW FCML_TEXT("vpcomeqw") #define M_VPCOMFALSEB FCML_TEXT("vpcomfalseb") #define M_VPCOMFALSED FCML_TEXT("vpcomfalsed") #define M_VPCOMFALSEQ FCML_TEXT("vpcomfalseq") #define M_VPCOMFALSEUB FCML_TEXT("vpcomfalseub") #define M_VPCOMFALSEUD FCML_TEXT("vpcomfalseud") #define M_VPCOMFALSEUQ FCML_TEXT("vpcomfalseuq") #define M_VPCOMFALSEUW FCML_TEXT("vpcomfalseuw") #define M_VPCOMFALSEW FCML_TEXT("vpcomfalsew") #define M_VPCOMGEB FCML_TEXT("vpcomgeb") #define M_VPCOMGED FCML_TEXT("vpcomged") #define M_VPCOMGEQ FCML_TEXT("vpcomgeq") #define M_VPCOMGEUB FCML_TEXT("vpcomgeub") #define M_VPCOMGEUD FCML_TEXT("vpcomgeud") #define M_VPCOMGEUQ FCML_TEXT("vpcomgeuq") #define M_VPCOMGEUW FCML_TEXT("vpcomgeuw") #define M_VPCOMGEW FCML_TEXT("vpcomgew") #define M_VPCOMGTB FCML_TEXT("vpcomgtb") #define M_VPCOMGTD FCML_TEXT("vpcomgtd") #define M_VPCOMGTQ FCML_TEXT("vpcomgtq") #define M_VPCOMGTUB FCML_TEXT("vpcomgtub") #define M_VPCOMGTUD FCML_TEXT("vpcomgtud") #define M_VPCOMGTUQ FCML_TEXT("vpcomgtuq") #define M_VPCOMGTUW FCML_TEXT("vpcomgtuw") #define M_VPCOMGTW FCML_TEXT("vpcomgtw") #define M_VPCOMLEB FCML_TEXT("vpcomleb") #define M_VPCOMLED FCML_TEXT("vpcomled") #define M_VPCOMLEQ FCML_TEXT("vpcomleq") #define M_VPCOMLEUB FCML_TEXT("vpcomleub") #define M_VPCOMLEUD FCML_TEXT("vpcomleud") #define M_VPCOMLEUQ FCML_TEXT("vpcomleuq") #define M_VPCOMLEUW FCML_TEXT("vpcomleuw") #define M_VPCOMLEW FCML_TEXT("vpcomlew") #define M_VPCOMLTB FCML_TEXT("vpcomltb") #define M_VPCOMLTD FCML_TEXT("vpcomltd") #define M_VPCOMLTQ FCML_TEXT("vpcomltq") #define M_VPCOMLTUB FCML_TEXT("vpcomltub") #define M_VPCOMLTUD FCML_TEXT("vpcomltud") #define M_VPCOMLTUQ FCML_TEXT("vpcomltuq") #define M_VPCOMLTUW FCML_TEXT("vpcomltuw") #define M_VPCOMLTW FCML_TEXT("vpcomltw") #define M_VPCOMNEQB FCML_TEXT("vpcomneqb") #define M_VPCOMNEQD FCML_TEXT("vpcomneqd") #define M_VPCOMNEQQ FCML_TEXT("vpcomneqq") #define M_VPCOMNEQUB FCML_TEXT("vpcomnequb") #define M_VPCOMNEQUD FCML_TEXT("vpcomnequd") #define M_VPCOMNEQUQ FCML_TEXT("vpcomnequq") #define M_VPCOMNEQUW FCML_TEXT("vpcomnequw") #define M_VPCOMNEQW FCML_TEXT("vpcomneqw") #define M_VPCOMQ FCML_TEXT("vpcomq") #define M_VPCOMTRUEB FCML_TEXT("vpcomtrueb") #define M_VPCOMTRUED FCML_TEXT("vpcomtrued") #define M_VPCOMTRUEQ FCML_TEXT("vpcomtrueq") #define M_VPCOMTRUEUB FCML_TEXT("vpcomtrueub") #define M_VPCOMTRUEUD FCML_TEXT("vpcomtrueud") #define M_VPCOMTRUEUQ FCML_TEXT("vpcomtrueuq") #define M_VPCOMTRUEUW FCML_TEXT("vpcomtrueuw") #define M_VPCOMTRUEW FCML_TEXT("vpcomtruew") #define M_VPCOMUB FCML_TEXT("vpcomub") #define M_VPCOMUD FCML_TEXT("vpcomud") #define M_VPCOMUQ FCML_TEXT("vpcomuq") #define M_VPCOMUW FCML_TEXT("vpcomuw") #define M_VPCOMW FCML_TEXT("vpcomw") #define M_VPERM2F128 FCML_TEXT("vperm2f128") #define M_VPERM2I128 FCML_TEXT("vperm2i128") #define M_VPERMD FCML_TEXT("vpermd") #define M_VPERMIL2PD FCML_TEXT("vpermil2pd") #define M_VPERMIL2PS FCML_TEXT("vpermil2ps") #define M_VPERMILPD FCML_TEXT("vpermilpd") #define M_VPERMILPS FCML_TEXT("vpermilps") #define M_VPERMPD FCML_TEXT("vpermpd") #define M_VPERMPS FCML_TEXT("vpermps") #define M_VPERMQ FCML_TEXT("vpermq") #define M_VPEXTRB FCML_TEXT("vpextrb") #define M_VPEXTRD FCML_TEXT("vpextrd") #define M_VPEXTRQ FCML_TEXT("vpextrq") #define M_VPEXTRW FCML_TEXT("vpextrw") #define M_VPGATHERDD FCML_TEXT("vpgatherdd") #define M_VPGATHERDQ FCML_TEXT("vpgatherdq") #define M_VPGATHERQD FCML_TEXT("vpgatherqd") #define M_VPGATHERQQ FCML_TEXT("vpgatherqq") #define M_VPHADDBD FCML_TEXT("vphaddbd") #define M_VPHADDBQ FCML_TEXT("vphaddbq") #define M_VPHADDBW FCML_TEXT("vphaddbw") #define M_VPHADDD FCML_TEXT("vphaddd") #define M_VPHADDDQ FCML_TEXT("vphadddq") #define M_VPHADDSW FCML_TEXT("vphaddsw") #define M_VPHADDUBD FCML_TEXT("vphaddubd") #define M_VPHADDUBQ FCML_TEXT("vphaddubq") #define M_VPHADDUBW FCML_TEXT("vphaddubw") #define M_VPHADDUDQ FCML_TEXT("vphaddudq") #define M_VPHADDUWD FCML_TEXT("vphadduwd") #define M_VPHADDUWQ FCML_TEXT("vphadduwq") #define M_VPHADDW FCML_TEXT("vphaddw") #define M_VPHADDWD FCML_TEXT("vphaddwd") #define M_VPHADDWQ FCML_TEXT("vphaddwq") #define M_VPHMINPOSUW FCML_TEXT("vphminposuw") #define M_VPHSUBBW FCML_TEXT("vphsubbw") #define M_VPHSUBD FCML_TEXT("vphsubd") #define M_VPHSUBDQ FCML_TEXT("vphsubdq") #define M_VPHSUBSW FCML_TEXT("vphsubsw") #define M_VPHSUBW FCML_TEXT("vphsubw") #define M_VPHSUBWD FCML_TEXT("vphsubwd") #define M_VPINSRB FCML_TEXT("vpinsrb") #define M_VPINSRD FCML_TEXT("vpinsrd") #define M_VPINSRQ FCML_TEXT("vpinsrq") #define M_VPINSRW FCML_TEXT("vpinsrw") #define M_VPMACSDD FCML_TEXT("vpmacsdd") #define M_VPMACSDQH FCML_TEXT("vpmacsdqh") #define M_VPMACSDQL FCML_TEXT("vpmacsdql") #define M_VPMACSSDD FCML_TEXT("vpmacssdd") #define M_VPMACSSDQH FCML_TEXT("vpmacssdqh") #define M_VPMACSSDQL FCML_TEXT("vpmacssdql") #define M_VPMACSSWD FCML_TEXT("vpmacsswd") #define M_VPMACSSWW FCML_TEXT("vpmacssww") #define M_VPMACSWD FCML_TEXT("vpmacswd") #define M_VPMACSWW FCML_TEXT("vpmacsww") #define M_VPMADCSSWD FCML_TEXT("vpmadcsswd") #define M_VPMADCSWD FCML_TEXT("vpmadcswd") #define M_VPMADDUBSW FCML_TEXT("vpmaddubsw") #define M_VPMADDWD FCML_TEXT("vpmaddwd") #define M_VPMASKMOV FCML_TEXT("vpmaskmov") #define M_VPMASKMOVD FCML_TEXT("vpmaskmovd") #define M_VPMASKMOVQ FCML_TEXT("vpmaskmovq") #define M_VPMAXSB FCML_TEXT("vpmaxsb") #define M_VPMAXSD FCML_TEXT("vpmaxsd") #define M_VPMAXSW FCML_TEXT("vpmaxsw") #define M_VPMAXUB FCML_TEXT("vpmaxub") #define M_VPMAXUD FCML_TEXT("vpmaxud") #define M_VPMAXUW FCML_TEXT("vpmaxuw") #define M_VPMINSB FCML_TEXT("vpminsb") #define M_VPMINSD FCML_TEXT("vpminsd") #define M_VPMINSW FCML_TEXT("vpminsw") #define M_VPMINUB FCML_TEXT("vpminub") #define M_VPMINUD FCML_TEXT("vpminud") #define M_VPMINUW FCML_TEXT("vpminuw") #define M_VPMOVMSKB FCML_TEXT("vpmovmskb") #define M_VPMOVSXBD FCML_TEXT("vpmovsxbd") #define M_VPMOVSXBQ FCML_TEXT("vpmovsxbq") #define M_VPMOVSXBW FCML_TEXT("vpmovsxbw") #define M_VPMOVSXDQ FCML_TEXT("vpmovsxdq") #define M_VPMOVSXWD FCML_TEXT("vpmovsxwd") #define M_VPMOVSXWQ FCML_TEXT("vpmovsxwq") #define M_VPMOVZXBD FCML_TEXT("vpmovzxbd") #define M_VPMOVZXBQ FCML_TEXT("vpmovzxbq") #define M_VPMOVZXBW FCML_TEXT("vpmovzxbw") #define M_VPMOVZXDQ FCML_TEXT("vpmovzxdq") #define M_VPMOVZXWD FCML_TEXT("vpmovzxwd") #define M_VPMOVZXWQ FCML_TEXT("vpmovzxwq") #define M_VPMULDQ FCML_TEXT("vpmuldq") #define M_VPMULHRSW FCML_TEXT("vpmulhrsw") #define M_VPMULHUW FCML_TEXT("vpmulhuw") #define M_VPMULHW FCML_TEXT("vpmulhw") #define M_VPMULLD FCML_TEXT("vpmulld") #define M_VPMULLW FCML_TEXT("vpmullw") #define M_VPMULUDQ FCML_TEXT("vpmuludq") #define M_VPOR FCML_TEXT("vpor") #define M_VPPERM FCML_TEXT("vpperm") #define M_VPROTB FCML_TEXT("vprotb") #define M_VPROTD FCML_TEXT("vprotd") #define M_VPROTQ FCML_TEXT("vprotq") #define M_VPROTW FCML_TEXT("vprotw") #define M_VPSADBW FCML_TEXT("vpsadbw") #define M_VPSHAB FCML_TEXT("vpshab") #define M_VPSHAD FCML_TEXT("vpshad") #define M_VPSHAQ FCML_TEXT("vpshaq") #define M_VPSHAW FCML_TEXT("vpshaw") #define M_VPSHLB FCML_TEXT("vpshlb") #define M_VPSHLD FCML_TEXT("vpshld") #define M_VPSHLQ FCML_TEXT("vpshlq") #define M_VPSHLW FCML_TEXT("vpshlw") #define M_VPSHUFB FCML_TEXT("vpshufb") #define M_VPSHUFD FCML_TEXT("vpshufd") #define M_VPSHUFHW FCML_TEXT("vpshufhw") #define M_VPSHUFLW FCML_TEXT("vpshuflw") #define M_VPSIGNB FCML_TEXT("vpsignb") #define M_VPSIGND FCML_TEXT("vpsignd") #define M_VPSIGNW FCML_TEXT("vpsignw") #define M_VPSLLD FCML_TEXT("vpslld") #define M_VPSLLDQ FCML_TEXT("vpslldq") #define M_VPSLLQ FCML_TEXT("vpsllq") #define M_VPSLLVD FCML_TEXT("vpsllvd") #define M_VPSLLVQ FCML_TEXT("vpsllvq") #define M_VPSLLW FCML_TEXT("vpsllw") #define M_VPSRAD FCML_TEXT("vpsrad") #define M_VPSRAVD FCML_TEXT("vpsravd") #define M_VPSRAW FCML_TEXT("vpsraw") #define M_VPSRLD FCML_TEXT("vpsrld") #define M_VPSRLDQ FCML_TEXT("vpsrldq") #define M_VPSRLQ FCML_TEXT("vpsrlq") #define M_VPSRLVD FCML_TEXT("vpsrlvd") #define M_VPSRLVQ FCML_TEXT("vpsrlvq") #define M_VPSRLW FCML_TEXT("vpsrlw") #define M_VPSUBB FCML_TEXT("vpsubb") #define M_VPSUBD FCML_TEXT("vpsubd") #define M_VPSUBQ FCML_TEXT("vpsubq") #define M_VPSUBSB FCML_TEXT("vpsubsb") #define M_VPSUBSW FCML_TEXT("vpsubsw") #define M_VPSUBUSB FCML_TEXT("vpsubusb") #define M_VPSUBUSW FCML_TEXT("vpsubusw") #define M_VPSUBW FCML_TEXT("vpsubw") #define M_VPTEST FCML_TEXT("vptest") #define M_VPUNPCKHBW FCML_TEXT("vpunpckhbw") #define M_VPUNPCKHDQ FCML_TEXT("vpunpckhdq") #define M_VPUNPCKHQDQ FCML_TEXT("vpunpckhqdq") #define M_VPUNPCKHWD FCML_TEXT("vpunpckhwd") #define M_VPUNPCKLBW FCML_TEXT("vpunpcklbw") #define M_VPUNPCKLDQ FCML_TEXT("vpunpckldq") #define M_VPUNPCKLQDQ FCML_TEXT("vpunpcklqdq") #define M_VPUNPCKLWD FCML_TEXT("vpunpcklwd") #define M_VPXOR FCML_TEXT("vpxor") #define M_VRCPPS FCML_TEXT("vrcpps") #define M_VRCPSS FCML_TEXT("vrcpss") #define M_VROUNDPD FCML_TEXT("vroundpd") #define M_VROUNDPS FCML_TEXT("vroundps") #define M_VROUNDSD FCML_TEXT("vroundsd") #define M_VROUNDSS FCML_TEXT("vroundss") #define M_VRSQRTPS FCML_TEXT("vrsqrtps") #define M_VRSQRTSS FCML_TEXT("vrsqrtss") #define M_VSHUFPD FCML_TEXT("vshufpd") #define M_VSHUFPS FCML_TEXT("vshufps") #define M_VSQRTPD FCML_TEXT("vsqrtpd") #define M_VSQRTPS FCML_TEXT("vsqrtps") #define M_VSQRTSD FCML_TEXT("vsqrtsd") #define M_VSQRTSS FCML_TEXT("vsqrtss") #define M_VSTMXCSR FCML_TEXT("vstmxcsr") #define M_VSUBPD FCML_TEXT("vsubpd") #define M_VSUBPS FCML_TEXT("vsubps") #define M_VSUBSD FCML_TEXT("vsubsd") #define M_VSUBSS FCML_TEXT("vsubss") #define M_VTESTPD FCML_TEXT("vtestpd") #define M_VTESTPS FCML_TEXT("vtestps") #define M_VUCOMISD FCML_TEXT("vucomisd") #define M_VUCOMISS FCML_TEXT("vucomiss") #define M_VUNPCKHPD FCML_TEXT("vunpckhpd") #define M_VUNPCKHPS FCML_TEXT("vunpckhps") #define M_VUNPCKLPD FCML_TEXT("vunpcklpd") #define M_VUNPCKLPS FCML_TEXT("vunpcklps") #define M_VXORPD FCML_TEXT("vxorpd") #define M_VXORPS FCML_TEXT("vxorps") #define M_VZEROALL FCML_TEXT("vzeroall") #define M_VZEROUPPER FCML_TEXT("vzeroupper") #define M_WAIT FCML_TEXT("wait") #define M_WBINVD FCML_TEXT("wbinvd") #define M_WRFSBASE FCML_TEXT("wrfsbase") #define M_WRGSBASE FCML_TEXT("wrgsbase") #define M_WRMSR FCML_TEXT("wrmsr") #define M_XABORT FCML_TEXT("xabort") #define M_XADD FCML_TEXT("xadd") #define M_XBEGIN FCML_TEXT("xbegin") #define M_XCHG FCML_TEXT("xchg") #define M_XEND FCML_TEXT("xend") #define M_XGETBV FCML_TEXT("xgetbv") #define M_XLAT FCML_TEXT("xlat") #define M_XLATB FCML_TEXT("xlatb") #define M_XOR FCML_TEXT("xor") #define M_XORB FCML_TEXT("xorb") #define M_XORL FCML_TEXT("xorl") #define M_XORPD FCML_TEXT("xorpd") #define M_XORPS FCML_TEXT("xorps") #define M_XORQ FCML_TEXT("xorq") #define M_XORW FCML_TEXT("xorw") #define M_XRSTOR FCML_TEXT("xrstor") #define M_XRSTOR64 FCML_TEXT("xrstor64") #define M_XSAVE FCML_TEXT("xsave") #define M_XSAVE64 FCML_TEXT("xsave64") #define M_XSAVEOPT FCML_TEXT("xsaveopt") #define M_XSAVEOPT64 FCML_TEXT("xsaveopt64") #define M_XSETBV FCML_TEXT("xsetbv") #define M_XTEST FCML_TEXT("xtest") #endif /* FCML_GAS_MNEMONICS_H_ */ fcml-1.1.1/include/fcml_common.h0000644000175000017500000004353212560745216013460 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_common.h * Definitions of common structures used by FCML components. * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_INT_COMMON_H_ #define FCML_INT_COMMON_H_ #include "fcml_lib_export.h" #include "fcml_types.h" #include "fcml_instructions.h" /** Maximal number of the instruction operands. */ #define FCML_OPERANDS_COUNT 5 /** Maximal number of bytes instruction can use. */ #define FCML_INSTRUCTION_SIZE 15 /** Number of opcode bytes. */ #define FCML_OPCODES_NUM 3 /** * @defgroup PREFIX_GROUP Explicit prefixes * List of prefixes that can be explicitly defined for instruction. * @{ */ /** LOCK prefix (0xF0)*/ #define FCML_PREFIX_LOCK 0x0001 /** REPNE prefix (0xF2) */ #define FCML_PREFIX_REPNE 0x0002 /** REPNZ prefix (0xF2) */ #define FCML_PREFIX_REPNZ FCML_PREFIX_REPNE /** REP prefix (0xF3) */ #define FCML_PREFIX_REP 0x0004 /** REPE prefix (0xF3) */ #define FCML_PREFIX_REPE FCML_PREFIX_REP /** REPZ prefix (0xF3) */ #define FCML_PREFIX_REPZ FCML_PREFIX_REP /** XACQUIRE prefix (0xF2) */ #define FCML_PREFIX_XACQUIRE 0x0008 /** XRELEASE prefix (0xF3) */ #define FCML_PREFIX_XRELEASE 0x0010 /** branch hint (0x2E) (SSE2 extension)*/ #define FCML_PREFIX_BRANCH_HINT 0x0020 /** nobranch hint (0x3E) (SSE2 extension)*/ #define FCML_PREFIX_NOBRANCH_HINT 0x0040 /** @} */ /** * Supported processor operating modes. */ typedef enum fcml_en_operating_mode { /** Real-addressing mode, virtual 8086 mode. */ FCML_OM_16_BIT = 1, /** Protected/Compatibility mode when 'D' segment descriptor flag is set to 1. */ FCML_OM_32_BIT, /** 64-bit mode. ('L' flag of segment descriptor set to 1.) */ FCML_OM_64_BIT, } fcml_en_operating_mode; /* Simple types. */ /** Type used for storing instruction and operand hint masks. */ typedef fcml_uint16_t fcml_hints; /** * Type for explicit instruction prefixes bit mask. */ typedef fcml_uint16_t fcml_prefixes; /** * General instruction pointer holder. */ typedef fcml_int64_t fcml_ip; /* Register numbers.*/ /** * @defgroup REGISTERS_GROUP Registers. * All supported x64_64 registers are defined here. * @{ */ #define FCML_REG_AL 0 #define FCML_REG_AX 0 #define FCML_REG_EAX 0 #define FCML_REG_RAX 0 #define FCML_REG_MM0 0 #define FCML_REG_XMM0 0 #define FCML_REG_YMM0 0 #define FCML_REG_CL 1 #define FCML_REG_CX 1 #define FCML_REG_ECX 1 #define FCML_REG_RCX 1 #define FCML_REG_MM1 1 #define FCML_REG_XMM1 1 #define FCML_REG_YMM1 1 #define FCML_REG_DL 2 #define FCML_REG_DX 2 #define FCML_REG_EDX 2 #define FCML_REG_RDX 2 #define FCML_REG_MM2 2 #define FCML_REG_XMM2 2 #define FCML_REG_YMM2 2 #define FCML_REG_BL 3 #define FCML_REG_BX 3 #define FCML_REG_EBX 3 #define FCML_REG_RBX 3 #define FCML_REG_MM3 3 #define FCML_REG_XMM3 3 #define FCML_REG_YMM3 3 #define FCML_REG_AH 4 #define FCML_REG_SP 4 #define FCML_REG_SPL 4 #define FCML_REG_ESP 4 #define FCML_REG_RSP 4 #define FCML_REG_MM4 4 #define FCML_REG_XMM4 4 #define FCML_REG_YMM4 4 #define FCML_REG_CH 5 #define FCML_REG_BP 5 #define FCML_REG_BPL 5 #define FCML_REG_EBP 5 #define FCML_REG_RBP 5 #define FCML_REG_MM5 5 #define FCML_REG_XMM5 5 #define FCML_REG_YMM5 5 #define FCML_REG_DH 6 #define FCML_REG_SI 6 #define FCML_REG_SIL 6 #define FCML_REG_ESI 6 #define FCML_REG_RSI 6 #define FCML_REG_MM6 6 #define FCML_REG_XMM6 6 #define FCML_REG_YMM6 6 #define FCML_REG_BH 7 #define FCML_REG_DI 7 #define FCML_REG_DIL 7 #define FCML_REG_EDI 7 #define FCML_REG_RDI 7 #define FCML_REG_MM7 7 #define FCML_REG_XMM7 7 #define FCML_REG_YMM7 7 #define FCML_REG_R8L 8 #define FCML_REG_R8W 8 #define FCML_REG_R8D 8 #define FCML_REG_R8 8 #define FCML_REG_XMM8 8 #define FCML_REG_YMM8 8 #define FCML_REG_R9L 9 #define FCML_REG_R9W 9 #define FCML_REG_R9D 9 #define FCML_REG_R9 9 #define FCML_REG_XMM9 9 #define FCML_REG_YMM9 9 #define FCML_REG_R10L 10 #define FCML_REG_R10W 10 #define FCML_REG_R10D 10 #define FCML_REG_R10 10 #define FCML_REG_XMM10 10 #define FCML_REG_YMM10 10 #define FCML_REG_R11L 11 #define FCML_REG_R11W 11 #define FCML_REG_R11D 11 #define FCML_REG_R11 11 #define FCML_REG_XMM11 11 #define FCML_REG_YMM11 11 #define FCML_REG_R12L 12 #define FCML_REG_R12W 12 #define FCML_REG_R12D 12 #define FCML_REG_R12 12 #define FCML_REG_XMM12 12 #define FCML_REG_YMM12 12 #define FCML_REG_R13L 13 #define FCML_REG_R13W 13 #define FCML_REG_R13D 13 #define FCML_REG_R13 13 #define FCML_REG_XMM13 13 #define FCML_REG_YMM13 13 #define FCML_REG_R14L 14 #define FCML_REG_R14W 14 #define FCML_REG_R14D 14 #define FCML_REG_R14 14 #define FCML_REG_XMM14 14 #define FCML_REG_YMM14 14 #define FCML_REG_R15L 15 #define FCML_REG_R15W 15 #define FCML_REG_R15D 15 #define FCML_REG_R15 15 #define FCML_REG_XMM15 15 #define FCML_REG_YMM15 15 /* Segment registers. */ #define FCML_REG_ES 0 #define FCML_REG_CS 1 #define FCML_REG_SS 2 #define FCML_REG_DS 3 #define FCML_REG_FS 4 #define FCML_REG_GS 5 /* FPU registers */ #define FCML_REG_ST0 0 #define FCML_REG_ST1 1 #define FCML_REG_ST2 2 #define FCML_REG_ST3 3 #define FCML_REG_ST4 4 #define FCML_REG_ST5 5 #define FCML_REG_ST6 6 #define FCML_REG_ST7 7 /* Control registers. */ #define FCML_REG_CR0 0 #define FCML_REG_CR2 2 #define FCML_REG_CR3 3 #define FCML_REG_CR4 4 #define FCML_REG_CR8 8 /* Debug register. */ #define FCML_REG_DR0 0 #define FCML_REG_DR1 1 #define FCML_REG_DR2 2 #define FCML_REG_DR3 3 #define FCML_REG_DR4 4 #define FCML_REG_DR5 5 #define FCML_REG_DR6 6 #define FCML_REG_DR7 7 /** @} */ /** * @defgroup DATA_SIZE_GROUP Constants used to describe data size. * @{instrunction->hints */ #define FCML_DS_UNDEF 0 #define FCML_DS_8 8 #define FCML_DS_16 16 #define FCML_DS_32 32 #define FCML_DS_64 64 #define FCML_DS_128 128 #define FCML_DS_256 256 /** @} */ /* Size operators. */ #define FCML_OS_UNDEFINED 0 #define FCML_OS_BYTE 8 #define FCML_OS_WORD 16 #define FCML_OS_DWORD 32 #define FCML_OS_FWORD 48 #define FCML_OS_QWORD 64 #define FCML_OS_MWORD 64 #define FCML_OS_TBYTE 80 #define FCML_OS_OWORD 128 #define FCML_OS_XWORD 128 #define FCML_OS_YWORD 256 /** * Register type. * Every register is represented as an integer value and it's register type. This enumeration provides all supported register types. */ typedef enum fcml_en_register { /** Undefined register type. */ FCML_REG_UNDEFINED = 0, /** General purpose register. */ FCML_REG_GPR, /** SIMD (SSE, MMX) register. */ FCML_REG_SIMD, /** FPU register. */ FCML_REG_FPU, /** Segment register */ FCML_REG_SEG, /** Control register. */ FCML_REG_CR, /** Debug register */ FCML_REG_DR, /** Instruction pointer register. Used for relative RIP addressing. */ FCML_REG_IP } fcml_en_register; /** * Structure describes x86_64 register. */ typedef struct fcml_st_register { /** Register type. */ fcml_en_register type; /** Register size in bits. */ fcml_usize size; /** Register itself as a positive integer. @see REGISTERS_GROUP */ fcml_uint8_t reg; /** In case of SPL,BPL,SIL,DIL GPR registers has to be set to true. */ fcml_bool x64_exp; } fcml_st_register; /********************************* * Conditions. *********************************/ /** Number of supported condition types. */ #define FCML_NUMBER_OF_CONDITIONS 8 /** * Condition type. * Every conditional instruction has an appropriate condition type set. * Following enumeration defines all supported types. */ typedef enum fcml_en_condition_type { /** 0 Overflow*/ FCML_CONDITION_O = 0, /** 1 Below*/ FCML_CONDITION_B, /** 2 Equal*/ FCML_CONDITION_E, /** 3 Below or equal*/ FCML_CONDITION_BE, /** 4 Sign*/ FCML_CONDITION_S, /** 5 Parity*/ FCML_CONDITION_P, /** 6 Less than*/ FCML_CONDITION_L, /** 7 Less than or equal to*/ FCML_CONDITION_LE } fcml_en_condition_type; /** * Defines instruction's condition. */ typedef struct fcml_st_condition { /* Condition type.*/ fcml_en_condition_type condition_type; /* True if condition should be negated.*/ fcml_bool is_negation; } fcml_st_condition; /********************************* * Size attributes flags. *********************************/ /** * @defgroup SUPPORTED_SIZE_GROUP These values can be used in order to prepare a mask of supported sizes. * Used mainly by optimizers where instructions can be assembled using different attribute sizes. * @{ */ #define FCML_EN_ASF_ANY 0x00 #define FCML_EN_ASF_16 0x01 #define FCML_EN_ASF_32 0x02 #define FCML_EN_ASF_64 0x04 #define FCML_EN_ASF_ALL FCML_EN_ASF_16 | FCML_EN_ASF_32 | FCML_EN_ASF_64 /** @} */ /** * Nullable wrapper for mask of size flags. */ typedef struct fcml_st_nullable_size_flags { /** True if mask is set. */ fcml_bool is_set; /** Mask of supported size values. */ fcml_flags flags; } fcml_st_nullable_size_flags; /********************************* * Operands. *********************************/ /** * Operand access mode. */ typedef enum fcml_en_access_mode { /** Undefined mode. */ FCML_AM_ACCESS_MODE_UNDEFINED = 0, /** Operand is read by instruction. */ FCML_AM_READ = 0x01, /** Operand is set by instruction */ FCML_AM_WRITE = 0x02, /** Operand is read but can be also set. */ FCML_AM_READ_WRITE = FCML_AM_READ | FCML_AM_WRITE } fcml_en_access_mode; /** * Representation of far pointer operand. */ typedef struct fcml_st_far_pointer { /** 16-bit Code segment. */ fcml_uint16_t segment; /** Size of the offset. */ fcml_usize offset_size; /** 16-bit offset. */ fcml_int16_t offset16; /** 32-bit offset. */ fcml_int32_t offset32; } fcml_st_far_pointer; /* *******************************************/ /* * Memory addressing using Mod/RM field **/ /* *******************************************/ /** * Addressing form. * Distinguish between two types of addressing forms: effective addressing and explicit absolute offset. */ typedef enum fcml_en_address_form { /** Default value set if memory addressing hasn't been configured. */ FCML_AF_UNDEFINED, /** Absolute offset (address). */ FCML_AF_OFFSET, /** Effective address combined from address components like base register, index registers, factor, displacement etc... */ FCML_AF_COMBINED } fcml_en_effective_address_form; /** * Absolute offset. */ typedef struct fcml_st_offset { /** Offset size 16,32 or 64 bits. */ fcml_usize size; /** True if offset should be treated as signed value. */ fcml_bool is_signed; /** Place for 16-bit absolute offset. */ fcml_int16_t off16; /** Place for 32-bit absolute offset. */ fcml_int32_t off32; /** Place for 64-bit absolute offset. */ fcml_int64_t off64; } fcml_st_offset; /** * Effective address. */ typedef struct fcml_st_effective_address { /** GPR base register. @see fcml_st_register*/ fcml_st_register base; /** GPR index register. @see fcml_st_register*/ fcml_st_register index; /** Scale factor 1,2,4 or 8. */ fcml_uint8_t scale_factor; /** Displacement value. @see fcml_st_integer*/ fcml_st_integer displacement; } fcml_st_effective_address; /** * Describes segment register. */ typedef struct fcml_st_segment_selector { /** Used segment register. @see fcml_st_register*/ fcml_st_register segment_selector; /** Set to true if given segment register is a default one in given context. This value is set by disassembler. */ fcml_bool is_default_reg; } fcml_st_segment_selector; /** * Generic memory addressing operator. */ typedef struct fcml_st_address { /** Size of data accessed in memory.*/ fcml_usize size_operator; /** Memory addressing format: absolute offset/effective address. @see fcml_en_effective_address_form*/ fcml_en_effective_address_form address_form; /** Segment register.*/ fcml_st_segment_selector segment_selector; /** Memory address for FCML_AF_COMBINED form.*/ fcml_st_effective_address effective_address; /** Memory address for FCML_AF_OFFSET form.*/ fcml_st_offset offset; } fcml_st_address; /** * Supported operand types. */ typedef enum fcml_en_operand_type { /** Operand not used. */ FCML_OT_NONE, /** Immediate integer value. */ FCML_OT_IMMEDIATE, /** Direct far pointer. */ FCML_OT_FAR_POINTER, /** Memory address. */ FCML_OT_ADDRESS, /** Processor register. */ FCML_OT_REGISTER } fcml_en_operand_type; /** * Operand hints. * Hints dedicated for instruction operands. */ typedef enum fcml_en_operand_hints { /** * Undefined. */ FCML_OP_HINT_UNDEFIEND = 0x0000, /** * SIMD operand. All operands which uses SIMD registers (mmx, xmm, ymm) have this flag set. It is for instance * used by Intel syntax renderer for data size operators (mmword ptr, xmmword ptr, ymmword ptr). */ FCML_OP_HINT_MULTIMEDIA_INSTRUCTION = 0x0001, /** * Relative address. Flags set for all branches which use jumps * calculated by displacement relative to the IP of the next instructions. */ FCML_OP_HINT_DISPLACEMENT_RELATIVE_ADDRESS = 0x0002, /** * Pseudo opcode. Hint set for last operand (Intel syntax) which contains comparison predicate of the following instructions: * CMPSD, VCMPSD, CMPSS, VCMPSS, VPCOMB, VPCOMW, VPCOMD, VPCOMQ, VPCOMUB, VPCOMUW, VPCOMUD, VPCOMUQ. */ FCML_OP_HINT_PSEUDO_OPCODE = 0x0004, /** * Offset should be encoded as absolute address. */ FCML_OP_HINT_ABSOLUTE_ADDRESSING = 0x0008, /** * Offset should be encoded as relative address. */ FCML_OP_HINT_RELATIVE_ADDRESSING = 0x0010, /** * Encode ModR/M with optional SIB byte if possible. **/ FCML_OP_HINT_SIB_ENCODING = 0x0020 } fcml_en_operand_hints; /** Instruction operand. * Structure represents one instruction operand. */ typedef struct fcml_st_operand { /** Operand type */ fcml_en_operand_type type; /** Optional operand level hints. */ fcml_hints hints; /** Immediate value operand. */ fcml_st_integer immediate; /** Far pointer operand. */ fcml_st_far_pointer far_pointer; /** Effective address or absolute offset. */ fcml_st_address address; /** Register operand. */ fcml_st_register reg; } fcml_st_operand; /********************************* * Instruction definition. *********************************/ /** * Instruction level hints. * Set of the hints that can be only defined on the * level of the whole instruction. They can not be used * with operands. */ typedef enum fcml_en_instruction_hints { /** No hints defined. */ FCML_HINT_NO_HINTS, /** Hints instruction to use FAR pointer to address the memory. */ FCML_HINT_FAR_POINTER = 0x0001, /** Hints instruction to use NEAR pointer to address the memory. */ FCML_HINT_NEAR_POINTER = 0x0002, /** This hint is used only by assembler in order to force it to generate three byte VEX/XOP prefix even if prefix fields fits into two bytes. */ FCML_HINT_LONG_FORM_POINTER = 0x0004, /** Hints instruction to use INDIRECT pointer to address the memory. */ FCML_HINT_INDIRECT_POINTER = 0x0008, /** Hints instruction to use DIRECT memory addressing. */ FCML_HINT_DIRECT_POINTER = 0x0010 } fcml_en_instruction_hints; /** * Generic instruction model. * Generic instruction model (GIM) is a common structure used to describe instruction in a common way used by FCML assembler and disassembler. */ typedef struct fcml_st_instruction { /** Describes explicit instruction prefixes. @ref PREFIX_GROUP "List of explicit prefixes." */ fcml_prefixes prefixes; /** Holds instruction level hints. */ fcml_hints hints; /** Dialect-dependent instruction mnemonic. @see fcml_en_instruction_hints */ fcml_char *mnemonic; /** True for conditional instructions. */ fcml_bool is_conditional; /** Describes condition used by assembled/disassembled conditional instruction. */ fcml_st_condition condition; /** Fixed size array of instruction operands. */ fcml_st_operand operands[FCML_OPERANDS_COUNT]; /** Number of operands defined for instruction. */ fcml_int operands_count; } fcml_st_instruction; /********************************* * Instruction definition. *********************************/ /** * An encoded instruction. */ typedef struct fcml_st_instruction_code { /** Pointer to the instruction code. */ fcml_uint8_t *code; /** Instruction code length. */ fcml_usize code_length; } fcml_st_instruction_code; /**************************** * Instruction entry point. ****************************/ /** * Describes address of an instruction code. */ typedef struct fcml_st_entry_point { /** Processor operating mode 16/32/64-bit.*/ fcml_en_operating_mode op_mode; /** Default address size attribute (See 'D' flag of segment descriptor.)*/ fcml_usize address_size_attribute; /** Default operand size attribute (See 'D' flag of segment descriptor.)*/ fcml_usize operand_size_attribute; /** Instruction pointer EIP/RIP. Take into account that even in 16 bit mode EIP register is used.*/ fcml_ip ip; } fcml_st_entry_point; #endif /* FCML_INT_COMMON_H_ */ fcml-1.1.1/include/Makefile.in0000644000175000017500000004206412561443455013063 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # 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, # 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. @SET_MAKE@ VPATH = @srcdir@ 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 \ ?) ;; \ *) 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@ pkglibexecdir = $(libexecdir)/@PACKAGE@ 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 = @build@ host_triplet = @host@ subdir = include 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 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(pkginclude_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = 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 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgincludedir)" HEADERS = $(pkginclude_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 am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FCML_IMPORT_LIB = @FCML_IMPORT_LIB@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ 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@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ 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@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ pkginclude_HEADERS = fcml_assembler.h \ fcml_assembler.hpp \ fcml_choosers.h \ fcml_common.h \ fcml_common.hpp \ fcml_common_utils.h \ fcml_dialect.h \ fcml_dialect.hpp \ fcml_disassembler.h \ fcml_disassembler.hpp \ fcml_env.h \ fcml_errors.h \ fcml_errors.hpp \ fcml_gas_dialect.h \ fcml_gas_dialect.hpp \ fcml_gas_mnemonics.h \ fcml_instructions.h \ fcml_intel_dialect.h \ fcml_intel_dialect.hpp \ fcml_intel_mnemonics.h \ fcml_lag_assembler.h \ fcml_lag_assembler.hpp \ fcml_lib_export.h \ fcml_optimizers.h \ fcml_parser.h \ fcml_parser.hpp \ fcml_registers.cpp \ fcml_registers.hpp \ fcml_renderer.h \ fcml_renderer.hpp \ fcml_stateful_assembler.hpp \ fcml_stateful_disassembler.hpp \ fcml_symbols.h \ fcml_symbols.hpp \ fcml_types.h \ fcml_gas_mnemonics.hpp \ fcml_gas_mnemonics.cpp \ fcml_intel_mnemonics.hpp \ fcml_intel_mnemonics.cpp all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.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) --gnu include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/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_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): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) 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 $(HEADERS) installdirs: for dir in "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done 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: 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." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgincludeHEADERS 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 -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-generic distclean-libtool 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-pkgincludeHEADERS install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pkgincludeHEADERS .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. .NOEXPORT: fcml-1.1.1/include/fcml_lag_assembler.hpp0000644000175000017500000003061112560745216015322 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_lag_assembler.hpp * C++ wrapper for the Multi-pass FCML assembler. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_LAG_ASSEMBLER_HPP_ #define FCML_LAG_ASSEMBLER_HPP_ #include "fcml_assembler.hpp" #include "fcml_symbols.hpp" #include "fcml_lag_assembler.h" namespace fcml { /** Assembler result which contains all assembled instructions. */ class MultiPassAssemblerResult { public: /** * Default constructor. * @since 1.1.0 */ MultiPassAssemblerResult() { } /** * Virtual destructor. * @since 1.1.0 */ virtual ~MultiPassAssemblerResult() { } public: /** * Gets error container. * * @return Error container. * @since 1.1.0 */ const ErrorContainer& getErrorContainer() const { return _errorContainer; } /** * Gets number of assembled instructions. * @return Number of assembled instructions. * @since 1.1.0 */ fcml_usize getSize() const { return _assembledInstructions.size(); } /** * Gets one assembled instruction by its index. * * @param index The index of the assembled instruction. * @return One assembled instruction at given index. * @throw BadArgumentException * @since 1.1.0 */ const AssembledInstruction& operator[] ( fcml_usize index ) const { if( index > _assembledInstructions.size() ) { throw BadArgumentException(FCML_TEXT("Array index out of bound."), FCML_CEH_GEC_VALUE_OUT_OF_RANGE); } return _assembledInstructions[index]; } /** * Gets constant vector of all assembled instructions. * * @return Assembled instructions. * @since 1.1.0 */ const std::vector& getAssembledInstructions() const { return _assembledInstructions; } /** * Gets iterator which allows to iterate through the whole machine code byte by byte. * * @return Iterator instance. * @since 1.1.0 */ CodeIterator getCodeIterator() { return CodeIterator( _assembledInstructions ); } /** * Clears the result. Remember not to use the CodeIterator after the result is cleared up. * @since 1.1.0 */ void clear() { _errorContainer.clean(); _assembledInstructions.clear(); } protected: /** Only the assembler can modify these objects. */ friend class MultiPassAssembler; /** * Gets vector of all assembled instructions. * * @return Assembled instructions. * @since 1.1.0 */ std::vector& getAssembledInstructions() { return _assembledInstructions; } /** * Sets new error container for the result. * * @param errorContainer The new error container to be set. * @since 1.1.0 */ void setErrorContainer(const ErrorContainer& errorContainer) { _errorContainer = errorContainer; } private: /** Errors container. */ ErrorContainer _errorContainer; /** Vector of all assembled instructions. */ std::vector _assembledInstructions; }; /** Assembler context. * @since 1.1.0 */ class MultiPassAssemblerContext { public: /** * Default constructor. * @since 1.1.0 */ MultiPassAssemblerContext() : _symbolTable( NULL ) { } /** * Creates assembler context for given operating mode and instruction pointer. * @param operatingMode The operating mode. * @param ip The instruction pointer. * @since 1.1.0 */ MultiPassAssemblerContext( EntryPoint::OperatingMode operatingMode, fcml_ip ip = 0 ) : _entryPoint( operatingMode, ip ), _symbolTable( NULL ) { } public: /** * Gets constant reference to assembler configuration. * * @return Assembler configuration. * @since 1.1.0 */ const AssemblerConf& getConfig() const { return _config; } /** * Gets reference to the assembler configuration. * * @return Assembler configuration. * @since 1.1.0 */ AssemblerConf& getConfig() { return _config; } /** * Sets a new assembler configuration. * * @return Assembler configuration. * @since 1.1.0 */ void setConfig(const AssemblerConf& config) { _config = config; } /** * Gets constant reference to the entry point. * * @return Entry point. * @since 1.1.0 */ const EntryPoint& getEntryPoint() const { return _entryPoint; } /** * Gets reference to the entry point. * * @return Entry point. * @since 1.1.0 */ EntryPoint& getEntryPoint() { return _entryPoint; } /** * Sets a new entry point. * * @param entryPoint Entry point to be set. * @since 1.1.0 */ void setEntryPoint(const EntryPoint& entryPoint) { _entryPoint = entryPoint; } /** * Sets a new instruction pointer. * * @param ip A new instruction pointer. * @since 1.1.0 */ void setIP( fcml_ip ip ) { _entryPoint.setIP(ip); } /** * Increments the instruction pointer by given number of bytes. * * @param ip The number of bytes the instruction pointer should be incremented by. * @since 1.1.0 */ void incrementIP( fcml_ip ip ) { _entryPoint.incrementIP( ip ); } /** * Sets a new processor operating mode for the entry point. * * @param operatingMode The new operating mode. * @since 1.1.0 */ void setOperatingMode( EntryPoint::OperatingMode operatingMode ) { _entryPoint.setOpMode( operatingMode ); } /** * Sets a new address size attribute for the entry point. * * @param addressSizeAttribute The address size attribute. * @since 1.1.0 */ void setAddressSizeAttribute( fcml_usize addressSizeAttribute ) { _entryPoint.setAddressSizeAttribute( addressSizeAttribute ); } /** * Sets a new operand size attribute for the entry point. * * @param operandSizeAttribute The operand size attribute. * @since 1.1.0 */ void setOperandSizeAttribute( fcml_usize operandSizeAttribute ) { _entryPoint.setOperandSizeAttribute( operandSizeAttribute ); } /** * Gets a pointer to the constant symbol table stored in the context. * * @return The pointer to the symbol table. * @since 1.1.0 */ const SymbolTable* getSymbolTable() const { return _symbolTable; } /** * Gets a pointer to the symbol table stored in the context. * * @return The pointer to the symbol table. * @since 1.1.0 */ SymbolTable* getSymbolTable() { return _symbolTable; } /** * Sets a new symbol table for the context. * * @param symbolTable The new symbol table to be set. * @since 1.1.0 */ void setSymbolTable( SymbolTable* symbolTable ) { _symbolTable = symbolTable; } private: /** The entry point. */ EntryPoint _entryPoint; /** The assembler configuration. */ AssemblerConf _config; /** The symbol table assigned to the context. */ SymbolTable *_symbolTable; }; /** * An assembler wrapper, as you can see the assembler context is managed internally and * is not exposed outside. */ class MultiPassAssembler: public NonCopyable, protected DialectAware, protected SymbolTableAware { public: /** * Creates multi-pass assembler for a dialect. * @param dialect The dialect for the assembler. * @throw InitException Cannot initialize the assembler. * @since 1.1.0 */ MultiPassAssembler(Dialect &dialect) : _dialect(dialect) { fcml_ceh_error error = ::fcml_fn_assembler_init( extractDialect( dialect ), &_assembler); if (error) { throw InitException(FCML_TEXT("Cannot initialize the assembler."), error); } } /** * Virtual destructor. * @since 1.1.0 */ virtual ~MultiPassAssembler() { if (_assembler) { ::fcml_fn_assembler_free(_assembler); _assembler = NULL; } } public: /** * Assembles given instruction model. * * @param ctx Assembler context. * @param instructions A pointer to the NULL terminated array of the instructions. * @param[out] result Assembler result. * @throw AssemblingFailedException Assembler failed. * @return Error code. * @since 1.1.0 */ fcml_ceh_error assemble( MultiPassAssemblerContext &ctx, const fcml_string *instructions, MultiPassAssemblerResult &result ) { /* Prepare assembler context. */ fcml_st_lag_assembler_context context = {0}; AssemblerTypeConverter::convert( ctx.getConfig(), context.configuration ); TypeConverter::convert( ctx.getEntryPoint(), context.entry_point ); SymbolTable *symbolTable = ctx.getSymbolTable(); context.symbol_table = symbolTable ? extractSymbolTable( *symbolTable ) : NULL; context.assembler = _assembler; /* Prepare assembler result. */ fcml_st_lag_assembler_result res; ::fcml_fn_lag_assembler_result_prepare( &res ); fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; try { result.clear(); error = ::fcml_fn_lag_assemble( &context, instructions, &res ); /* Failed or not, convert assembler errors. */ ErrorContainer errorContainer; ErrorTypeConverter::convert( res.errors, errorContainer ); /* Prepares assembler result. */ result.setErrorContainer( errorContainer ); if( error && ctx.getConfig().isThrowExceptionOnError() ) { ::fcml_fn_lag_assembler_result_free( &res ); throw AssemblingFailedException( errorContainer.prepareErrorMessage( FCML_TEXT("Assembling failed") ), errorContainer, error ); } if( !error ) { std::vector &assembledInstructions = result.getAssembledInstructions(); assembledInstructions.clear(); ErrorContainer instructionWarnings; fcml_st_assembled_instruction *next_instruction = res.instructions; while( next_instruction ) { fcml_st_ceh_error_container &instruction_warnings = next_instruction->warnings; ErrorTypeConverter::convert( instruction_warnings, instructionWarnings ); const AssembledInstruction assembledInstruction( next_instruction->code, next_instruction->code_length, instructionWarnings ); assembledInstructions.push_back( assembledInstruction ); next_instruction = next_instruction->next; } // Convert it back to the context because it might have been // modified during assembling process (IP incrementation etc). TypeConverter::convert( context.entry_point, ctx.getEntryPoint() ); } ::fcml_fn_lag_assembler_result_free( &res ); } catch( std::exception &exc ) { // If anything failed, free assembler results. ::fcml_fn_lag_assembler_result_free( &res ); throw exc; } return error; } private: // The dialect used by the assembler. Dialect &_dialect; // The initialized assembler instance used by the wrapper. fcml_st_assembler *_assembler; }; } #endif /* FCML_LAG_ASSEMBLER_HPP_ */ fcml-1.1.1/include/fcml_lib_export.h0000644000175000017500000000406212560745216014332 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_lib_export.h * Handles Win32 DLL symbols importing/exporting. * The only interesting thing here is the LIBFCML_DLL_IMPORT symbol which has to * be always defined in order to use dynamic DLL under Windows. You can achieve it * by declaring the symbol before this header file is included. For example: * @code * #define LIBFCML_DLL_IMPORT * #include * @endcode * Take into account that this header file is included by every FCML public header, so * in fact you should define the symbol before including anything from the FCML library. * This declaration can be omitted as long as you use undecorated symbol names. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_LIB_EXPORT_H_ #define FCML_LIB_EXPORT_H_ #ifdef HAVE_CONFIG_H #include #endif #if _WIN32 || __CYGWIN__ #define LIB_CALL __stdcall #ifdef DLL_EXPORT #define LIB_EXPORT __declspec(dllexport) #else #ifdef LIBFCML_DLL_IMPORT #define LIB_EXPORT __declspec(dllimport) #endif #endif #endif #ifndef LIB_EXPORT #define LIB_EXPORT #endif #ifndef LIB_CALL #define LIB_CALL #endif #endif /* FCML_LIB_EXPORT_H_ */ fcml-1.1.1/include/fcml_intel_mnemonics.hpp0000644000175000017500000014055412560745216015715 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /** @file fcml_intel_mnemonics.hpp * Declarations of Intel mnemonics. * * @copyright Copyright (C) 2010-2015 Slawomir Wojtasiak. All rights reserved. * This project is released under the GNU Lesser General Public License. */ #ifndef FCML_INTEL_MNEMONICS_HPP_ #define FCML_INTEL_MNEMONICS_HPP_ #include "fcml_types.h" #include "fcml_intel_mnemonics.hpp" namespace fcml { namespace intel { extern const fcml_cstring M_AAA; extern const fcml_cstring M_AAD; extern const fcml_cstring M_AAM; extern const fcml_cstring M_AAS; extern const fcml_cstring M_ADC; extern const fcml_cstring M_ADCX; extern const fcml_cstring M_ADD; extern const fcml_cstring M_ADDPD; extern const fcml_cstring M_ADDPS; extern const fcml_cstring M_ADDSD; extern const fcml_cstring M_ADDSS; extern const fcml_cstring M_ADDSUBPD; extern const fcml_cstring M_ADDSUBPS; extern const fcml_cstring M_ADOX; extern const fcml_cstring M_AESDEC; extern const fcml_cstring M_AESDECLAST; extern const fcml_cstring M_AESENC; extern const fcml_cstring M_AESENCLAST; extern const fcml_cstring M_AESIMC; extern const fcml_cstring M_AESKEYGENASSIST; extern const fcml_cstring M_AND; extern const fcml_cstring M_ANDN; extern const fcml_cstring M_ANDNPD; extern const fcml_cstring M_ANDNPS; extern const fcml_cstring M_ANDPD; extern const fcml_cstring M_ANDPS; extern const fcml_cstring M_ARPL; extern const fcml_cstring M_BEXR; extern const fcml_cstring M_BEXTR; extern const fcml_cstring M_BLCFILL; extern const fcml_cstring M_BLCI; extern const fcml_cstring M_BLCIC; extern const fcml_cstring M_BLCMSK; extern const fcml_cstring M_BLCS; extern const fcml_cstring M_BLENDPD; extern const fcml_cstring M_BLENDPS; extern const fcml_cstring M_BLENDVPD; extern const fcml_cstring M_BLENDVPS; extern const fcml_cstring M_BLSFILL; extern const fcml_cstring M_BLSI; extern const fcml_cstring M_BLSIC; extern const fcml_cstring M_BLSMSK; extern const fcml_cstring M_BLSR; extern const fcml_cstring M_BOUND; extern const fcml_cstring M_BSF; extern const fcml_cstring M_BSR; extern const fcml_cstring M_BSWAP; extern const fcml_cstring M_BT; extern const fcml_cstring M_BTC; extern const fcml_cstring M_BTR; extern const fcml_cstring M_BTS; extern const fcml_cstring M_BZHI; extern const fcml_cstring M_CALL; extern const fcml_cstring M_CBW; extern const fcml_cstring M_CDQ; extern const fcml_cstring M_CDQE; extern const fcml_cstring M_CLAC; extern const fcml_cstring M_CLC; extern const fcml_cstring M_CLD; extern const fcml_cstring M_CLFLUSH; extern const fcml_cstring M_CLGI; extern const fcml_cstring M_CLI; extern const fcml_cstring M_CLTS; extern const fcml_cstring M_CMC; extern const fcml_cstring M_CMOVO; extern const fcml_cstring M_CMOVNO; extern const fcml_cstring M_CMOVB; extern const fcml_cstring M_CMOVNB; extern const fcml_cstring M_CMOVE; extern const fcml_cstring M_CMOVNE; extern const fcml_cstring M_CMOVBE; extern const fcml_cstring M_CMOVNBE; extern const fcml_cstring M_CMOVS; extern const fcml_cstring M_CMOVNS; extern const fcml_cstring M_CMOVP; extern const fcml_cstring M_CMOVNP; extern const fcml_cstring M_CMOVL; extern const fcml_cstring M_CMOVNL; extern const fcml_cstring M_CMOVLE; extern const fcml_cstring M_CMOVNLE; extern const fcml_cstring M_CMOVNAE; extern const fcml_cstring M_CMOVAE; extern const fcml_cstring M_CMOVZ; extern const fcml_cstring M_CMOVNZ; extern const fcml_cstring M_CMOVNA; extern const fcml_cstring M_CMOVA; extern const fcml_cstring M_CMOVPE; extern const fcml_cstring M_CMOVPO; extern const fcml_cstring M_CMOVNGE; extern const fcml_cstring M_CMOVGE; extern const fcml_cstring M_CMOVNG; extern const fcml_cstring M_CMOVG; extern const fcml_cstring M_CMOVC; extern const fcml_cstring M_CMOVNC; extern const fcml_cstring M_CMP; extern const fcml_cstring M_CMPEQSD; extern const fcml_cstring M_CMPEQSS; extern const fcml_cstring M_CMPLESD; extern const fcml_cstring M_CMPLESS; extern const fcml_cstring M_CMPLTSD; extern const fcml_cstring M_CMPLTSS; extern const fcml_cstring M_CMPNEQSD; extern const fcml_cstring M_CMPNEQSS; extern const fcml_cstring M_CMPNLESD; extern const fcml_cstring M_CMPNLESS; extern const fcml_cstring M_CMPNLTSD; extern const fcml_cstring M_CMPNLTSS; extern const fcml_cstring M_CMPORDSD; extern const fcml_cstring M_CMPORDSS; extern const fcml_cstring M_CMPPD; extern const fcml_cstring M_CMPPS; extern const fcml_cstring M_CMPS; extern const fcml_cstring M_CMPSB; extern const fcml_cstring M_CMPSD; extern const fcml_cstring M_CMPSQ; extern const fcml_cstring M_CMPSS; extern const fcml_cstring M_CMPSW; extern const fcml_cstring M_CMPUNORDSD; extern const fcml_cstring M_CMPUNORDSS; extern const fcml_cstring M_CMPXCHG; extern const fcml_cstring M_CMPXCHG16B; extern const fcml_cstring M_CMPXCHG8B; extern const fcml_cstring M_COMISD; extern const fcml_cstring M_COMISS; extern const fcml_cstring M_CPUID; extern const fcml_cstring M_CQO; extern const fcml_cstring M_CRC32; extern const fcml_cstring M_CVTDQ2PD; extern const fcml_cstring M_CVTDQ2PS; extern const fcml_cstring M_CVTPD2DQ; extern const fcml_cstring M_CVTPD2PI; extern const fcml_cstring M_CVTPD2PS; extern const fcml_cstring M_CVTPI2PD; extern const fcml_cstring M_CVTPI2PS; extern const fcml_cstring M_CVTPS2DQ; extern const fcml_cstring M_CVTPS2PD; extern const fcml_cstring M_CVTPS2PI; extern const fcml_cstring M_CVTSD2SI; extern const fcml_cstring M_CVTSD2SS; extern const fcml_cstring M_CVTSI2SD; extern const fcml_cstring M_CVTSI2SS; extern const fcml_cstring M_CVTSS2SD; extern const fcml_cstring M_CVTSS2SI; extern const fcml_cstring M_CVTTPD2DQ; extern const fcml_cstring M_CVTTPD2PI; extern const fcml_cstring M_CVTTPS2DQ; extern const fcml_cstring M_CVTTPS2PI; extern const fcml_cstring M_CVTTSD2SI; extern const fcml_cstring M_CVTTSS2SI; extern const fcml_cstring M_CWD; extern const fcml_cstring M_CWDE; extern const fcml_cstring M_DAA; extern const fcml_cstring M_DAS; extern const fcml_cstring M_DEC; extern const fcml_cstring M_DIV; extern const fcml_cstring M_DIVPD; extern const fcml_cstring M_DIVPS; extern const fcml_cstring M_DIVSD; extern const fcml_cstring M_DIVSS; extern const fcml_cstring M_DPPD; extern const fcml_cstring M_DPPS; extern const fcml_cstring M_EMMS; extern const fcml_cstring M_ENTER; extern const fcml_cstring M_EXTRACTPS; extern const fcml_cstring M_EXTRQ; extern const fcml_cstring M_F2XM1; extern const fcml_cstring M_FABS; extern const fcml_cstring M_FADD; extern const fcml_cstring M_FADDP; extern const fcml_cstring M_FBLD; extern const fcml_cstring M_FBSTP; extern const fcml_cstring M_FCHS; extern const fcml_cstring M_FCLEX; extern const fcml_cstring M_FCMOVB; extern const fcml_cstring M_FCMOVBE; extern const fcml_cstring M_FCMOVE; extern const fcml_cstring M_FCMOVNB; extern const fcml_cstring M_FCMOVNBE; extern const fcml_cstring M_FCMOVNE; extern const fcml_cstring M_FCMOVNU; extern const fcml_cstring M_FCMOVU; extern const fcml_cstring M_FCOM; extern const fcml_cstring M_FCOMI; extern const fcml_cstring M_FCOMIP; extern const fcml_cstring M_FCOMP; extern const fcml_cstring M_FCOMPP; extern const fcml_cstring M_FCOS; extern const fcml_cstring M_FDECSTP; extern const fcml_cstring M_FDIV; extern const fcml_cstring M_FDIVP; extern const fcml_cstring M_FDIVR; extern const fcml_cstring M_FDIVRP; extern const fcml_cstring M_FEMMS; extern const fcml_cstring M_FFREE; extern const fcml_cstring M_FIADD; extern const fcml_cstring M_FICOM; extern const fcml_cstring M_FICOMP; extern const fcml_cstring M_FIDIV; extern const fcml_cstring M_FIDIVR; extern const fcml_cstring M_FILD; extern const fcml_cstring M_FIMUL; extern const fcml_cstring M_FINCSTP; extern const fcml_cstring M_FINIT; extern const fcml_cstring M_FIST; extern const fcml_cstring M_FISTP; extern const fcml_cstring M_FISTTP; extern const fcml_cstring M_FISUB; extern const fcml_cstring M_FISUBR; extern const fcml_cstring M_FLD; extern const fcml_cstring M_FLD1; extern const fcml_cstring M_FLDCW; extern const fcml_cstring M_FLDENV; extern const fcml_cstring M_FLDL2E; extern const fcml_cstring M_FLDL2T; extern const fcml_cstring M_FLDLG2; extern const fcml_cstring M_FLDLN2; extern const fcml_cstring M_FLDPI; extern const fcml_cstring M_FLDZ; extern const fcml_cstring M_FMUL; extern const fcml_cstring M_FMULP; extern const fcml_cstring M_FNCLEX; extern const fcml_cstring M_FNINIT; extern const fcml_cstring M_FNOP; extern const fcml_cstring M_FNSAVE; extern const fcml_cstring M_FNSTCW; extern const fcml_cstring M_FNSTENV; extern const fcml_cstring M_FNSTSW; extern const fcml_cstring M_FPATAN; extern const fcml_cstring M_FPREM; extern const fcml_cstring M_FPREM1; extern const fcml_cstring M_FPTAN; extern const fcml_cstring M_FRNDINT; extern const fcml_cstring M_FRSTOR; extern const fcml_cstring M_FSAVE; extern const fcml_cstring M_FSCALE; extern const fcml_cstring M_FSIN; extern const fcml_cstring M_FSINCOS; extern const fcml_cstring M_FSQRT; extern const fcml_cstring M_FST; extern const fcml_cstring M_FSTCW; extern const fcml_cstring M_FSTENV; extern const fcml_cstring M_FSTP; extern const fcml_cstring M_FSTSW; extern const fcml_cstring M_FSUB; extern const fcml_cstring M_FSUBP; extern const fcml_cstring M_FSUBR; extern const fcml_cstring M_FSUBRP; extern const fcml_cstring M_FTST; extern const fcml_cstring M_FUCOM; extern const fcml_cstring M_FUCOMI; extern const fcml_cstring M_FUCOMIP; extern const fcml_cstring M_FUCOMP; extern const fcml_cstring M_FUCOMPP; extern const fcml_cstring M_FWAIT; extern const fcml_cstring M_FXAM; extern const fcml_cstring M_FXCH; extern const fcml_cstring M_FXRSTOR; extern const fcml_cstring M_FXRSTOR64; extern const fcml_cstring M_FXSAVE; extern const fcml_cstring M_FXSAVE64; extern const fcml_cstring M_FXTRACT; extern const fcml_cstring M_FYL2X; extern const fcml_cstring M_FYL2XP1; extern const fcml_cstring M_GETSEC; extern const fcml_cstring M_HADDPD; extern const fcml_cstring M_HADDPS; extern const fcml_cstring M_HLT; extern const fcml_cstring M_HSUBPD; extern const fcml_cstring M_HSUBPS; extern const fcml_cstring M_IDIV; extern const fcml_cstring M_IMUL; extern const fcml_cstring M_IN; extern const fcml_cstring M_INC; extern const fcml_cstring M_INS; extern const fcml_cstring M_INSB; extern const fcml_cstring M_INSD; extern const fcml_cstring M_INSERTPS; extern const fcml_cstring M_INSERTQ; extern const fcml_cstring M_INSW; extern const fcml_cstring M_INT; extern const fcml_cstring M_INT3; extern const fcml_cstring M_INTO; extern const fcml_cstring M_INVD; extern const fcml_cstring M_INVEPT; extern const fcml_cstring M_INVLPG; extern const fcml_cstring M_INVLPGA; extern const fcml_cstring M_INVPCID; extern const fcml_cstring M_INVVPID; extern const fcml_cstring M_IRET; extern const fcml_cstring M_IRETD; extern const fcml_cstring M_IRETQ; extern const fcml_cstring M_JO; extern const fcml_cstring M_JNO; extern const fcml_cstring M_JB; extern const fcml_cstring M_JNB; extern const fcml_cstring M_JE; extern const fcml_cstring M_JNE; extern const fcml_cstring M_JBE; extern const fcml_cstring M_JNBE; extern const fcml_cstring M_JS; extern const fcml_cstring M_JNS; extern const fcml_cstring M_JP; extern const fcml_cstring M_JNP; extern const fcml_cstring M_JL; extern const fcml_cstring M_JNL; extern const fcml_cstring M_JLE; extern const fcml_cstring M_JNLE; extern const fcml_cstring M_JNAE; extern const fcml_cstring M_JAE; extern const fcml_cstring M_JZ; extern const fcml_cstring M_JNZ; extern const fcml_cstring M_JNA; extern const fcml_cstring M_JA; extern const fcml_cstring M_JPE; extern const fcml_cstring M_JPO; extern const fcml_cstring M_JNGE; extern const fcml_cstring M_JGE; extern const fcml_cstring M_JNG; extern const fcml_cstring M_JG; extern const fcml_cstring M_JC; extern const fcml_cstring M_JNC; extern const fcml_cstring M_JCXZ; extern const fcml_cstring M_JECXZ; extern const fcml_cstring M_JMP; extern const fcml_cstring M_JRCXZ; extern const fcml_cstring M_LAHF; extern const fcml_cstring M_LAR; extern const fcml_cstring M_LDDQU; extern const fcml_cstring M_LDMXCSR; extern const fcml_cstring M_LDS; extern const fcml_cstring M_LEA; extern const fcml_cstring M_LEAVE; extern const fcml_cstring M_LES; extern const fcml_cstring M_LFENCE; extern const fcml_cstring M_LFS; extern const fcml_cstring M_LGDT; extern const fcml_cstring M_LGS; extern const fcml_cstring M_LIDT; extern const fcml_cstring M_LLDT; extern const fcml_cstring M_LLWPCB; extern const fcml_cstring M_LMSW; extern const fcml_cstring M_LODS; extern const fcml_cstring M_LODSB; extern const fcml_cstring M_LODSD; extern const fcml_cstring M_LODSQ; extern const fcml_cstring M_LODSW; extern const fcml_cstring M_LOOP; extern const fcml_cstring M_LOOPE; extern const fcml_cstring M_LOOPNE; extern const fcml_cstring M_LOOPNZ; extern const fcml_cstring M_LOOPZ; extern const fcml_cstring M_LSL; extern const fcml_cstring M_LSS; extern const fcml_cstring M_LTR; extern const fcml_cstring M_LWPINS; extern const fcml_cstring M_LWPVAL; extern const fcml_cstring M_LZCNT; extern const fcml_cstring M_MASKMOVDQU; extern const fcml_cstring M_MASKMOVQ; extern const fcml_cstring M_MAXPD; extern const fcml_cstring M_MAXPS; extern const fcml_cstring M_MAXSD; extern const fcml_cstring M_MAXSS; extern const fcml_cstring M_MFENCE; extern const fcml_cstring M_MINPD; extern const fcml_cstring M_MINPS; extern const fcml_cstring M_MINSD; extern const fcml_cstring M_MINSS; extern const fcml_cstring M_MONITOR; extern const fcml_cstring M_MOV; extern const fcml_cstring M_MOVAPD; extern const fcml_cstring M_MOVAPS; extern const fcml_cstring M_MOVBE; extern const fcml_cstring M_MOVD; extern const fcml_cstring M_MOVDDUP; extern const fcml_cstring M_MOVDQ2Q; extern const fcml_cstring M_MOVDQA; extern const fcml_cstring M_MOVDQU; extern const fcml_cstring M_MOVHLPS; extern const fcml_cstring M_MOVHPD; extern const fcml_cstring M_MOVHPS; extern const fcml_cstring M_MOVLHPS; extern const fcml_cstring M_MOVLPD; extern const fcml_cstring M_MOVLPS; extern const fcml_cstring M_MOVMSKPD; extern const fcml_cstring M_MOVMSKPS; extern const fcml_cstring M_MOVNTDQ; extern const fcml_cstring M_MOVNTDQA; extern const fcml_cstring M_MOVNTI; extern const fcml_cstring M_MOVNTPD; extern const fcml_cstring M_MOVNTPS; extern const fcml_cstring M_MOVNTQ; extern const fcml_cstring M_MOVNTSD; extern const fcml_cstring M_MOVNTSS; extern const fcml_cstring M_MOVQ; extern const fcml_cstring M_MOVQ2DQ; extern const fcml_cstring M_MOVS; extern const fcml_cstring M_MOVSB; extern const fcml_cstring M_MOVSD; extern const fcml_cstring M_MOVSHDUP; extern const fcml_cstring M_MOVSLDUP; extern const fcml_cstring M_MOVSQ; extern const fcml_cstring M_MOVSS; extern const fcml_cstring M_MOVSW; extern const fcml_cstring M_MOVSX; extern const fcml_cstring M_MOVSXD; extern const fcml_cstring M_MOVUPD; extern const fcml_cstring M_MOVUPS; extern const fcml_cstring M_MOVZX; extern const fcml_cstring M_MPSADBW; extern const fcml_cstring M_MUL; extern const fcml_cstring M_MULPD; extern const fcml_cstring M_MULPS; extern const fcml_cstring M_MULSD; extern const fcml_cstring M_MULSS; extern const fcml_cstring M_MULX; extern const fcml_cstring M_MWAIT; extern const fcml_cstring M_NEG; extern const fcml_cstring M_NOP; extern const fcml_cstring M_NOT; extern const fcml_cstring M_OR; extern const fcml_cstring M_ORPD; extern const fcml_cstring M_ORPS; extern const fcml_cstring M_OUT; extern const fcml_cstring M_OUTS; extern const fcml_cstring M_OUTSB; extern const fcml_cstring M_OUTSD; extern const fcml_cstring M_OUTSW; extern const fcml_cstring M_PABSB; extern const fcml_cstring M_PABSD; extern const fcml_cstring M_PABSW; extern const fcml_cstring M_PACKSSDW; extern const fcml_cstring M_PACKSSWB; extern const fcml_cstring M_PACKUSDW; extern const fcml_cstring M_PACKUSWB; extern const fcml_cstring M_PADDB; extern const fcml_cstring M_PADDD; extern const fcml_cstring M_PADDQ; extern const fcml_cstring M_PADDSB; extern const fcml_cstring M_PADDSW; extern const fcml_cstring M_PADDUSB; extern const fcml_cstring M_PADDUSW; extern const fcml_cstring M_PADDW; extern const fcml_cstring M_PALIGNR; extern const fcml_cstring M_PAND; extern const fcml_cstring M_PANDN; extern const fcml_cstring M_PAUSE; extern const fcml_cstring M_PAVGB; extern const fcml_cstring M_PAVGUSB; extern const fcml_cstring M_PAVGW; extern const fcml_cstring M_PBLENDVB; extern const fcml_cstring M_PBLENDW; extern const fcml_cstring M_PCLMULQDQ; extern const fcml_cstring M_PCMPEQB; extern const fcml_cstring M_PCMPEQD; extern const fcml_cstring M_PCMPEQQ; extern const fcml_cstring M_PCMPEQW; extern const fcml_cstring M_PCMPESTRI; extern const fcml_cstring M_PCMPESTRM; extern const fcml_cstring M_PCMPGTB; extern const fcml_cstring M_PCMPGTD; extern const fcml_cstring M_PCMPGTQ; extern const fcml_cstring M_PCMPGTW; extern const fcml_cstring M_PCMPISTRI; extern const fcml_cstring M_PCMPISTRM; extern const fcml_cstring M_PDEP; extern const fcml_cstring M_PEXT; extern const fcml_cstring M_PEXTRB; extern const fcml_cstring M_PEXTRD; extern const fcml_cstring M_PEXTRQ; extern const fcml_cstring M_PEXTRW; extern const fcml_cstring M_PF2ID; extern const fcml_cstring M_PF2IW; extern const fcml_cstring M_PFACC; extern const fcml_cstring M_PFADD; extern const fcml_cstring M_PFCMPEQ; extern const fcml_cstring M_PFCMPGE; extern const fcml_cstring M_PFCMPGT; extern const fcml_cstring M_PFMAX; extern const fcml_cstring M_PFMIN; extern const fcml_cstring M_PFMUL; extern const fcml_cstring M_PFNACC; extern const fcml_cstring M_PFPNACC; extern const fcml_cstring M_PFRCP; extern const fcml_cstring M_PFRCPIT1; extern const fcml_cstring M_PFRCPIT2; extern const fcml_cstring M_PFRSQIT1; extern const fcml_cstring M_PFRSQRT; extern const fcml_cstring M_PFSUB; extern const fcml_cstring M_PFSUBR; extern const fcml_cstring M_PHADDD; extern const fcml_cstring M_PHADDSW; extern const fcml_cstring M_PHADDW; extern const fcml_cstring M_PHMINPOSUW; extern const fcml_cstring M_PHSUBD; extern const fcml_cstring M_PHSUBSW; extern const fcml_cstring M_PHSUBW; extern const fcml_cstring M_PI2FD; extern const fcml_cstring M_PI2FW; extern const fcml_cstring M_PINSRB; extern const fcml_cstring M_PINSRD; extern const fcml_cstring M_PINSRQ; extern const fcml_cstring M_PINSRW; extern const fcml_cstring M_PMADDUBSW; extern const fcml_cstring M_PMADDWD; extern const fcml_cstring M_PMAXSB; extern const fcml_cstring M_PMAXSD; extern const fcml_cstring M_PMAXSW; extern const fcml_cstring M_PMAXUB; extern const fcml_cstring M_PMAXUD; extern const fcml_cstring M_PMAXUW; extern const fcml_cstring M_PMINSB; extern const fcml_cstring M_PMINSD; extern const fcml_cstring M_PMINSW; extern const fcml_cstring M_PMINUB; extern const fcml_cstring M_PMINUD; extern const fcml_cstring M_PMINUW; extern const fcml_cstring M_PMOVMSKB; extern const fcml_cstring M_PMOVSXBD; extern const fcml_cstring M_PMOVSXBQ; extern const fcml_cstring M_PMOVSXBW; extern const fcml_cstring M_PMOVSXDQ; extern const fcml_cstring M_PMOVSXWD; extern const fcml_cstring M_PMOVSXWQ; extern const fcml_cstring M_PMOVZXBD; extern const fcml_cstring M_PMOVZXBQ; extern const fcml_cstring M_PMOVZXBW; extern const fcml_cstring M_PMOVZXDQ; extern const fcml_cstring M_PMOVZXWD; extern const fcml_cstring M_PMOVZXWQ; extern const fcml_cstring M_PMULDQ; extern const fcml_cstring M_PMULHRSW; extern const fcml_cstring M_PMULHRW; extern const fcml_cstring M_PMULHUW; extern const fcml_cstring M_PMULHW; extern const fcml_cstring M_PMULLD; extern const fcml_cstring M_PMULLW; extern const fcml_cstring M_PMULUDQ; extern const fcml_cstring M_POP; extern const fcml_cstring M_POPA; extern const fcml_cstring M_POPAD; extern const fcml_cstring M_POPCNT; extern const fcml_cstring M_POPF; extern const fcml_cstring M_POPFD; extern const fcml_cstring M_POPFQ; extern const fcml_cstring M_POR; extern const fcml_cstring M_PREFETCH; extern const fcml_cstring M_PREFETCHNTA; extern const fcml_cstring M_PREFETCHT0; extern const fcml_cstring M_PREFETCHT1; extern const fcml_cstring M_PREFETCHT2; extern const fcml_cstring M_PREFETCHW; extern const fcml_cstring M_PSADBW; extern const fcml_cstring M_PSHUFB; extern const fcml_cstring M_PSHUFD; extern const fcml_cstring M_PSHUFHW; extern const fcml_cstring M_PSHUFLW; extern const fcml_cstring M_PSHUFW; extern const fcml_cstring M_PSIGNB; extern const fcml_cstring M_PSIGND; extern const fcml_cstring M_PSIGNW; extern const fcml_cstring M_PSLLD; extern const fcml_cstring M_PSLLDQ; extern const fcml_cstring M_PSLLQ; extern const fcml_cstring M_PSLLW; extern const fcml_cstring M_PSRAD; extern const fcml_cstring M_PSRAW; extern const fcml_cstring M_PSRLD; extern const fcml_cstring M_PSRLDQ; extern const fcml_cstring M_PSRLQ; extern const fcml_cstring M_PSRLW; extern const fcml_cstring M_PSUBB; extern const fcml_cstring M_PSUBD; extern const fcml_cstring M_PSUBQ; extern const fcml_cstring M_PSUBSB; extern const fcml_cstring M_PSUBSW; extern const fcml_cstring M_PSUBUSB; extern const fcml_cstring M_PSUBUSW; extern const fcml_cstring M_PSUBW; extern const fcml_cstring M_PSWAPD; extern const fcml_cstring M_PTEST; extern const fcml_cstring M_PUNPCKHBW; extern const fcml_cstring M_PUNPCKHDQ; extern const fcml_cstring M_PUNPCKHQDQ; extern const fcml_cstring M_PUNPCKHWD; extern const fcml_cstring M_PUNPCKLBW; extern const fcml_cstring M_PUNPCKLDQ; extern const fcml_cstring M_PUNPCKLQDQ; extern const fcml_cstring M_PUNPCKLWD; extern const fcml_cstring M_PUSH; extern const fcml_cstring M_PUSHA; extern const fcml_cstring M_PUSHAD; extern const fcml_cstring M_PUSHF; extern const fcml_cstring M_PUSHFD; extern const fcml_cstring M_PUSHFQ; extern const fcml_cstring M_PXOR; extern const fcml_cstring M_RCL; extern const fcml_cstring M_RCPPS; extern const fcml_cstring M_RCPSS; extern const fcml_cstring M_RCR; extern const fcml_cstring M_RDFSBASE; extern const fcml_cstring M_RDGSBASE; extern const fcml_cstring M_RDMSR; extern const fcml_cstring M_RDPMC; extern const fcml_cstring M_RDRAND; extern const fcml_cstring M_RDSEED; extern const fcml_cstring M_RDTSC; extern const fcml_cstring M_RDTSCP; extern const fcml_cstring M_RET; extern const fcml_cstring M_RETF; extern const fcml_cstring M_ROL; extern const fcml_cstring M_ROR; extern const fcml_cstring M_RORX; extern const fcml_cstring M_ROUNDPD; extern const fcml_cstring M_ROUNDPS; extern const fcml_cstring M_ROUNDSD; extern const fcml_cstring M_ROUNDSS; extern const fcml_cstring M_RSM; extern const fcml_cstring M_RSQRTPS; extern const fcml_cstring M_RSQRTSS; extern const fcml_cstring M_SAHF; extern const fcml_cstring M_SAL; extern const fcml_cstring M_SAR; extern const fcml_cstring M_SARX; extern const fcml_cstring M_SBB; extern const fcml_cstring M_SCAS; extern const fcml_cstring M_SCASB; extern const fcml_cstring M_SCASD; extern const fcml_cstring M_SCASQ; extern const fcml_cstring M_SCASW; extern const fcml_cstring M_SETO; extern const fcml_cstring M_SETNO; extern const fcml_cstring M_SETB; extern const fcml_cstring M_SETNB; extern const fcml_cstring M_SETE; extern const fcml_cstring M_SETNE; extern const fcml_cstring M_SETBE; extern const fcml_cstring M_SETNBE; extern const fcml_cstring M_SETS; extern const fcml_cstring M_SETNS; extern const fcml_cstring M_SETP; extern const fcml_cstring M_SETNP; extern const fcml_cstring M_SETL; extern const fcml_cstring M_SETNL; extern const fcml_cstring M_SETLE; extern const fcml_cstring M_SETNLE; extern const fcml_cstring M_SETNAE; extern const fcml_cstring M_SETAE; extern const fcml_cstring M_SETZ; extern const fcml_cstring M_SETNZ; extern const fcml_cstring M_SETNA; extern const fcml_cstring M_SETA; extern const fcml_cstring M_SETPE; extern const fcml_cstring M_SETPO; extern const fcml_cstring M_SETNGE; extern const fcml_cstring M_SETGE; extern const fcml_cstring M_SETNG; extern const fcml_cstring M_SETG; extern const fcml_cstring M_SETC; extern const fcml_cstring M_SETNC; extern const fcml_cstring M_SFENCE; extern const fcml_cstring M_SGDT; extern const fcml_cstring M_SHL; extern const fcml_cstring M_SHLD; extern const fcml_cstring M_SHLX; extern const fcml_cstring M_SHR; extern const fcml_cstring M_SHRD; extern const fcml_cstring M_SHRX; extern const fcml_cstring M_SHUFPD; extern const fcml_cstring M_SHUFPS; extern const fcml_cstring M_SIDT; extern const fcml_cstring M_SKINIT; extern const fcml_cstring M_SLDT; extern const fcml_cstring M_SLWPCB; extern const fcml_cstring M_SMSW; extern const fcml_cstring M_SQRTPD; extern const fcml_cstring M_SQRTPS; extern const fcml_cstring M_SQRTSD; extern const fcml_cstring M_SQRTSS; extern const fcml_cstring M_STAC; extern const fcml_cstring M_STC; extern const fcml_cstring M_STD; extern const fcml_cstring M_STGI; extern const fcml_cstring M_STI; extern const fcml_cstring M_STMXCSR; extern const fcml_cstring M_STOS; extern const fcml_cstring M_STOSB; extern const fcml_cstring M_STOSD; extern const fcml_cstring M_STOSQ; extern const fcml_cstring M_STOSW; extern const fcml_cstring M_STR; extern const fcml_cstring M_SUB; extern const fcml_cstring M_SUBPD; extern const fcml_cstring M_SUBPS; extern const fcml_cstring M_SUBSD; extern const fcml_cstring M_SUBSS; extern const fcml_cstring M_SWAPGS; extern const fcml_cstring M_SYSCALL; extern const fcml_cstring M_SYSENTER; extern const fcml_cstring M_SYSEXIT; extern const fcml_cstring M_SYSRET; extern const fcml_cstring M_T1MSKC; extern const fcml_cstring M_TEST; extern const fcml_cstring M_TZCNT; extern const fcml_cstring M_TZMSK; extern const fcml_cstring M_UCOMISD; extern const fcml_cstring M_UCOMISS; extern const fcml_cstring M_UD2; extern const fcml_cstring M_UNPCKHPD; extern const fcml_cstring M_UNPCKHPS; extern const fcml_cstring M_UNPCKLPD; extern const fcml_cstring M_UNPCKLPS; extern const fcml_cstring M_VADDPD; extern const fcml_cstring M_VADDPS; extern const fcml_cstring M_VADDSD; extern const fcml_cstring M_VADDSS; extern const fcml_cstring M_VADDSUBPD; extern const fcml_cstring M_VADDSUBPS; extern const fcml_cstring M_VAESDEC; extern const fcml_cstring M_VAESDECLAST; extern const fcml_cstring M_VAESENC; extern const fcml_cstring M_VAESENCLAST; extern const fcml_cstring M_VAESIMC; extern const fcml_cstring M_VAESKEYGENASSIST; extern const fcml_cstring M_VANDNPD; extern const fcml_cstring M_VANDNPS; extern const fcml_cstring M_VANDPD; extern const fcml_cstring M_VANDPS; extern const fcml_cstring M_VBLENDPD; extern const fcml_cstring M_VBLENDPS; extern const fcml_cstring M_VBLENDVPD; extern const fcml_cstring M_VBLENDVPS; extern const fcml_cstring M_VBROADCASTF128; extern const fcml_cstring M_VBROADCASTI128; extern const fcml_cstring M_VBROADCASTSD; extern const fcml_cstring M_VBROADCASTSS; extern const fcml_cstring M_VCMPEQ_OSSD; extern const fcml_cstring M_VCMPEQ_OSSS; extern const fcml_cstring M_VCMPEQSD; extern const fcml_cstring M_VCMPEQSS; extern const fcml_cstring M_VCMPEQ_UQSD; extern const fcml_cstring M_VCMPEQ_UQSS; extern const fcml_cstring M_VCMPEQ_USSD; extern const fcml_cstring M_VCMPEQ_USSS; extern const fcml_cstring M_VCMPFALSE_OSSD; extern const fcml_cstring M_VCMPFALSE_OSSS; extern const fcml_cstring M_VCMPFALSESD; extern const fcml_cstring M_VCMPFALSESS; extern const fcml_cstring M_VCMPGE_OQSD; extern const fcml_cstring M_VCMPGE_OQSS; extern const fcml_cstring M_VCMPGESD; extern const fcml_cstring M_VCMPGESS; extern const fcml_cstring M_VCMPGT_OQSD; extern const fcml_cstring M_VCMPGT_OQSS; extern const fcml_cstring M_VCMPGTSD; extern const fcml_cstring M_VCMPGTSS; extern const fcml_cstring M_VCMPLE_OQSD; extern const fcml_cstring M_VCMPLE_OQSS; extern const fcml_cstring M_VCMPLESD; extern const fcml_cstring M_VCMPLESS; extern const fcml_cstring M_VCMPLT_OQSD; extern const fcml_cstring M_VCMPLT_OQSS; extern const fcml_cstring M_VCMPLTSD; extern const fcml_cstring M_VCMPLTSS; extern const fcml_cstring M_VCMPNEQ_OQSD; extern const fcml_cstring M_VCMPNEQ_OQSS; extern const fcml_cstring M_VCMPNEQ_OSSD; extern const fcml_cstring M_VCMPNEQ_OSSS; extern const fcml_cstring M_VCMPNEQSD; extern const fcml_cstring M_VCMPNEQSS; extern const fcml_cstring M_VCMPNEQ_USSD; extern const fcml_cstring M_VCMPNEQ_USSS; extern const fcml_cstring M_VCMPNGESD; extern const fcml_cstring M_VCMPNGESS; extern const fcml_cstring M_VCMPNGE_UQSD; extern const fcml_cstring M_VCMPNGE_UQSS; extern const fcml_cstring M_VCMPNGTSD; extern const fcml_cstring M_VCMPNGTSS; extern const fcml_cstring M_VCMPNGT_UQSD; extern const fcml_cstring M_VCMPNGT_UQSS; extern const fcml_cstring M_VCMPNLESD; extern const fcml_cstring M_VCMPNLESS; extern const fcml_cstring M_VCMPNLE_UQSD; extern const fcml_cstring M_VCMPNLE_UQSS; extern const fcml_cstring M_VCMPNLTSD; extern const fcml_cstring M_VCMPNLTSS; extern const fcml_cstring M_VCMPNLT_UQSD; extern const fcml_cstring M_VCMPNLT_UQSS; extern const fcml_cstring M_VCMPORDSD; extern const fcml_cstring M_VCMPORDSS; extern const fcml_cstring M_VCMPORD_SSD; extern const fcml_cstring M_VCMPORD_SSS; extern const fcml_cstring M_VCMPPD; extern const fcml_cstring M_VCMPPS; extern const fcml_cstring M_VCMPSD; extern const fcml_cstring M_VCMPSS; extern const fcml_cstring M_VCMPTRUESD; extern const fcml_cstring M_VCMPTRUESS; extern const fcml_cstring M_VCMPTRUE_USSD; extern const fcml_cstring M_VCMPTRUE_USSS; extern const fcml_cstring M_VCMPUNORDSD; extern const fcml_cstring M_VCMPUNORDSS; extern const fcml_cstring M_VCMPUNORD_SSD; extern const fcml_cstring M_VCMPUNORD_SSS; extern const fcml_cstring M_VCOMISD; extern const fcml_cstring M_VCOMISS; extern const fcml_cstring M_VCVTDQ2PD; extern const fcml_cstring M_VCVTDQ2PS; extern const fcml_cstring M_VCVTPD2DQ; extern const fcml_cstring M_VCVTPD2PS; extern const fcml_cstring M_VCVTPH2PS; extern const fcml_cstring M_VCVTPS2DQ; extern const fcml_cstring M_VCVTPS2PD; extern const fcml_cstring M_VCVTPS2PH; extern const fcml_cstring M_VCVTSD2SI; extern const fcml_cstring M_VCVTSD2SS; extern const fcml_cstring M_VCVTSI2SD; extern const fcml_cstring M_VCVTSI2SS; extern const fcml_cstring M_VCVTSS2SD; extern const fcml_cstring M_VCVTSS2SI; extern const fcml_cstring M_VCVTTPD2DQ; extern const fcml_cstring M_VCVTTPS2DQ; extern const fcml_cstring M_VCVTTSD2SI; extern const fcml_cstring M_VCVTTSS2SI; extern const fcml_cstring M_VDIVPD; extern const fcml_cstring M_VDIVPS; extern const fcml_cstring M_VDIVSD; extern const fcml_cstring M_VDIVSS; extern const fcml_cstring M_VDPPD; extern const fcml_cstring M_VDPPS; extern const fcml_cstring M_VERR; extern const fcml_cstring M_VERW; extern const fcml_cstring M_VEXTRACTF128; extern const fcml_cstring M_VEXTRACTI128; extern const fcml_cstring M_VEXTRACTPS; extern const fcml_cstring M_VFMADD132PD; extern const fcml_cstring M_VFMADD132PS; extern const fcml_cstring M_VFMADD132SD; extern const fcml_cstring M_VFMADD132SS; extern const fcml_cstring M_VFMADD213PD; extern const fcml_cstring M_VFMADD213PS; extern const fcml_cstring M_VFMADD213SD; extern const fcml_cstring M_VFMADD213SS; extern const fcml_cstring M_VFMADD231PD; extern const fcml_cstring M_VFMADD231PS; extern const fcml_cstring M_VFMADD231SD; extern const fcml_cstring M_VFMADD231SS; extern const fcml_cstring M_VFMADDPD; extern const fcml_cstring M_VFMADDPS; extern const fcml_cstring M_VFMADDSD; extern const fcml_cstring M_VFMADDSS; extern const fcml_cstring M_VFMADDSUB132PD; extern const fcml_cstring M_VFMADDSUB132PS; extern const fcml_cstring M_VFMADDSUB213PD; extern const fcml_cstring M_VFMADDSUB213PS; extern const fcml_cstring M_VFMADDSUB231PD; extern const fcml_cstring M_VFMADDSUB231PS; extern const fcml_cstring M_VFMADDSUBPD; extern const fcml_cstring M_VFMADDSUBPS; extern const fcml_cstring M_VFMSUB132PD; extern const fcml_cstring M_VFMSUB132PS; extern const fcml_cstring M_VFMSUB132SD; extern const fcml_cstring M_VFMSUB132SS; extern const fcml_cstring M_VFMSUB213PD; extern const fcml_cstring M_VFMSUB213PS; extern const fcml_cstring M_VFMSUB213SD; extern const fcml_cstring M_VFMSUB213SS; extern const fcml_cstring M_VFMSUB231PD; extern const fcml_cstring M_VFMSUB231PS; extern const fcml_cstring M_VFMSUB231SD; extern const fcml_cstring M_VFMSUB231SS; extern const fcml_cstring M_VFMSUBADD132PD; extern const fcml_cstring M_VFMSUBADD132PS; extern const fcml_cstring M_VFMSUBADD213PD; extern const fcml_cstring M_VFMSUBADD213PS; extern const fcml_cstring M_VFMSUBADD231PD; extern const fcml_cstring M_VFMSUBADD231PS; extern const fcml_cstring M_VFMSUBADDPD; extern const fcml_cstring M_VFMSUBADDPS; extern const fcml_cstring M_VFMSUBPD; extern const fcml_cstring M_VFMSUBPS; extern const fcml_cstring M_VFMSUBSD; extern const fcml_cstring M_VFMSUBSS; extern const fcml_cstring M_VFNMADD132PD; extern const fcml_cstring M_VFNMADD132PS; extern const fcml_cstring M_VFNMADD132SD; extern const fcml_cstring M_VFNMADD132SS; extern const fcml_cstring M_VFNMADD213PD; extern const fcml_cstring M_VFNMADD213PS; extern const fcml_cstring M_VFNMADD213SD; extern const fcml_cstring M_VFNMADD213SS; extern const fcml_cstring M_VFNMADD231PD; extern const fcml_cstring M_VFNMADD231PS; extern const fcml_cstring M_VFNMADD231SD; extern const fcml_cstring M_VFNMADD231SS; extern const fcml_cstring M_VFNMADDPD; extern const fcml_cstring M_VFNMADDPS; extern const fcml_cstring M_VFNMADDSD; extern const fcml_cstring M_VFNMADDSS; extern const fcml_cstring M_VFNMSUB132PD; extern const fcml_cstring M_VFNMSUB132PS; extern const fcml_cstring M_VFNMSUB132SD; extern const fcml_cstring M_VFNMSUB132SS; extern const fcml_cstring M_VFNMSUB213PD; extern const fcml_cstring M_VFNMSUB213PS; extern const fcml_cstring M_VFNMSUB213SD; extern const fcml_cstring M_VFNMSUB213SS; extern const fcml_cstring M_VFNMSUB231PD; extern const fcml_cstring M_VFNMSUB231PS; extern const fcml_cstring M_VFNMSUB231SD; extern const fcml_cstring M_VFNMSUB231SS; extern const fcml_cstring M_VFNMSUBPD; extern const fcml_cstring M_VFNMSUBPS; extern const fcml_cstring M_VFNMSUBSD; extern const fcml_cstring M_VFNMSUBSS; extern const fcml_cstring M_VFRCZPD; extern const fcml_cstring M_VFRCZPS; extern const fcml_cstring M_VFRCZSD; extern const fcml_cstring M_VFRCZSS; extern const fcml_cstring M_VGATHERDPD; extern const fcml_cstring M_VGATHERDPS; extern const fcml_cstring M_VGATHERQPD; extern const fcml_cstring M_VGATHERQPS; extern const fcml_cstring M_VHADDPD; extern const fcml_cstring M_VHADDPS; extern const fcml_cstring M_VHSUBPD; extern const fcml_cstring M_VHSUBPS; extern const fcml_cstring M_VINSERTF128; extern const fcml_cstring M_VINSERTI128; extern const fcml_cstring M_VINSERTPS; extern const fcml_cstring M_VLDDQU; extern const fcml_cstring M_VLDMXCSR; extern const fcml_cstring M_VMASKMOVDQU; extern const fcml_cstring M_VMASKMOVPD; extern const fcml_cstring M_VMASKMOVPS; extern const fcml_cstring M_VMAXPD; extern const fcml_cstring M_VMAXPS; extern const fcml_cstring M_VMAXSD; extern const fcml_cstring M_VMAXSS; extern const fcml_cstring M_VMCALL; extern const fcml_cstring M_VMCLEAR; extern const fcml_cstring M_VMFUNC; extern const fcml_cstring M_VMINPD; extern const fcml_cstring M_VMINPS; extern const fcml_cstring M_VMINSD; extern const fcml_cstring M_VMINSS; extern const fcml_cstring M_VMLAUNCH; extern const fcml_cstring M_VMLOAD; extern const fcml_cstring M_VMMCALL; extern const fcml_cstring M_VMOVAPD; extern const fcml_cstring M_VMOVAPS; extern const fcml_cstring M_VMOVD; extern const fcml_cstring M_VMOVDDUP; extern const fcml_cstring M_VMOVDQA; extern const fcml_cstring M_VMOVDQU; extern const fcml_cstring M_VMOVHLPS; extern const fcml_cstring M_VMOVHPD; extern const fcml_cstring M_VMOVHPS; extern const fcml_cstring M_VMOVLHPS; extern const fcml_cstring M_VMOVLPD; extern const fcml_cstring M_VMOVLPS; extern const fcml_cstring M_VMOVMSKPD; extern const fcml_cstring M_VMOVMSKPS; extern const fcml_cstring M_VMOVNTDQ; extern const fcml_cstring M_VMOVNTDQA; extern const fcml_cstring M_VMOVNTPD; extern const fcml_cstring M_VMOVNTPS; extern const fcml_cstring M_VMOVQ; extern const fcml_cstring M_VMOVSD; extern const fcml_cstring M_VMOVSHDUP; extern const fcml_cstring M_VMOVSLDUP; extern const fcml_cstring M_VMOVSS; extern const fcml_cstring M_VMOVUPD; extern const fcml_cstring M_VMOVUPS; extern const fcml_cstring M_VMPSADBW; extern const fcml_cstring M_VMPTRLD; extern const fcml_cstring M_VMPTRST; extern const fcml_cstring M_VMREAD; extern const fcml_cstring M_VMRESUME; extern const fcml_cstring M_VMRUN; extern const fcml_cstring M_VMSAVE; extern const fcml_cstring M_VMULPD; extern const fcml_cstring M_VMULPS; extern const fcml_cstring M_VMULSD; extern const fcml_cstring M_VMULSS; extern const fcml_cstring M_VMWRITE; extern const fcml_cstring M_VMXOFF; extern const fcml_cstring M_VMXON; extern const fcml_cstring M_VORPD; extern const fcml_cstring M_VORPS; extern const fcml_cstring M_VPABSB; extern const fcml_cstring M_VPABSD; extern const fcml_cstring M_VPABSW; extern const fcml_cstring M_VPACKSSDW; extern const fcml_cstring M_VPACKSSWB; extern const fcml_cstring M_VPACKUSDW; extern const fcml_cstring M_VPACKUSWB; extern const fcml_cstring M_VPADDB; extern const fcml_cstring M_VPADDD; extern const fcml_cstring M_VPADDQ; extern const fcml_cstring M_VPADDSB; extern const fcml_cstring M_VPADDSW; extern const fcml_cstring M_VPADDUSB; extern const fcml_cstring M_VPADDUSW; extern const fcml_cstring M_VPADDW; extern const fcml_cstring M_VPALIGNR; extern const fcml_cstring M_VPAND; extern const fcml_cstring M_VPANDN; extern const fcml_cstring M_VPAVGB; extern const fcml_cstring M_VPAVGW; extern const fcml_cstring M_VPBLENDD; extern const fcml_cstring M_VPBLENDVB; extern const fcml_cstring M_VPBLENDW; extern const fcml_cstring M_VPBROADCASTB; extern const fcml_cstring M_VPBROADCASTD; extern const fcml_cstring M_VPBROADCASTQ; extern const fcml_cstring M_VPBROADCASTW; extern const fcml_cstring M_VPCLMULQDQ; extern const fcml_cstring M_VPCMOV; extern const fcml_cstring M_VPCMPEQB; extern const fcml_cstring M_VPCMPEQD; extern const fcml_cstring M_VPCMPEQQ; extern const fcml_cstring M_VPCMPEQW; extern const fcml_cstring M_VPCMPESTRI; extern const fcml_cstring M_VPCMPESTRM; extern const fcml_cstring M_VPCMPGTB; extern const fcml_cstring M_VPCMPGTD; extern const fcml_cstring M_VPCMPGTQ; extern const fcml_cstring M_VPCMPGTW; extern const fcml_cstring M_VPCMPISTRI; extern const fcml_cstring M_VPCMPISTRM; extern const fcml_cstring M_VPCOMB; extern const fcml_cstring M_VPCOMD; extern const fcml_cstring M_VPCOMEQB; extern const fcml_cstring M_VPCOMEQD; extern const fcml_cstring M_VPCOMEQQ; extern const fcml_cstring M_VPCOMEQUB; extern const fcml_cstring M_VPCOMEQUD; extern const fcml_cstring M_VPCOMEQUQ; extern const fcml_cstring M_VPCOMEQUW; extern const fcml_cstring M_VPCOMEQW; extern const fcml_cstring M_VPCOMFALSEB; extern const fcml_cstring M_VPCOMFALSED; extern const fcml_cstring M_VPCOMFALSEQ; extern const fcml_cstring M_VPCOMFALSEUB; extern const fcml_cstring M_VPCOMFALSEUD; extern const fcml_cstring M_VPCOMFALSEUQ; extern const fcml_cstring M_VPCOMFALSEUW; extern const fcml_cstring M_VPCOMFALSEW; extern const fcml_cstring M_VPCOMGEB; extern const fcml_cstring M_VPCOMGED; extern const fcml_cstring M_VPCOMGEQ; extern const fcml_cstring M_VPCOMGEUB; extern const fcml_cstring M_VPCOMGEUD; extern const fcml_cstring M_VPCOMGEUQ; extern const fcml_cstring M_VPCOMGEUW; extern const fcml_cstring M_VPCOMGEW; extern const fcml_cstring M_VPCOMGTB; extern const fcml_cstring M_VPCOMGTD; extern const fcml_cstring M_VPCOMGTQ; extern const fcml_cstring M_VPCOMGTUB; extern const fcml_cstring M_VPCOMGTUD; extern const fcml_cstring M_VPCOMGTUQ; extern const fcml_cstring M_VPCOMGTUW; extern const fcml_cstring M_VPCOMGTW; extern const fcml_cstring M_VPCOMLEB; extern const fcml_cstring M_VPCOMLED; extern const fcml_cstring M_VPCOMLEQ; extern const fcml_cstring M_VPCOMLEUB; extern const fcml_cstring M_VPCOMLEUD; extern const fcml_cstring M_VPCOMLEUQ; extern const fcml_cstring M_VPCOMLEUW; extern const fcml_cstring M_VPCOMLEW; extern const fcml_cstring M_VPCOMLTB; extern const fcml_cstring M_VPCOMLTD; extern const fcml_cstring M_VPCOMLTQ; extern const fcml_cstring M_VPCOMLTUB; extern const fcml_cstring M_VPCOMLTUD; extern const fcml_cstring M_VPCOMLTUQ; extern const fcml_cstring M_VPCOMLTUW; extern const fcml_cstring M_VPCOMLTW; extern const fcml_cstring M_VPCOMNEQB; extern const fcml_cstring M_VPCOMNEQD; extern const fcml_cstring M_VPCOMNEQQ; extern const fcml_cstring M_VPCOMNEQUB; extern const fcml_cstring M_VPCOMNEQUD; extern const fcml_cstring M_VPCOMNEQUQ; extern const fcml_cstring M_VPCOMNEQUW; extern const fcml_cstring M_VPCOMNEQW; extern const fcml_cstring M_VPCOMQ; extern const fcml_cstring M_VPCOMTRUEB; extern const fcml_cstring M_VPCOMTRUED; extern const fcml_cstring M_VPCOMTRUEQ; extern const fcml_cstring M_VPCOMTRUEUB; extern const fcml_cstring M_VPCOMTRUEUD; extern const fcml_cstring M_VPCOMTRUEUQ; extern const fcml_cstring M_VPCOMTRUEUW; extern const fcml_cstring M_VPCOMTRUEW; extern const fcml_cstring M_VPCOMUB; extern const fcml_cstring M_VPCOMUD; extern const fcml_cstring M_VPCOMUQ; extern const fcml_cstring M_VPCOMUW; extern const fcml_cstring M_VPCOMW; extern const fcml_cstring M_VPERM2F128; extern const fcml_cstring M_VPERM2I128; extern const fcml_cstring M_VPERMD; extern const fcml_cstring M_VPERMIL2PD; extern const fcml_cstring M_VPERMIL2PS; extern const fcml_cstring M_VPERMILPD; extern const fcml_cstring M_VPERMILPS; extern const fcml_cstring M_VPERMPD; extern const fcml_cstring M_VPERMPS; extern const fcml_cstring M_VPERMQ; extern const fcml_cstring M_VPEXTRB; extern const fcml_cstring M_VPEXTRD; extern const fcml_cstring M_VPEXTRQ; extern const fcml_cstring M_VPEXTRW; extern const fcml_cstring M_VPGATHERDD; extern const fcml_cstring M_VPGATHERDQ; extern const fcml_cstring M_VPGATHERQD; extern const fcml_cstring M_VPGATHERQQ; extern const fcml_cstring M_VPHADDBD; extern const fcml_cstring M_VPHADDBQ; extern const fcml_cstring M_VPHADDBW; extern const fcml_cstring M_VPHADDD; extern const fcml_cstring M_VPHADDDQ; extern const fcml_cstring M_VPHADDSW; extern const fcml_cstring M_VPHADDUBD; extern const fcml_cstring M_VPHADDUBQ; extern const fcml_cstring M_VPHADDUBW; extern const fcml_cstring M_VPHADDUDQ; extern const fcml_cstring M_VPHADDUWD; extern const fcml_cstring M_VPHADDUWQ; extern const fcml_cstring M_VPHADDW; extern const fcml_cstring M_VPHADDWD; extern const fcml_cstring M_VPHADDWQ; extern const fcml_cstring M_VPHMINPOSUW; extern const fcml_cstring M_VPHSUBBW; extern const fcml_cstring M_VPHSUBD; extern const fcml_cstring M_VPHSUBDQ; extern const fcml_cstring M_VPHSUBSW; extern const fcml_cstring M_VPHSUBW; extern const fcml_cstring M_VPHSUBWD; extern const fcml_cstring M_VPINSRB; extern const fcml_cstring M_VPINSRD; extern const fcml_cstring M_VPINSRQ; extern const fcml_cstring M_VPINSRW; extern const fcml_cstring M_VPMACSDD; extern const fcml_cstring M_VPMACSDQH; extern const fcml_cstring M_VPMACSDQL; extern const fcml_cstring M_VPMACSSDD; extern const fcml_cstring M_VPMACSSDQH; extern const fcml_cstring M_VPMACSSDQL; extern const fcml_cstring M_VPMACSSWD; extern const fcml_cstring M_VPMACSSWW; extern const fcml_cstring M_VPMACSWD; extern const fcml_cstring M_VPMACSWW; extern const fcml_cstring M_VPMADCSSWD; extern const fcml_cstring M_VPMADCSWD; extern const fcml_cstring M_VPMADDUBSW; extern const fcml_cstring M_VPMADDWD; extern const fcml_cstring M_VPMASKMOV; extern const fcml_cstring M_VPMASKMOVD; extern const fcml_cstring M_VPMASKMOVQ; extern const fcml_cstring M_VPMAXSB; extern const fcml_cstring M_VPMAXSD; extern const fcml_cstring M_VPMAXSW; extern const fcml_cstring M_VPMAXUB; extern const fcml_cstring M_VPMAXUD; extern const fcml_cstring M_VPMAXUW; extern const fcml_cstring M_VPMINSB; extern const fcml_cstring M_VPMINSD; extern const fcml_cstring M_VPMINSW; extern const fcml_cstring M_VPMINUB; extern const fcml_cstring M_VPMINUD; extern const fcml_cstring M_VPMINUW; extern const fcml_cstring M_VPMOVMSKB; extern const fcml_cstring M_VPMOVSXBD; extern const fcml_cstring M_VPMOVSXBQ; extern const fcml_cstring M_VPMOVSXBW; extern const fcml_cstring M_VPMOVSXDQ; extern const fcml_cstring M_VPMOVSXWD; extern const fcml_cstring M_VPMOVSXWQ; extern const fcml_cstring M_VPMOVZXBD; extern const fcml_cstring M_VPMOVZXBQ; extern const fcml_cstring M_VPMOVZXBW; extern const fcml_cstring M_VPMOVZXDQ; extern const fcml_cstring M_VPMOVZXWD; extern const fcml_cstring M_VPMOVZXWQ; extern const fcml_cstring M_VPMULDQ; extern const fcml_cstring M_VPMULHRSW; extern const fcml_cstring M_VPMULHUW; extern const fcml_cstring M_VPMULHW; extern const fcml_cstring M_VPMULLD; extern const fcml_cstring M_VPMULLW; extern const fcml_cstring M_VPMULUDQ; extern const fcml_cstring M_VPOR; extern const fcml_cstring M_VPPERM; extern const fcml_cstring M_VPROTB; extern const fcml_cstring M_VPROTD; extern const fcml_cstring M_VPROTQ; extern const fcml_cstring M_VPROTW; extern const fcml_cstring M_VPSADBW; extern const fcml_cstring M_VPSHAB; extern const fcml_cstring M_VPSHAD; extern const fcml_cstring M_VPSHAQ; extern const fcml_cstring M_VPSHAW; extern const fcml_cstring M_VPSHLB; extern const fcml_cstring M_VPSHLD; extern const fcml_cstring M_VPSHLQ; extern const fcml_cstring M_VPSHLW; extern const fcml_cstring M_VPSHUFB; extern const fcml_cstring M_VPSHUFD; extern const fcml_cstring M_VPSHUFHW; extern const fcml_cstring M_VPSHUFLW; extern const fcml_cstring M_VPSIGNB; extern const fcml_cstring M_VPSIGND; extern const fcml_cstring M_VPSIGNW; extern const fcml_cstring M_VPSLLD; extern const fcml_cstring M_VPSLLDQ; extern const fcml_cstring M_VPSLLQ; extern const fcml_cstring M_VPSLLVD; extern const fcml_cstring M_VPSLLVQ; extern const fcml_cstring M_VPSLLW; extern const fcml_cstring M_VPSRAD; extern const fcml_cstring M_VPSRAVD; extern const fcml_cstring M_VPSRAW; extern const fcml_cstring M_VPSRLD; extern const fcml_cstring M_VPSRLDQ; extern const fcml_cstring M_VPSRLQ; extern const fcml_cstring M_VPSRLVD; extern const fcml_cstring M_VPSRLVQ; extern const fcml_cstring M_VPSRLW; extern const fcml_cstring M_VPSUBB; extern const fcml_cstring M_VPSUBD; extern const fcml_cstring M_VPSUBQ; extern const fcml_cstring M_VPSUBSB; extern const fcml_cstring M_VPSUBSW; extern const fcml_cstring M_VPSUBUSB; extern const fcml_cstring M_VPSUBUSW; extern const fcml_cstring M_VPSUBW; extern const fcml_cstring M_VPTEST; extern const fcml_cstring M_VPUNPCKHBW; extern const fcml_cstring M_VPUNPCKHDQ; extern const fcml_cstring M_VPUNPCKHQDQ; extern const fcml_cstring M_VPUNPCKHWD; extern const fcml_cstring M_VPUNPCKLBW; extern const fcml_cstring M_VPUNPCKLDQ; extern const fcml_cstring M_VPUNPCKLQDQ; extern const fcml_cstring M_VPUNPCKLWD; extern const fcml_cstring M_VPXOR; extern const fcml_cstring M_VRCPPS; extern const fcml_cstring M_VRCPSS; extern const fcml_cstring M_VROUNDPD; extern const fcml_cstring M_VROUNDPS; extern const fcml_cstring M_VROUNDSD; extern const fcml_cstring M_VROUNDSS; extern const fcml_cstring M_VRSQRTPS; extern const fcml_cstring M_VRSQRTSS; extern const fcml_cstring M_VSHUFPD; extern const fcml_cstring M_VSHUFPS; extern const fcml_cstring M_VSQRTPD; extern const fcml_cstring M_VSQRTPS; extern const fcml_cstring M_VSQRTSD; extern const fcml_cstring M_VSQRTSS; extern const fcml_cstring M_VSTMXCSR; extern const fcml_cstring M_VSUBPD; extern const fcml_cstring M_VSUBPS; extern const fcml_cstring M_VSUBSD; extern const fcml_cstring M_VSUBSS; extern const fcml_cstring M_VTESTPD; extern const fcml_cstring M_VTESTPS; extern const fcml_cstring M_VUCOMISD; extern const fcml_cstring M_VUCOMISS; extern const fcml_cstring M_VUNPCKHPD; extern const fcml_cstring M_VUNPCKHPS; extern const fcml_cstring M_VUNPCKLPD; extern const fcml_cstring M_VUNPCKLPS; extern const fcml_cstring M_VXORPD; extern const fcml_cstring M_VXORPS; extern const fcml_cstring M_VZEROALL; extern const fcml_cstring M_VZEROUPPER; extern const fcml_cstring M_WAIT; extern const fcml_cstring M_WBINVD; extern const fcml_cstring M_WRFSBASE; extern const fcml_cstring M_WRGSBASE; extern const fcml_cstring M_WRMSR; extern const fcml_cstring M_XABORT; extern const fcml_cstring M_XADD; extern const fcml_cstring M_XBEGIN; extern const fcml_cstring M_XCHG; extern const fcml_cstring M_XEND; extern const fcml_cstring M_XGETBV; extern const fcml_cstring M_XLAT; extern const fcml_cstring M_XLATB; extern const fcml_cstring M_XOR; extern const fcml_cstring M_XORPD; extern const fcml_cstring M_XORPS; extern const fcml_cstring M_XRSTOR; extern const fcml_cstring M_XRSTOR64; extern const fcml_cstring M_XSAVE; extern const fcml_cstring M_XSAVE64; extern const fcml_cstring M_XSAVEOPT; extern const fcml_cstring M_XSAVEOPT64; extern const fcml_cstring M_XSETBV; extern const fcml_cstring M_XTEST; } } #endif /* FCML_INTEL_MNEMONICS_HPP_ */ fcml-1.1.1/NEWS0000644000175000017500000000006112560745216010060 00000000000000This is a first official release of the project. fcml-1.1.1/test-driver0000755000175000017500000001104012560745327011561 00000000000000#! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2013-07-13.22; # UTC # Copyright (C) 2011-2014 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 2, 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 . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <$log_file 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then tweaked_estatus=1 else tweaked_estatus=$estatus fi case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report the test outcome and exit status in the logs, so that one can # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). echo "$res $test_name (exit status: $estatus)" >>$log_file # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: fcml-1.1.1/config.guess0000755000175000017500000012536012560745327011716 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-03-04' # 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 # 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 . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || \ echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` machine=${arch}${endian}-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case "${UNAME_MACHINE_ARCH}" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; e2k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) eval $set_cc_for_build X86_64_ABI= # If there is a compiler, see if it is configured for 32-bit objects. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_X32 >/dev/null then X86_64_ABI=x32 fi fi echo x86_64-unknown-linux-gnu${X86_64_ABI} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # 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 # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: fcml-1.1.1/ylwrap0000755000175000017500000001531212560745330010627 00000000000000#! /bin/sh # ylwrap - wrapper for lex/yacc invocations. scriptversion=2013-01-12.17; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # Written by Tom Tromey . # # 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, 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 . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . get_dirname () { case $1 in */*|*\\*) printf '%s\n' "$1" | sed -e 's|\([\\/]\)[^\\/]*$|\1|';; # Otherwise, we want the empty string (not "."). esac } # guard FILE # ---------- # The CPP macro used to guard inclusion of FILE. guard () { printf '%s\n' "$1" \ | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g' \ -e 's/__*/_/g' } # quote_for_sed [STRING] # ---------------------- # Return STRING (or stdin) quoted to be used as a sed pattern. quote_for_sed () { case $# in 0) cat;; 1) printf '%s\n' "$1";; esac \ | sed -e 's|[][\\.*]|\\&|g' } case "$1" in '') echo "$0: No files given. Try '$0 --help' for more information." 1>&2 exit 1 ;; --basedir) basedir=$2 shift 2 ;; -h|--h*) cat <<\EOF Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... Wrapper for lex/yacc invocations, renaming files as desired. INPUT is the input file OUTPUT is one file PROG generates DESIRED is the file we actually want instead of OUTPUT PROGRAM is program to run ARGS are passed to PROG Any number of OUTPUT,DESIRED pairs may be used. Report bugs to . EOF exit $? ;; -v|--v*) echo "ylwrap $scriptversion" exit $? ;; esac # The input. input=$1 shift # We'll later need for a correct munging of "#line" directives. input_sub_rx=`get_dirname "$input" | quote_for_sed` case $input in [\\/]* | ?:[\\/]*) # Absolute path; do nothing. ;; *) # Relative path. Make it absolute. input=`pwd`/$input ;; esac input_rx=`get_dirname "$input" | quote_for_sed` # Since DOS filename conventions don't allow two dots, # the DOS version of Bison writes out y_tab.c instead of y.tab.c # and y_tab.h instead of y.tab.h. Test to see if this is the case. y_tab_nodot=false if test -f y_tab.c || test -f y_tab.h; then y_tab_nodot=true fi # The parser itself, the first file, is the destination of the .y.c # rule in the Makefile. parser=$1 # A sed program to s/FROM/TO/g for all the FROM/TO so that, for # instance, we rename #include "y.tab.h" into #include "parse.h" # during the conversion from y.tab.c to parse.c. sed_fix_filenames= # Also rename header guards, as Bison 2.7 for instance uses its header # guard in its implementation file. sed_fix_header_guards= while test $# -ne 0; do if test x"$1" = x"--"; then shift break fi from=$1 # Handle y_tab.c and y_tab.h output by DOS if $y_tab_nodot; then case $from in "y.tab.c") from=y_tab.c;; "y.tab.h") from=y_tab.h;; esac fi shift to=$1 shift sed_fix_filenames="${sed_fix_filenames}s|"`quote_for_sed "$from"`"|$to|g;" sed_fix_header_guards="${sed_fix_header_guards}s|"`guard "$from"`"|"`guard "$to"`"|g;" done # The program to run. prog=$1 shift # Make any relative path in $prog absolute. case $prog in [\\/]* | ?:[\\/]*) ;; *[\\/]*) prog=`pwd`/$prog ;; esac dirname=ylwrap$$ do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 mkdir $dirname || exit 1 cd $dirname case $# in 0) "$prog" "$input" ;; *) "$prog" "$@" "$input" ;; esac ret=$? if test $ret -eq 0; then for from in * do to=`printf '%s\n' "$from" | sed "$sed_fix_filenames"` if test -f "$from"; then # If $2 is an absolute path name, then just use that, # otherwise prepend '../'. case $to in [\\/]* | ?:[\\/]*) target=$to;; *) target=../$to;; esac # Do not overwrite unchanged header files to avoid useless # recompilations. Always update the parser itself: it is the # destination of the .y.c rule in the Makefile. Divert the # output of all other files to a temporary file so we can # compare them to existing versions. if test $from != $parser; then realtarget=$target target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'` fi # Munge "#line" or "#" directives. Don't let the resulting # debug information point at an absolute srcdir. Use the real # output file name, not yy.lex.c for instance. Adjust the # include guards too. sed -e "/^#/!b" \ -e "s|$input_rx|$input_sub_rx|" \ -e "$sed_fix_filenames" \ -e "$sed_fix_header_guards" \ "$from" >"$target" || ret=$? # Check whether files must be updated. if test "$from" != "$parser"; then if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then echo "$to is unchanged" rm -f "$target" else echo "updating $to" mv -f "$target" "$realtarget" fi fi else # A missing file is only an error for the parser. This is a # blatant hack to let us support using "yacc -d". If -d is not # specified, don't fail when the header file is "missing". if test "$from" = "$parser"; then ret=1 fi fi done fi # Remove the directory. cd .. rm -rf $dirname exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: fcml-1.1.1/depcomp0000755000175000017500000005601612560745327010754 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2014 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 2, 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 . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: fcml-1.1.1/aclocal.m40000644000175000017500000012556012561443446011236 00000000000000# generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file 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. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_COND_IF -*- Autoconf -*- # Copyright (C) 2008-2014 Free Software Foundation, Inc. # # This file 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. # _AM_COND_IF # _AM_COND_ELSE # _AM_COND_ENDIF # -------------- # These macros are only used for tracing. m4_define([_AM_COND_IF]) m4_define([_AM_COND_ELSE]) m4_define([_AM_COND_ENDIF]) # AM_COND_IF(COND, [IF-TRUE], [IF-FALSE]) # --------------------------------------- # If the shell condition COND is true, execute IF-TRUE, otherwise execute # IF-FALSE. Allow automake to learn about conditional instantiating macros # (the AC_CONFIG_FOOS). AC_DEFUN([AM_COND_IF], [m4_ifndef([_AM_COND_VALUE_$1], [m4_fatal([$0: no such condition "$1"])])dnl _AM_COND_IF([$1])dnl if test -z "$$1_TRUE"; then : m4_n([$2])[]dnl m4_ifval([$3], [_AM_COND_ELSE([$1])dnl else $3 ])dnl _AM_COND_ENDIF([$1])dnl fi[]dnl ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file 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. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file 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. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Copyright (C) 1998-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_LEX # ----------- # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a # "missing" invocation, for better error output. AC_DEFUN([AM_PROG_LEX], [AC_PREREQ([2.50])dnl AC_REQUIRE([AM_MISSING_HAS_RUN])dnl AC_REQUIRE([AC_PROG_LEX])dnl if test "$LEX" = :; then LEX=${am_missing_run}flex fi]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file 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. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file 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. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file 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. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file 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. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) fcml-1.1.1/Makefile.am0000644000175000017500000000515312560745216011424 00000000000000 ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = win32/dist.bat \ win32/vs2008/fcml/fcml-check/fcml-check.vcproj \ win32/vs2008/fcml/fcml-check-cpp/fcml-check-cpp.vcproj \ win32/vs2008/fcml/fcml.sln \ win32/vs2008/fcml/fcml/dllmain.c \ win32/vs2008/fcml/fcml/fcml.def \ win32/vs2008/fcml/fcml/fcml.rc \ win32/vs2008/fcml/fcml/fcml.vcproj \ win32/vs2008/fcml/fcml/resource.h \ win32/vs2008/fcml/fcml/resource1.h \ win32/vs2008/fcml/examples/hsdis/dllmain.cpp \ win32/vs2008/fcml/examples/hsdis/hsdis.def \ win32/vs2008/fcml/examples/hsdis/hsdis.rc \ 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 \ win32/vs2010/fcml/fcml-check-cpp/fcml-check-cpp.vcxproj.filters \ win32/vs2010/fcml/fcml.sln \ win32/vs2010/fcml/fcml/dllmain.c \ win32/vs2010/fcml/fcml/fcml.def \ win32/vs2010/fcml/fcml/fcml.rc \ win32/vs2010/fcml/fcml/fcml.vcxproj \ win32/vs2010/fcml/fcml/fcml.vcxproj.filters \ win32/vs2010/fcml/fcml/resource.h \ win32/vs2010/fcml/fcml/resource1.h \ win32/vs2010/fcml/examples/hsdis/dllmain.cpp \ win32/vs2010/fcml/examples/hsdis/hsdis.def \ win32/vs2010/fcml/examples/hsdis/hsdis.rc \ win32/vs2010/fcml/examples/hsdis/resource.h \ 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 \ win32/vs2013/fcml/fcml-check-cpp/fcml-check-cpp.vcxproj.filters \ win32/vs2013/fcml/fcml.sln \ win32/vs2013/fcml/fcml/dllmain.c \ win32/vs2013/fcml/fcml/fcml.def \ win32/vs2013/fcml/fcml/fcml.rc \ win32/vs2013/fcml/fcml/fcml.vcxproj \ win32/vs2013/fcml/fcml/fcml.vcxproj.filters \ win32/vs2013/fcml/fcml/resource.h \ win32/vs2013/fcml/fcml/resource1.h \ win32/vs2013/fcml/examples/hsdis/dllmain.cpp \ win32/vs2013/fcml/examples/hsdis/hsdis.def \ win32/vs2013/fcml/examples/hsdis/hsdis.rc \ win32/vs2013/fcml/examples/hsdis/resource.h \ 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 if HAVE_DOXYGEN DOXYDIR = docs/doxygen endif SUBDIRS = include src check example $(DOXYDIR) fcml-1.1.1/ChangeLog0000644000175000017500000000120012561462422011123 0000000000000010.06.2014 (1.0.0) - First official release. 03.02.2015 (1.1.0) - Wrapper for C++ language. - Some minor fixes in unit tests. - Multi-pass assembler tests could have failed on some systems due to a bug. - Several missing 'extern "C"' declarations added. - 'dist' build targed has been fixed. - pkg-config support. - Lexer generated using newer version of flex. 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. fcml-1.1.1/INSTALL0000644000175000017500000003660512560745216010427 00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. fcml-1.1.1/m4/0000755000175000017500000000000012561462630007761 500000000000000fcml-1.1.1/m4/lt~obsolete.m40000644000175000017500000001377412560745320012530 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software # Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file 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. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) fcml-1.1.1/m4/libtool.m40000644000175000017500000112570012560745320011614 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file 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. m4_define([_LT_COPYING], [dnl # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool 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 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool 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 . ]) # serial 58 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi # Handle Gentoo/FreeBSD as it was Linux case $host_vendor in gentoo) version_type=linux ;; *) version_type=freebsd-$objformat ;; esac case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; linux) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' need_lib_prefix=no need_version=no ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS fcml-1.1.1/m4/ltsugar.m40000644000175000017500000001044012560745320011622 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) fcml-1.1.1/m4/ltoptions.m40000644000175000017500000003426212560745320012204 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) fcml-1.1.1/m4/ltversion.m40000644000175000017500000000127312560745320012172 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file 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. # @configure_input@ # serial 4179 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.6]) m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) fcml-1.1.1/win32/0000755000175000017500000000000012561462630010403 500000000000000fcml-1.1.1/win32/vs2013/0000755000175000017500000000000012561462630011341 500000000000000fcml-1.1.1/win32/vs2013/fcml/0000755000175000017500000000000012561462631012263 500000000000000fcml-1.1.1/win32/vs2013/fcml/fcml.sln0000644000175000017500000001611212560745216013645 00000000000000 Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Express 2013 for Windows Desktop VisualStudioVersion = 12.0.21005.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{BBE0AA04-8E2A-4ECC-BB7E-3541022740EC}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fcml", "fcml\fcml.vcxproj", "{759BCBFA-3A75-47D2-8DF3-8440D8E9C752}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fcml-check", "fcml-check\fcml-check.vcxproj", "{73008BA6-43CF-41C8-8C49-B60D8DEDC069}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hsdis", "examples\hsdis\hsdis.vcxproj", "{65E5C6B1-F5A6-47AA-BDA3-E718A255D900}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fcml-check-cpp", "fcml-check-cpp\fcml-check-cpp.vcxproj", "{8BBBB021-AF54-45B5-B463-9E0C318E71E3}" ProjectSection(ProjectDependencies) = postProject {759BCBFA-3A75-47D2-8DF3-8440D8E9C752} = {759BCBFA-3A75-47D2-8DF3-8440D8E9C752} EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug-dll|Win32 = Debug-dll|Win32 Debug-dll|x64 = Debug-dll|x64 Debug-lib|Win32 = Debug-lib|Win32 Debug-lib|x64 = Debug-lib|x64 Release-dll|Win32 = Release-dll|Win32 Release-dll|x64 = Release-dll|x64 Release-lib|Win32 = Release-lib|Win32 Release-lib|x64 = Release-lib|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-dll|Win32.Build.0 = Debug-dll|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-dll|x64.ActiveCfg = Debug-dll|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-dll|x64.Build.0 = Debug-dll|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-lib|Win32.ActiveCfg = Debug-lib|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-lib|Win32.Build.0 = Debug-lib|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-lib|x64.ActiveCfg = Debug-lib|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-lib|x64.Build.0 = Debug-lib|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-dll|Win32.ActiveCfg = Release-dll|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-dll|Win32.Build.0 = Release-dll|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-dll|x64.ActiveCfg = Release-dll|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-dll|x64.Build.0 = Release-dll|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-lib|Win32.ActiveCfg = Release-lib|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-lib|Win32.Build.0 = Release-lib|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-lib|x64.ActiveCfg = Release-lib|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-lib|x64.Build.0 = Release-lib|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-dll|Win32.Build.0 = Debug-dll|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-dll|x64.ActiveCfg = Debug-dll|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-dll|x64.Build.0 = Debug-dll|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-lib|Win32.ActiveCfg = Debug-lib|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-lib|Win32.Build.0 = Debug-lib|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-lib|x64.ActiveCfg = Debug-lib|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-lib|x64.Build.0 = Debug-lib|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-dll|Win32.ActiveCfg = Release-dll|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-dll|Win32.Build.0 = Release-dll|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-dll|x64.ActiveCfg = Release-dll|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-dll|x64.Build.0 = Release-dll|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-lib|Win32.ActiveCfg = Release-lib|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-lib|Win32.Build.0 = Release-lib|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-lib|x64.ActiveCfg = Release-lib|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-lib|x64.Build.0 = Release-lib|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-dll|Win32.Build.0 = Debug-dll|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-dll|x64.ActiveCfg = Debug-dll|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-dll|x64.Build.0 = Debug-dll|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-lib|Win32.ActiveCfg = Debug-lib|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-lib|Win32.Build.0 = Debug-lib|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-lib|x64.ActiveCfg = Debug-lib|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-lib|x64.Build.0 = Debug-lib|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-dll|Win32.ActiveCfg = Release-dll|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-dll|Win32.Build.0 = Release-dll|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-dll|x64.ActiveCfg = Release-dll|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-dll|x64.Build.0 = Release-dll|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-lib|Win32.ActiveCfg = Release-lib|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-lib|Win32.Build.0 = Release-lib|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-lib|x64.ActiveCfg = Release-lib|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-lib|x64.Build.0 = Release-lib|x64 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-dll|Win32.Build.0 = Debug-dll|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-dll|x64.ActiveCfg = Debug-dll|x64 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-dll|x64.Build.0 = Debug-dll|x64 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-lib|Win32.ActiveCfg = Debug-lib|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-lib|Win32.Build.0 = Debug-lib|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-lib|x64.ActiveCfg = Debug-lib|x64 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-lib|x64.Build.0 = Debug-lib|x64 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-dll|Win32.ActiveCfg = Release-dll|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-dll|Win32.Build.0 = Release-dll|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-dll|x64.ActiveCfg = Release-dll|x64 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-dll|x64.Build.0 = Release-dll|x64 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-lib|Win32.ActiveCfg = Release-lib|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-lib|Win32.Build.0 = Release-lib|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-lib|x64.ActiveCfg = Release-lib|x64 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-lib|x64.Build.0 = Release-lib|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {65E5C6B1-F5A6-47AA-BDA3-E718A255D900} = {BBE0AA04-8E2A-4ECC-BB7E-3541022740EC} EndGlobalSection EndGlobal fcml-1.1.1/win32/vs2013/fcml/fcml-check/0000755000175000017500000000000012561462631014257 500000000000000fcml-1.1.1/win32/vs2013/fcml/fcml-check/fcml-check.vcxproj.filters0000644000175000017500000002241612560745216021266 00000000000000 {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hpp;hxx;hm;inl;inc;xsd {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav {d70bc9ff-c281-4fb2-a465-f3e52f50857f} Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files stf Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files stf Source Files fcml-1.1.1/win32/vs2013/fcml/fcml-check/fcml-check.vcxproj0000644000175000017500000005451012560745216017617 00000000000000 Debug-dll Win32 Debug-dll x64 Debug-lib Win32 Debug-lib x64 Release-dll Win32 Release-dll x64 Release-lib Win32 Release-lib x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069} fcmlcheck Win32Proj Application v120 Application v120 Application Unicode true v120 Application Unicode v120 Application v120 Application v120 Application Unicode true v120 Application Unicode v120 <_ProjectFileVersion>10.0.40219.1 $(SolutionDir)$(Configuration)\ $(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ $(SolutionDir)$(Configuration)\ $(Configuration)\ false $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ false $(SolutionDir)$(Configuration)\ $(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ $(SolutionDir)$(Configuration)\ $(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset Disabled ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;LIBFCML_DLL_IMPORT;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL Level3 EditAndContinue CompileAsCpp true Console MachineX86 X64 Disabled ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;LIBFCML_DLL_IMPORT;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL Level3 ProgramDatabase CompileAsCpp true Console MachineX64 MaxSpeed true ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;LIBFCML_DLL_IMPORT;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 ProgramDatabase CompileAsCpp true Console true true MachineX86 X64 MaxSpeed true ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;LIBFCML_DLL_IMPORT;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 ProgramDatabase CompileAsCpp true Console true true MachineX64 ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp X64 ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp MachineX64 ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp X64 ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp MachineX64 {759bcbfa-3a75-47d2-8df3-8440d8e9c752} false fcml-1.1.1/win32/vs2013/fcml/fcml/0000755000175000017500000000000012561462631013204 500000000000000fcml-1.1.1/win32/vs2013/fcml/fcml/dllmain.c0000644000175000017500000000042012560745216014706 00000000000000#include BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } fcml-1.1.1/win32/vs2013/fcml/fcml/fcml.vcxproj0000644000175000017500000007570312560745216015500 00000000000000 Debug-dll Win32 Debug-dll x64 Debug-lib Win32 Debug-lib x64 Release-dll Win32 Release-dll x64 Release-lib Win32 Release-lib x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752} fcml Win32Proj StaticLibrary NotSet true v120 StaticLibrary NotSet true v120 DynamicLibrary NotSet true v120 DynamicLibrary NotSet v120 StaticLibrary NotSet true v120 StaticLibrary NotSet true v120 DynamicLibrary NotSet true v120 DynamicLibrary NotSet v120 <_ProjectFileVersion>10.0.40219.1 $(SolutionDir)$(Configuration)\ $(Configuration)\ true $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ true $(SolutionDir)$(Configuration)\ $(Configuration)\ false $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ false $(SolutionDir)$(Configuration)\ $(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ $(SolutionDir)$(Configuration)\ $(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset Disabled ..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL true Level3 EditAndContinue CompileAsCpp 4005;4996;4018;%(DisableSpecificWarnings) fcml.def true Windows MachineX86 mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformTarget) mkdir $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) copy $(TargetDir)\$(TargetName).lib $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) X64 Disabled ..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL true Level3 ProgramDatabase CompileAsCpp 4005;4996;4018;%(DisableSpecificWarnings) fcml.def true Windows MachineX64 mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformTarget) mkdir $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) copy $(TargetDir)\$(TargetName).lib $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) MaxSpeed true ..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 ProgramDatabase CompileAsCpp 4005;4996;4018;%(DisableSpecificWarnings) fcml.def true Windows true true MachineX86 mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformTarget) mkdir $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) copy $(TargetDir)\$(TargetName).lib $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) X64 MaxSpeed true ..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 ProgramDatabase CompileAsCpp 4005;4996;4018;%(DisableSpecificWarnings) fcml.def true Windows true true MachineX64 mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformTarget) mkdir $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) copy $(TargetDir)\$(TargetName).lib $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) MaxSpeed true ..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) MultiThreaded true Level3 ProgramDatabase CompileAsCpp 4005;4996;4018;%(DisableSpecificWarnings) MachineX86 mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformTarget) mkdir $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) X64 MaxSpeed true ..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) MultiThreaded true Level3 ProgramDatabase CompileAsCpp 4005;4996;4018;%(DisableSpecificWarnings) mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformTarget) mkdir $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) Disabled false ..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) true Default MultiThreadedDebug true Level3 ProgramDatabase CompileAsCpp 4005;4996;4018;%(DisableSpecificWarnings) MachineX86 mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformTarget) mkdir $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) X64 Disabled false ..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) true Default MultiThreadedDebug true Level3 ProgramDatabase CompileAsCpp 4005;4996;4018;%(DisableSpecificWarnings) mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformTarget) mkdir $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformTarget)\$(ConfigurationName) false false false false false false false false fcml-1.1.1/win32/vs2013/fcml/fcml/fcml.vcxproj.filters0000644000175000017500000003041412560745216017135 00000000000000 {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {eaa5753f-598d-455b-877e-1b77749f4997} {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hpp;hxx;hm;inl;inc;xsd {71e56462-a75b-4a81-90c4-f7650c4b5127} {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav {2e966e01-d0da-4627-8fb4-a592544477be} Source Files Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Header Files Header Files Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Resource Files Def fcml-1.1.1/win32/vs2013/fcml/fcml/fcml.def0000644000175000017500000001125712560745216014535 00000000000000LIBRARY "fcml" EXPORTS fcml_fn_env_register_memory_alloc_handler fcml_fn_env_register_memory_free_handler fcml_fn_env_register_memory_free_handler fcml_fn_dialect_init_gas fcml_fn_dialect_init_intel fcml_fn_dialect_free fcml_fn_assemble fcml_fn_assembler_free fcml_fn_assembler_init fcml_fn_assembler_result_free fcml_fn_assembler_result_prepare fcml_fn_assembler_instruction_free fcml_fn_assembler_instruction_detach fcml_fn_lag_assemble fcml_fn_lag_assembler_result_prepare fcml_fn_lag_assembler_result_free fcml_fn_disassemble fcml_fn_disassembler_free fcml_fn_disassembler_init fcml_fn_disassembler_result_free fcml_fn_disassembler_result_prepare fcml_fn_parse fcml_fn_parser_result_free fcml_fn_parser_result_prepare fcml_fn_render fcml_fn_symbol_alloc fcml_fn_symbol_free fcml_fn_symbol_table_alloc fcml_fn_symbol_add_raw fcml_fn_symbol_add fcml_fn_symbol_remove fcml_fn_symbol_get fcml_fn_symbol_remove_all fcml_fn_symbol_table_free fcml_fn_asm_default_instruction_chooser fcml_fn_asm_no_instruction_chooser fcml_fn_asm_default_optimizer fcml_fn_cu_add_operand_hints fcml_fn_cu_clone_instruction fcml_fn_cu_free_instruction fcml_fn_cu_operand_addr_b_disp_16 fcml_fn_cu_operand_addr_b_disp_32 fcml_fn_cu_operand_addr_b_disp_64 fcml_fn_cu_operand_addr_b_disp_8 fcml_fn_cu_operand_addr_bis_disp_32 fcml_fn_cu_operand_addr_bis_disp_64 fcml_fn_cu_operand_addr_bis_disp_8 fcml_fn_cu_operand_addr_disp_16 fcml_fn_cu_operand_addr_disp_32 fcml_fn_cu_operand_addr_disp_64 fcml_fn_cu_operand_addr_far_pointer_offset16 fcml_fn_cu_operand_addr_far_pointer_offset32 fcml_fn_cu_operand_addr_is_disp_32 fcml_fn_cu_operand_addr_is_disp_64 fcml_fn_cu_operand_addr_is_disp_8 fcml_fn_cu_operand_addr_offset_16 fcml_fn_cu_operand_addr_offset_32 fcml_fn_cu_operand_addr_offset_abs_64 fcml_fn_cu_operand_addr_offset_rel_64 fcml_fn_cu_operand_reg fcml_fn_cu_operand_signed_imm_16 fcml_fn_cu_operand_signed_imm_32 fcml_fn_cu_operand_signed_imm_64 fcml_fn_cu_operand_signed_imm_8 fcml_fn_cu_operand_unsigned_imm_16 fcml_fn_cu_operand_unsigned_imm_32 fcml_fn_cu_operand_unsigned_imm_64 fcml_fn_cu_operand_unsigned_imm_8 fcml_fn_cu_find_operand fcml_reg_AH fcml_reg_AL fcml_reg_AX fcml_reg_BH fcml_reg_BL fcml_reg_BP fcml_reg_BPL fcml_reg_BX fcml_reg_CH fcml_reg_CL fcml_reg_CR0 fcml_reg_CR2 fcml_reg_CR3 fcml_reg_CR4 fcml_reg_CR8 fcml_reg_CS fcml_reg_CX fcml_reg_DH fcml_reg_DI fcml_reg_DIL fcml_reg_DL fcml_reg_DR0 fcml_reg_DR1 fcml_reg_DR2 fcml_reg_DR3 fcml_reg_DR4 fcml_reg_DR5 fcml_reg_DR6 fcml_reg_DR7 fcml_reg_DS fcml_reg_DX fcml_reg_EAX fcml_reg_EBP fcml_reg_EBX fcml_reg_ECX fcml_reg_EDI fcml_reg_EDX fcml_reg_EIP fcml_reg_ES fcml_reg_ESI fcml_reg_ESP fcml_reg_FS fcml_reg_GS fcml_reg_IP fcml_reg_MM0 fcml_reg_MM1 fcml_reg_MM2 fcml_reg_MM3 fcml_reg_MM4 fcml_reg_MM5 fcml_reg_MM6 fcml_reg_MM7 fcml_reg_R10 fcml_reg_R10D fcml_reg_R10L fcml_reg_R10W fcml_reg_R11 fcml_reg_R11D fcml_reg_R11L fcml_reg_R11W fcml_reg_R12 fcml_reg_R12D fcml_reg_R12L fcml_reg_R12W fcml_reg_R13 fcml_reg_R13D fcml_reg_R13L fcml_reg_R13W fcml_reg_R14 fcml_reg_R14D fcml_reg_R14L fcml_reg_R14W fcml_reg_R15 fcml_reg_R15D fcml_reg_R15L fcml_reg_R15W fcml_reg_R8 fcml_reg_R8D fcml_reg_R8L fcml_reg_R8W fcml_reg_R9 fcml_reg_R9D fcml_reg_R9L fcml_reg_R9W fcml_reg_RAX fcml_reg_RBP fcml_reg_RBX fcml_reg_RCX fcml_reg_RDI fcml_reg_RDX fcml_reg_RIP fcml_reg_RSI fcml_reg_RSP fcml_reg_SI fcml_reg_SIL fcml_reg_SP fcml_reg_SPL fcml_reg_SS fcml_reg_ST0 fcml_reg_ST1 fcml_reg_ST2 fcml_reg_ST3 fcml_reg_ST4 fcml_reg_ST5 fcml_reg_ST6 fcml_reg_ST7 fcml_reg_XMM0 fcml_reg_XMM1 fcml_reg_XMM10 fcml_reg_XMM11 fcml_reg_XMM12 fcml_reg_XMM13 fcml_reg_XMM14 fcml_reg_XMM15 fcml_reg_XMM2 fcml_reg_XMM3 fcml_reg_XMM4 fcml_reg_XMM5 fcml_reg_XMM6 fcml_reg_XMM7 fcml_reg_XMM8 fcml_reg_XMM9 fcml_reg_YMM0 fcml_reg_YMM1 fcml_reg_YMM10 fcml_reg_YMM11 fcml_reg_YMM12 fcml_reg_YMM13 fcml_reg_YMM14 fcml_reg_YMM15 fcml_reg_YMM2 fcml_reg_YMM3 fcml_reg_YMM4 fcml_reg_YMM5 fcml_reg_YMM6 fcml_reg_YMM7 fcml_reg_YMM8 fcml_reg_YMM9 fcml-1.1.1/win32/vs2013/fcml/fcml/resource1.h0000644000175000017500000000060012560745216015203 00000000000000//{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by fcml.rc // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif fcml-1.1.1/win32/vs2013/fcml/fcml/fcml.rc0000644000175000017500000000432312560745216014377 00000000000000// Microsoft Visual C++ generated resource script. // #include "resource1.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "windows.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource1.h\0" END 2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE BEGIN "\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,0 PRODUCTVERSION 1,0,0,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x0L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "fcml" VALUE "FileVersion", "1, 0, 0, 0" VALUE "InternalName", "fcml.dll" VALUE "LegalCopyright", "Copyright (C) 2014 Slawomir Wojtasiak" VALUE "LegalTrademarks", "All Rights Reserved" VALUE "OriginalFilename", "fcml.dll" VALUE "ProductName", "Free Code Manipulation Library" VALUE "ProductVersion", "1, 0, 0, 0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED fcml-1.1.1/win32/vs2013/fcml/fcml/resource.h0000644000175000017500000000060012560745216015122 00000000000000//{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by fcml.rc // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif fcml-1.1.1/win32/vs2013/fcml/fcml-check-cpp/0000755000175000017500000000000012561462631015037 500000000000000fcml-1.1.1/win32/vs2013/fcml/fcml-check-cpp/fcml-check-cpp.vcxproj0000644000175000017500000004336012560745216021160 00000000000000 Debug-dll Win32 Debug-dll x64 Debug-lib Win32 Debug-lib x64 Release-dll Win32 Release-dll x64 Release-lib Win32 Release-lib x64 {8BBBB021-AF54-45B5-B463-9E0C318E71E3} fcmlcheckcpp Win32Proj Application v120 Application v120 Application v120 Unicode true Application v120 Unicode Application v120 Application v120 Application v120 Unicode true Application v120 Unicode <_ProjectFileVersion>12.0.21005.1 $(SolutionDir)$(Configuration)\ $(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ $(SolutionDir)$(Configuration)\ $(Configuration)\ false $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ false $(SolutionDir)$(Configuration)\ $(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ $(SolutionDir)$(Configuration)\ $(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ Disabled ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;LIBFCML_DLL_IMPORT;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL Level3 EditAndContinue CompileAsCpp 4101;%(DisableSpecificWarnings) true Console MachineX86 fcml.lib;%(AdditionalDependencies) $(TargetDir);%(AdditionalLibraryDirectories) X64 Disabled ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;LIBFCML_DLL_IMPORT;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL Level3 ProgramDatabase CompileAsCpp 4101 true Console MachineX64 fcml.lib;%(AdditionalDependencies) $(TargetDir);%(AdditionalLibraryDirectories) MaxSpeed true ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;LIBFCML_DLL_IMPORT;%(PreprocessorDefinitions) Sync MultiThreadedDLL true Level3 ProgramDatabase CompileAsCpp 4101;%(DisableSpecificWarnings) true Console true true MachineX86 fcml.lib;%(AdditionalDependencies) $(TargetDir);%(AdditionalLibraryDirectories) X64 MaxSpeed true ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;LIBFCML_DLL_IMPORT;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 ProgramDatabase CompileAsCpp 4101 true Console true true MachineX64 fcml.lib;%(AdditionalDependencies) $(TargetDir);%(AdditionalLibraryDirectories) ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp 4101;%(DisableSpecificWarnings) fcml.lib;%(AdditionalDependencies) $(TargetDir);%(AdditionalLibraryDirectories) X64 ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp 4101 MachineX64 fcml.lib;%(AdditionalDependencies) $(TargetDir);%(AdditionalLibraryDirectories) ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp 4101;%(DisableSpecificWarnings) fcml.lib;%(AdditionalDependencies) $(TargetDir);%(AdditionalLibraryDirectories) X64 ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp 4101 MachineX64 fcml.lib;%(AdditionalDependencies) $(TargetDir);%(AdditionalLibraryDirectories) fcml-1.1.1/win32/vs2013/fcml/fcml-check-cpp/fcml-check-cpp.vcxproj.filters0000644000175000017500000000542112560745216022623 00000000000000 {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hpp;hxx;hm;inl;inc;xsd {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav {842e0075-848c-4acf-a7aa-f66c6b23ee2f} Source Files Source Files Source Files Source Files Source Files Source Files Source Files stf Source Files Source Files Source Files Source Files Source Files Source Files stf fcml-1.1.1/win32/vs2013/fcml/examples/0000755000175000017500000000000012561462630014100 500000000000000fcml-1.1.1/win32/vs2013/fcml/examples/hsdis/0000755000175000017500000000000012561462631015213 500000000000000fcml-1.1.1/win32/vs2013/fcml/examples/hsdis/COPYING0000644000175000017500000004325412560745216016200 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. fcml-1.1.1/win32/vs2013/fcml/examples/hsdis/targetver.h0000644000175000017500000000257412560745216017321 00000000000000#pragma once // The following macros define the minimum required platform. The minimum required platform // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run // your application. The macros work by enabling all features available on platform versions up to and // including the version specified. // Modify the following defines if you have to target a platform prior to the ones specified below. // Refer to MSDN for the latest info on corresponding values for different platforms. #ifndef WINVER // Specifies that the minimum required platform is Windows Vista. #define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows. #endif #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. #endif #ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98. #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. #endif #ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0. #define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE. #endif fcml-1.1.1/win32/vs2013/fcml/examples/hsdis/hsdis.def0000644000175000017500000000006112560745216016724 00000000000000LIBRARY "hsdis" EXPORTS decode_instructions @1 fcml-1.1.1/win32/vs2013/fcml/examples/hsdis/hsdis.vcxproj0000644000175000017500000005711512561462045017672 00000000000000 Debug-dll Win32 Debug-dll x64 Debug-lib Win32 Debug-lib x64 Release-dll Win32 Release-dll x64 Release-lib Win32 Release-lib x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900} hsdis Win32Proj DynamicLibrary Unicode true v120 DynamicLibrary Unicode v120 DynamicLibrary Unicode true v120 DynamicLibrary Unicode v120 DynamicLibrary Unicode true v120 DynamicLibrary Unicode v120 DynamicLibrary Unicode true v120 DynamicLibrary Unicode v120 <_ProjectFileVersion>10.0.40219.1 $(SolutionDir)$(Configuration)\ $(Configuration)\ true $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ true $(SolutionDir)$(Configuration)\ $(Configuration)\ false $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ false $(SolutionDir)$(Configuration)\ $(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ $(SolutionDir)$(Configuration)\ $(Configuration)\ false $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ false AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset Disabled ..\..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL Level3 ProgramDatabase CompileAsCpp hsdis.def true Windows MachineX86 X64 Disabled ..\..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL Level3 ProgramDatabase CompileAsCpp hsdis.def false Windows MachineX64 MaxSpeed true ..\..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 CompileAsCpp hsdis.def false Windows true true MachineX86 X64 MaxSpeed true ..\..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 CompileAsCpp hsdis.def false Windows true true MachineX64 Disabled ..\..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug Level3 ProgramDatabase CompileAsCpp hsdis.def true Windows MachineX86 X64 Disabled ..\..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug Level3 ProgramDatabase CompileAsCpp hsdis.def false Windows MachineX64 MaxSpeed true ..\..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) MultiThreaded true Level3 CompileAsCpp hsdis.def false Windows true true MachineX86 mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformTarget) mkdir $(SolutionDir)\..\dist\$(PlatformTarget)\hsdis copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformTarget)\hsdis copy $(TargetDir)\$(TargetName).lib $(SolutionDir)\..\dist\$(PlatformTarget)\hsdis X64 MaxSpeed true ..\..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) MultiThreaded true Level3 CompileAsCpp hsdis.def false Windows true true MachineX64 mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformTarget) mkdir $(SolutionDir)\..\dist\$(PlatformTarget)\hsdis copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformTarget)\hsdis copy $(TargetDir)\$(TargetName).lib $(SolutionDir)\..\dist\$(PlatformTarget)\hsdis false false false false false false false false {759bcbfa-3a75-47d2-8df3-8440d8e9c752} false fcml-1.1.1/win32/vs2013/fcml/examples/hsdis/dllmain.cpp0000644000175000017500000000214312560745216017261 00000000000000/** * FCML - Free Code Manipulation Library. * Copyright (C) 2014-2015 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 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "targetver.h" #include BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } fcml-1.1.1/win32/vs2013/fcml/examples/hsdis/hsdis.vcxproj.filters0000644000175000017500000000310312560745216021330 00000000000000 {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hpp;hxx;hm;inl;inc;xsd {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav Source Files Source Files Source Files Header Files Header Files Header Files Resource Files fcml-1.1.1/win32/vs2013/fcml/examples/hsdis/resource.h0000644000175000017500000000060112560745216017132 00000000000000//{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by hsdis.rc // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif fcml-1.1.1/win32/vs2013/fcml/examples/hsdis/hsdis.rc0000644000175000017500000000424712560745216016604 00000000000000// Microsoft Visual C++ generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "windows.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource.h\0" END 2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE BEGIN "\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,1 PRODUCTVERSION 1,0,0,1 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x0L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "SWKSoftware" VALUE "FileDescription", "hsdis" VALUE "FileVersion", "1, 0, 0, 1" VALUE "InternalName", "hsdis" VALUE "LegalCopyright", "Copyright (C) 2014 Slawomir Wojtasiak" VALUE "OriginalFilename", "hsdis" VALUE "ProductName", "hsdis" VALUE "ProductVersion", "1, 0, 0, 1" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED fcml-1.1.1/win32/dist.bat0000644000175000017500000000323612560745216011765 00000000000000rem In order to build the project use VS directly. This file is here rem for internal purpose only and shouldn't be used to build anything. set base=%1 rd /s /q %base%\dist mkdir %base%\dist rem x86 mkdir %base%\dist\x86 mkdir %base%\dist\x86\debug-dll mkdir %base%\dist\x86\debug-lib mkdir %base%\dist\x86\release-dll mkdir %base%\dist\x86\release-lib mkdir %base%\dist\x86\hsdis rem x64 mkdir %base%\dist\x64 mkdir %base%\dist\x64\debug-dll mkdir %base%\dist\x64\debug-lib mkdir %base%\dist\x64\release-dll mkdir %base%\dist\x64\release-lib mkdir %base%\dist\x64\hsdis rem x86 copy %base%\fcml\Debug-dll\fcml.dll %base%\dist\x86\debug-dll copy %base%\fcml\Debug-dll\fcml.lib %base%\dist\x86\debug-dll copy %base%\fcml\Release-dll\fcml.dll %base%\dist\x86\release-dll copy %base%\fcml\Release-dll\fcml.lib %base%\dist\x86\release-dll copy %base%\fcml\Debug-lib\fcml.lib %base%\dist\x86\debug-lib copy %base%\fcml\Release-lib\fcml.lib %base%\dist\x86\release-lib copy %base%\fcml\Release-lib\hsdis.dll %base%\dist\x86\hsdis\hsdis-i386.dll copy %base%\fcml\Release-lib\hsdis.lib %base%\dist\x86\hsdis\hsdis-i386.lib rem x64 copy %base%\fcml\x64\Debug-dll\fcml.dll %base%\dist\x64\debug-dll copy %base%\fcml\x64\Debug-dll\fcml.lib %base%\dist\x64\debug-dll copy %base%\fcml\x64\Release-dll\fcml.dll %base%\dist\x64\release-dll copy %base%\fcml\x64\Release-dll\fcml.lib %base%\dist\x64\release-dll copy %base%\fcml\x64\Debug-lib\fcml.lib %base%\dist\x64\debug-lib copy %base%\fcml\x64\Release-lib\fcml.lib %base%\dist\x64\release-lib copy %base%\fcml\x64\Release-lib\hsdis.dll %base%\dist\x64\hsdis\hsdis-amd64.dll copy %base%\fcml\x64\Release-lib\hsdis.lib %base%\dist\x64\hsdis\hsdis-amd64.lib fcml-1.1.1/win32/vs2010/0000755000175000017500000000000012561462630011336 500000000000000fcml-1.1.1/win32/vs2010/fcml/0000755000175000017500000000000012561462631012260 500000000000000fcml-1.1.1/win32/vs2010/fcml/fcml.sln0000644000175000017500000001557312560745216013654 00000000000000 Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{BBE0AA04-8E2A-4ECC-BB7E-3541022740EC}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fcml", "fcml\fcml.vcxproj", "{759BCBFA-3A75-47D2-8DF3-8440D8E9C752}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fcml-check", "fcml-check\fcml-check.vcxproj", "{73008BA6-43CF-41C8-8C49-B60D8DEDC069}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hsdis", "examples\hsdis\hsdis.vcxproj", "{65E5C6B1-F5A6-47AA-BDA3-E718A255D900}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fcml-check-cpp", "fcml-check-cpp\fcml-check-cpp.vcxproj", "{8BBBB021-AF54-45B5-B463-9E0C318E71E3}" ProjectSection(ProjectDependencies) = postProject {759BCBFA-3A75-47D2-8DF3-8440D8E9C752} = {759BCBFA-3A75-47D2-8DF3-8440D8E9C752} EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug-dll|Win32 = Debug-dll|Win32 Debug-dll|x64 = Debug-dll|x64 Debug-lib|Win32 = Debug-lib|Win32 Debug-lib|x64 = Debug-lib|x64 Release-dll|Win32 = Release-dll|Win32 Release-dll|x64 = Release-dll|x64 Release-lib|Win32 = Release-lib|Win32 Release-lib|x64 = Release-lib|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-dll|Win32.Build.0 = Debug-dll|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-dll|x64.ActiveCfg = Debug-dll|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-dll|x64.Build.0 = Debug-dll|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-lib|Win32.ActiveCfg = Debug-lib|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-lib|Win32.Build.0 = Debug-lib|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-lib|x64.ActiveCfg = Debug-lib|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-lib|x64.Build.0 = Debug-lib|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-dll|Win32.ActiveCfg = Release-dll|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-dll|Win32.Build.0 = Release-dll|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-dll|x64.ActiveCfg = Release-dll|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-dll|x64.Build.0 = Release-dll|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-lib|Win32.ActiveCfg = Release-lib|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-lib|Win32.Build.0 = Release-lib|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-lib|x64.ActiveCfg = Release-lib|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-lib|x64.Build.0 = Release-lib|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-dll|Win32.Build.0 = Debug-dll|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-dll|x64.ActiveCfg = Debug-dll|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-dll|x64.Build.0 = Debug-dll|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-lib|Win32.ActiveCfg = Debug-lib|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-lib|Win32.Build.0 = Debug-lib|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-lib|x64.ActiveCfg = Debug-lib|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-lib|x64.Build.0 = Debug-lib|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-dll|Win32.ActiveCfg = Release-dll|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-dll|Win32.Build.0 = Release-dll|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-dll|x64.ActiveCfg = Release-dll|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-dll|x64.Build.0 = Release-dll|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-lib|Win32.ActiveCfg = Release-lib|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-lib|Win32.Build.0 = Release-lib|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-lib|x64.ActiveCfg = Release-lib|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-lib|x64.Build.0 = Release-lib|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-dll|Win32.Build.0 = Debug-dll|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-dll|x64.ActiveCfg = Debug-dll|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-dll|x64.Build.0 = Debug-dll|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-lib|Win32.ActiveCfg = Debug-lib|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-lib|Win32.Build.0 = Debug-lib|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-lib|x64.ActiveCfg = Debug-lib|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-lib|x64.Build.0 = Debug-lib|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-dll|Win32.ActiveCfg = Release-dll|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-dll|Win32.Build.0 = Release-dll|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-dll|x64.ActiveCfg = Release-dll|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-dll|x64.Build.0 = Release-dll|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-lib|Win32.ActiveCfg = Release-lib|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-lib|Win32.Build.0 = Release-lib|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-lib|x64.ActiveCfg = Release-lib|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-lib|x64.Build.0 = Release-lib|x64 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-dll|Win32.Build.0 = Debug-dll|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-dll|x64.ActiveCfg = Debug-dll|x64 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-dll|x64.Build.0 = Debug-dll|x64 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-lib|Win32.ActiveCfg = Debug-lib|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-lib|Win32.Build.0 = Debug-lib|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-lib|x64.ActiveCfg = Debug-lib|x64 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-lib|x64.Build.0 = Debug-lib|x64 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-dll|Win32.ActiveCfg = Release-dll|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-dll|Win32.Build.0 = Release-dll|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-dll|x64.ActiveCfg = Release-dll|x64 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-dll|x64.Build.0 = Release-dll|x64 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-lib|Win32.ActiveCfg = Release-lib|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-lib|Win32.Build.0 = Release-lib|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-lib|x64.ActiveCfg = Release-lib|x64 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-lib|x64.Build.0 = Release-lib|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {65E5C6B1-F5A6-47AA-BDA3-E718A255D900} = {BBE0AA04-8E2A-4ECC-BB7E-3541022740EC} EndGlobalSection EndGlobal fcml-1.1.1/win32/vs2010/fcml/fcml-check/0000755000175000017500000000000012561462631014254 500000000000000fcml-1.1.1/win32/vs2010/fcml/fcml-check/fcml-check.vcxproj.filters0000644000175000017500000002241612560745216021263 00000000000000 {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hpp;hxx;hm;inl;inc;xsd {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav {d70bc9ff-c281-4fb2-a465-f3e52f50857f} Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files stf Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files stf Source Files fcml-1.1.1/win32/vs2010/fcml/fcml-check/fcml-check.vcxproj0000644000175000017500000005423312560745216017616 00000000000000 Debug-dll Win32 Debug-dll x64 Debug-lib Win32 Debug-lib x64 Release-dll Win32 Release-dll x64 Release-lib Win32 Release-lib x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069} fcmlcheck Win32Proj Application Application Application Unicode true Application Unicode Application Application Application Unicode true Application Unicode <_ProjectFileVersion>10.0.40219.1 $(SolutionDir)$(Configuration)\ $(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ $(SolutionDir)$(Configuration)\ $(Configuration)\ false $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ false $(SolutionDir)$(Configuration)\ $(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ $(SolutionDir)$(Configuration)\ $(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset Disabled ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;LIBFCML_DLL_IMPORT;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL Level3 EditAndContinue CompileAsCpp true Console MachineX86 %(AdditionalLibraryDirectories) %(AdditionalDependencies) X64 Disabled ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;LIBFCML_DLL_IMPORT;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL Level3 ProgramDatabase CompileAsCpp true Console MachineX64 MaxSpeed true ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;LIBFCML_DLL_IMPORT;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 ProgramDatabase CompileAsCpp true Console true true MachineX86 X64 MaxSpeed true ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;LIBFCML_DLL_IMPORT;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 ProgramDatabase CompileAsCpp true Console true true MachineX64 ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp X64 ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp MachineX64 ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp X64 ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp MachineX64 {759bcbfa-3a75-47d2-8df3-8440d8e9c752} false fcml-1.1.1/win32/vs2010/fcml/fcml/0000755000175000017500000000000012561462631013201 500000000000000fcml-1.1.1/win32/vs2010/fcml/fcml/dllmain.c0000644000175000017500000000042012560745216014703 00000000000000#include BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } fcml-1.1.1/win32/vs2010/fcml/fcml/fcml.vcxproj0000644000175000017500000007525612560745216015500 00000000000000 Debug-dll Win32 Debug-dll x64 Debug-lib Win32 Debug-lib x64 Release-dll Win32 Release-dll x64 Release-lib Win32 Release-lib x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752} fcml Win32Proj StaticLibrary NotSet true StaticLibrary NotSet true DynamicLibrary NotSet true DynamicLibrary NotSet StaticLibrary NotSet true StaticLibrary NotSet true DynamicLibrary NotSet true DynamicLibrary NotSet <_ProjectFileVersion>10.0.40219.1 $(SolutionDir)$(Configuration)\ $(Configuration)\ true $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ true $(SolutionDir)$(Configuration)\ $(Configuration)\ false $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ false $(SolutionDir)$(Configuration)\ $(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ $(SolutionDir)$(Configuration)\ $(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset Disabled ..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL true Level3 EditAndContinue CompileAsCpp 4005;4996;4018;%(DisableSpecificWarnings) fcml.def true Windows MachineX86 mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformShortName) mkdir $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) copy $(TargetDir)\$(TargetName).lib $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) X64 Disabled ..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL true Level3 ProgramDatabase CompileAsCpp 4005;4996;4018;%(DisableSpecificWarnings) fcml.def true Windows MachineX64 mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformShortName) mkdir $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) copy $(TargetDir)\$(TargetName).lib $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) MaxSpeed true ..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 ProgramDatabase CompileAsCpp 4005;4996;4018;%(DisableSpecificWarnings) fcml.def true Windows true true MachineX86 mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformShortName) mkdir $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) copy $(TargetDir)\$(TargetName).lib $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) X64 MaxSpeed true ..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 ProgramDatabase CompileAsCpp 4005;4996;4018;%(DisableSpecificWarnings) fcml.def true Windows true true MachineX64 mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformShortName) mkdir $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) copy $(TargetDir)\$(TargetName).lib $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) MaxSpeed true ..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) MultiThreaded true Level3 ProgramDatabase CompileAsCpp 4005;4996;4018;%(DisableSpecificWarnings) mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformShortName) mkdir $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) X64 MaxSpeed true ..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) MultiThreaded true Level3 ProgramDatabase CompileAsCpp 4005;4996;4018;%(DisableSpecificWarnings) mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformShortName) mkdir $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) MachineX64 Disabled false ..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) true Default MultiThreadedDebug true Level3 ProgramDatabase CompileAsCpp 4005;4996;4018;%(DisableSpecificWarnings) mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformShortName) mkdir $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) X64 Disabled false ..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) true Default MultiThreadedDebug true Level3 ProgramDatabase CompileAsCpp 4005;4996;4018;%(DisableSpecificWarnings) mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformShortName) mkdir $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformShortName)\$(ConfigurationName) MachineX64 false false false false false false false false fcml-1.1.1/win32/vs2010/fcml/fcml/fcml.vcxproj.filters0000644000175000017500000003041412560745216017132 00000000000000 {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {eaa5753f-598d-455b-877e-1b77749f4997} {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hpp;hxx;hm;inl;inc;xsd {71e56462-a75b-4a81-90c4-f7650c4b5127} {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav {2e966e01-d0da-4627-8fb4-a592544477be} Source Files Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Source Files\fcml Header Files Header Files Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Header Files\include Resource Files Def fcml-1.1.1/win32/vs2010/fcml/fcml/fcml.def0000644000175000017500000001125712560745216014532 00000000000000LIBRARY "fcml" EXPORTS fcml_fn_env_register_memory_alloc_handler fcml_fn_env_register_memory_free_handler fcml_fn_env_register_memory_free_handler fcml_fn_dialect_init_gas fcml_fn_dialect_init_intel fcml_fn_dialect_free fcml_fn_assemble fcml_fn_assembler_free fcml_fn_assembler_init fcml_fn_assembler_result_free fcml_fn_assembler_result_prepare fcml_fn_assembler_instruction_free fcml_fn_assembler_instruction_detach fcml_fn_lag_assemble fcml_fn_lag_assembler_result_prepare fcml_fn_lag_assembler_result_free fcml_fn_disassemble fcml_fn_disassembler_free fcml_fn_disassembler_init fcml_fn_disassembler_result_free fcml_fn_disassembler_result_prepare fcml_fn_parse fcml_fn_parser_result_free fcml_fn_parser_result_prepare fcml_fn_render fcml_fn_symbol_alloc fcml_fn_symbol_free fcml_fn_symbol_table_alloc fcml_fn_symbol_add_raw fcml_fn_symbol_add fcml_fn_symbol_remove fcml_fn_symbol_get fcml_fn_symbol_remove_all fcml_fn_symbol_table_free fcml_fn_asm_default_instruction_chooser fcml_fn_asm_no_instruction_chooser fcml_fn_asm_default_optimizer fcml_fn_cu_add_operand_hints fcml_fn_cu_clone_instruction fcml_fn_cu_free_instruction fcml_fn_cu_operand_addr_b_disp_16 fcml_fn_cu_operand_addr_b_disp_32 fcml_fn_cu_operand_addr_b_disp_64 fcml_fn_cu_operand_addr_b_disp_8 fcml_fn_cu_operand_addr_bis_disp_32 fcml_fn_cu_operand_addr_bis_disp_64 fcml_fn_cu_operand_addr_bis_disp_8 fcml_fn_cu_operand_addr_disp_16 fcml_fn_cu_operand_addr_disp_32 fcml_fn_cu_operand_addr_disp_64 fcml_fn_cu_operand_addr_far_pointer_offset16 fcml_fn_cu_operand_addr_far_pointer_offset32 fcml_fn_cu_operand_addr_is_disp_32 fcml_fn_cu_operand_addr_is_disp_64 fcml_fn_cu_operand_addr_is_disp_8 fcml_fn_cu_operand_addr_offset_16 fcml_fn_cu_operand_addr_offset_32 fcml_fn_cu_operand_addr_offset_abs_64 fcml_fn_cu_operand_addr_offset_rel_64 fcml_fn_cu_operand_reg fcml_fn_cu_operand_signed_imm_16 fcml_fn_cu_operand_signed_imm_32 fcml_fn_cu_operand_signed_imm_64 fcml_fn_cu_operand_signed_imm_8 fcml_fn_cu_operand_unsigned_imm_16 fcml_fn_cu_operand_unsigned_imm_32 fcml_fn_cu_operand_unsigned_imm_64 fcml_fn_cu_operand_unsigned_imm_8 fcml_fn_cu_find_operand fcml_reg_AH fcml_reg_AL fcml_reg_AX fcml_reg_BH fcml_reg_BL fcml_reg_BP fcml_reg_BPL fcml_reg_BX fcml_reg_CH fcml_reg_CL fcml_reg_CR0 fcml_reg_CR2 fcml_reg_CR3 fcml_reg_CR4 fcml_reg_CR8 fcml_reg_CS fcml_reg_CX fcml_reg_DH fcml_reg_DI fcml_reg_DIL fcml_reg_DL fcml_reg_DR0 fcml_reg_DR1 fcml_reg_DR2 fcml_reg_DR3 fcml_reg_DR4 fcml_reg_DR5 fcml_reg_DR6 fcml_reg_DR7 fcml_reg_DS fcml_reg_DX fcml_reg_EAX fcml_reg_EBP fcml_reg_EBX fcml_reg_ECX fcml_reg_EDI fcml_reg_EDX fcml_reg_EIP fcml_reg_ES fcml_reg_ESI fcml_reg_ESP fcml_reg_FS fcml_reg_GS fcml_reg_IP fcml_reg_MM0 fcml_reg_MM1 fcml_reg_MM2 fcml_reg_MM3 fcml_reg_MM4 fcml_reg_MM5 fcml_reg_MM6 fcml_reg_MM7 fcml_reg_R10 fcml_reg_R10D fcml_reg_R10L fcml_reg_R10W fcml_reg_R11 fcml_reg_R11D fcml_reg_R11L fcml_reg_R11W fcml_reg_R12 fcml_reg_R12D fcml_reg_R12L fcml_reg_R12W fcml_reg_R13 fcml_reg_R13D fcml_reg_R13L fcml_reg_R13W fcml_reg_R14 fcml_reg_R14D fcml_reg_R14L fcml_reg_R14W fcml_reg_R15 fcml_reg_R15D fcml_reg_R15L fcml_reg_R15W fcml_reg_R8 fcml_reg_R8D fcml_reg_R8L fcml_reg_R8W fcml_reg_R9 fcml_reg_R9D fcml_reg_R9L fcml_reg_R9W fcml_reg_RAX fcml_reg_RBP fcml_reg_RBX fcml_reg_RCX fcml_reg_RDI fcml_reg_RDX fcml_reg_RIP fcml_reg_RSI fcml_reg_RSP fcml_reg_SI fcml_reg_SIL fcml_reg_SP fcml_reg_SPL fcml_reg_SS fcml_reg_ST0 fcml_reg_ST1 fcml_reg_ST2 fcml_reg_ST3 fcml_reg_ST4 fcml_reg_ST5 fcml_reg_ST6 fcml_reg_ST7 fcml_reg_XMM0 fcml_reg_XMM1 fcml_reg_XMM10 fcml_reg_XMM11 fcml_reg_XMM12 fcml_reg_XMM13 fcml_reg_XMM14 fcml_reg_XMM15 fcml_reg_XMM2 fcml_reg_XMM3 fcml_reg_XMM4 fcml_reg_XMM5 fcml_reg_XMM6 fcml_reg_XMM7 fcml_reg_XMM8 fcml_reg_XMM9 fcml_reg_YMM0 fcml_reg_YMM1 fcml_reg_YMM10 fcml_reg_YMM11 fcml_reg_YMM12 fcml_reg_YMM13 fcml_reg_YMM14 fcml_reg_YMM15 fcml_reg_YMM2 fcml_reg_YMM3 fcml_reg_YMM4 fcml_reg_YMM5 fcml_reg_YMM6 fcml_reg_YMM7 fcml_reg_YMM8 fcml_reg_YMM9 fcml-1.1.1/win32/vs2010/fcml/fcml/resource1.h0000644000175000017500000000060012560745216015200 00000000000000//{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by fcml.rc // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif fcml-1.1.1/win32/vs2010/fcml/fcml/fcml.rc0000644000175000017500000000432312560745216014374 00000000000000// Microsoft Visual C++ generated resource script. // #include "resource1.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "windows.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource1.h\0" END 2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE BEGIN "\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,0 PRODUCTVERSION 1,0,0,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x0L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "fcml" VALUE "FileVersion", "1, 0, 0, 0" VALUE "InternalName", "fcml.dll" VALUE "LegalCopyright", "Copyright (C) 2014 Slawomir Wojtasiak" VALUE "LegalTrademarks", "All Rights Reserved" VALUE "OriginalFilename", "fcml.dll" VALUE "ProductName", "Free Code Manipulation Library" VALUE "ProductVersion", "1, 0, 0, 0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED fcml-1.1.1/win32/vs2010/fcml/fcml/resource.h0000644000175000017500000000060012560745216015117 00000000000000//{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by fcml.rc // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif fcml-1.1.1/win32/vs2010/fcml/fcml-check-cpp/0000755000175000017500000000000012561462631015034 500000000000000fcml-1.1.1/win32/vs2010/fcml/fcml-check-cpp/fcml-check-cpp.vcxproj0000644000175000017500000005061712560745216021160 00000000000000 Debug-dll Win32 Debug-dll x64 Debug-lib Win32 Debug-lib x64 Release-dll Win32 Release-dll x64 Release-lib Win32 Release-lib x64 {8BBBB021-AF54-45B5-B463-9E0C318E71E3} fcmlcheckcpp Win32Proj Application Application Application Unicode true Application Unicode Application Application Application Unicode true Application Unicode <_ProjectFileVersion>10.0.40219.1 $(SolutionDir)$(Configuration)\ $(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ $(SolutionDir)$(Configuration)\ $(Configuration)\ false $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ false $(SolutionDir)$(Configuration)\ $(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ $(SolutionDir)$(Configuration)\ $(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset Disabled ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;LIBFCML_DLL_IMPORT;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL Level3 EditAndContinue CompileAsCpp 4101;%(DisableSpecificWarnings) true Console MachineX86 fcml.lib;%(AdditionalDependencies) $(TargetDir);%(AdditionalLibraryDirectories) X64 Disabled ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;LIBFCML_DLL_IMPORT;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL Level3 ProgramDatabase CompileAsCpp true Console MachineX64 $(TargetDir);%(AdditionalLibraryDirectories) fcml.lib;%(AdditionalDependencies) MaxSpeed true ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;LIBFCML_DLL_IMPORT;%(PreprocessorDefinitions) Sync MultiThreadedDLL true Level3 ProgramDatabase CompileAsCpp 4101;%(DisableSpecificWarnings) true Console true true MachineX86 $(TargetDir);%(AdditionalLibraryDirectories) fcml.lib;%(AdditionalDependencies) X64 MaxSpeed true ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;LIBFCML_DLL_IMPORT;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 ProgramDatabase CompileAsCpp true Console true true MachineX64 $(TargetDir);%(AdditionalLibraryDirectories) fcml.lib;%(AdditionalDependencies) ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp 4101;%(DisableSpecificWarnings) $(TargetDir);%(AdditionalLibraryDirectories) fcml.lib;%(AdditionalDependencies) X64 ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) MultiThreaded CompileAsCpp MachineX64 $(TargetDir);%(AdditionalLibraryDirectories) fcml.lib;%(AdditionalDependencies) ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp 4101;%(DisableSpecificWarnings) fcml.lib;%(AdditionalDependencies) $(TargetDir);%(AdditionalLibraryDirectories) X64 ..\..\..\..\include;..\..\..\..\check\stf;%(AdditionalIncludeDirectories) MultiThreadedDebug CompileAsCpp MachineX64 $(TargetDir);%(AdditionalLibraryDirectories) fcml.lib;%(AdditionalDependencies) fcml-1.1.1/win32/vs2010/fcml/fcml-check-cpp/fcml-check-cpp.vcxproj.filters0000644000175000017500000000531512560745216022622 00000000000000 {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hpp;hxx;hm;inl;inc;xsd {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav {60eadf50-26fa-4026-86ab-98f14ba34d75} Source Files Source Files Source Files Source Files Source Files Source Files Source Files stf Source Files Source Files Source Files Source Files Source Files Source Files stf fcml-1.1.1/win32/vs2010/fcml/examples/0000755000175000017500000000000012561462630014075 500000000000000fcml-1.1.1/win32/vs2010/fcml/examples/hsdis/0000755000175000017500000000000012561462631015210 500000000000000fcml-1.1.1/win32/vs2010/fcml/examples/hsdis/COPYING0000644000175000017500000004325412560745216016175 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. fcml-1.1.1/win32/vs2010/fcml/examples/hsdis/targetver.h0000644000175000017500000000257412560745216017316 00000000000000#pragma once // The following macros define the minimum required platform. The minimum required platform // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run // your application. The macros work by enabling all features available on platform versions up to and // including the version specified. // Modify the following defines if you have to target a platform prior to the ones specified below. // Refer to MSDN for the latest info on corresponding values for different platforms. #ifndef WINVER // Specifies that the minimum required platform is Windows Vista. #define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows. #endif #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. #endif #ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98. #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. #endif #ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0. #define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE. #endif fcml-1.1.1/win32/vs2010/fcml/examples/hsdis/hsdis.def0000644000175000017500000000006112560745216016721 00000000000000LIBRARY "hsdis" EXPORTS decode_instructions @1 fcml-1.1.1/win32/vs2010/fcml/examples/hsdis/hsdis.vcxproj0000644000175000017500000005640412560745216017672 00000000000000 Debug-dll Win32 Debug-dll x64 Debug-lib Win32 Debug-lib x64 Release-dll Win32 Release-dll x64 Release-lib Win32 Release-lib x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900} hsdis Win32Proj DynamicLibrary Unicode true DynamicLibrary Unicode DynamicLibrary Unicode true DynamicLibrary Unicode DynamicLibrary Unicode true DynamicLibrary Unicode DynamicLibrary Unicode true DynamicLibrary Unicode <_ProjectFileVersion>10.0.40219.1 $(SolutionDir)$(Configuration)\ $(Configuration)\ true $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ true $(SolutionDir)$(Configuration)\ $(Configuration)\ false $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ false $(SolutionDir)$(Configuration)\ $(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ $(SolutionDir)$(Configuration)\ $(Configuration)\ false $(SolutionDir)$(Platform)\$(Configuration)\ $(Platform)\$(Configuration)\ false AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset AllRules.ruleset Disabled ..\..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL Level3 ProgramDatabase CompileAsCpp hsdis.def false Windows MachineX86 X64 Disabled ..\..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL Level3 ProgramDatabase CompileAsCpp hsdis.def false Windows MachineX64 MaxSpeed true ..\..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 CompileAsCpp hsdis.def false Windows true true MachineX86 X64 MaxSpeed true ..\..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 CompileAsCpp hsdis.def false Windows true true MachineX64 Disabled ..\..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug Level3 ProgramDatabase CompileAsCpp hsdis.def false Windows MachineX86 X64 Disabled ..\..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug Level3 ProgramDatabase CompileAsCpp hsdis.def false Windows MachineX64 MaxSpeed true ..\..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) MultiThreaded true Level3 CompileAsCpp hsdis.def false Windows true true MachineX86 mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformShortName) mkdir $(SolutionDir)\..\dist\$(PlatformShortName)\hsdis copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformShortName)\hsdis copy $(TargetDir)\$(TargetName).lib $(SolutionDir)\..\dist\$(PlatformShortName)\hsdis X64 MaxSpeed true ..\..\..\..\..\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) MultiThreaded true Level3 CompileAsCpp hsdis.def false Windows true true MachineX64 mkdir $(SolutionDir)\..\dist mkdir $(SolutionDir)\..\dist\$(PlatformShortName) mkdir $(SolutionDir)\..\dist\$(PlatformShortName)\hsdis copy $(TargetPath) $(SolutionDir)\..\dist\$(PlatformShortName)\hsdis copy $(TargetDir)\$(TargetName).lib $(SolutionDir)\..\dist\$(PlatformShortName)\hsdis false false false false false false false false {759bcbfa-3a75-47d2-8df3-8440d8e9c752} false fcml-1.1.1/win32/vs2010/fcml/examples/hsdis/dllmain.cpp0000644000175000017500000000214312560745216017256 00000000000000/** * FCML - Free Code Manipulation Library. * Copyright (C) 2014-2015 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 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "targetver.h" #include BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } fcml-1.1.1/win32/vs2010/fcml/examples/hsdis/hsdis.vcxproj.filters0000644000175000017500000000310312560745216021325 00000000000000 {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hpp;hxx;hm;inl;inc;xsd {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav Source Files Source Files Source Files Header Files Header Files Header Files Resource Files fcml-1.1.1/win32/vs2010/fcml/examples/hsdis/resource.h0000644000175000017500000000060112560745216017127 00000000000000//{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by hsdis.rc // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif fcml-1.1.1/win32/vs2010/fcml/examples/hsdis/hsdis.rc0000644000175000017500000000424712560745216016601 00000000000000// Microsoft Visual C++ generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "windows.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource.h\0" END 2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE BEGIN "\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,1 PRODUCTVERSION 1,0,0,1 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x0L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "SWKSoftware" VALUE "FileDescription", "hsdis" VALUE "FileVersion", "1, 0, 0, 1" VALUE "InternalName", "hsdis" VALUE "LegalCopyright", "Copyright (C) 2014 Slawomir Wojtasiak" VALUE "OriginalFilename", "hsdis" VALUE "ProductName", "hsdis" VALUE "ProductVersion", "1, 0, 0, 1" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED fcml-1.1.1/win32/vs2008/0000755000175000017500000000000012561462630011345 500000000000000fcml-1.1.1/win32/vs2008/fcml/0000755000175000017500000000000012561462630012266 500000000000000fcml-1.1.1/win32/vs2008/fcml/fcml.sln0000644000175000017500000001572112560745216013656 00000000000000 Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fcml", "fcml\fcml.vcproj", "{759BCBFA-3A75-47D2-8DF3-8440D8E9C752}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fcml-check", "fcml-check\fcml-check.vcproj", "{73008BA6-43CF-41C8-8C49-B60D8DEDC069}" ProjectSection(ProjectDependencies) = postProject {759BCBFA-3A75-47D2-8DF3-8440D8E9C752} = {759BCBFA-3A75-47D2-8DF3-8440D8E9C752} EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{BBE0AA04-8E2A-4ECC-BB7E-3541022740EC}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hsdis", "examples\hsdis\hsdis.vcproj", "{65E5C6B1-F5A6-47AA-BDA3-E718A255D900}" ProjectSection(ProjectDependencies) = postProject {759BCBFA-3A75-47D2-8DF3-8440D8E9C752} = {759BCBFA-3A75-47D2-8DF3-8440D8E9C752} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fcml-check-cpp", "fcml-check-cpp\fcml-check-cpp.vcproj", "{8BBBB021-AF54-45B5-B463-9E0C318E71E3}" ProjectSection(ProjectDependencies) = postProject {759BCBFA-3A75-47D2-8DF3-8440D8E9C752} = {759BCBFA-3A75-47D2-8DF3-8440D8E9C752} EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug-dll|Win32 = Debug-dll|Win32 Debug-dll|x64 = Debug-dll|x64 Debug-lib|Win32 = Debug-lib|Win32 Debug-lib|x64 = Debug-lib|x64 Release-dll|Win32 = Release-dll|Win32 Release-dll|x64 = Release-dll|x64 Release-lib|Win32 = Release-lib|Win32 Release-lib|x64 = Release-lib|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-dll|Win32.Build.0 = Debug-dll|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-dll|x64.ActiveCfg = Debug-dll|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-dll|x64.Build.0 = Debug-dll|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-lib|Win32.ActiveCfg = Debug-lib|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-lib|Win32.Build.0 = Debug-lib|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-lib|x64.ActiveCfg = Debug-lib|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Debug-lib|x64.Build.0 = Debug-lib|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-dll|Win32.ActiveCfg = Release-dll|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-dll|Win32.Build.0 = Release-dll|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-dll|x64.ActiveCfg = Release-dll|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-dll|x64.Build.0 = Release-dll|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-lib|Win32.ActiveCfg = Release-lib|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-lib|Win32.Build.0 = Release-lib|Win32 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-lib|x64.ActiveCfg = Release-lib|x64 {759BCBFA-3A75-47D2-8DF3-8440D8E9C752}.Release-lib|x64.Build.0 = Release-lib|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-dll|Win32.Build.0 = Debug-dll|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-dll|x64.ActiveCfg = Debug-dll|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-dll|x64.Build.0 = Debug-dll|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-lib|Win32.ActiveCfg = Debug-lib|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-lib|Win32.Build.0 = Debug-lib|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-lib|x64.ActiveCfg = Debug-lib|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Debug-lib|x64.Build.0 = Debug-lib|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-dll|Win32.ActiveCfg = Release-dll|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-dll|Win32.Build.0 = Release-dll|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-dll|x64.ActiveCfg = Release-dll|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-dll|x64.Build.0 = Release-dll|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-lib|Win32.ActiveCfg = Release-lib|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-lib|Win32.Build.0 = Release-lib|Win32 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-lib|x64.ActiveCfg = Release-lib|x64 {73008BA6-43CF-41C8-8C49-B60D8DEDC069}.Release-lib|x64.Build.0 = Release-lib|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-dll|Win32.Build.0 = Debug-dll|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-dll|x64.ActiveCfg = Debug-dll|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-dll|x64.Build.0 = Debug-dll|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-lib|Win32.ActiveCfg = Debug-lib|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-lib|Win32.Build.0 = Debug-lib|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-lib|x64.ActiveCfg = Debug-lib|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Debug-lib|x64.Build.0 = Debug-lib|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-dll|Win32.ActiveCfg = Release-dll|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-dll|Win32.Build.0 = Release-dll|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-dll|x64.ActiveCfg = Release-dll|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-dll|x64.Build.0 = Release-dll|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-lib|Win32.ActiveCfg = Release-lib|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-lib|Win32.Build.0 = Release-lib|Win32 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-lib|x64.ActiveCfg = Release-lib|x64 {65E5C6B1-F5A6-47AA-BDA3-E718A255D900}.Release-lib|x64.Build.0 = Release-lib|x64 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-dll|Win32.Build.0 = Debug-dll|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-dll|x64.ActiveCfg = Debug-dll|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-lib|Win32.ActiveCfg = Debug-lib|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-lib|Win32.Build.0 = Debug-lib|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Debug-lib|x64.ActiveCfg = Debug-dll|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-dll|Win32.ActiveCfg = Release-dll|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-dll|Win32.Build.0 = Release-dll|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-dll|x64.ActiveCfg = Release-dll|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-lib|Win32.ActiveCfg = Release-lib|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-lib|Win32.Build.0 = Release-lib|Win32 {8BBBB021-AF54-45B5-B463-9E0C318E71E3}.Release-lib|x64.ActiveCfg = Release-dll|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {65E5C6B1-F5A6-47AA-BDA3-E718A255D900} = {BBE0AA04-8E2A-4ECC-BB7E-3541022740EC} EndGlobalSection EndGlobal fcml-1.1.1/win32/vs2008/fcml/fcml-check/0000755000175000017500000000000012561462630014262 500000000000000fcml-1.1.1/win32/vs2008/fcml/fcml-check/fcml-check.vcproj0000644000175000017500000004247712560745216017444 00000000000000 fcml-1.1.1/win32/vs2008/fcml/fcml/0000755000175000017500000000000012561462631013210 500000000000000fcml-1.1.1/win32/vs2008/fcml/fcml/dllmain.c0000644000175000017500000000042012560745216014712 00000000000000#include BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } fcml-1.1.1/win32/vs2008/fcml/fcml/fcml.def0000644000175000017500000001125712560745216014541 00000000000000LIBRARY "fcml" EXPORTS fcml_fn_env_register_memory_alloc_handler fcml_fn_env_register_memory_free_handler fcml_fn_env_register_memory_free_handler fcml_fn_dialect_init_gas fcml_fn_dialect_init_intel fcml_fn_dialect_free fcml_fn_assemble fcml_fn_assembler_free fcml_fn_assembler_init fcml_fn_assembler_result_free fcml_fn_assembler_result_prepare fcml_fn_assembler_instruction_free fcml_fn_assembler_instruction_detach fcml_fn_lag_assemble fcml_fn_lag_assembler_result_prepare fcml_fn_lag_assembler_result_free fcml_fn_disassemble fcml_fn_disassembler_free fcml_fn_disassembler_init fcml_fn_disassembler_result_free fcml_fn_disassembler_result_prepare fcml_fn_parse fcml_fn_parser_result_free fcml_fn_parser_result_prepare fcml_fn_render fcml_fn_symbol_alloc fcml_fn_symbol_free fcml_fn_symbol_table_alloc fcml_fn_symbol_add_raw fcml_fn_symbol_add fcml_fn_symbol_remove fcml_fn_symbol_get fcml_fn_symbol_remove_all fcml_fn_symbol_table_free fcml_fn_asm_default_instruction_chooser fcml_fn_asm_no_instruction_chooser fcml_fn_asm_default_optimizer fcml_fn_cu_add_operand_hints fcml_fn_cu_clone_instruction fcml_fn_cu_free_instruction fcml_fn_cu_operand_addr_b_disp_16 fcml_fn_cu_operand_addr_b_disp_32 fcml_fn_cu_operand_addr_b_disp_64 fcml_fn_cu_operand_addr_b_disp_8 fcml_fn_cu_operand_addr_bis_disp_32 fcml_fn_cu_operand_addr_bis_disp_64 fcml_fn_cu_operand_addr_bis_disp_8 fcml_fn_cu_operand_addr_disp_16 fcml_fn_cu_operand_addr_disp_32 fcml_fn_cu_operand_addr_disp_64 fcml_fn_cu_operand_addr_far_pointer_offset16 fcml_fn_cu_operand_addr_far_pointer_offset32 fcml_fn_cu_operand_addr_is_disp_32 fcml_fn_cu_operand_addr_is_disp_64 fcml_fn_cu_operand_addr_is_disp_8 fcml_fn_cu_operand_addr_offset_16 fcml_fn_cu_operand_addr_offset_32 fcml_fn_cu_operand_addr_offset_abs_64 fcml_fn_cu_operand_addr_offset_rel_64 fcml_fn_cu_operand_reg fcml_fn_cu_operand_signed_imm_16 fcml_fn_cu_operand_signed_imm_32 fcml_fn_cu_operand_signed_imm_64 fcml_fn_cu_operand_signed_imm_8 fcml_fn_cu_operand_unsigned_imm_16 fcml_fn_cu_operand_unsigned_imm_32 fcml_fn_cu_operand_unsigned_imm_64 fcml_fn_cu_operand_unsigned_imm_8 fcml_fn_cu_find_operand fcml_reg_AH fcml_reg_AL fcml_reg_AX fcml_reg_BH fcml_reg_BL fcml_reg_BP fcml_reg_BPL fcml_reg_BX fcml_reg_CH fcml_reg_CL fcml_reg_CR0 fcml_reg_CR2 fcml_reg_CR3 fcml_reg_CR4 fcml_reg_CR8 fcml_reg_CS fcml_reg_CX fcml_reg_DH fcml_reg_DI fcml_reg_DIL fcml_reg_DL fcml_reg_DR0 fcml_reg_DR1 fcml_reg_DR2 fcml_reg_DR3 fcml_reg_DR4 fcml_reg_DR5 fcml_reg_DR6 fcml_reg_DR7 fcml_reg_DS fcml_reg_DX fcml_reg_EAX fcml_reg_EBP fcml_reg_EBX fcml_reg_ECX fcml_reg_EDI fcml_reg_EDX fcml_reg_EIP fcml_reg_ES fcml_reg_ESI fcml_reg_ESP fcml_reg_FS fcml_reg_GS fcml_reg_IP fcml_reg_MM0 fcml_reg_MM1 fcml_reg_MM2 fcml_reg_MM3 fcml_reg_MM4 fcml_reg_MM5 fcml_reg_MM6 fcml_reg_MM7 fcml_reg_R10 fcml_reg_R10D fcml_reg_R10L fcml_reg_R10W fcml_reg_R11 fcml_reg_R11D fcml_reg_R11L fcml_reg_R11W fcml_reg_R12 fcml_reg_R12D fcml_reg_R12L fcml_reg_R12W fcml_reg_R13 fcml_reg_R13D fcml_reg_R13L fcml_reg_R13W fcml_reg_R14 fcml_reg_R14D fcml_reg_R14L fcml_reg_R14W fcml_reg_R15 fcml_reg_R15D fcml_reg_R15L fcml_reg_R15W fcml_reg_R8 fcml_reg_R8D fcml_reg_R8L fcml_reg_R8W fcml_reg_R9 fcml_reg_R9D fcml_reg_R9L fcml_reg_R9W fcml_reg_RAX fcml_reg_RBP fcml_reg_RBX fcml_reg_RCX fcml_reg_RDI fcml_reg_RDX fcml_reg_RIP fcml_reg_RSI fcml_reg_RSP fcml_reg_SI fcml_reg_SIL fcml_reg_SP fcml_reg_SPL fcml_reg_SS fcml_reg_ST0 fcml_reg_ST1 fcml_reg_ST2 fcml_reg_ST3 fcml_reg_ST4 fcml_reg_ST5 fcml_reg_ST6 fcml_reg_ST7 fcml_reg_XMM0 fcml_reg_XMM1 fcml_reg_XMM10 fcml_reg_XMM11 fcml_reg_XMM12 fcml_reg_XMM13 fcml_reg_XMM14 fcml_reg_XMM15 fcml_reg_XMM2 fcml_reg_XMM3 fcml_reg_XMM4 fcml_reg_XMM5 fcml_reg_XMM6 fcml_reg_XMM7 fcml_reg_XMM8 fcml_reg_XMM9 fcml_reg_YMM0 fcml_reg_YMM1 fcml_reg_YMM10 fcml_reg_YMM11 fcml_reg_YMM12 fcml_reg_YMM13 fcml_reg_YMM14 fcml_reg_YMM15 fcml_reg_YMM2 fcml_reg_YMM3 fcml_reg_YMM4 fcml_reg_YMM5 fcml_reg_YMM6 fcml_reg_YMM7 fcml_reg_YMM8 fcml_reg_YMM9 fcml-1.1.1/win32/vs2008/fcml/fcml/resource1.h0000644000175000017500000000060012560745216015207 00000000000000//{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by fcml.rc // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif fcml-1.1.1/win32/vs2008/fcml/fcml/fcml.rc0000644000175000017500000000432312560745216014403 00000000000000// Microsoft Visual C++ generated resource script. // #include "resource1.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "windows.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource1.h\0" END 2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE BEGIN "\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,0 PRODUCTVERSION 1,0,0,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x0L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "fcml" VALUE "FileVersion", "1, 0, 0, 0" VALUE "InternalName", "fcml.dll" VALUE "LegalCopyright", "Copyright (C) 2014 Slawomir Wojtasiak" VALUE "LegalTrademarks", "All Rights Reserved" VALUE "OriginalFilename", "fcml.dll" VALUE "ProductName", "Free Code Manipulation Library" VALUE "ProductVersion", "1, 0, 0, 0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED fcml-1.1.1/win32/vs2008/fcml/fcml/fcml.vcproj0000644000175000017500000006623712560745216015316 00000000000000 fcml-1.1.1/win32/vs2008/fcml/fcml/resource.h0000644000175000017500000000060012560745216015126 00000000000000//{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by fcml.rc // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif fcml-1.1.1/win32/vs2008/fcml/fcml-check-cpp/0000755000175000017500000000000012561462630015042 500000000000000fcml-1.1.1/win32/vs2008/fcml/fcml-check-cpp/fcml-check-cpp.vcproj0000644000175000017500000003261712560745216020777 00000000000000 fcml-1.1.1/win32/vs2008/fcml/examples/0000755000175000017500000000000012561462630014104 500000000000000fcml-1.1.1/win32/vs2008/fcml/examples/hsdis/0000755000175000017500000000000012561462631015217 500000000000000fcml-1.1.1/win32/vs2008/fcml/examples/hsdis/COPYING0000644000175000017500000004325412560745216016204 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. fcml-1.1.1/win32/vs2008/fcml/examples/hsdis/targetver.h0000644000175000017500000000257412560745216017325 00000000000000#pragma once // The following macros define the minimum required platform. The minimum required platform // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run // your application. The macros work by enabling all features available on platform versions up to and // including the version specified. // Modify the following defines if you have to target a platform prior to the ones specified below. // Refer to MSDN for the latest info on corresponding values for different platforms. #ifndef WINVER // Specifies that the minimum required platform is Windows Vista. #define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows. #endif #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. #endif #ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98. #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. #endif #ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0. #define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE. #endif fcml-1.1.1/win32/vs2008/fcml/examples/hsdis/hsdis.vcproj0000644000175000017500000003747712560745216017522 00000000000000 fcml-1.1.1/win32/vs2008/fcml/examples/hsdis/hsdis.def0000644000175000017500000000006112560745216016730 00000000000000LIBRARY "hsdis" EXPORTS decode_instructions @1 fcml-1.1.1/win32/vs2008/fcml/examples/hsdis/dllmain.cpp0000644000175000017500000000214312560745216017265 00000000000000/** * FCML - Free Code Manipulation Library. * Copyright (C) 2014-2015 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 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "targetver.h" #include BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } fcml-1.1.1/win32/vs2008/fcml/examples/hsdis/resource.h0000644000175000017500000000060112560745216017136 00000000000000//{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by hsdis.rc // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif fcml-1.1.1/win32/vs2008/fcml/examples/hsdis/hsdis.rc0000644000175000017500000000424712560745216016610 00000000000000// Microsoft Visual C++ generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "windows.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource.h\0" END 2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE BEGIN "\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,1 PRODUCTVERSION 1,0,0,1 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x0L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "SWKSoftware" VALUE "FileDescription", "hsdis" VALUE "FileVersion", "1, 0, 0, 1" VALUE "InternalName", "hsdis" VALUE "LegalCopyright", "Copyright (C) 2014 Slawomir Wojtasiak" VALUE "OriginalFilename", "hsdis" VALUE "ProductName", "hsdis" VALUE "ProductVersion", "1, 0, 0, 1" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED fcml-1.1.1/src/0000755000175000017500000000000012561462632010232 500000000000000fcml-1.1.1/src/fcml_coll.c0000644000175000017500000003676012560745216012265 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "fcml_env_int.h" #include "fcml_coll.h" #include "fcml_ceh.h" /***********************/ /* Bidirectional list. */ /***********************/ fcml_st_coll_list *fcml_fn_coll_list_alloc() { fcml_st_coll_list *list = (fcml_st_coll_list*) fcml_fn_env_memory_alloc( sizeof(fcml_st_coll_list) ); if (list) { list->head = NULL; list->tail = NULL; list->size = 0; } return list; } fcml_st_coll_list_element *fcml_fn_coll_list_add_front( fcml_st_coll_list *list, const fcml_ptr item ) { fcml_st_coll_list_element *element = (fcml_st_coll_list_element*) fcml_fn_env_memory_alloc( sizeof(fcml_st_coll_list_element) ); if (element) { element->next = list->head; if (list->head) { list->head->prev = element; } element->prev = NULL; element->item = item; list->head = element; if (!list->tail) { list->tail = element; } list->size++; } return element; } fcml_st_coll_list_element *fcml_fn_coll_list_add_back( fcml_st_coll_list *list, const fcml_ptr item ) { fcml_st_coll_list_element *element = (fcml_st_coll_list_element*) fcml_fn_env_memory_alloc( sizeof(fcml_st_coll_list_element) ); if (element) { element->next = NULL; element->prev = list->tail; element->item = item; if (list->tail) { list->tail->next = element; } list->tail = element; if (!list->head) { list->head = element; } list->size++; } return element; } fcml_st_coll_list_element *fcml_fn_coll_list_insert( fcml_st_coll_list *list, fcml_st_coll_list_element *prev_element, const fcml_ptr item ) { fcml_st_coll_list_element *element; if (prev_element) { element = (fcml_st_coll_list_element*) fcml_fn_env_memory_alloc( sizeof(fcml_st_coll_list_element) ); if (element) { element->item = item; element->prev = prev_element; element->next = prev_element->next; prev_element->next = element; } } else { element = fcml_fn_coll_list_add_front( list, item ); } return element; } void fcml_fn_coll_list_traverse( const fcml_st_coll_list *list, fcml_fp_coll_list_action item_handler, fcml_ptr item_handler_args ) { fcml_st_coll_list_element *current = list->head; while ( current ) { ( item_handler )( current->item, item_handler_args ); current = current->next; } } void fcml_fn_coll_list_remove( fcml_st_coll_list *list, fcml_st_coll_list_element *element ) { fcml_st_coll_list_element *prev = element->prev; fcml_st_coll_list_element *next = element->next; if (prev) { prev->next = next; } else { list->head = next; } if (next) { next->prev = prev; } else { list->tail = prev; } list->size--; fcml_fn_env_memory_free( element ); } void fcml_fn_coll_list_free( fcml_st_coll_list *list, fcml_fp_coll_list_action item_handler, const fcml_ptr item_handler_args ) { fcml_st_coll_list_element *current = list->head; while ( current ) { if (item_handler) { ( item_handler )( current->item, item_handler_args ); } fcml_st_coll_list_element *tmp = current; current = current->next; fcml_fn_env_memory_free( tmp ); } fcml_fn_env_memory_free( list ); } /*************/ /* Hash map. */ /*************/ /* Internal data types dedicated for given implementation of the map.*/ struct fcml_ist_coll_map_entry { struct fcml_ist_coll_map_entry *next; fcml_uint32_t hash; fcml_ptr key; fcml_ptr value; }; struct fcml_ist_coll_map { fcml_st_coll_map_descriptor descriptor; float load_factor; fcml_uint32_t boundary; fcml_uint32_t capacity; fcml_uint32_t size; fcml_uint32_t hash_mask; struct fcml_ist_coll_map_entry** map_entries; }; fcml_st_coll_map_descriptor fcml_coll_map_descriptor_string = { fcml_fnp_coll_map_key_hash_string, fcml_fnp_coll_map_key_equals_string, NULL, NULL }; fcml_st_coll_map_descriptor fcml_coll_map_descriptor_uint32 = { fcml_fnp_coll_map_key_hash_uint32, fcml_fnp_coll_map_key_equals_uint32, NULL, NULL }; fcml_uint32_t fcml_ifn_get_hash( fcml_st_coll_map_descriptor *descriptor, fcml_ptr key ) { fcml_uint32_t hash = descriptor->hash_function( key ); hash ^= ( hash >> 20 ) ^ ( hash >> 12 ); hash ^= ( hash >> 7 ) ^ ( hash >> 4 ); return hash; } fcml_coll_map fcml_fn_coll_map_alloc( const fcml_st_coll_map_descriptor *descriptor, fcml_uint32_t capacity, fcml_int *error ) { return fcml_fn_coll_map_alloc_factor( descriptor, capacity, FCML_COLL_MAP_DEFAULT_FACTOR, error ); } fcml_coll_map fcml_fn_coll_map_alloc_factor( const fcml_st_coll_map_descriptor *descriptor, fcml_uint32_t capacity, float load_factor, fcml_int *error ) { *error = FCML_COLL_ERROR_NO_ERROR; if (capacity > ( 1 << 31 )) { *error = FCML_COLL_ERROR_BAD_ARGS; return NULL; } fcml_uint32_t real_capacity = 2; while ( real_capacity < capacity ) { real_capacity <<= 1; } struct fcml_ist_coll_map *map = (struct fcml_ist_coll_map*) fcml_fn_env_memory_alloc( sizeof(struct fcml_ist_coll_map) ); if (map == NULL) { *error = FCML_COLL_ERROR_OUT_OF_MEMORY; return NULL; } map->descriptor = *descriptor; /* Calculate and cache boundary to gain some performance from further calculations.*/ map->load_factor = load_factor; map->boundary = (fcml_uint32_t) ( real_capacity * load_factor ); map->capacity = real_capacity; map->hash_mask = real_capacity - 1; map->size = 0; /* Allocate space for entries.*/ map->map_entries = (struct fcml_ist_coll_map_entry**) fcml_fn_env_memory_alloc_clear( sizeof(struct fcml_ist_coll_map_entry*) * real_capacity ); if (!map->map_entries) { fcml_fn_env_memory_free( map ); *error = FCML_COLL_ERROR_OUT_OF_MEMORY; return NULL; } return map; } fcml_uint32_t fcml_fn_coll_map_size( const fcml_coll_map map_int ) { struct fcml_ist_coll_map *map = (struct fcml_ist_coll_map*) map_int; return map->size; } fcml_bool fcml_ifn_coll_map_expand( struct fcml_ist_coll_map *map, fcml_ceh_error *error ) { *error = FCML_COLL_ERROR_NO_ERROR; if (map->capacity > FCML_INT32_MAX) { /* Map reached its maximum capacity.*/ *error = FCML_COLL_ERROR_MAP_FULL; return FCML_FALSE; } fcml_uint32_t new_capacity = map->capacity << 1; /* Allocate new map entries.*/ struct fcml_ist_coll_map_entry** new_map_entries = (struct fcml_ist_coll_map_entry**) fcml_fn_env_memory_alloc( new_capacity * sizeof(struct fcml_ist_coll_map_entry*) ); if (!new_map_entries) { *error = FCML_COLL_ERROR_OUT_OF_MEMORY; return FCML_FALSE; } fcml_fn_env_memory_clear( new_map_entries, new_capacity * sizeof(struct fcml_ist_coll_map_entry*) ); fcml_uint32_t new_hash_mask = ( new_capacity - 1 ); fcml_uint32_t i; for ( i = 0; i < map->capacity; i++ ) { struct fcml_ist_coll_map_entry *entry = map->map_entries[i]; if (entry) { while ( entry ) { struct fcml_ist_coll_map_entry *next_entry = entry->next; fcml_uint32_t new_index = new_hash_mask & entry->hash; entry->next = new_map_entries[new_index]; new_map_entries[new_index] = entry; entry = next_entry; } } } fcml_fn_env_memory_free( map->map_entries ); map->map_entries = new_map_entries; map->capacity = new_capacity; map->boundary = (fcml_uint32_t) ( new_capacity * map->load_factor ); map->hash_mask = new_hash_mask; return FCML_TRUE; } void fcml_fn_coll_map_put( fcml_coll_map map_int, const fcml_ptr key, const fcml_ptr value, fcml_int *error ) { *error = FCML_COLL_ERROR_NO_ERROR; struct fcml_ist_coll_map *map = (struct fcml_ist_coll_map*) map_int; fcml_st_coll_map_descriptor *descriptor = &( map->descriptor ); fcml_uint32_t hash = fcml_ifn_get_hash( descriptor, key ); fcml_uint32_t index = map->hash_mask & hash; struct fcml_ist_coll_map_entry *entry = map->map_entries[index]; struct fcml_ist_coll_map_entry *current_entry = entry; /* Checking for entry with the same key. */ while ( current_entry ) { if (current_entry->hash == hash && ( key == current_entry->key || descriptor->equals_function( key, current_entry->key ) )) { /* We found element with same key, so replace key and value. */ if (descriptor->entry_free_function) { descriptor->entry_free_function( current_entry->key, current_entry->value, map->descriptor.entry_free_args ); } current_entry->key = key; current_entry->value = value; return; } current_entry = current_entry->next; } /* Check if map should be already extended. */ if (entry && map->size > map->boundary) { /* Currently we ignore errors, because it really doesn't matter if /* there is no space in the map or on the heap. */ fcml_ceh_error error; if (fcml_ifn_coll_map_expand( map, &error )) { index = map->hash_mask & hash; } } struct fcml_ist_coll_map_entry *newEntry = (struct fcml_ist_coll_map_entry*) fcml_fn_env_memory_alloc( sizeof(struct fcml_ist_coll_map_entry) ); if (!newEntry) { *error = FCML_COLL_ERROR_OUT_OF_MEMORY; return; } newEntry->key = key; newEntry->value = value; newEntry->hash = hash; newEntry->next = map->map_entries[index]; map->map_entries[index] = newEntry; map->size++; } void fcml_fn_coll_map_remove( fcml_coll_map map_int, const fcml_ptr key ) { struct fcml_ist_coll_map *map = (struct fcml_ist_coll_map*) map_int; fcml_uint32_t hash = fcml_ifn_get_hash( &( map->descriptor ), key ); int index = map->hash_mask & hash; struct fcml_ist_coll_map_entry *entry = map->map_entries[index]; struct fcml_ist_coll_map_entry *previous_entry = NULL; while ( entry ) { if (entry->hash == hash && ( key == entry->key || map->descriptor.equals_function( key, entry->key ) )) { /* We found entry, so remove it. */ if (map->descriptor.entry_free_function) { map->descriptor.entry_free_function( entry->key, entry->value, map->descriptor.entry_free_args ); } if (previous_entry) { previous_entry->next = entry->next; } else { map->map_entries[index] = NULL; } fcml_fn_env_memory_free( entry ); map->size--; return; } previous_entry = entry; entry = entry->next; } return; } void fcml_fn_coll_map_iterate( const fcml_coll_map map_int, fcml_fnp_coll_map_entry_handler item_handler ) { if (item_handler) { struct fcml_ist_coll_map *map = (struct fcml_ist_coll_map*) map_int; fcml_uint32_t i; for ( i = 0; i < map->capacity; i++ ) { struct fcml_ist_coll_map_entry *entry = map->map_entries[i]; while ( entry ) { item_handler( entry->key, entry->value, map->descriptor.entry_free_args ); entry = entry->next; } } } } void fcml_fn_coll_map_remove_if( fcml_coll_map map_int, fcml_fnp_coll_map_entry_handler_if item_handler, fcml_ptr item_handler_args ) { struct fcml_ist_coll_map *map = (struct fcml_ist_coll_map*) map_int; fcml_uint32_t i; for ( i = 0; i < map->capacity; i++ ) { struct fcml_ist_coll_map_entry **entry = &( map->map_entries[i] ); struct fcml_ist_coll_map_entry **next_entry; while ( *entry ) { next_entry = &( ( *entry )->next ); if (item_handler( ( *entry )->key, ( *entry )->value, item_handler_args )) { if (map->descriptor.entry_free_function) { map->descriptor.entry_free_function( ( *entry )->key, ( *entry )->value, map->descriptor.entry_free_args ); } struct fcml_ist_coll_map_entry *current = *entry; *entry = *next_entry; fcml_fn_env_memory_free( current ); map->size--; } else { entry = next_entry; } } } } void fcml_fn_coll_map_clear( fcml_coll_map map_int ) { struct fcml_ist_coll_map *map = (struct fcml_ist_coll_map*) map_int; fcml_uint32_t i; for ( i = 0; i < map->capacity; i++ ) { struct fcml_ist_coll_map_entry *entry = map->map_entries[i]; struct fcml_ist_coll_map_entry *next_entry; while ( entry ) { next_entry = entry->next; if (map->descriptor.entry_free_function) { map->descriptor.entry_free_function( entry->key, entry->value, map->descriptor.entry_free_args ); } fcml_fn_env_memory_free( entry ); entry = next_entry; } map->map_entries[i] = NULL; } map->size = 0; } fcml_ptr fcml_fn_coll_map_get( fcml_coll_map map_int, const fcml_ptr key ) { struct fcml_ist_coll_map *map = (struct fcml_ist_coll_map*) map_int; fcml_uint32_t hash = fcml_ifn_get_hash( &( map->descriptor ), key ); fcml_uint32_t index = map->hash_mask & hash; struct fcml_ist_coll_map_entry *entry = map->map_entries[index]; /* Checking for entry with the same key.*/ while ( entry ) { if (entry->hash == hash && ( key == entry->key || map->descriptor.equals_function( key, entry->key ) )) { return entry->value; } entry = entry->next; } return NULL; } void fcml_fn_coll_map_free( fcml_coll_map map_int ) { if (map_int) { fcml_fn_coll_map_clear( map_int ); struct fcml_ist_coll_map *map = (struct fcml_ist_coll_map*) map_int; if (map->map_entries) { fcml_fn_env_memory_free( map->map_entries ); } fcml_fn_env_memory_free( map ); } } /* Build-in Hash & Equals implementations. */ fcml_uint32_t fcml_fnp_coll_map_key_hash_string( fcml_ptr key ) { fcml_uint32_t hash = 0; fcml_string str_key = (fcml_string) key; int i; for ( i = 0; str_key[i] != '\0'; i++ ) { hash = ( hash << 6 ) | ( hash >> 26 ); hash += (fcml_uint32_t) str_key[i]; } return hash; } fcml_bool fcml_fnp_coll_map_key_equals_string( fcml_ptr key1, fcml_ptr key2 ) { return fcml_fn_env_str_strcmp( (fcml_string) key1, (fcml_string) key2 ); } fcml_uint32_t fcml_fnp_coll_map_key_hash_uint32( fcml_ptr key ) { return *( (fcml_uint32_t*) key ); } fcml_bool fcml_fnp_coll_map_key_equals_uint32( fcml_ptr key1, fcml_ptr key2 ) { return *( (fcml_uint32_t*) key1 ) == *( (fcml_uint32_t*) key2 ); } fcml-1.1.1/src/fcml_intel_parser.c0000644000175000017500000000556312560745216014020 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include #include #include "fcml_ceh.h" #include "fcml_env_int.h" #include "fcml_parser_utils.h" #include "fcml_intel_parser_def.h" #include "fcml_intel_lexer.h" #include "fcml_intel_parser.h" #include "fcml_parser_int.h" void intel_error( struct fcml_st_parser_data *pd, const char *error ) { /* Stores parser error into standard container.*/ fcml_fn_ceh_add_error( &( pd->errors ), (const fcml_string) error, FCML_CEH_MEC_ERROR_INVALID_SYNTAX, FCML_EN_CEH_EL_ERROR ); } void *intel_alloc( yy_size_t size, yyscan_t yyscanner ) { return fcml_fn_env_memory_alloc( (fcml_usize) size ); } void *intel_realloc( void *ptr, yy_size_t size, yyscan_t yyscanner ) { return fcml_fn_env_memory_realloc( ptr, (fcml_usize) size ); } void intel_free( void *ptr, yyscan_t yyscanner ) { return fcml_fn_env_memory_free( ptr ); } fcml_ceh_error fcml_fn_intel_parse_instruction_to_ast( fcml_ip ip, const fcml_string mnemonic, fcml_st_parser_ast *ast ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; /* Instruction size is limited to prevent from parser's stack and buffer overflow. */ if ( !mnemonic || !ast || fcml_fn_env_str_strlen( mnemonic ) > FCML_PARSER_MAX_INSTRUCTION_LEN ) { return FCML_CEH_GEC_INVALID_INPUT; } /* Fill instruction pointer. */ fcml_st_parser_data parser = { 0 }; parser.ip = ip; /* Set up scanner. */ if ( intel_lex_init_extra( &parser, &( parser.scannerInfo ) ) ) { return FCML_CEH_GEC_OUT_OF_MEMORY; } intel__scan_string( mnemonic, parser.scannerInfo ); int yyresult = intel_parse( &parser ); intel_lex_destroy( parser.scannerInfo ); ast->errors = parser.errors; ast->symbol = parser.symbol; ast->tree = parser.tree; if ( yyresult ) { switch ( yyresult ) { case 1: /*Syntax error.*/ error = FCML_CEH_GEC_INVALID_INPUT; break; case 2: /*Out of memory*/ error = FCML_CEH_GEC_OUT_OF_MEMORY; break; } } return error; } fcml-1.1.1/src/fcml_dialect.c0000644000175000017500000000214012560745216012722 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "fcml_dialect_int.h" void LIB_CALL fcml_fn_dialect_free( fcml_st_dialect *dialect ) { if ( dialect ) { fcml_st_dialect_context_int *context = (fcml_st_dialect_context_int*) dialect; context->free_dialect( dialect ); } } fcml-1.1.1/src/fcml_env_int.c0000644000175000017500000001263312560745216012767 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_env_int.h" #include #include #include #include #include #include static void *fcml_fn_env_default_memory_alloc( fcml_usize size ) { return malloc( (fcml_usize) size ); } static void *fcml_fn_env_default_memory_realloc( fcml_ptr ptr, fcml_usize size ) { return realloc( ptr, (fcml_usize) size ); } static void fcml_fp_env_default_memory_free( fcml_ptr memory_block ) { free( memory_block ); } static fcml_fp_env_memory_alloc_handler fcml_gl_fp_memory_alloc = fcml_fn_env_default_memory_alloc; static fcml_fp_env_memory_realloc_handler fcml_gl_fp_memory_realloc = fcml_fn_env_default_memory_realloc; static fcml_fp_env_memory_free_handler fcml_gl_fp_memory_free = fcml_fp_env_default_memory_free; fcml_fp_env_memory_alloc_handler LIB_CALL fcml_fn_env_register_memory_alloc_handler( fcml_fp_env_memory_alloc_handler handler ) { fcml_fp_env_memory_alloc_handler tmp = fcml_gl_fp_memory_alloc; fcml_gl_fp_memory_alloc = handler; return tmp; } fcml_fp_env_memory_realloc_handler LIB_CALL fcml_fn_env_register_memory_realloc_handler( fcml_fp_env_memory_realloc_handler handler ) { fcml_fp_env_memory_realloc_handler tmp = fcml_gl_fp_memory_realloc; fcml_gl_fp_memory_realloc = handler; return tmp; } fcml_fp_env_memory_free_handler LIB_CALL fcml_fn_env_register_memory_free_handler( fcml_fp_env_memory_free_handler handler ) { fcml_fp_env_memory_free_handler tmp = fcml_gl_fp_memory_free; fcml_gl_fp_memory_free = handler; return tmp; } fcml_ptr fcml_fn_env_memory_alloc_clear( fcml_usize size ) { fcml_ptr ptr = fcml_fn_env_memory_alloc( size ); if ( ptr ) { fcml_fn_env_memory_clear( ptr, size ); } return ptr; } fcml_ptr fcml_fn_env_memory_alloc( fcml_usize size ) { return fcml_gl_fp_memory_alloc( size ); } fcml_ptr fcml_fn_env_memory_realloc( fcml_ptr ptr, fcml_usize size ) { return fcml_gl_fp_memory_realloc( ptr, size ); } void fcml_fn_env_memory_copy( fcml_ptr dest, const fcml_ptr src, fcml_usize len ) { memcpy( dest, src, (fcml_usize) len ); } void fcml_fn_env_memory_clear( fcml_ptr src, fcml_usize len ) { memset( src, 0, (fcml_usize) len ); } fcml_bool fcml_fn_env_memory_cmp( const fcml_ptr src1, const fcml_ptr src2, fcml_usize len ) { return strncmp( (char *) src1, (char *) src2, len ) == 0 ? FCML_TRUE : FCML_FALSE; } void fcml_fn_env_memory_free( fcml_ptr ptr ) { fcml_gl_fp_memory_free( ptr ); } fcml_string fcml_fn_env_str_strldup( const fcml_string str, fcml_usize size ) { fcml_string new_str = (fcml_string) fcml_fn_env_memory_alloc( size + 1 ); if ( new_str ) { memcpy( new_str, str, (fcml_usize) size ); new_str[size] = '\0'; } return new_str; } fcml_bool fcml_fn_env_str_strblank( const fcml_string str ) { fcml_usize len = fcml_fn_env_str_strlen( str ); fcml_int i; for ( i = 0; i < len; i++ ) { if ( !isspace( str[i] ) ) { return FCML_FALSE; } } return FCML_TRUE; } fcml_usize fcml_fn_env_str_strlen( const fcml_string str ) { return (fcml_usize) strlen( str ); } void fcml_fn_env_str_strcpy( fcml_string dst, const fcml_string src ) { strcpy( dst, src ); } fcml_bool fcml_fn_env_str_strcmp( const fcml_string src1, const fcml_string src2 ) { return !strcmp( src1, src2 ); } void fcml_fn_env_str_strncpy( fcml_string dst, const fcml_string src, fcml_usize len ) { strncpy( dst, src, (fcml_usize) len ); } fcml_string fcml_fn_env_str_strdup( const fcml_string str ) { fcml_usize size = (fcml_usize) ( strlen( str ) + 1 ); fcml_string new_str = (fcml_string) fcml_fn_env_memory_alloc( size ); if ( new_str ) { memcpy( new_str, str, (fcml_usize) size ); } return new_str; } fcml_string fcml_fn_env_str_stralloc( fcml_usize len ) { return (fcml_string) fcml_fn_env_memory_alloc_clear( len ); } void fcml_fn_env_str_strclr( fcml_string str ) { str[0] = '\0'; } void fcml_fn_env_str_strfree( fcml_string str ) { if ( str ) { fcml_fn_env_memory_free( str ); } } void fcml_fn_env_str_vsnprintf( fcml_string buffer, fcml_usize maxlen, const fcml_string format, va_list args ) { vsnprintf( buffer, (fcml_usize) maxlen, format, args ); } void fcml_fn_env_str_snprintf( fcml_string buffer, fcml_usize maxlen, fcml_string format, ... ) { va_list args; va_start( args, format ); vsnprintf( buffer, (fcml_usize) maxlen, format, args ); va_end( args ); } fcml_bool fcml_fn_env_is_alpha( fcml_char c ) { return isalpha( c ); } fcml_bool fcml_fn_env_is_digit( fcml_char c ) { return isdigit( c ); } fcml-1.1.1/src/fcml_utils.h0000644000175000017500000000662012560745216012471 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_UTILS_H_ #define FCML_UTILS_H_ #include #include #include "fcml_ceh.h" #include "fcml_stream.h" typedef enum fcml_en_utils_size_flags { FCML_ENUSF_8 = 0x01, FCML_ENUSF_16 = 0x02, FCML_ENUSF_32 = 0x04, FCML_ENUSF_64 = 0x08, FCML_ENUSF_ALL = ( FCML_ENUSF_8 | FCML_ENUSF_16 | FCML_ENUSF_32 | FCML_ENUSF_64 ) } fcml_en_utils_size_flags; fcml_ceh_error fcml_fn_utils_int64_to_integer( fcml_uint64_t src, fcml_bool is_src_signed, fcml_st_integer *integer, fcml_en_utils_size_flags filter ); fcml_ceh_error fcml_fn_utils_convert_integer_to_integer( const fcml_st_integer *source, fcml_st_integer *destination, fcml_usize expected_source_size, fcml_usize destination_size ); fcml_ceh_error fcml_fn_utils_convert_integer_to_uint8( const fcml_st_integer *integer, fcml_uint8_t *value ); fcml_ceh_error fcml_fn_utils_convert_integer_to_uint16( const fcml_st_integer *integer, fcml_uint16_t *value ); fcml_ceh_error fcml_fn_utils_convert_integer_to_uint32( const fcml_st_integer *integer, fcml_uint32_t *value ); fcml_ceh_error fcml_fn_utils_convert_integer_to_uint64( const fcml_st_integer *integer, fcml_uint64_t *value ); fcml_ceh_error fcml_fn_utils_convert_integer_to_int8( const fcml_st_integer *integer, fcml_int8_t *value ); fcml_ceh_error fcml_fn_utils_convert_integer_to_int16( const fcml_st_integer *integer, fcml_int16_t *value ); fcml_ceh_error fcml_fn_utils_convert_integer_to_int32( const fcml_st_integer *integer, fcml_int32_t *value ); fcml_ceh_error fcml_fn_utils_convert_integer_to_int64( const fcml_st_integer *integer, fcml_int64_t *value ); fcml_ceh_error fcml_fn_utils_decode_integer( fcml_st_memory_stream *stream, fcml_st_integer *integer, fcml_usize size ); fcml_ceh_error fcml_fn_utils_encode_integer( fcml_st_memory_stream *stream, const fcml_st_integer *integer ); fcml_ceh_error fcml_fn_utils_offset_to_integer( const fcml_st_offset *offset, fcml_st_integer *integer ); fcml_ceh_error fcml_fn_utils_integer_to_offset( const fcml_st_integer *integer, fcml_st_offset *offset ); fcml_ceh_error fcml_fn_utils_extend_integer( fcml_st_integer *integer, fcml_usize extension ); fcml_bool fcml_fn_utils_is_reg_undef( const fcml_st_register *reg ); fcml_ceh_error fcml_fn_utils_convert_map_error( fcml_int error ); void fcml_fn_utils_convert_gec_to_error_info( fcml_bool enabled, fcml_st_ceh_error_container *error_container, fcml_ceh_error code ); fcml_ceh_error fcml_fn_prepare_entry_point( fcml_st_entry_point *entry_point ); fcml_bool fcml_fn_utils_is_displacement_negative( const fcml_st_integer *displacement ); #endif /* FCML_UTILS_H_ */ fcml-1.1.1/src/fcml_gas_lexer.c0000644000175000017500000024333412560745216013302 00000000000000#line 2 "fcml_gas_lexer.c" #line 4 "fcml_gas_lexer.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 39 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) are macros in the reentrant scanner. */ #define yyin yyg->yyin_r #define yyout yyg->yyout_r #define yyextra yyg->yyextra_r #define yyleng yyg->yyleng_r #define yytext yyg->yytext_r #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) #define yy_flex_debug yyg->yy_flex_debug_r /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN yyg->yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yyg->yy_start - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE gas_restart(yyin ,yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #define YY_BUF_SIZE 16384 #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = yyg->yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ 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 * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via gas_restart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] void gas_restart (FILE *input_file ,yyscan_t yyscanner ); void gas__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); YY_BUFFER_STATE gas__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); void gas__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void gas__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void gas_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void gas_pop_buffer_state (yyscan_t yyscanner ); static void gas_ensure_buffer_stack (yyscan_t yyscanner ); static void gas__load_buffer_state (yyscan_t yyscanner ); static void gas__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); #define YY_FLUSH_BUFFER gas__flush_buffer(YY_CURRENT_BUFFER ,yyscanner) YY_BUFFER_STATE gas__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE gas__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); YY_BUFFER_STATE gas__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); void *gas_alloc (yy_size_t ,yyscan_t yyscanner ); void *gas_realloc (void *,yy_size_t ,yyscan_t yyscanner ); void gas_free (void * ,yyscan_t yyscanner ); #define yy_new_buffer gas__create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ gas_ensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ gas__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ gas_ensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ gas__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define gas_wrap(yyscanner) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; typedef int yy_state_type; #define yytext_ptr yytext_r static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); static int yy_get_next_buffer (yyscan_t yyscanner ); static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ yyleng = (size_t) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 161 #define YY_END_OF_BUFFER 162 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[288] = { 0, 158, 158, 162, 159, 158, 160, 157, 159, 154, 155, 152, 150, 149, 151, 148, 153, 1, 1, 156, 148, 148, 148, 148, 148, 148, 148, 158, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 148, 148, 1, 0, 1, 148, 148, 148, 148, 148, 148, 148, 8, 4, 24, 11, 7, 29, 27, 9, 5, 0, 134, 25, 0, 10, 31, 6, 136, 26, 0, 0, 0, 0, 133, 137, 138, 0, 0, 64, 65, 0, 0, 0, 0, 0, 0, 30, 28, 135, 0, 0, 0, 148, 2, 148, 148, 148, 148, 142, 148, 148, 21, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 23, 40, 45, 43, 41, 47, 42, 46, 44, 72, 73, 74, 75, 76, 77, 78, 79, 66, 67, 68, 69, 70, 71, 48, 12, 32, 49, 13, 33, 56, 61, 59, 57, 63, 58, 139, 62, 60, 22, 20, 0, 0, 112, 113, 114, 115, 116, 117, 118, 119, 0, 0, 148, 148, 148, 140, 148, 142, 148, 142, 148, 148, 50, 14, 34, 51, 15, 35, 52, 16, 36, 53, 17, 37, 54, 18, 38, 55, 19, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 147, 148, 148, 148, 141, 141, 148, 148, 0, 0, 0, 0, 0, 0, 0, 0, 90, 91, 92, 93, 94, 95, 106, 107, 108, 109, 110, 111, 145, 148, 148, 148, 148, 148, 148, 148, 148, 148, 146, 143, 144, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 3, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 4, 5, 1, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1, 1, 1, 1, 1, 1, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 34, 46, 47, 48, 49, 1, 1, 1, 1, 50, 1, 51, 52, 53, 54, 55, 56, 57, 58, 59, 34, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 34, 71, 72, 73, 74, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[75] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 } ; static yyconst flex_int16_t yy_base[290] = { 0, 0, 0, 263, 591, 241, 591, 591, 50, 591, 591, 591, 591, 591, 591, 56, 591, 69, 110, 591, 0, 42, 58, 49, 50, 65, 94, 240, 102, 107, 108, 155, 157, 47, 53, 73, 213, 153, 100, 105, 0, 98, 220, 0, 268, 127, 111, 137, 151, 130, 162, 165, 591, 591, 591, 591, 591, 156, 591, 591, 591, 215, 591, 591, 233, 591, 163, 591, 591, 591, 154, 228, 158, 245, 236, 591, 591, 291, 243, 285, 286, 172, 276, 198, 286, 215, 285, 235, 237, 591, 347, 237, 240, 259, 0, 288, 291, 294, 288, 331, 293, 334, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 343, 345, 346, 347, 374, 375, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 435, 445, 591, 591, 591, 591, 591, 591, 591, 591, 453, 463, 265, 345, 156, 0, 362, 0, 383, 0, 339, 367, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 485, 84, 93, 151, 335, 336, 383, 417, 423, 591, 474, 591, 591, 591, 591, 591, 591, 591, 591, 591, 493, 591, 591, 591, 591, 591, 591, 591, 591, 0, 462, 465, 377, 0, 0, 463, 472, 424, 432, 441, 511, 512, 522, 523, 524, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 0, 395, 488, 475, 484, 154, 496, 503, 504, 495, 0, 0, 0, 491, 109, 497, 513, 498, 500, 515, 107, 512, 509, 504, 520, 519, 522, 106, 523, 519, 531, 526, 520, 0, 591, 587, 96 } ; static yyconst flex_int16_t yy_def[290] = { 0, 287, 1, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 288, 287, 287, 287, 287, 288, 288, 288, 288, 288, 288, 288, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 288, 288, 287, 289, 287, 288, 288, 288, 288, 288, 288, 288, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 288, 289, 288, 288, 288, 288, 288, 288, 288, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 288, 288, 288, 288, 288, 288, 288, 288, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 0, 287, 287 } ; static yyconst flex_int16_t yy_nxt[666] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 20, 20, 20, 22, 20, 20, 20, 20, 20, 23, 20, 24, 20, 20, 20, 25, 20, 20, 20, 20, 26, 20, 20, 20, 20, 21, 20, 20, 20, 22, 20, 20, 20, 20, 23, 20, 24, 20, 20, 20, 25, 20, 20, 20, 20, 26, 20, 20, 28, 29, 30, 31, 32, 33, 34, 41, 42, 45, 46, 233, 35, 47, 48, 75, 158, 36, 37, 49, 234, 76, 38, 39, 94, 159, 28, 29, 30, 31, 32, 33, 34, 41, 45, 77, 46, 35, 47, 48, 75, 43, 36, 37, 50, 49, 76, 38, 39, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 52, 77, 51, 91, 53, 55, 59, 43, 92, 56, 60, 50, 93, 57, 96, 54, 61, 62, 95, 235, 58, 63, 281, 274, 160, 268, 52, 51, 91, 53, 97, 55, 59, 92, 56, 60, 99, 93, 57, 96, 54, 61, 62, 98, 95, 58, 63, 64, 70, 71, 72, 73, 87, 65, 66, 100, 97, 67, 102, 88, 101, 99, 89, 90, 68, 116, 74, 117, 69, 98, 262, 120, 227, 64, 70, 71, 72, 73, 87, 65, 66, 100, 67, 102, 88, 145, 101, 89, 90, 68, 116, 74, 117, 69, 78, 103, 120, 104, 105, 106, 42, 79, 80, 107, 81, 82, 83, 84, 27, 27, 145, 148, 85, 108, 109, 110, 111, 112, 113, 114, 115, 151, 86, 133, 134, 135, 136, 137, 138, 287, 81, 82, 83, 84, 118, 123, 148, 154, 85, 155, 166, 119, 124, 167, 121, 287, 151, 86, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 122, 118, 225, 123, 154, 287, 155, 166, 119, 124, 167, 168, 121, 125, 126, 127, 128, 129, 130, 131, 132, 139, 142, 287, 146, 122, 152, 149, 225, 140, 143, 147, 287, 153, 169, 170, 168, 171, 172, 141, 144, 150, 176, 287, 287, 236, 237, 139, 142, 146, 161, 162, 152, 149, 140, 143, 147, 156, 153, 169, 170, 157, 171, 172, 141, 144, 150, 176, 173, 158, 159, 160, 161, 162, 163, 164, 165, 174, 177, 178, 226, 181, 184, 187, 287, 287, 287, 179, 175, 182, 185, 188, 231, 238, 173, 228, 287, 180, 163, 183, 186, 189, 174, 177, 232, 178, 226, 181, 184, 187, 190, 193, 179, 175, 182, 185, 188, 231, 191, 194, 229, 228, 180, 255, 183, 186, 189, 239, 192, 195, 232, 287, 164, 240, 233, 287, 190, 193, 165, 158, 230, 258, 234, 191, 194, 156, 229, 159, 255, 157, 287, 235, 287, 192, 195, 196, 160, 158, 159, 160, 161, 162, 163, 164, 165, 230, 258, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 196, 241, 242, 243, 244, 245, 246, 253, 254, 256, 257, 287, 197, 198, 199, 200, 201, 202, 203, 204, 247, 248, 249, 250, 251, 252, 236, 237, 259, 287, 260, 161, 162, 253, 254, 256, 257, 238, 239, 240, 261, 263, 163, 164, 165, 264, 265, 287, 266, 267, 269, 270, 287, 271, 259, 260, 272, 273, 275, 287, 276, 277, 278, 279, 280, 261, 282, 263, 283, 284, 285, 264, 265, 266, 267, 269, 286, 270, 271, 287, 287, 272, 287, 273, 275, 276, 277, 287, 278, 279, 280, 287, 282, 283, 287, 284, 285, 287, 287, 287, 287, 286, 40, 40, 3, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287 } ; static yyconst flex_int16_t yy_chk[666] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 8, 8, 8, 8, 8, 15, 17, 21, 22, 197, 8, 23, 24, 33, 197, 8, 8, 25, 198, 34, 8, 8, 289, 198, 8, 8, 8, 8, 8, 8, 8, 15, 21, 35, 22, 8, 23, 24, 33, 17, 8, 8, 26, 25, 34, 8, 8, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 28, 35, 26, 38, 28, 29, 30, 17, 39, 29, 30, 26, 41, 29, 46, 28, 30, 30, 45, 199, 29, 30, 280, 273, 199, 267, 28, 26, 38, 28, 47, 29, 30, 39, 29, 30, 49, 41, 29, 46, 28, 30, 30, 48, 45, 29, 30, 31, 32, 32, 32, 32, 37, 31, 31, 50, 47, 31, 57, 37, 51, 49, 37, 37, 31, 66, 32, 70, 31, 48, 258, 72, 170, 31, 32, 32, 32, 32, 37, 31, 31, 50, 31, 57, 37, 81, 51, 37, 37, 31, 66, 32, 70, 31, 36, 61, 72, 61, 61, 61, 42, 36, 36, 61, 36, 36, 36, 36, 27, 5, 81, 83, 36, 64, 64, 64, 64, 64, 64, 64, 64, 85, 36, 78, 78, 78, 78, 78, 78, 3, 36, 36, 36, 36, 71, 74, 83, 87, 36, 88, 91, 71, 74, 92, 73, 0, 85, 36, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 73, 71, 168, 74, 87, 0, 88, 91, 71, 74, 92, 93, 73, 77, 77, 77, 77, 77, 77, 77, 77, 79, 80, 0, 82, 73, 86, 84, 168, 79, 80, 82, 0, 86, 95, 96, 93, 97, 98, 79, 80, 84, 100, 0, 0, 200, 201, 79, 80, 82, 200, 201, 86, 84, 79, 80, 82, 90, 86, 95, 96, 90, 97, 98, 79, 80, 84, 100, 99, 90, 90, 90, 90, 90, 90, 90, 90, 99, 101, 133, 169, 134, 135, 136, 0, 0, 0, 133, 99, 134, 135, 136, 176, 202, 99, 172, 0, 133, 202, 134, 135, 136, 99, 101, 177, 133, 169, 134, 135, 136, 137, 138, 133, 99, 134, 135, 136, 176, 137, 138, 174, 172, 133, 228, 134, 135, 136, 203, 137, 138, 177, 0, 203, 204, 233, 0, 137, 138, 204, 233, 174, 254, 234, 137, 138, 156, 174, 234, 228, 156, 0, 235, 0, 137, 138, 157, 235, 156, 156, 156, 156, 156, 156, 156, 156, 174, 254, 157, 157, 157, 157, 157, 157, 157, 157, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 196, 206, 206, 206, 206, 206, 206, 226, 227, 231, 232, 0, 196, 196, 196, 196, 196, 196, 196, 196, 216, 216, 216, 216, 216, 216, 236, 237, 255, 0, 256, 236, 237, 226, 227, 231, 232, 238, 239, 240, 257, 259, 238, 239, 240, 260, 261, 0, 262, 266, 268, 269, 0, 270, 255, 256, 271, 272, 274, 0, 275, 276, 277, 278, 279, 257, 281, 259, 282, 283, 284, 260, 261, 262, 266, 268, 285, 269, 270, 0, 0, 271, 0, 272, 274, 275, 276, 0, 277, 278, 279, 0, 281, 282, 0, 283, 284, 0, 0, 0, 0, 285, 288, 288, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287 } ; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET #line 1 "fcml_gas_lexer.l" /* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ #line 21 "fcml_gas_lexer.l" #include #include #include "fcml_common_lex.h" #include "fcml_gas_parser_def.h" #define YY_NO_INPUT 1 #define YY_NO_UNISTD_H 1 /* White spaces. */ /*Dec and hex values.*/ #line 703 "fcml_gas_lexer.c" #define INITIAL 0 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #define YY_EXTRA_TYPE struct fcml_st_parser_data * /* Holds the entire state of the reentrant scanner. */ struct yyguts_t { /* User-defined. Not touched by flex. */ YY_EXTRA_TYPE yyextra_r; /* The rest are the same as the globals declared in the non-reentrant scanner. */ FILE *yyin_r, *yyout_r; size_t yy_buffer_stack_top; /**< index of top of stack. */ size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; yy_size_t yy_n_chars; yy_size_t yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; int yy_did_buffer_switch_on_eof; int yy_start_stack_ptr; int yy_start_stack_depth; int *yy_start_stack; yy_state_type yy_last_accepting_state; char* yy_last_accepting_cpos; int yylineno_r; int yy_flex_debug_r; char *yytext_r; int yy_more_flag; int yy_more_len; YYSTYPE * yylval_r; }; /* end struct yyguts_t */ static int yy_init_globals (yyscan_t yyscanner ); /* This must go here because YYSTYPE and YYLTYPE are included * from bison output in section 1.*/ # define yylval yyg->yylval_r int gas_lex_init (yyscan_t* scanner); int gas_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int gas_lex_destroy (yyscan_t yyscanner ); int gas_get_debug (yyscan_t yyscanner ); void gas_set_debug (int debug_flag ,yyscan_t yyscanner ); YY_EXTRA_TYPE gas_get_extra (yyscan_t yyscanner ); void gas_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *gas_get_in (yyscan_t yyscanner ); void gas_set_in (FILE * in_str ,yyscan_t yyscanner ); FILE *gas_get_out (yyscan_t yyscanner ); void gas_set_out (FILE * out_str ,yyscan_t yyscanner ); yy_size_t gas_get_leng (yyscan_t yyscanner ); char *gas_get_text (yyscan_t yyscanner ); int gas_get_lineno (yyscan_t yyscanner ); void gas_set_lineno (int line_number ,yyscan_t yyscanner ); int gas_get_column (yyscan_t yyscanner ); void gas_set_column (int column_no ,yyscan_t yyscanner ); YYSTYPE * gas_get_lval (yyscan_t yyscanner ); void gas_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int gas_wrap (yyscan_t yyscanner ); #else extern int gas_wrap (yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner ); #else static int input (yyscan_t yyscanner ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int gas_lex \ (YYSTYPE * yylval_param ,yyscan_t yyscanner); #define YY_DECL int gas_lex \ (YYSTYPE * yylval_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yylval = yylval_param; if ( !yyg->yy_init ) { yyg->yy_init = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! yyg->yy_start ) yyg->yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { gas_ensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = gas__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); } gas__load_buffer_state(yyscanner ); } { #line 54 "fcml_gas_lexer.l" /* Decimal integers. */ #line 969 "fcml_gas_lexer.c" while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yyg->yy_c_buf_p; /* Support of yytext. */ *yy_cp = yyg->yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = yyg->yy_start; yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 288 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_current_state != 287 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; yy_find_action: yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yyg->yy_hold_char; yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; goto yy_find_action; case 1: YY_RULE_SETUP #line 57 "fcml_gas_lexer.l" { fcml_fn_pu_parse_integer( yytext, &(yylval->integer_value), 10 ); return FCML_TK_INTEGER; } YY_BREAK /* HEX integers. */ case 2: YY_RULE_SETUP #line 60 "fcml_gas_lexer.l" { fcml_fn_pu_parse_integer( yytext, &(yylval->integer_value), 16 ); return FCML_TK_INTEGER; } YY_BREAK case 3: YY_RULE_SETUP #line 62 "fcml_gas_lexer.l" YY_BREAK /* GPR. */ case 4: YY_RULE_SETUP #line 65 "fcml_gas_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_AL) YY_BREAK case 5: YY_RULE_SETUP #line 66 "fcml_gas_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_CL) YY_BREAK case 6: YY_RULE_SETUP #line 67 "fcml_gas_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_DL) YY_BREAK case 7: YY_RULE_SETUP #line 68 "fcml_gas_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_BL) YY_BREAK case 8: YY_RULE_SETUP #line 69 "fcml_gas_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_AH) YY_BREAK case 9: YY_RULE_SETUP #line 70 "fcml_gas_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_CH) YY_BREAK case 10: YY_RULE_SETUP #line 71 "fcml_gas_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_DH) YY_BREAK case 11: YY_RULE_SETUP #line 72 "fcml_gas_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_BH) YY_BREAK case 12: YY_RULE_SETUP #line 73 "fcml_gas_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_R8L) YY_BREAK case 13: YY_RULE_SETUP #line 74 "fcml_gas_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_R9L) YY_BREAK case 14: YY_RULE_SETUP #line 75 "fcml_gas_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_R10L) YY_BREAK case 15: YY_RULE_SETUP #line 76 "fcml_gas_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_R11L) YY_BREAK case 16: YY_RULE_SETUP #line 77 "fcml_gas_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_R12L) YY_BREAK case 17: YY_RULE_SETUP #line 78 "fcml_gas_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_R13L) YY_BREAK case 18: YY_RULE_SETUP #line 79 "fcml_gas_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_R14L) YY_BREAK case 19: YY_RULE_SETUP #line 80 "fcml_gas_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_R15L) YY_BREAK case 20: YY_RULE_SETUP #line 82 "fcml_gas_lexer.l" FCML_FM_GPRS_8_X_REG(FCML_REG_SPL) YY_BREAK case 21: YY_RULE_SETUP #line 83 "fcml_gas_lexer.l" FCML_FM_GPRS_8_X_REG(FCML_REG_BPL) YY_BREAK case 22: YY_RULE_SETUP #line 84 "fcml_gas_lexer.l" FCML_FM_GPRS_8_X_REG(FCML_REG_SIL) YY_BREAK case 23: YY_RULE_SETUP #line 85 "fcml_gas_lexer.l" FCML_FM_GPRS_8_X_REG(FCML_REG_DIL) YY_BREAK case 24: YY_RULE_SETUP #line 87 "fcml_gas_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_AX) YY_BREAK case 25: YY_RULE_SETUP #line 88 "fcml_gas_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_CX) YY_BREAK case 26: YY_RULE_SETUP #line 89 "fcml_gas_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_DX) YY_BREAK case 27: YY_RULE_SETUP #line 90 "fcml_gas_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_BX) YY_BREAK case 28: YY_RULE_SETUP #line 91 "fcml_gas_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_SP) YY_BREAK case 29: YY_RULE_SETUP #line 92 "fcml_gas_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_BP) YY_BREAK case 30: YY_RULE_SETUP #line 93 "fcml_gas_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_SI) YY_BREAK case 31: YY_RULE_SETUP #line 94 "fcml_gas_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_DI) YY_BREAK case 32: YY_RULE_SETUP #line 95 "fcml_gas_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_R8W) YY_BREAK case 33: YY_RULE_SETUP #line 96 "fcml_gas_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_R9W) YY_BREAK case 34: YY_RULE_SETUP #line 97 "fcml_gas_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_R10W) YY_BREAK case 35: YY_RULE_SETUP #line 98 "fcml_gas_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_R11W) YY_BREAK case 36: YY_RULE_SETUP #line 99 "fcml_gas_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_R12W) YY_BREAK case 37: YY_RULE_SETUP #line 100 "fcml_gas_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_R13W) YY_BREAK case 38: YY_RULE_SETUP #line 101 "fcml_gas_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_R14W) YY_BREAK case 39: YY_RULE_SETUP #line 102 "fcml_gas_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_R15W) YY_BREAK case 40: YY_RULE_SETUP #line 104 "fcml_gas_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_EAX) YY_BREAK case 41: YY_RULE_SETUP #line 105 "fcml_gas_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_ECX) YY_BREAK case 42: YY_RULE_SETUP #line 106 "fcml_gas_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_EDX) YY_BREAK case 43: YY_RULE_SETUP #line 107 "fcml_gas_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_EBX) YY_BREAK case 44: YY_RULE_SETUP #line 108 "fcml_gas_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_ESP) YY_BREAK case 45: YY_RULE_SETUP #line 109 "fcml_gas_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_EBP) YY_BREAK case 46: YY_RULE_SETUP #line 110 "fcml_gas_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_ESI) YY_BREAK case 47: YY_RULE_SETUP #line 111 "fcml_gas_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_EDI) YY_BREAK case 48: YY_RULE_SETUP #line 112 "fcml_gas_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_R8D) YY_BREAK case 49: YY_RULE_SETUP #line 113 "fcml_gas_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_R9D) YY_BREAK case 50: YY_RULE_SETUP #line 114 "fcml_gas_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_R10D) YY_BREAK case 51: YY_RULE_SETUP #line 115 "fcml_gas_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_R11D) YY_BREAK case 52: YY_RULE_SETUP #line 116 "fcml_gas_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_R12D) YY_BREAK case 53: YY_RULE_SETUP #line 117 "fcml_gas_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_R13D) YY_BREAK case 54: YY_RULE_SETUP #line 118 "fcml_gas_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_R14D) YY_BREAK case 55: YY_RULE_SETUP #line 119 "fcml_gas_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_R15D) YY_BREAK case 56: YY_RULE_SETUP #line 121 "fcml_gas_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_RAX) YY_BREAK case 57: YY_RULE_SETUP #line 122 "fcml_gas_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_RCX) YY_BREAK case 58: YY_RULE_SETUP #line 123 "fcml_gas_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_RDX) YY_BREAK case 59: YY_RULE_SETUP #line 124 "fcml_gas_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_RBX) YY_BREAK case 60: YY_RULE_SETUP #line 125 "fcml_gas_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_RSP) YY_BREAK case 61: YY_RULE_SETUP #line 126 "fcml_gas_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_RBP) YY_BREAK case 62: YY_RULE_SETUP #line 127 "fcml_gas_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_RSI) YY_BREAK case 63: YY_RULE_SETUP #line 128 "fcml_gas_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_RDI) YY_BREAK case 64: YY_RULE_SETUP #line 129 "fcml_gas_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_R8) YY_BREAK case 65: YY_RULE_SETUP #line 130 "fcml_gas_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_R9) YY_BREAK case 66: YY_RULE_SETUP #line 131 "fcml_gas_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_R10) YY_BREAK case 67: YY_RULE_SETUP #line 132 "fcml_gas_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_R11) YY_BREAK case 68: YY_RULE_SETUP #line 133 "fcml_gas_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_R12) YY_BREAK case 69: YY_RULE_SETUP #line 134 "fcml_gas_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_R13) YY_BREAK case 70: YY_RULE_SETUP #line 135 "fcml_gas_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_R14) YY_BREAK case 71: YY_RULE_SETUP #line 136 "fcml_gas_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_R15) YY_BREAK /* SIMD-MMX */ case 72: YY_RULE_SETUP #line 139 "fcml_gas_lexer.l" FCML_FM_SIMD_64_REG(FCML_REG_MM0) YY_BREAK case 73: YY_RULE_SETUP #line 140 "fcml_gas_lexer.l" FCML_FM_SIMD_64_REG(FCML_REG_MM1) YY_BREAK case 74: YY_RULE_SETUP #line 141 "fcml_gas_lexer.l" FCML_FM_SIMD_64_REG(FCML_REG_MM2) YY_BREAK case 75: YY_RULE_SETUP #line 142 "fcml_gas_lexer.l" FCML_FM_SIMD_64_REG(FCML_REG_MM3) YY_BREAK case 76: YY_RULE_SETUP #line 143 "fcml_gas_lexer.l" FCML_FM_SIMD_64_REG(FCML_REG_MM4) YY_BREAK case 77: YY_RULE_SETUP #line 144 "fcml_gas_lexer.l" FCML_FM_SIMD_64_REG(FCML_REG_MM5) YY_BREAK case 78: YY_RULE_SETUP #line 145 "fcml_gas_lexer.l" FCML_FM_SIMD_64_REG(FCML_REG_MM6) YY_BREAK case 79: YY_RULE_SETUP #line 146 "fcml_gas_lexer.l" FCML_FM_SIMD_64_REG(FCML_REG_MM7) YY_BREAK /* SIMD-XMM */ case 80: YY_RULE_SETUP #line 149 "fcml_gas_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM0) YY_BREAK case 81: YY_RULE_SETUP #line 150 "fcml_gas_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM1) YY_BREAK case 82: YY_RULE_SETUP #line 151 "fcml_gas_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM2) YY_BREAK case 83: YY_RULE_SETUP #line 152 "fcml_gas_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM3) YY_BREAK case 84: YY_RULE_SETUP #line 153 "fcml_gas_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM4) YY_BREAK case 85: YY_RULE_SETUP #line 154 "fcml_gas_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM5) YY_BREAK case 86: YY_RULE_SETUP #line 155 "fcml_gas_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM6) YY_BREAK case 87: YY_RULE_SETUP #line 156 "fcml_gas_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM7) YY_BREAK case 88: YY_RULE_SETUP #line 157 "fcml_gas_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM8) YY_BREAK case 89: YY_RULE_SETUP #line 158 "fcml_gas_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM9) YY_BREAK case 90: YY_RULE_SETUP #line 159 "fcml_gas_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM10) YY_BREAK case 91: YY_RULE_SETUP #line 160 "fcml_gas_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM11) YY_BREAK case 92: YY_RULE_SETUP #line 161 "fcml_gas_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM12) YY_BREAK case 93: YY_RULE_SETUP #line 162 "fcml_gas_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM13) YY_BREAK case 94: YY_RULE_SETUP #line 163 "fcml_gas_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM14) YY_BREAK case 95: YY_RULE_SETUP #line 164 "fcml_gas_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM15) YY_BREAK /* SIMD-YMM */ case 96: YY_RULE_SETUP #line 167 "fcml_gas_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM0) YY_BREAK case 97: YY_RULE_SETUP #line 168 "fcml_gas_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM1) YY_BREAK case 98: YY_RULE_SETUP #line 169 "fcml_gas_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM2) YY_BREAK case 99: YY_RULE_SETUP #line 170 "fcml_gas_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM3) YY_BREAK case 100: YY_RULE_SETUP #line 171 "fcml_gas_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM4) YY_BREAK case 101: YY_RULE_SETUP #line 172 "fcml_gas_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM5) YY_BREAK case 102: YY_RULE_SETUP #line 173 "fcml_gas_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM6) YY_BREAK case 103: YY_RULE_SETUP #line 174 "fcml_gas_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM7) YY_BREAK case 104: YY_RULE_SETUP #line 175 "fcml_gas_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM8) YY_BREAK case 105: YY_RULE_SETUP #line 176 "fcml_gas_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM9) YY_BREAK case 106: YY_RULE_SETUP #line 177 "fcml_gas_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM10) YY_BREAK case 107: YY_RULE_SETUP #line 178 "fcml_gas_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM11) YY_BREAK case 108: YY_RULE_SETUP #line 179 "fcml_gas_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM12) YY_BREAK case 109: YY_RULE_SETUP #line 180 "fcml_gas_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM13) YY_BREAK case 110: YY_RULE_SETUP #line 181 "fcml_gas_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM14) YY_BREAK case 111: YY_RULE_SETUP #line 182 "fcml_gas_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM15) YY_BREAK /* FPU */ case 112: YY_RULE_SETUP #line 185 "fcml_gas_lexer.l" FCML_FM_FPU_REG(FCML_REG_ST0) YY_BREAK case 113: YY_RULE_SETUP #line 186 "fcml_gas_lexer.l" FCML_FM_FPU_REG(FCML_REG_ST1) YY_BREAK case 114: YY_RULE_SETUP #line 187 "fcml_gas_lexer.l" FCML_FM_FPU_REG(FCML_REG_ST2) YY_BREAK case 115: YY_RULE_SETUP #line 188 "fcml_gas_lexer.l" FCML_FM_FPU_REG(FCML_REG_ST3) YY_BREAK case 116: YY_RULE_SETUP #line 189 "fcml_gas_lexer.l" FCML_FM_FPU_REG(FCML_REG_ST4) YY_BREAK case 117: YY_RULE_SETUP #line 190 "fcml_gas_lexer.l" FCML_FM_FPU_REG(FCML_REG_ST5) YY_BREAK case 118: YY_RULE_SETUP #line 191 "fcml_gas_lexer.l" FCML_FM_FPU_REG(FCML_REG_ST6) YY_BREAK case 119: YY_RULE_SETUP #line 192 "fcml_gas_lexer.l" FCML_FM_FPU_REG(FCML_REG_ST7) YY_BREAK /* Control registers. */ case 120: YY_RULE_SETUP #line 195 "fcml_gas_lexer.l" FCML_FM_CR_REG(FCML_REG_CR0) YY_BREAK case 121: YY_RULE_SETUP #line 196 "fcml_gas_lexer.l" FCML_FM_CR_REG(FCML_REG_CR2) YY_BREAK case 122: YY_RULE_SETUP #line 197 "fcml_gas_lexer.l" FCML_FM_CR_REG(FCML_REG_CR3) YY_BREAK case 123: YY_RULE_SETUP #line 198 "fcml_gas_lexer.l" FCML_FM_CR_REG(FCML_REG_CR4) YY_BREAK case 124: YY_RULE_SETUP #line 199 "fcml_gas_lexer.l" FCML_FM_CR_REG(FCML_REG_CR8) YY_BREAK /* Debug registers. */ case 125: YY_RULE_SETUP #line 202 "fcml_gas_lexer.l" FCML_FM_DR_REG(FCML_REG_DR0) YY_BREAK case 126: YY_RULE_SETUP #line 203 "fcml_gas_lexer.l" FCML_FM_DR_REG(FCML_REG_DR1) YY_BREAK case 127: YY_RULE_SETUP #line 204 "fcml_gas_lexer.l" FCML_FM_DR_REG(FCML_REG_DR2) YY_BREAK case 128: YY_RULE_SETUP #line 205 "fcml_gas_lexer.l" FCML_FM_DR_REG(FCML_REG_DR3) YY_BREAK case 129: YY_RULE_SETUP #line 206 "fcml_gas_lexer.l" FCML_FM_DR_REG(FCML_REG_DR4) YY_BREAK case 130: YY_RULE_SETUP #line 207 "fcml_gas_lexer.l" FCML_FM_DR_REG(FCML_REG_DR5) YY_BREAK case 131: YY_RULE_SETUP #line 208 "fcml_gas_lexer.l" FCML_FM_DR_REG(FCML_REG_DR6) YY_BREAK case 132: YY_RULE_SETUP #line 209 "fcml_gas_lexer.l" FCML_FM_DR_REG(FCML_REG_DR7) YY_BREAK /* Segment registers. */ case 133: YY_RULE_SETUP #line 212 "fcml_gas_lexer.l" FCML_FM_SEG_REG(FCML_REG_ES) YY_BREAK case 134: YY_RULE_SETUP #line 213 "fcml_gas_lexer.l" FCML_FM_SEG_REG(FCML_REG_CS) YY_BREAK case 135: YY_RULE_SETUP #line 214 "fcml_gas_lexer.l" FCML_FM_SEG_REG(FCML_REG_SS) YY_BREAK case 136: YY_RULE_SETUP #line 215 "fcml_gas_lexer.l" FCML_FM_SEG_REG(FCML_REG_DS) YY_BREAK case 137: YY_RULE_SETUP #line 216 "fcml_gas_lexer.l" FCML_FM_SEG_REG(FCML_REG_FS) YY_BREAK case 138: YY_RULE_SETUP #line 217 "fcml_gas_lexer.l" FCML_FM_SEG_REG(FCML_REG_GS) YY_BREAK /* RIP */ case 139: YY_RULE_SETUP #line 220 "fcml_gas_lexer.l" FCML_FM_RIP YY_BREAK /* Prefixes */ case 140: YY_RULE_SETUP #line 224 "fcml_gas_lexer.l" { yylval->prefixes = FCML_PREFIX_LOCK; return FCML_TK_PREFIX; } YY_BREAK case 141: YY_RULE_SETUP #line 229 "fcml_gas_lexer.l" { yylval->prefixes = FCML_PREFIX_REPNE; return FCML_TK_PREFIX; } YY_BREAK case 142: YY_RULE_SETUP #line 234 "fcml_gas_lexer.l" { yylval->prefixes = FCML_PREFIX_REPE; return FCML_TK_PREFIX; } YY_BREAK case 143: YY_RULE_SETUP #line 239 "fcml_gas_lexer.l" { yylval->prefixes = FCML_PREFIX_XACQUIRE; return FCML_TK_PREFIX; } YY_BREAK case 144: YY_RULE_SETUP #line 244 "fcml_gas_lexer.l" { yylval->prefixes = FCML_PREFIX_XRELEASE; return FCML_TK_PREFIX; } YY_BREAK case 145: YY_RULE_SETUP #line 249 "fcml_gas_lexer.l" { yylval->hints = FCML_PREFIX_BRANCH_HINT; return FCML_TK_PREFIX; } YY_BREAK case 146: YY_RULE_SETUP #line 254 "fcml_gas_lexer.l" { yylval->hints = FCML_PREFIX_NOBRANCH_HINT; return FCML_TK_PREFIX; } YY_BREAK /* Identifiers. */ case 147: YY_RULE_SETUP #line 260 "fcml_gas_lexer.l" { yylval->symbol.text = (fcml_string)yytext; yylval->symbol.length = (fcml_usize)yyleng; return FCML_TK_PO_BYTE; } YY_BREAK /* Identifiers. */ case 148: YY_RULE_SETUP #line 267 "fcml_gas_lexer.l" { yylval->symbol.text = (fcml_string)yytext; yylval->symbol.length = (fcml_usize)yyleng; return FCML_TK_SYMBOL; } YY_BREAK /* Operators and parentheses. */ case 149: YY_RULE_SETUP #line 274 "fcml_gas_lexer.l" { return ','; } YY_BREAK case 150: YY_RULE_SETUP #line 275 "fcml_gas_lexer.l" { return '+'; } YY_BREAK case 151: YY_RULE_SETUP #line 276 "fcml_gas_lexer.l" { return '-'; } YY_BREAK case 152: YY_RULE_SETUP #line 277 "fcml_gas_lexer.l" { return '*'; } YY_BREAK case 153: YY_RULE_SETUP #line 278 "fcml_gas_lexer.l" { return '/'; } YY_BREAK case 154: YY_RULE_SETUP #line 279 "fcml_gas_lexer.l" { return '('; } YY_BREAK case 155: YY_RULE_SETUP #line 280 "fcml_gas_lexer.l" { return ')'; } YY_BREAK case 156: YY_RULE_SETUP #line 281 "fcml_gas_lexer.l" { return ':'; } YY_BREAK case 157: YY_RULE_SETUP #line 282 "fcml_gas_lexer.l" { return '$'; } YY_BREAK /* Ignore white spaces. */ case 158: YY_RULE_SETUP #line 285 "fcml_gas_lexer.l" YY_BREAK /*Anything else is not expected.*/ case 159: YY_RULE_SETUP #line 288 "fcml_gas_lexer.l" { return FCML_TK_UNEXPECTED; } YY_BREAK /*Ignore like white spaces.*/ case 160: /* rule 160 can match eol */ YY_RULE_SETUP #line 291 "fcml_gas_lexer.l" YY_BREAK case 161: YY_RULE_SETUP #line 293 "fcml_gas_lexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK #line 1874 "fcml_gas_lexer.c" case YY_STATE_EOF(INITIAL): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yyg->yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * gas_lex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( yyscanner ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yyg->yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; goto yy_find_action; } } else switch ( yy_get_next_buffer( yyscanner ) ) { case EOB_ACT_END_OF_FILE: { yyg->yy_did_buffer_switch_on_eof = 0; if ( gas_wrap(yyscanner ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( yyscanner ); yy_cp = yyg->yy_c_buf_p; yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; yy_current_state = yy_get_previous_state( yyscanner ); yy_cp = yyg->yy_c_buf_p; yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of user's declarations */ } /* end of gas_lex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = yyg->yytext_ptr; register int number_to_move, i; int ret_val; if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; else { 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_LVALUE; int yy_c_buf_p_offset = (int) (yyg->yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ gas_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } if ( yyg->yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; gas_restart(yyin ,yyscanner); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) gas_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } yyg->yy_n_chars += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { register yy_state_type yy_current_state; register char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_current_state = yyg->yy_start; for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 288 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { register int yy_is_jam; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ register char *yy_cp = yyg->yy_c_buf_p; register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 288 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 287); (void)yyg; return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner) #else static int input (yyscan_t yyscanner) #endif { int c; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; *yyg->yy_c_buf_p = yyg->yy_hold_char; if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) /* This was really a NUL. */ *yyg->yy_c_buf_p = '\0'; else { /* need more input */ yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ gas_restart(yyin ,yyscanner); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( gas_wrap(yyscanner ) ) return EOF; if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(yyscanner); #else return input(yyscanner); #endif } case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; } } } c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ yyg->yy_hold_char = *++yyg->yy_c_buf_p; return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ void gas_restart (FILE * input_file , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! YY_CURRENT_BUFFER ){ gas_ensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = gas__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); } gas__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); gas__load_buffer_state(yyscanner ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ void gas__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* TODO. We should be able to replace this entire function body * with * gas_pop_buffer_state(); * gas_push_buffer_state(new_buffer); */ gas_ensure_buffer_stack (yyscanner); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *yyg->yy_c_buf_p = yyg->yy_hold_char; YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } YY_CURRENT_BUFFER_LVALUE = new_buffer; gas__load_buffer_state(yyscanner ); /* We don't actually know whether we did this switch during * EOF (gas_wrap()) processing, but the only time this flag * is looked at is after gas_wrap() is called, so it's safe * to go ahead and always set it. */ yyg->yy_did_buffer_switch_on_eof = 1; } static void gas__load_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * @param yyscanner The scanner object. * @return the allocated buffer state. */ YY_BUFFER_STATE gas__create_buffer (FILE * file, int size , yyscan_t yyscanner) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) gas_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in gas__create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) gas_alloc(b->yy_buf_size + 2 ,yyscanner ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in gas__create_buffer()" ); b->yy_is_our_buffer = 1; gas__init_buffer(b,file ,yyscanner); return b; } /** Destroy the buffer. * @param b a buffer created with gas__create_buffer() * @param yyscanner The scanner object. */ void gas__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) gas_free((void *) b->yy_ch_buf ,yyscanner ); gas_free((void *) b ,yyscanner ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a gas_restart() or at EOF. */ static void gas__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) { int oerrno = errno; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; gas__flush_buffer(b ,yyscanner); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then gas__init_buffer was _probably_ * called from gas_restart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ void gas__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) gas__load_buffer_state(yyscanner ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * @param yyscanner The scanner object. */ void gas_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (new_buffer == NULL) return; gas_ensure_buffer_stack(yyscanner); /* This block is copied from gas__switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *yyg->yy_c_buf_p = yyg->yy_hold_char; YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) yyg->yy_buffer_stack_top++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from gas__switch_to_buffer. */ gas__load_buffer_state(yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ void gas_pop_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!YY_CURRENT_BUFFER) return; gas__delete_buffer(YY_CURRENT_BUFFER ,yyscanner); YY_CURRENT_BUFFER_LVALUE = NULL; if (yyg->yy_buffer_stack_top > 0) --yyg->yy_buffer_stack_top; if (YY_CURRENT_BUFFER) { gas__load_buffer_state(yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void gas_ensure_buffer_stack (yyscan_t yyscanner) { yy_size_t num_to_alloc; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!yyg->yy_buffer_stack) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; yyg->yy_buffer_stack = (struct yy_buffer_state**)gas_alloc (num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in gas_ensure_buffer_stack()" ); memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; } if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = yyg->yy_buffer_stack_max + grow_size; yyg->yy_buffer_stack = (struct yy_buffer_state**)gas_realloc (yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in gas_ensure_buffer_stack()" ); /* zero only the new slots.*/ memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); yyg->yy_buffer_stack_max = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ YY_BUFFER_STATE gas__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) gas_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in gas__scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; gas__switch_to_buffer(b ,yyscanner ); return b; } /** Setup the input buffer state to scan a string. The next call to gas_lex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * @param yyscanner The scanner object. * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * gas__scan_bytes() instead. */ YY_BUFFER_STATE gas__scan_string (yyconst char * yystr , yyscan_t yyscanner) { return gas__scan_bytes(yystr,strlen(yystr) ,yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to gas_lex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ YY_BUFFER_STATE gas__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; yy_size_t n; yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) gas_alloc(n ,yyscanner ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in gas__scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = gas__scan_buffer(buf,n ,yyscanner); if ( ! b ) YY_FATAL_ERROR( "bad buffer in gas__scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = yyg->yy_hold_char; \ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ yyg->yy_hold_char = *yyg->yy_c_buf_p; \ *yyg->yy_c_buf_p = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ YY_EXTRA_TYPE gas_get_extra (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ int gas_get_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (! YY_CURRENT_BUFFER) return 0; return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ int gas_get_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (! YY_CURRENT_BUFFER) return 0; return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ FILE *gas_get_in (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ FILE *gas_get_out (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ yy_size_t gas_get_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ char *gas_get_text (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ void gas_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyextra = user_defined ; } /** Set the current line number. * @param line_number * @param yyscanner The scanner object. */ void gas_set_lineno (int line_number , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "gas_set_lineno called with no buffer" ); yylineno = line_number; } /** Set the current column. * @param line_number * @param yyscanner The scanner object. */ void gas_set_column (int column_no , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "gas_set_column called with no buffer" ); yycolumn = column_no; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * @param yyscanner The scanner object. * @see gas__switch_to_buffer */ void gas_set_in (FILE * in_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyin = in_str ; } void gas_set_out (FILE * out_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyout = out_str ; } int gas_get_debug (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yy_flex_debug; } void gas_set_debug (int bdebug , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_flex_debug = bdebug ; } /* Accessor methods for yylval and yylloc */ YYSTYPE * gas_get_lval (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yylval; } void gas_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yylval = yylval_param; } /* User-visible API */ /* gas_lex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ int gas_lex_init(yyscan_t* ptr_yy_globals) { if (ptr_yy_globals == NULL){ errno = EINVAL; return 1; } *ptr_yy_globals = (yyscan_t) gas_alloc ( sizeof( struct yyguts_t ), NULL ); if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); return yy_init_globals ( *ptr_yy_globals ); } /* gas_lex_init_extra has the same functionality as gas_lex_init, but follows the * convention of taking the scanner as the last argument. Note however, that * this is a *pointer* to a scanner, as it will be allocated by this call (and * is the reason, too, why this function also must handle its own declaration). * The user defined value in the first argument will be available to gas_alloc in * the yyextra field. */ int gas_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) { struct yyguts_t dummy_yyguts; gas_set_extra (yy_user_defined, &dummy_yyguts); if (ptr_yy_globals == NULL){ errno = EINVAL; return 1; } *ptr_yy_globals = (yyscan_t) gas_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); gas_set_extra (yy_user_defined, *ptr_yy_globals); return yy_init_globals ( *ptr_yy_globals ); } static int yy_init_globals (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* Initialization is the same as for the non-reentrant scanner. * This function is called from gas_lex_destroy(), so don't allocate here. */ yyg->yy_buffer_stack = 0; yyg->yy_buffer_stack_top = 0; yyg->yy_buffer_stack_max = 0; yyg->yy_c_buf_p = (char *) 0; yyg->yy_init = 0; yyg->yy_start = 0; yyg->yy_start_stack_ptr = 0; yyg->yy_start_stack_depth = 0; yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = (FILE *) 0; yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * gas_lex_init() */ return 0; } /* gas_lex_destroy is for both reentrant and non-reentrant scanners. */ int gas_lex_destroy (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ gas__delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); YY_CURRENT_BUFFER_LVALUE = NULL; gas_pop_buffer_state(yyscanner); } /* Destroy the stack itself. */ gas_free(yyg->yy_buffer_stack ,yyscanner); yyg->yy_buffer_stack = NULL; /* Destroy the start condition stack. */ gas_free(yyg->yy_start_stack ,yyscanner ); yyg->yy_start_stack = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * gas_lex() is called, initialization will occur. */ yy_init_globals( yyscanner); /* Destroy the main struct (reentrant only). */ gas_free ( yyscanner , yyscanner ); yyscanner = NULL; return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif #define YYTABLES_NAME "yytables" #line 293 "fcml_gas_lexer.l" fcml-1.1.1/src/fcml_intel_parser_def.y0000644000175000017500000002350012560745216014653 00000000000000 /* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ %define api.pure %parse-param { struct fcml_st_parser_data *pd } %name-prefix="intel_" %{ #include #include "fcml_parser_utils.h" void intel_error( struct fcml_st_parser_data *pd, const char *error ); /* Macro responsible for handling 'Out of memory' errors. */ #define HANDLE_ERRORS(x) if( !x ) { yyerror(pd, "Out of memory."); YYERROR; } /* Macro responsible for adding error messages to result. */ #define ADD_ERROR_MSG(x) { yyerror( pd, x ); } %} /* Uncomment it in order to enable debugging */ /* %debug */ /* Terminal symbols. */ /* Uexpected tokens goes here. */ %token FCML_TK_UNEXPECTED /* Registers. */ %token FCML_TK_REG_GPR %token FCML_TK_REG_SIMD %token FCML_TK_REG_FPU %token FCML_TK_REG_SEG %token FCML_TK_REG_CR %token FCML_TK_REG_DR %token FCML_TK_REG_RIP /* Integer values. Encoding doesn't matters. */ %token FCML_TK_INTEGER /* Single-precision floating-point in IEEE 754. */ %token FCML_TK_FLOAT /* Size operand (BYTE PTR etc.) */ %token FCML_TK_SIZE_OPERATOR; /* Literal symbol. It's used mainly for mnemonics.*/ %token FCML_TK_SYMBOL /* Instruction addressing mode hints. */ %token FCML_TK_HINTS %token FCML_TK_EAO_HINTS %token FCML_TK_SIB_HINT /* Prefixes */ %token FCML_TK_PREFIX /*Non-terminal symbols.*/ %type reg %type segment_selector %type hint_list %type operand %type operand_list %type instruction %type exp %type far_pointer %type effective_address %type effective_address_components %type mnemonic %type inst_prefixes /* Precedence levels and associativity. */ %left '-' '+' %left '*' '/' %left FCML_OP_UMINUS /* Destructor for leafs of AST. */ %destructor { fcml_fn_ast_free_node($$); } /* Printers goes here. */ %printer { YYFPRINTF(yyoutput, "Integer: %d Overflow: %d", $$.value, $$.overflow); } %printer { YYFPRINTF(yyoutput, "Float: %f Overflow: %d", $$.value, $$.overflow); } %printer { YYFPRINTF(yyoutput, "AST-Type: %d", $$->type); } %printer { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( $$.type ), $$.size, $$.reg, $$.x64_exp); } %union { /*Complex values.*/ fcml_st_ast_val_integer integer_value; fcml_st_ast_val_float float_value; fcml_st_register reg_value; fcml_st_ast_node *ast; struct { fcml_string text; int length; } symbol; fcml_st_size_operator size_operator; fcml_hints hints; fcml_prefixes prefixes; } %{ #include "fcml_intel_lexer.h" #define YYLEX_PARAM ((yyscan_t)pd->scannerInfo) %} %initial-action { /* Uncomment it in order to enable debugging */ /* yydebug = 1; */ } %% start: | instruction { pd->tree = $1; pd->symbol = NULL; } | FCML_TK_SYMBOL ':' { pd->tree = NULL; pd->symbol = fcml_fn_ast_alloc_node_define_symbol( pd->ip, $1.text, $1.length ); HANDLE_ERRORS( pd->symbol ); } | FCML_TK_SYMBOL ':' instruction { pd->tree = $3; pd->symbol = fcml_fn_ast_alloc_node_define_symbol( pd->ip, $1.text, $1.length ); HANDLE_ERRORS( pd->symbol ); } ; instruction: mnemonic { $$ = fcml_fn_ast_alloc_node_instruction( 0, $1.text, $1.length, 0, NULL ); HANDLE_ERRORS($$); } | mnemonic operand_list { $$ = fcml_fn_ast_alloc_node_instruction( 0, $1.text, $1.length, 0, $2 ); HANDLE_ERRORS($$); } | mnemonic hint_list operand_list { $$ = fcml_fn_ast_alloc_node_instruction( 0, $1.text, $1.length, $2, $3 ); HANDLE_ERRORS($$); } | inst_prefixes mnemonic { $$ = fcml_fn_ast_alloc_node_instruction( $1, $2.text, $2.length, 0, NULL ); HANDLE_ERRORS($$); } | inst_prefixes mnemonic operand_list { $$ = fcml_fn_ast_alloc_node_instruction( $1, $2.text, $2.length, 0, $3 ); HANDLE_ERRORS($$); } | inst_prefixes mnemonic hint_list operand_list { $$ = fcml_fn_ast_alloc_node_instruction( $1, $2.text, $2.length, $3, $4 ); HANDLE_ERRORS($$); } ; inst_prefixes: FCML_TK_PREFIX | inst_prefixes FCML_TK_PREFIX { if( $1 & $2 ) { ADD_ERROR_MSG( "Doubled prefixes." ); YYERROR; } else { $$ = $1 | $2; } } ; mnemonic: FCML_TK_SYMBOL ; hint_list: FCML_TK_HINTS | hint_list FCML_TK_HINTS { $$ = $1 | $2; } ; operand_list: operand { $$ = fcml_fn_ast_alloc_node_operand_list( $1, NULL ); HANDLE_ERRORS($$); } | operand_list ',' operand { $$ = fcml_fn_ast_alloc_node_operand_list( $1, $3 ); HANDLE_ERRORS($$); } ; operand: exp | far_pointer | effective_address | reg { $$ = fcml_fn_ast_alloc_node_register( &$1 ); HANDLE_ERRORS($$); } ; effective_address: '[' effective_address_components ']' { $$ = $2; } | FCML_TK_SIZE_OPERATOR '[' effective_address_components ']' { $$ = fcml_fn_ast_set_effective_address_details( NULL, &$1, $3 ); } | segment_selector '[' effective_address_components ']' { $$ = fcml_fn_ast_set_effective_address_details( &$1, FCML_OS_UNDEFINED, $3 ); } | FCML_TK_SIZE_OPERATOR segment_selector '[' effective_address_components ']' { $$ = fcml_fn_ast_set_effective_address_details( &$2, &$1, $4 ); } ; effective_address_components: reg { $$ = fcml_fn_ast_alloc_node_effective_address( &$1, NULL, NULL, NULL, FCML_FALSE, 0 ); } | FCML_TK_SIB_HINT reg { $$ = fcml_fn_ast_alloc_node_effective_address( &$2, NULL, NULL, NULL, FCML_FALSE, $1 ); } | FCML_TK_REG_RIP { $$ = fcml_fn_ast_alloc_node_effective_address( &$1, NULL, NULL, NULL, FCML_FALSE, 0 ); } | reg '+' reg { $$ = fcml_fn_ast_alloc_node_effective_address( &$1, &$3, NULL, NULL, FCML_FALSE, 0 ); } | reg '+' reg '*' FCML_TK_INTEGER { $$ = fcml_fn_ast_alloc_node_effective_address( &$1, &$3, &$5, NULL, FCML_FALSE, 0 ); } | reg '+' reg '*' FCML_TK_INTEGER '+' exp { $$ = fcml_fn_ast_alloc_node_effective_address( &$1, &$3, &$5, $7, FCML_FALSE, 0 ); } | reg '+' reg '*' FCML_TK_INTEGER '-' exp { $$ = fcml_fn_ast_alloc_node_effective_address( &$1, &$3, &$5, $7, FCML_TRUE, 0 ); } | reg '+' reg '+' exp { $$ = fcml_fn_ast_alloc_node_effective_address( &$1, &$3, NULL, $5, FCML_FALSE, 0 ); } | reg '+' reg '-' exp { $$ = fcml_fn_ast_alloc_node_effective_address( &$1, &$3, NULL, $5, FCML_TRUE, 0 ); } | reg '+' exp { $$ = fcml_fn_ast_alloc_node_effective_address( &$1, NULL, NULL, $3, FCML_FALSE, 0 ); } | FCML_TK_REG_RIP '+' exp { $$ = fcml_fn_ast_alloc_node_effective_address( &$1, NULL, NULL, $3, FCML_FALSE, 0 ); } | FCML_TK_SIB_HINT reg '+' exp { $$ = fcml_fn_ast_alloc_node_effective_address( &$2, NULL, NULL, $4, FCML_FALSE, $1 ); } | reg '-' exp { $$ = fcml_fn_ast_alloc_node_effective_address( &$1, NULL, NULL, $3, FCML_TRUE, 0 ); } | FCML_TK_SIB_HINT reg '-' exp { $$ = fcml_fn_ast_alloc_node_effective_address( &$2, NULL, NULL, $4, FCML_TRUE, $1 ); } | exp { $$ = fcml_fn_ast_alloc_node_effective_address( NULL, NULL, NULL, $1, FCML_FALSE, 0); } | FCML_TK_EAO_HINTS exp { $$ = fcml_fn_ast_alloc_node_effective_address( NULL, NULL, NULL, $2, FCML_FALSE, $1); } | FCML_TK_SIB_HINT exp { $$ = fcml_fn_ast_alloc_node_effective_address( NULL, NULL, NULL, $2, FCML_FALSE, $1); } ; segment_selector: FCML_TK_REG_SEG ':' { $$ = $1; } ; far_pointer: exp ':' exp { $$ = fcml_fn_ast_alloc_node_far_pointer( $1, $3 ); HANDLE_ERRORS($$); } ; exp: FCML_TK_INTEGER { $$ = fcml_fn_ast_alloc_node_integer( &$1 ); HANDLE_ERRORS($$); } | FCML_TK_FLOAT { $$ = fcml_fn_ast_alloc_node_float( &$1 ); HANDLE_ERRORS($$); } | exp '-' exp { $$ = fcml_fn_ast_alloc_node_exp( FCML_EN_EXN_SUB, $1, $3 ); HANDLE_ERRORS($$); } | exp '+' exp { $$ = fcml_fn_ast_alloc_node_exp( FCML_EN_EXN_ADD, $1, $3 ); HANDLE_ERRORS($$); } | exp '/' exp { $$ = fcml_fn_ast_alloc_node_exp( FCML_EN_EXN_DIV, $1, $3 ); HANDLE_ERRORS($$); } | exp '*' exp { $$ = fcml_fn_ast_alloc_node_exp( FCML_EN_EXN_MUL, $1, $3 ); HANDLE_ERRORS($$); } | FCML_TK_SYMBOL { $$ = fcml_fn_ast_alloc_node_use_symbol( $1.text, $1.length ); HANDLE_ERRORS($$); } | '-' exp %prec FCML_OP_UMINUS { $$ = fcml_fn_ast_alloc_node_uminus( $2 ); HANDLE_ERRORS($$); } | '(' exp ')' { $$ = $2; } ; /* Every register possible. */ reg: FCML_TK_REG_GPR | FCML_TK_REG_SIMD | FCML_TK_REG_FPU | FCML_TK_REG_SEG | FCML_TK_REG_CR | FCML_TK_REG_DR ; %% fcml-1.1.1/src/fcml_rend_utils.c0000644000175000017500000002471712560745216013503 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_rend_utils.h" #include #include #include #include #include #include "fcml_env_int.h" #include "fcml_ceh.h" #include "fcml_stream.h" void fcml_fn_rend_utils_format_printf( fcml_st_memory_stream *stream, const fcml_string format, ... ) { /* We'll never reach this limit.*/ fcml_char local_buffer[512]; va_list arg_list; va_start( arg_list, format ); fcml_fn_env_str_vsnprintf( local_buffer, sizeof( local_buffer ), format, arg_list ); int part_size = fcml_fn_env_str_strlen( local_buffer ); if ( part_size > stream->size - stream->offset - 1 ) { part_size = stream->size - stream->offset - 1; } fcml_fn_env_memory_copy( &( ( (fcml_char*) stream->base_address )[stream->offset] ), local_buffer, part_size ); stream->offset += part_size; } void fcml_fn_rend_utils_format_append_hex_byte( fcml_st_memory_stream *stream, fcml_uint8_t hex_byte ) { fcml_fn_rend_utils_format_printf( stream, FCML_PRI_INT8_HEX, hex_byte ); } void fcml_fn_rend_utils_format_append_code( const fcml_st_render_config *config, fcml_st_memory_stream *stream, const fcml_uint8_t *instrunction_code, const fcml_usize instruction_code_size ) { fcml_int c_pad = 0; fcml_int i; for ( i = 0; i < instruction_code_size; i++ ) { fcml_fn_rend_utils_format_append_hex_byte( stream, instrunction_code[i] ); } if ( config->render_flags & FCML_REND_FLAG_CODE_PADDING ) { int padding = FCML_REND_DEFAULT_CODE_PADDING; if ( config->prefered_code_padding > 0 ) { padding = config->prefered_code_padding; } c_pad = ( padding - instruction_code_size ) * 2; if ( c_pad > 0 ) { fcml_fn_rend_utils_format_repeat_char( stream, ' ', c_pad ); } } if ( c_pad <= 0 ) { fcml_fn_rend_utils_format_append_str( stream, FCML_TEXT( " " ) ); } } fcml_int fcml_fn_rend_utils_format_append_str_if( fcml_st_memory_stream *stream, const fcml_string string, fcml_bool condition ) { if ( condition ) { return fcml_fn_rend_utils_format_append_str( stream, string ); } return 0; } void fcml_fn_rend_utils_format_finish_str( fcml_st_memory_stream *stream ) { int size = sizeof( FCML_TEXT( "\0" ) ); if ( fcml_fn_stream_size( stream ) >= size ) { fcml_fn_env_str_strncpy( &( ( (fcml_char*) stream->base_address )[stream->offset] ), FCML_TEXT( "\0" ), size ); stream->offset += size; } } fcml_int fcml_fn_rend_utils_format_append_str( fcml_st_memory_stream *stream, const fcml_string source ) { fcml_int source_size; if ( source == NULL || ( source_size = fcml_fn_env_str_strlen( source ) ) == 0 ) { return 0; } fcml_int destination_size = stream->size - stream->offset; fcml_int n = ( destination_size < source_size ) ? destination_size : source_size; if ( n > 0 ) { fcml_fn_env_str_strncpy( &( ( (fcml_char*) stream->base_address )[stream->offset] ), source, n ); stream->offset += n; } else { n = 0; } return n; } fcml_int fcml_fn_rend_utils_format_append_str_padding( fcml_st_memory_stream *stream, const fcml_string source, fcml_int16_t padding ) { fcml_usize str_len = fcml_fn_env_str_strlen( source ); fcml_int len = 0; len += fcml_fn_rend_utils_format_append_str( stream, source ); if ( str_len < padding ) { padding -= str_len; while ( padding > 0 ) { len += fcml_fn_rend_utils_format_append_str( stream, " " ); } } return len; } void fcml_fn_rend_utils_format_append_stream( fcml_st_memory_stream *destination_stream, const fcml_st_memory_stream *source_stream ) { if ( source_stream->offset == 0 ) { return; } fcml_int destination_size = destination_stream->size - destination_stream->offset; fcml_int n = ( destination_size < source_stream->offset ) ? destination_size : source_stream->offset; if ( n > 0 ) { fcml_fn_env_str_strncpy( (fcml_string) &( ( (fcml_char*) destination_stream->base_address )[destination_stream->offset] ), (fcml_string) source_stream->base_address, n ); destination_stream->offset += n; } } fcml_ceh_error fcml_fn_rend_utils_format_append_integer( fcml_string patterns[6][4], fcml_st_memory_stream *stream, const fcml_st_integer *integer, fcml_bool is_hex, fcml_bool remove_leading_zeros ) { fcml_string *format; fcml_int delta = integer->is_signed ? 0 : 1; if ( is_hex ) { if ( remove_leading_zeros ) { format = &( patterns[4 + delta][0] ); } else { format = &( patterns[2 + delta][0] ); } } else { format = &( patterns[0 + delta][0] ); } fcml_char local_buffer[32]; switch ( integer->size ) { case 8: fcml_fn_env_str_snprintf( local_buffer, sizeof( local_buffer ), format[0], integer->is_signed & !is_hex ? integer->int8 : (fcml_uint8_t) integer->int8 ); break; case 16: fcml_fn_env_str_snprintf( local_buffer, sizeof( local_buffer ), format[1], integer->is_signed & !is_hex ? integer->int16 : (fcml_uint16_t) integer->int16 ); break; case 32: fcml_fn_env_str_snprintf( local_buffer, sizeof( local_buffer ), format[2], integer->is_signed & !is_hex ? integer->int32 : (fcml_uint32_t) integer->int32 ); break; case 64: fcml_fn_env_str_snprintf( local_buffer, sizeof( local_buffer ), format[3], integer->is_signed & !is_hex ? integer->int64 : (fcml_uint64_t) integer->int64 ); break; default: return FCML_CEH_GEC_INVALID_INPUT; } /* Currently this logic desn't collide with AT&T dialect, so parameterization is not needed.*/ if ( is_hex && !isdigit( local_buffer[0] ) ) { fcml_fn_rend_utils_format_append_str( stream, "0" ); } fcml_fn_rend_utils_format_append_str( stream, (fcml_string) local_buffer ); return FCML_CEH_GEC_NO_ERROR; } void fcml_fn_rend_utils_format_append_reg( const fcml_st_dialect_context_int *dialect_context, fcml_st_memory_stream *output_stream, const fcml_st_register *reg, fcml_bool is_rex ) { fcml_char printable_reg[64]; dialect_context->get_register( reg, printable_reg, sizeof( printable_reg ), is_rex ); fcml_fn_rend_utils_format_append_str( output_stream, printable_reg ); } fcml_int fcml_fn_rend_utils_padding( fcml_st_memory_stream *output_stream, fcml_int len, fcml_int padding, fcml_int default_padding ) { if ( padding <= 0 ) { padding = default_padding; } return fcml_fn_rend_utils_format_repeat_char( output_stream, ' ', padding - len ); } fcml_int fcml_fn_rend_utils_format_repeat_char( fcml_st_memory_stream *stream, fcml_char character, fcml_int repeats ) { if ( repeats > 0 ) { fcml_int size = fcml_fn_stream_size( stream ); if ( size < repeats ) { repeats = size; } if ( repeats > 0 ) { fcml_char *buffer = &( ( (fcml_char*) stream->base_address )[stream->offset] ); stream->offset += repeats; fcml_int counter = repeats; while ( counter > 0 ) { buffer[--counter] = character; } } } else { repeats = 0; } return repeats; } fcml_int fcml_ifn_rend_utils_print_prefixes( fcml_st_memory_stream *output_stream, const fcml_st_prefixes_details *prefixes, fcml_uint32_t flags ) { fcml_int len = 0; if ( prefixes->is_xacquire ) { len += fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "xacquire " ) ); } if ( prefixes->is_xrelease ) { len += fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "xrelease " ) ); } if ( prefixes->is_lock ) { len += fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "lock " ) ); } if ( prefixes->is_branch ) { len += fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "branch " ) ); } if ( prefixes->is_nobranch ) { len += fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "nobranch " ) ); } if ( prefixes->is_rep ) { if ( flags & FCML_REND_FLAG_REP_PREFIX_GROUP_1 ) { len += fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "repe " ) ); } else if ( flags & FCML_REND_FLAG_REP_PREFIX_GROUP_2 ) { len += fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "repz " ) ); } else { len += fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "rep " ) ); } } if ( prefixes->is_repne ) { if ( flags & FCML_REND_FLAG_REP_PREFIX_GROUP_2 ) { len += fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "repnz " ) ); } else { len += fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "repne " ) ); } } return len; } fcml_bool fcml_fn_rend_utils_render_operand_separator( const fcml_st_render_config *config, fcml_st_memory_stream *output_stream, fcml_int mnemonic_length, fcml_bool first_operand ) { if ( !first_operand ) { fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "," ) ); } else { /* Deferred mnemonic part padding. */ fcml_int padding_len = 0; if ( config->render_flags & FCML_REND_FLAG_MNEMONIC_PADDING ) { padding_len = fcml_fn_rend_utils_padding( output_stream, mnemonic_length, config->prefered_mnemonic_padding, FCML_REND_DEFAULT_MNEMONIC_PADDING ); } if ( padding_len <= 0 ) { fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( " " ) ); } first_operand = FCML_FALSE; } return FCML_FALSE; } fcml-1.1.1/src/fcml_encoding.c0000644000175000017500000056452012560745216013122 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_encoding.h" #include #include #include #include #include #include "fcml_def.h" #include "fcml_env_int.h" #include "fcml_hints.h" #include "fcml_messages.h" #include "fcml_mnemonic_parser.h" #include "fcml_modrm.h" #include "fcml_modrm_encoder.h" #include "fcml_stream.h" #include "fcml_trace.h" #include "fcml_utils.h" #define FCML_ASM_MAX_PART_PROCESSORS 40 /* REX prefix.*/ #define FCML_ENCODE_REX_BASE 0x40 #define FCML_ENCODE_REX_W(rex,w) ( rex | ( w << 3 ) ) #define FCML_ENCODE_REX_R(rex,r) ( rex | ( r << 2 ) ) #define FCML_ENCODE_REX_X(rex,x) ( rex | ( x << 1 ) ) #define FCML_ENCODE_REX_B(rex,b) ( rex | b ) /* XOP/VEX prefixes.*/ #define FCML_ENCODE_VEXOP_MMMM(vexop,x) ( ( vexop ) | ( ( x ) & 0x1F ) ) #define FCML_ENCODE_VEXOP_VVVV(vexop,x) ( ( vexop ) | ( ( ~( x ) & 0x0F ) << 3 ) ) #define FCML_ENCODE_VEXOP_PP(vexop,x) ( ( vexop ) | ( ( x ) & 0x03 ) ) #define FCML_ENCODE_VEXOP_W(vexop,x) ( ( vexop ) | ( ( ( x ) & 0x01 ) << 7 ) ) #define FCML_ENCODE_VEXOP_L(vexop,x) ( ( vexop ) | ( ( ( x ) & 0x01 ) << 2 ) ) /* R,X and B are stored in 1's complement form.*/ #define FCML_ENCODE_VEXOP_R(vexop,x) ( ( vexop ) | ( ( ~( x ) & 0x01 ) << 7 ) ) #define FCML_ENCODE_VEXOP_X(vexop,x) ( ( vexop ) | ( ( ~( x ) & 0x01 ) << 6 ) ) #define FCML_ENCODE_VEXOP_B(vexop,x) ( ( vexop ) | ( ( ~( x ) & 0x01 ) << 5 ) ) #define FCML_ASM_FCF 16 typedef enum fcml_ist_addr_mode_processing_phase { FCML_AMPP_UNDEFINED, FCML_AMPP_ACCEPT, FCML_AMPP_PROCESS } fcml_ist_addr_mode_processing_phase; typedef struct fcml_ist_asm_addr_mode_error { /** Addressing mode processing failed in the phase: */ fcml_ist_addr_mode_processing_phase phase; /** Error code */ fcml_ceh_error error_code; /** Local errors container, dedicated to addressing mode processing. */ fcml_st_ceh_error_container addr_mode_errors; /** Ordinal number of failed instruction part processor. */ fcml_int ipp_failed; } fcml_ist_asm_addr_mode_error; typedef struct fcml_ist_asm_extension_prefixes_fields { fcml_uint8_t vvvv; fcml_uint8_t mmmm; } fcml_ist_asm_extension_prefixes_fields; typedef struct fcml_ist_asm_opcode_reg { fcml_uint8_t opcode_reg; fcml_uint8_t ext_b; } fcml_ist_asm_opcode_reg; typedef fcml_usize (*fcml_ifp_asm_memory_data_size_calculator)( fcml_st_instruction *instruction, fcml_ptr args ); typedef struct fcml_ist_asm_addr_mode_desc_details { /* Precalculated flags describing which ASA and OSA values are available for addressing mode.*/ fcml_flags allowed_osa; fcml_flags allowed_asa; fcml_bool is_conditional; fcml_st_condition condition; fcml_ifp_asm_memory_data_size_calculator ds_calculator; fcml_ptr ds_calculator_args; } fcml_ist_asm_addr_mode_desc_details; typedef union fcml_ist_asm_part_processor_cache { fcml_uint8_t is5_m2z; } fcml_ist_asm_part_processor_cache; typedef struct fcml_ist_asm_part_processor_context { fcml_ist_asm_part_processor_cache cache[FCML_ASM_MAX_PART_PROCESSORS]; fcml_int part_processor_index; } fcml_ist_asm_part_processor_context; typedef struct fcml_ist_asm_encoding_context { fcml_st_assembler_context *assembler_context; fcml_st_instruction *instruction; fcml_st_asm_encoder_result *encoder_result; fcml_st_asm_optimizer_processing_details optimizer_processing_details; fcml_st_mp_mnemonic *mnemonic; fcml_ist_asm_part_processor_context part_processor_context; fcml_ist_asm_extension_prefixes_fields epf; fcml_st_register segment_override; fcml_st_modrm mod_rm; /* ModR/M related operand hints.*/ fcml_bool is_sib_alternative_hint; fcml_bool is_rel_alternative_hint; fcml_bool is_abs_alternative_hint; /* True if SIB alternative is available, but hasn't been chosen.*/ fcml_bool is_sib_alternative_encoding; fcml_st_encoded_modrm encoded_mod_rm; fcml_ist_asm_opcode_reg opcode_reg; fcml_nuint8_t instruction_size; fcml_bool is_short_form; fcml_bool reg_opcode_needs_rex; fcml_uint8_t is5_byte; /* Operand size calculator selected for processed addressing mode.*/ fcml_ifp_asm_memory_data_size_calculator ds_calculator; fcml_ptr ds_calculator_args; /* Error messages.*/ fcml_st_ceh_error_container *error_container; /* Number of lastly proceeded instruction part processor. */ fcml_int last_ipp; #ifdef FCML_DEBUG fcml_int __def_index; #endif } fcml_ist_asm_encoding_context; struct fcml_ist_asm_instruction_part; typedef fcml_ceh_error (*fcml_st_asm_instruction_part_post_processor)( fcml_ist_asm_encoding_context *context, struct fcml_ist_asm_instruction_part *instruction_part, fcml_ptr post_processor_args ); typedef struct fcml_ist_asm_instruction_part { fcml_uint8_t code[10]; fcml_int code_length; fcml_ptr post_processor_args; fcml_st_asm_instruction_part_post_processor post_processor; } fcml_ist_asm_instruction_part; typedef struct fcml_ist_asm_instruction_part_container { /* Address of the instruction parts array.*/ fcml_ist_asm_instruction_part *instruction_parts; /* Number of instruction parts in the array.*/ fcml_int count; } fcml_ist_asm_instruction_part_container; struct fcml_st_asm_instruction_addr_modes; typedef enum fcml_ien_asm_part_processor_phase { /* ModR/M arguments filling.*/ FCML_IEN_ASM_IPPP_FIRST_PHASE, /* ModR/M encoding.*/ FCML_IEN_ASM_IPPP_SECOND_PHASE, /* Prefixes are applied in this phase.*/ FCML_IEN_ASM_IPPP_THIRD_PHASE } fcml_ien_asm_part_processor_phase; typedef struct fcml_ist_asm_init_context { fcml_coll_map instructions_map; fcml_st_dialect_context_int *dialect_context; } fcml_ist_asm_init_context; typedef fcml_ceh_error (*fcml_ifp_asm_operand_encoder)( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ); typedef fcml_ceh_error (*fcml_ifp_asm_operand_acceptor)( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ); typedef struct fcml_ist_asm_operand_encoder_def { fcml_ifp_asm_operand_encoder encoder; fcml_ifp_asm_operand_acceptor acceptor; fcml_fp_hts_instruction_hints_calculator hints_calculator; } fcml_ist_asm_operand_encoder_def; typedef enum fcml_ien_asm_instruction_part_processor_type { FCML_IEN_ASM_IPPT_VERIFIER, FCML_IEN_ASM_IPPT_ENCODER, FCML_IEN_ASM_IPPT_DECORATOR, } fcml_ien_asm_instruction_part_processor_type; typedef fcml_ceh_error (*fcml_ifp_asm_instruction_part_processor)( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr args ); typedef fcml_ceh_error (*fcml_ifp_asm_instruction_part_processor_acceptor)( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_instruction *instruction, fcml_ptr args ); typedef struct fcml_ist_asm_instruction_part_processor_descriptor { fcml_ifp_asm_instruction_part_processor processor_encoder; fcml_ifp_asm_instruction_part_processor_acceptor processor_acceptor; fcml_ien_asm_instruction_part_processor_type processor_type; fcml_ptr processor_args; fcml_fp_env_memory_free_handler processor_args_deallocator; fcml_bool is_short_form_supported; } fcml_ist_asm_instruction_part_processor_descriptor; typedef fcml_ist_asm_instruction_part_processor_descriptor (*fcml_ifp_asm_instruction_part_processor_factory)( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ); typedef struct fcml_ist_asm_instruction_part_processor_chain { struct fcml_ist_asm_instruction_part_processor_chain *next_processor; fcml_ist_asm_instruction_part_processor_descriptor processor_descriptor; } fcml_ist_asm_instruction_part_processor_chain; typedef fcml_ist_asm_instruction_part_processor_chain* (*fcml_ifp_asm_instruction_part_processor_factory_dispatcher)( fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, int *parts, fcml_hints *hints, fcml_ceh_error *error ); typedef struct fcml_ist_asm_instruction_addr_mode_encoding_details { /* Instruction code. */ fcml_en_instruction instruction; /* Mnemonic configuration chosen for given addressing mode.*/ fcml_st_mp_mnemonic *mnemonic; /* Instruction definition.*/ fcml_st_def_addr_mode_desc *addr_mode_desc; /* Some precalculated information about instruction addressing mode. This structure can be helpful, because*/ /* some details of the addressing mode can be pre-calculate while addressing mode is processed in initialization mode.*/ /* So we can get some performance improvements.*/ fcml_ist_asm_addr_mode_desc_details addr_mode_details; /* Chain of instruction part processors registered for instruction addressing mode.*/ fcml_ist_asm_instruction_part_processor_chain *part_processor_chain; /* Number of instruction parts needed to assemble described instruction.*/ fcml_int instruction_parts; /* Addressing mode related hints.*/ fcml_hints hints; /* True if details are cloned for alternative mnemonics.*/ fcml_bool is_cloned; } fcml_ist_asm_instruction_addr_mode_encoding_details; /* *************************/ /* DEBUG related functions.*/ /* *************************/ #ifdef FCML_DEBUG fcml_char fcml_idarr_asm_data_attr_flags_buff[64]; fcml_string fcml_idfn_asm_print_attr_size_flags( fcml_flags flags ) { int index = 0; if( flags == FCML_EN_ASF_ANY ) { sprintf( fcml_idarr_asm_data_attr_flags_buff, "ANY" ); } else { if( flags & FCML_EN_ASF_16 ) { index += sprintf( fcml_idarr_asm_data_attr_flags_buff, "2" ); } if( flags & FCML_EN_ASF_32 ) { index += sprintf( fcml_idarr_asm_data_attr_flags_buff + index, "4" ); } if( flags & FCML_EN_ASF_64 ) { index += sprintf( fcml_idarr_asm_data_attr_flags_buff + index, "8" ); } } return fcml_idarr_asm_data_attr_flags_buff; } fcml_char fcml_idarr_asm_data_flags_buff[512]; fcml_string fcml_idfn_asm_encode_size_flags( fcml_st_asm_optimizer_processing_details *size_flags ) { int index = 0; /* L flag.*/ if( size_flags->l.is_not_null ) { index += sprintf( fcml_idarr_asm_data_flags_buff, "L: %d, ", size_flags->l.value ); } else { index += sprintf( fcml_idarr_asm_data_flags_buff, "L: NS, " ); } /* Allowed EOSA.*/ if( size_flags->allowed_eosa.is_set ) { index += sprintf( fcml_idarr_asm_data_flags_buff + index, "Allowed OSA: [%s], ", fcml_idfn_asm_print_attr_size_flags( size_flags->allowed_eosa.flags ) ); } else { index += sprintf( fcml_idarr_asm_data_flags_buff + index, "Allowed OSA: NS, " ); } /* Allowed EASA.*/ if( size_flags->allowed_easa.is_set ) { index += sprintf( fcml_idarr_asm_data_flags_buff + index, "Allowed ASA: [%s], ", fcml_idfn_asm_print_attr_size_flags( size_flags->allowed_easa.flags ) ); } else { index += sprintf( fcml_idarr_asm_data_flags_buff + index, "Allowed ASA: NS, " ); } /* Chosen OSA.*/ index += sprintf( fcml_idarr_asm_data_flags_buff + index, "EOSA: %d, ", size_flags->eosa ); /* Chosen OSA.*/ index += sprintf( fcml_idarr_asm_data_flags_buff + index, "EASA: %d", size_flags->easa ); return fcml_idarr_asm_data_flags_buff; } #endif /***********************************/ /* Error handling helper functions */ /***********************************/ void fcml_ifn_ceh_asm_add_error_msg( fcml_ist_asm_encoding_context *context, fcml_string message, fcml_ceh_error error_code ) { if ( context->assembler_context->configuration.enable_error_messages ) { fcml_bool add_error = FCML_TRUE; fcml_st_ceh_error_info *current = context->error_container->errors; // Only one error message is currently allowed. while ( current ) { if ( current->code == FCML_EN_CEH_EL_ERROR ) { add_error = FCML_FALSE; break; } current = current->next_error; } if ( add_error ) { fcml_fn_ceh_add_error( context->error_container, message, error_code, FCML_EN_CEH_EL_ERROR ); } } } void fcml_ifn_ceh_asm_add_warning_msg( fcml_ist_asm_encoding_context *context, fcml_string message, fcml_ceh_error error_code ) { if ( context->assembler_context->configuration.enable_error_messages ) { fcml_fn_ceh_add_error( context->error_container, message, error_code, FCML_EN_CEH_EL_WARN ); } } enum fcml_ien_asm_comparator_type { FCML_IEN_CT_EQUAL, FCML_IEN_CT_EQUAL_OR_LESS, }; void fcml_ifn_asm_clean_context( fcml_ist_asm_encoding_context *context ) { fcml_st_asm_optimizer_processing_details *data_size_flags = &( context->optimizer_processing_details ); data_size_flags->easa = FCML_DS_UNDEF; data_size_flags->eosa = FCML_DS_UNDEF; data_size_flags->l.is_not_null = FCML_FALSE; data_size_flags->l.value = 0; data_size_flags->allowed_easa.flags = FCML_EN_ASF_ANY; data_size_flags->allowed_easa.is_set = FCML_FALSE; data_size_flags->allowed_eosa.flags = FCML_EN_ASF_ANY; data_size_flags->allowed_eosa.is_set = FCML_FALSE; /* Clears segment override set by acceptor functions.*/ context->segment_override.reg = 0; context->segment_override.size = FCML_DS_UNDEF; context->segment_override.type = FCML_REG_UNDEFINED; context->segment_override.x64_exp = FCML_FALSE; } fcml_st_memory_stream fcml_ifn_asm_instruction_part_stream( fcml_ist_asm_instruction_part *instruction_part ) { fcml_st_memory_stream stream; stream.base_address = &( instruction_part->code ); stream.offset = 0; stream.size = sizeof( instruction_part->code ); return stream; } fcml_usize fcml_ifn_asm_get_effective_address_size( fcml_ist_asm_encoding_context *context ) { if ( context->optimizer_processing_details.easa ) { return context->optimizer_processing_details.easa; } return context->assembler_context->entry_point.address_size_attribute; } fcml_usize fcml_ifn_asm_calculate_operand_size( fcml_ist_asm_encoding_context *context, fcml_usize size_operator, fcml_uint8_t encoded_size_operator ) { /* Remember, some addressing modes use registers that do not match memory data size. * These addressing modes can accept unknown operand size so we do not calculate * size operators for them, because such calculated size wouldn't match data size anyway. */ if ( size_operator == FCML_OS_UNDEFINED && !FCML_IS_EOS_OPT( encoded_size_operator ) ) { if ( context->ds_calculator ) { size_operator = context->ds_calculator( context->instruction, context->ds_calculator_args ); } } return size_operator; } fcml_usize fcml_ifn_asm_non_standard_attribute_size_calculator( fcml_st_entry_point *entry_point, fcml_usize operand_size, fcml_usize l, fcml_usize u, fcml_ceh_error *error ) { fcml_usize attribute_size = 0; if ( operand_size == l ) { attribute_size = 16; } else if ( operand_size == u ) { if ( entry_point->operand_size_attribute == FCML_DS_16 ) { FCML_TRACE_MSG( "Addressing mode not available for 16 bit EOSA." ); *error = FCML_CEH_GEC_INVALID_OPPERAND_SIZE; } else { attribute_size = entry_point->operand_size_attribute; } } return attribute_size; } fcml_ceh_error fcml_ifn_asm_decode_dynamic_operand_size( fcml_ist_asm_encoding_context *context, fcml_uint8_t encoded_operand_size, fcml_usize operand_size, fcml_usize *encoded_data_size, enum fcml_ien_asm_comparator_type comparator ) { fcml_st_entry_point *entry_point = &( context->assembler_context->entry_point ); fcml_st_asm_optimizer_processing_details *flags = &( context->optimizer_processing_details ); fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_usize effective_address_size = 0; fcml_usize effective_operand_size = 0; fcml_uint8_t encoded_static_operand_size = FCML_GET_OS( encoded_operand_size ); fcml_nuint8_t l = { 0, FCML_FALSE }; if ( ( operand_size == FCML_OS_UNDEFINED ) && FCML_IS_EOS_OPT( encoded_operand_size ) ) { return error; } if ( encoded_data_size != NULL ) { *encoded_data_size = operand_size; } switch ( encoded_static_operand_size ) { case FCML_EOS_UNDEFINED: break; case FCML_EOS_L: l.is_not_null = FCML_TRUE; l.value = 0; if ( operand_size == FCML_DS_256 ) { l.value = 1; } else if ( operand_size != FCML_DS_128 ) { error = FCML_CEH_GEC_INVALID_OPPERAND_SIZE; } break; case FCML_EOS_EASA: if ( operand_size == FCML_DS_16 || operand_size == FCML_DS_32 || operand_size == FCML_DS_64 ) { effective_address_size = operand_size; } else { FCML_TRACE_MSG( "Unsupported encoded EOSA size." ); error = FCML_CEH_GEC_INVALID_OPPERAND_SIZE; } break; case FCML_EOS_EOSA: if ( operand_size == FCML_DS_16 || operand_size == FCML_DS_32 || operand_size == FCML_DS_64 ) { effective_operand_size = operand_size; } else { FCML_TRACE_MSG( "Unsupported encoded EASA size." ); error = FCML_CEH_GEC_INVALID_OPPERAND_SIZE; } break; case FCML_EOS_14_28: effective_operand_size = fcml_ifn_asm_non_standard_attribute_size_calculator( entry_point, operand_size, 14 * 8, 28 * 8, &error ); break; case FCML_EOS_32_64: effective_operand_size = fcml_ifn_asm_non_standard_attribute_size_calculator( entry_point, operand_size, 16 * 8, 32 * 8, &error ); break; case FCML_EOS_94_108: effective_operand_size = fcml_ifn_asm_non_standard_attribute_size_calculator( entry_point, operand_size, 94 * 8, 108 * 8, &error ); break; case FCML_EOS_FPI: case FCML_EOS_FP: /* Far pointer indirect.*/ effective_operand_size = operand_size - FCML_DS_16; break; default: if ( operand_size || !FCML_IS_EOS_OPT( encoded_operand_size ) ) { if ( comparator == FCML_IEN_CT_EQUAL ) { if ( encoded_static_operand_size * 8 != operand_size ) { FCML_TRACE( "Unsupported operand size. Expected %d got %d.", operand_size, encoded_static_operand_size * 8 ); error = FCML_CEH_GEC_INVALID_OPPERAND_SIZE; } } else { if ( encoded_static_operand_size * 8 < operand_size ) { FCML_TRACE( "Unsupported operand size. Expected greater or equal to %d got %d.", operand_size, encoded_static_operand_size * 8 ); error = FCML_CEH_GEC_INVALID_OPPERAND_SIZE; } else { if ( encoded_data_size != NULL ) { *encoded_data_size = encoded_static_operand_size * 8; } } } } break; } if ( !error ) { if ( l.is_not_null ) { if ( flags->l.is_not_null && flags->l.value != l.value ) { /* All dynamic operands have to be of the same size.*/ FCML_TRACE( "L flag differs expected %d got %d.", flags->l.value, l.value ); error = FCML_CEH_GEC_INVALID_OPPERAND_SIZE; } else { flags->l = l; } } if ( effective_address_size ) { if ( flags->easa && effective_address_size != flags->easa ) { FCML_TRACE( "Wrong encoded EASA size. Expected %d got %d.", flags->easa, effective_address_size ); error = FCML_CEH_GEC_INVALID_OPPERAND_SIZE; } else { flags->easa = effective_address_size; if ( encoded_data_size ) { *encoded_data_size = effective_address_size; } } } if ( effective_operand_size ) { if ( flags->eosa && effective_operand_size != flags->eosa ) { FCML_TRACE( "Wrong encoded EOSA size. Expected %d got %d.", flags->eosa, effective_operand_size ); error = FCML_CEH_GEC_INVALID_OPPERAND_SIZE; } else { flags->eosa = effective_operand_size; if ( encoded_data_size ) { *encoded_data_size = effective_operand_size; } } } } return error; } fcml_bool fcml_ifn_asm_set_size_flag( fcml_st_nullable_size_flags *nullable_flags, fcml_flags flags ) { if ( nullable_flags->is_set ) { if ( ( nullable_flags->flags & flags ) == 0 ) { /* We need flags that weren't allowed by previous operands or IPPs.*/ return FCML_FALSE; } /* Set new set of flags, take into account that these might be a subset of existing ones.*/ nullable_flags->flags = flags; } else { nullable_flags->flags = flags; nullable_flags->is_set = FCML_TRUE; } return FCML_TRUE; } fcml_ceh_error fcml_ifn_asm_accept_segment_register( fcml_ist_asm_encoding_context *context, fcml_st_register *segment_register, fcml_uint8_t encoded_segment_register ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( segment_register->type == FCML_REG_UNDEFINED ) { /* No mater what segment register we have expected, default one has been used.*/ error = FCML_CEH_GEC_NO_ERROR; } else { if ( segment_register->type == FCML_REG_SEG ) { if ( segment_register->reg != ( encoded_segment_register & 0x7F ) ) { if ( encoded_segment_register & FCML_SEG_ALLOW_OVERRIDE ) { context->segment_override = *segment_register; } else { /* Register can not be overridden.*/ fcml_ifn_ceh_asm_add_error_msg( context, fcml_fn_msg_get_message( FCML_MC_SEGMENT_REGISTER_CAN_NOT_BE_OVERRIDDEN ), FCML_CEH_MEC_ERROR_ILLEGAL_SEG_REG_OVERRIDE ); error = FCML_CEH_GEC_INVALID_REGISTER; } } } else { /* Wrong register type, segment register should be used.*/ fcml_ifn_ceh_asm_add_error_msg( context, fcml_fn_msg_get_message( FCML_MC_SEGMENT_WRONG_REGISTER_TYPE_SEG ), FCML_CEH_MEC_ERROR_INVALID_REGISTER_TYPE_SEG ); error = FCML_CEH_GEC_INVALID_REGISTER_TYPE; } } return error; } fcml_bool fcml_ifn_asm_accept_data_size( fcml_ist_asm_encoding_context *context, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_uint8_t encoded_operand_size, fcml_usize operand_size, enum fcml_ien_asm_comparator_type comparator ) { fcml_st_entry_point *entry_point = &( context->assembler_context->entry_point ); fcml_st_asm_optimizer_processing_details *data_size_flags = &( context->optimizer_processing_details ); fcml_flags osa_flags = FCML_EN_ASF_ANY; fcml_flags asa_flags = FCML_EN_ASF_ANY; fcml_bool result = FCML_TRUE; if ( ( operand_size == FCML_OS_UNDEFINED ) && FCML_IS_EOS_OPT( encoded_operand_size ) ) { /* If operand size is optional, we do not need to accept it.*/ return FCML_TRUE; } switch ( FCML_GET_OS( encoded_operand_size ) ) { case FCML_EOS_UNDEFINED: break; case FCML_EOS_L: if ( FCML_DEF_PREFIX_L_IGNORE_OS( addr_mode_desc->allowed_prefixes ) ) { result = ( operand_size == entry_point->operand_size_attribute ); } else { result = ( ( operand_size == FCML_DS_128 ) || ( operand_size == FCML_DS_256 ) ); } break; case FCML_EOS_EASA: if ( entry_point->op_mode == FCML_OM_32_BIT ) { result = ( ( operand_size == FCML_DS_16 ) || ( operand_size == FCML_DS_32 ) ); } else { result = ( ( operand_size == FCML_DS_32 ) || ( operand_size == FCML_DS_64 ) ); } if ( result ) { asa_flags = ( operand_size / FCML_ASM_FCF ); } break; case FCML_EOS_EOSA: if ( entry_point->op_mode == FCML_OM_32_BIT ) { result = ( ( operand_size == FCML_DS_16 ) || ( operand_size == FCML_DS_32 ) ); } else { result = ( ( operand_size == FCML_DS_16 ) || ( operand_size == FCML_DS_32 ) || ( operand_size == FCML_DS_64 ) ); } if ( result ) { osa_flags = ( operand_size / FCML_ASM_FCF ); } break; case FCML_EOS_14_28: if ( operand_size == 14 * 8 ) { osa_flags |= FCML_EN_ASF_16; } else if ( operand_size == 28 * 8 ) { osa_flags |= ( FCML_EN_ASF_32 | FCML_EN_ASF_64 ); } else { result = FCML_FALSE; } break; case FCML_EOS_32_64: if ( ( operand_size == FCML_DS_16 * 2 ) || ( FCML_DS_32 * 2 ) || ( FCML_DS_64 * 2 ) ) { osa_flags = ( operand_size / 2 / FCML_ASM_FCF ); } else { result = FCML_FALSE; } break; case FCML_EOS_94_108: if ( operand_size == 94 * 8 ) { osa_flags |= FCML_EN_ASF_16; } else if ( operand_size == 108 * 8 ) { osa_flags |= ( FCML_EN_ASF_32 | FCML_EN_ASF_64 ); } else { result = FCML_FALSE; } break; case FCML_EOS_FPI: case FCML_EOS_FP: /* Far pointer indirect.*/ switch ( operand_size ) { case FCML_DS_16 + FCML_DS_16: osa_flags |= FCML_EN_ASF_16; break; case FCML_DS_32 + FCML_DS_16: osa_flags |= FCML_EN_ASF_32; break; case FCML_DS_64 + FCML_DS_16: osa_flags |= FCML_EN_ASF_64; break; default: result = FCML_FALSE; } break; default: if ( comparator == FCML_IEN_CT_EQUAL ) { result = ( FCML_GET_OS( encoded_operand_size ) * 8 == operand_size ); } else { result = ( FCML_GET_OS( encoded_operand_size ) * 8 >= operand_size ); } if ( !result && FCML_IS_EOS_OPT( encoded_operand_size ) && operand_size == 0 ) { /* Operand size is optional, so return TRUE anyway.*/ result = FCML_TRUE; } break; } if ( osa_flags && !fcml_ifn_asm_set_size_flag( &( data_size_flags->allowed_eosa ), osa_flags ) ) { result = FCML_FALSE; } if ( asa_flags && !fcml_ifn_asm_set_size_flag( &( data_size_flags->allowed_easa ), asa_flags ) ) { result = FCML_FALSE; } return result; } /********************************* * Operand encoders. *********************************/ /*******************/ /* Immediate value */ /*******************/ fcml_bool fcml_ifn_asm_try_to_convert_integer_and_set_flag( const fcml_st_integer *source, fcml_st_integer *destination, fcml_usize expected_size, fcml_usize size, fcml_flags flag, fcml_flags *flags ) { /* We expect signed integers here, but of course user is not forced to provide values that match expected size. * In such cases values are converted to appropriate size using sign set by user. Anyway sometimes user is not * able to guess if values are signed or not in given context. Parsers might be a good example. To avoid sign * problem, if source operand has expected size (so conversion to the expected size is not necessary) * we can treat it like signed value. */ fcml_st_integer tmp = *source; if ( !expected_size ) { expected_size = size; } else { if ( tmp.size == expected_size ) { tmp.is_signed = FCML_TRUE; } } fcml_ceh_error error = fcml_fn_utils_convert_integer_to_integer( &tmp, destination, expected_size, size ); if ( !error && flags ) { *flags |= flag; } return !error; } fcml_ceh_error fcml_ifn_asm_operand_acceptor_imm( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( operand_def->type == FCML_OT_IMMEDIATE ) { fcml_st_integer destination = { 0 }; fcml_flags flags = 0; fcml_sf_def_tma_imm *args = (fcml_sf_def_tma_imm*) addr_mode->addr_mode_args; fcml_uint8_t size = args->encoded_size; fcml_uint8_t size_ex = args->encoded_ex_size; fcml_st_integer *immediate = &( operand_def->immediate ); fcml_en_operating_mode op_mode = context->assembler_context->entry_point.op_mode; fcml_bool is_convertable = FCML_FALSE; fcml_flags osa_flags = context->optimizer_processing_details.allowed_eosa.flags; if ( !osa_flags ) { osa_flags = FCML_EN_ASF_ALL; } /* Not all EOSA values are available for every addressing mode. Additional flags can enable or disable some of them.*/ if ( size != FCML_EOS_EOSA && size_ex != FCML_EOS_EOSA ) { is_convertable |= fcml_ifn_asm_try_to_convert_integer_and_set_flag( immediate, &destination, FCML_GET_OS( size_ex ) * 8, FCML_GET_OS( size ) * 8, 0, NULL ); } else if ( size == FCML_EOS_EOSA && size_ex == FCML_EOS_EOSA ) { /* Destination size calculated by EOSA.*/ if ( osa_flags & FCML_EN_ASF_16 ) is_convertable |= fcml_ifn_asm_try_to_convert_integer_and_set_flag( immediate, &destination, FCML_DS_16, FCML_DS_16, FCML_EN_ASF_16, &flags ); if ( osa_flags & FCML_EN_ASF_32 ) is_convertable |= fcml_ifn_asm_try_to_convert_integer_and_set_flag( immediate, &destination, FCML_DS_32, FCML_DS_32, FCML_EN_ASF_32, &flags ); if ( ( osa_flags & FCML_EN_ASF_64 ) && op_mode == FCML_OM_64_BIT ) { is_convertable |= fcml_ifn_asm_try_to_convert_integer_and_set_flag( immediate, &destination, FCML_DS_64, ( args->is_64bit_imm_allowed ) ? FCML_DS_64 : FCML_DS_32, FCML_EN_ASF_64, &flags ); } } else if ( size == FCML_EOS_EOSA ) { if ( osa_flags & FCML_EN_ASF_16 ) is_convertable |= fcml_ifn_asm_try_to_convert_integer_and_set_flag( immediate, &destination, FCML_GET_OS( size_ex ) * 8, FCML_DS_16, FCML_EN_ASF_16, &flags ); if ( osa_flags & FCML_EN_ASF_32 ) is_convertable |= fcml_ifn_asm_try_to_convert_integer_and_set_flag( immediate, &destination, FCML_GET_OS( size_ex ) * 8, FCML_DS_32, FCML_EN_ASF_32, &flags ); if ( ( osa_flags & FCML_EN_ASF_64 ) && op_mode == FCML_OM_64_BIT ) { is_convertable |= fcml_ifn_asm_try_to_convert_integer_and_set_flag( immediate, &destination, FCML_GET_OS( size_ex ) * 8, args->is_64bit_imm_allowed ? FCML_DS_64 : FCML_DS_32, FCML_EN_ASF_64, &flags ); } } else { /* IMM extended to effective address size attribute.*/ if ( osa_flags & FCML_EN_ASF_16 ) is_convertable |= fcml_ifn_asm_try_to_convert_integer_and_set_flag( immediate, &destination, FCML_DS_16, FCML_GET_OS( size ) * 8, FCML_EN_ASF_16, &flags ); if ( osa_flags & FCML_EN_ASF_32 ) is_convertable |= fcml_ifn_asm_try_to_convert_integer_and_set_flag( immediate, &destination, FCML_DS_32, FCML_GET_OS( size ) * 8, FCML_EN_ASF_32, &flags ); if ( ( osa_flags & FCML_EN_ASF_64 ) && op_mode == FCML_OM_64_BIT ) { is_convertable |= fcml_ifn_asm_try_to_convert_integer_and_set_flag( immediate, &destination, FCML_DS_64, FCML_GET_OS( size ) * 8, FCML_EN_ASF_64, &flags ); } } if ( !is_convertable || ( flags && !fcml_ifn_asm_set_size_flag( &( context->optimizer_processing_details.allowed_eosa ), flags ) ) ) { FCML_TRACE_MSG("Accept IMM: Can not accept IMM value." ); error = FCML_CEH_GEC_INVALID_OPPERAND; } return error; } else { error = FCML_CEH_GEC_INVALID_OPPERAND; } return error; } fcml_ceh_error fcml_ifn_asm_operand_encoder_imm( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( phase == FCML_IEN_ASM_IPPP_FIRST_PHASE ) { fcml_sf_def_tma_imm *args = (fcml_sf_def_tma_imm*) addr_mode->addr_mode_args; fcml_uint8_t size = args->encoded_size; fcml_uint8_t size_ex = args->encoded_ex_size; fcml_st_integer *source_imm = &( operand_def->immediate ); fcml_st_integer converted_source; fcml_usize eosa_size = context->optimizer_processing_details.eosa; /* Remember that only one addressing mode of MOV instruction for 64 bits mode can encode IMM64. */ fcml_usize eosa_imm = eosa_size; if ( !args->is_64bit_imm_allowed && eosa_size == FCML_DS_64 ) { eosa_imm = FCML_DS_32; } if ( ( size == FCML_EOS_EOSA || size_ex == FCML_EOS_EOSA ) && !eosa_size ) { FCML_TRACE_MSG("EOSA size not set! Processing failed."); return FCML_CEH_GEC_INTERNAL_ERROR; } fcml_bool is_converted = FCML_FALSE; if ( size != FCML_EOS_EOSA && size_ex != FCML_EOS_EOSA ) { is_converted = fcml_ifn_asm_try_to_convert_integer_and_set_flag( source_imm, &converted_source, FCML_GET_OS( size_ex ) * 8, FCML_GET_OS( size ) * 8, 0, NULL ); } else if ( size == FCML_EOS_EOSA && size_ex == FCML_EOS_EOSA ) { is_converted = fcml_ifn_asm_try_to_convert_integer_and_set_flag( source_imm, &converted_source, eosa_size, eosa_imm, 0, NULL ); } else if ( size == FCML_EOS_EOSA ) { is_converted = fcml_ifn_asm_try_to_convert_integer_and_set_flag( source_imm, &converted_source, FCML_GET_OS( size_ex ) * 8, eosa_imm, 0, NULL ); } else { is_converted = fcml_ifn_asm_try_to_convert_integer_and_set_flag( source_imm, &converted_source, eosa_size, FCML_GET_OS( size ) * 8, 0, NULL ); } if ( !is_converted ) { error = FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } if ( !error ) { fcml_st_memory_stream stream = { &( operand_enc->code ), 0, sizeof( operand_enc->code ) }; error = fcml_fn_utils_encode_integer( &stream, &converted_source ); if ( !error ) { operand_enc->code_length = stream.offset; } } } return error; } /*********************/ /* Explicit register */ /*********************/ fcml_ceh_error fcml_ifn_asm_operand_acceptor_explicit_reg( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_sf_def_tma_explicit_reg *args = (fcml_sf_def_tma_explicit_reg*) addr_mode->addr_mode_args; if ( operand_def->type != FCML_OT_REGISTER || operand_def->reg.type != args->reg_type || operand_def->reg.reg != args->reg_num || !fcml_ifn_asm_accept_data_size( context, addr_mode_desc, args->encoded_reg_size, operand_def->reg.size, FCML_IEN_CT_EQUAL ) ) { error = FCML_CEH_GEC_INVALID_OPPERAND; } return error; } /* Example: FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_BYTE )*/ fcml_ceh_error fcml_ifn_asm_operand_encoder_explicit_reg( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( phase == FCML_IEN_ASM_IPPP_FIRST_PHASE ) { fcml_sf_def_tma_explicit_reg *args = (fcml_sf_def_tma_explicit_reg*) addr_mode->addr_mode_args; fcml_st_register *reg = &( operand_def->reg ); /* Encode IMM.*/ fcml_usize encoded_size; error = fcml_ifn_asm_decode_dynamic_operand_size( context, args->encoded_reg_size, reg->size, &encoded_size, FCML_IEN_CT_EQUAL ); } return error; } /*******************/ /* Opcode register */ /*******************/ fcml_ceh_error fcml_ifn_asm_operand_acceptor_opcode_reg( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_sf_def_tma_opcode_reg *args = (fcml_sf_def_tma_opcode_reg*) addr_mode->addr_mode_args; if ( operand_def->type != FCML_OT_REGISTER || operand_def->reg.type != args->reg_type ) { return FCML_CEH_GEC_INVALID_OPPERAND; } if ( !fcml_ifn_asm_accept_data_size( context, addr_mode_desc, args->encoded_reg_size, operand_def->reg.size, FCML_IEN_CT_EQUAL ) ) { return FCML_CEH_GEC_INVALID_OPPERAND; } return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_ifn_asm_operand_encoder_opcode_reg( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { if ( phase == FCML_IEN_ASM_IPPP_FIRST_PHASE ) { if ( operand_def->reg.reg > 7 ) { context->opcode_reg.opcode_reg = operand_def->reg.reg - 8; context->opcode_reg.ext_b = FCML_TRUE; } else { context->opcode_reg.opcode_reg = operand_def->reg.reg; } if ( context->assembler_context->entry_point.op_mode == FCML_OM_64_BIT ) { context->reg_opcode_needs_rex = operand_def->reg.x64_exp; } } return FCML_CEH_GEC_NO_ERROR; } /***********************************/ /* Immediate relative displacement */ /***********************************/ fcml_ceh_error fcml_ifn_asm_operand_acceptor_immediate_dis_relative( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { /* In 64-bit mode OSA is fixed at 64 bits. Just in case, because addressing mode * acceptor is responsible for interpreting FCML_DEF_OPCODE_FLAGS_FORCE_64BITS_EOSA * flag and forcing appropriate OSA size. */ fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_bool is_offset = ( operand_def->type == FCML_OT_ADDRESS && operand_def->address.address_form == FCML_AF_OFFSET ); fcml_bool is_imm = ( operand_def->type == FCML_OT_IMMEDIATE ); if ( is_imm || is_offset ) { fcml_flags flags = 0; if ( context->assembler_context->entry_point.op_mode == FCML_OM_64_BIT ) { flags = FCML_EN_ASF_64; } else { fcml_sf_def_tma_immediate_dis_relative *rel_args = (fcml_sf_def_tma_immediate_dis_relative*) addr_mode->addr_mode_args; if ( is_imm || ( rel_args->encoded_size != FCML_EOS_UNDEFINED ) ) { /* In case of IMM operand size operator is not available, so we * have to try both operand size attributes. */ flags = FCML_EN_ASF_32 | FCML_EN_ASF_16; } else { fcml_usize size_operator = operand_def->address.size_operator; switch ( size_operator ) { case FCML_DS_UNDEF: flags = FCML_EN_ASF_32 | FCML_EN_ASF_16; break; case FCML_DS_16: flags = FCML_EN_ASF_16; break; case FCML_DS_32: flags = FCML_EN_ASF_32; break; case FCML_DS_64: /* We are not in 64-bit mode. */ error = FCML_CEH_GEC_INVALID_OPPERAND; break; } } } if ( !fcml_ifn_asm_set_size_flag( &( context->optimizer_processing_details.allowed_eosa ), flags ) ) { error = FCML_CEH_GEC_INVALID_OPPERAND; } } else { error = FCML_CEH_GEC_INVALID_OPPERAND; } return error; } fcml_ceh_error fcml_ifn_asm_convert_to_requested_rel( fcml_st_integer *value, fcml_usize expected_size, fcml_uint8_t encoded_rel_size ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( encoded_rel_size == FCML_EOS_BYTE ) { error = fcml_fn_utils_convert_integer_to_integer( value, value, expected_size, FCML_DS_8 ); if ( error ) { error = FCML_CEH_GEC_INVALID_OPPERAND_SIZE; } } return error; } int fcml_ifn_asm_calculate_size_for_encoded_rel( fcml_usize osa, fcml_uint8_t encoded_rel_size ) { if ( encoded_rel_size == FCML_EOS_UNDEFINED ) { return ( osa == FCML_DS_64 ) ? 4 : osa / 8; } else { return encoded_rel_size; } } fcml_ceh_error fcml_ifn_asm_instruction_part_immediate_dis_relative_post_processor( fcml_ist_asm_encoding_context *context, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr post_processor_args, fcml_uint8_t encoded_rel_size ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; /* Sanity check.*/ if ( encoded_rel_size != FCML_EOS_UNDEFINED && encoded_rel_size != FCML_EOS_BYTE ) { return FCML_CEH_GEC_INVALID_OPPERAND; } if ( context->instruction_size.is_not_null ) { fcml_st_entry_point *entry_point = &( context->assembler_context->entry_point ); /* Optimizer is responsible for setting optimal OSA value.*/ fcml_usize osa = context->optimizer_processing_details.eosa; fcml_st_operand *operand_def = (fcml_st_operand*) post_processor_args; fcml_st_integer source; fcml_st_integer destination = { 0 }; fcml_st_integer displacement = { 0 }; int rel_size = fcml_ifn_asm_calculate_size_for_encoded_rel( osa, encoded_rel_size ); if ( operand_def->type == FCML_OT_IMMEDIATE ) { source = operand_def->immediate; } else if ( operand_def->type == FCML_OT_ADDRESS && operand_def->address.address_form == FCML_AF_OFFSET ) { error = fcml_fn_utils_offset_to_integer( &( operand_def->address.offset ), &source ); } else { return FCML_CEH_GEC_INVALID_OPPERAND; } if ( !error ) { displacement.is_signed = FCML_TRUE; if ( fcml_fn_utils_convert_integer_to_integer( &source, &destination, osa, osa ) ) { error = FCML_CEH_GEC_INVALID_OPPERAND; } if ( !error ) { switch ( osa ) { case FCML_DS_16: { fcml_int16_t offset = destination.int16; fcml_int16_t ip = (fcml_int16_t) ( ( entry_point->ip + context->instruction_size.value + rel_size ) & 0x0000FFFF ); fcml_int16_t rel16 = offset - ip; displacement.int16 = rel16; displacement.size = FCML_DS_16; error = fcml_ifn_asm_convert_to_requested_rel( &displacement, FCML_DS_16, encoded_rel_size ); break; } case FCML_DS_32: { fcml_int32_t offset = destination.int32; fcml_int32_t eip = (fcml_int32_t) ( entry_point->ip + context->instruction_size.value + rel_size ); fcml_int32_t rel32 = offset - eip; displacement.int32 = rel32; displacement.size = FCML_DS_32; error = fcml_ifn_asm_convert_to_requested_rel( &displacement, FCML_DS_32, encoded_rel_size ); break; } case FCML_DS_64: { fcml_int64_t offset = (fcml_int64_t) destination.int64; fcml_int64_t rip = (fcml_int64_t) ( entry_point->ip + context->instruction_size.value + rel_size ); fcml_int64_t rel32 = offset - rip; displacement.int32 = (fcml_int32_t) rel32; displacement.size = FCML_DS_32; error = fcml_ifn_asm_convert_to_requested_rel( &displacement, FCML_DS_32, encoded_rel_size ); break; } } if ( !error ) { /* Encode ModR/M and displacement.*/ fcml_st_memory_stream stream = fcml_ifn_asm_instruction_part_stream( instruction_part ); fcml_fn_utils_encode_integer( &stream, &displacement ); instruction_part->code_length = stream.offset; } else if ( error == FCML_CEH_GEC_INVALID_OPPERAND_SIZE && encoded_rel_size == 1 ) { /* In this case we can hint optimizer not to try different ASA/OSA combinations, because it doesn't make sense. */ context->optimizer_processing_details.break_optimization = FCML_TRUE; } } } } else { /* Should never happened.*/ FCML_TRACE_MSG( "Instruction size can not be here." ); error = FCML_CEH_GEC_INTERNAL_ERROR; } return error; } fcml_ceh_error fcml_ifn_asm_instruction_part_immediate_dis_relative_post_processor_8( fcml_ist_asm_encoding_context *context, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr post_processor_args ) { return fcml_ifn_asm_instruction_part_immediate_dis_relative_post_processor( context, instruction_part, post_processor_args, FCML_EOS_BYTE ); } fcml_ceh_error fcml_ifn_asm_instruction_part_immediate_dis_relative_post_processor_undef( fcml_ist_asm_encoding_context *context, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr post_processor_args ) { return fcml_ifn_asm_instruction_part_immediate_dis_relative_post_processor( context, instruction_part, post_processor_args, FCML_EOS_UNDEFINED ); } fcml_ceh_error fcml_ifn_asm_operand_encoder_immediate_dis_relative( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( phase == FCML_IEN_ASM_IPPP_SECOND_PHASE ) { fcml_sf_def_tma_immediate_dis_relative *args = (fcml_sf_def_tma_immediate_dis_relative*) addr_mode->addr_mode_args; operand_enc->code_length = 0; if ( args->encoded_size == FCML_EOS_BYTE ) { operand_enc->post_processor = fcml_ifn_asm_instruction_part_immediate_dis_relative_post_processor_8; } else if ( args->encoded_size == FCML_EOS_UNDEFINED ) { operand_enc->post_processor = fcml_ifn_asm_instruction_part_immediate_dis_relative_post_processor_undef; } else { /* Unsupported operand size encoded in operand arguments.*/ error = FCML_CEH_GEC_INVALID_OPPERAND; } operand_enc->post_processor_args = operand_def; } return error; } /***************/ /* Far pointer */ /***************/ fcml_ceh_error fcml_ifn_asm_operand_acceptor_far_pointer( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_ceh_error result = FCML_CEH_GEC_NO_ERROR; if ( operand_def->type != FCML_OT_FAR_POINTER ) { return FCML_CEH_GEC_INVALID_OPPERAND; } switch ( context->assembler_context->entry_point.op_mode ) { case FCML_OM_16_BIT: if ( operand_def->far_pointer.offset_size == FCML_DS_16 ) { if ( !fcml_ifn_asm_set_size_flag( &( context->optimizer_processing_details.allowed_eosa ), FCML_EN_ASF_16 ) ) { /* Size can not be used by this operand. */ result = FCML_CEH_GEC_INVALID_OPPERAND; } } else { /* 32 bit offset is not supported in 16 bit mode. */ result = FCML_CEH_GEC_INVALID_OPPERAND; } break; case FCML_OM_32_BIT: if ( !fcml_ifn_asm_set_size_flag( &( context->optimizer_processing_details.allowed_eosa ), ( operand_def->far_pointer.offset_size == FCML_DS_16 ) ? ( FCML_EN_ASF_16 | FCML_EN_ASF_32 ) : FCML_EN_ASF_32 ) ) { /* Size can not be used by this operand. */ result = FCML_CEH_GEC_INVALID_OPPERAND; } break; case FCML_OM_64_BIT: result = FCML_CEH_GEC_INVALID_OPPERAND; break; } return result; } fcml_ceh_error fcml_ifn_asm_operand_encoder_far_pointer( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( phase == FCML_IEN_ASM_IPPP_FIRST_PHASE ) { /* Prepare stream to instruction part's buffer. */ fcml_st_memory_stream stream = fcml_ifn_asm_instruction_part_stream( operand_enc ); /* Write offset.*/ if ( operand_def->far_pointer.offset_size == FCML_DS_16 ) { fcml_fn_stream_write_word( &stream, (fcml_uint16_t) operand_def->far_pointer.offset16 ); operand_enc->code_length = 4; } else { fcml_fn_stream_write_dword( &stream, (fcml_uint32_t) operand_def->far_pointer.offset32 ); operand_enc->code_length = 6; } /* Write segment.*/ fcml_fn_stream_write_word( &stream, operand_def->far_pointer.segment ); } return error; } /************************************/ /* Explicit GPR register addressing */ /************************************/ fcml_ceh_error fcml_ifn_asm_operand_acceptor_explicit_gps_reg_addressing( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_sf_def_tma_explicit_gps_reg_addressing *args = (fcml_sf_def_tma_explicit_gps_reg_addressing*) addr_mode->addr_mode_args; if ( ( operand_def->type != FCML_OT_ADDRESS ) || ( operand_def->address.effective_address.base.reg != args->reg_num ) ) { error = FCML_CEH_GEC_INVALID_OPPERAND; } else if ( !fcml_ifn_asm_accept_data_size( context, addr_mode_desc, FCML_EOS_EASA, operand_def->address.effective_address.base.size, FCML_IEN_CT_EQUAL ) ) { error = FCML_CEH_GEC_INVALID_ADDRESS_SIZE; } else if ( !fcml_ifn_asm_accept_data_size( context, addr_mode_desc, args->encoded_operand_size, operand_def->address.size_operator, FCML_IEN_CT_EQUAL ) ) { error = FCML_CEH_GEC_INVALID_OPPERAND_SIZE; } else { error = fcml_ifn_asm_accept_segment_register( context, &( operand_def->address.segment_selector.segment_selector ), args->encoded_segment_register ); } return error; } /***************/ /* Explicit IB */ /***************/ fcml_ceh_error fcml_ifn_asm_operand_acceptor_explicit_ib( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_ceh_error error = FCML_CEH_GEC_INVALID_OPPERAND; if ( operand_def->type == FCML_OT_IMMEDIATE ) { fcml_st_integer dest; /* We are interested in errors only here. */ error = fcml_fn_utils_convert_integer_to_integer( &( operand_def->immediate ), &dest, FCML_DS_8, FCML_DS_8 ); } return error; } fcml_ceh_error fcml_ifn_asm_operand_encoder_explicit_ib( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( phase == FCML_IEN_ASM_IPPP_FIRST_PHASE ) { error = FCML_CEH_GEC_INVALID_OPPERAND; fcml_sf_def_tma_explicit_ib *exp_ib = (fcml_sf_def_tma_explicit_ib*) addr_mode->addr_mode_args; fcml_st_integer dest; fcml_ceh_error res = fcml_fn_utils_convert_integer_to_integer( &( operand_def->immediate ), &dest, FCML_DS_8, FCML_DS_8 ); if ( !res ) { if ( exp_ib->ib == (fcml_uint8_t) dest.int8 ) { error = FCML_CEH_GEC_NO_ERROR; } } } return error; } /***************************/ /* Segment relative offset */ /***************************/ fcml_ceh_error fcml_ifn_asm_operand_acceptor_segment_relative_offset( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( operand_def->type == FCML_OT_ADDRESS ) { fcml_sf_def_tma_segment_relative_offset *args = (fcml_sf_def_tma_segment_relative_offset*) addr_mode->addr_mode_args; fcml_st_address *address = &( operand_def->address ); if ( address->address_form != FCML_AF_OFFSET ) { return FCML_CEH_GEC_INVALID_OPPERAND; } if ( operand_def->address.size_operator != FCML_OS_UNDEFINED ) { if ( !fcml_ifn_asm_accept_data_size( context, addr_mode_desc, args->encoded_operand_size, operand_def->address.size_operator, FCML_IEN_CT_EQUAL ) ) { return FCML_CEH_GEC_INVALID_OPPERAND; } } fcml_bool is_convertable = FCML_FALSE; fcml_flags flags = FCML_EN_ASF_ANY; fcml_st_integer source_address = { 0 }, converted_address = { 0 }; /* Convert IMM value to address. */ error = fcml_fn_utils_offset_to_integer( &( address->offset ), &source_address ); if ( error ) { return FCML_CEH_GEC_INVALID_OPPERAND; } /* Check if address can be converted to 16, 32 or 64 bits. */ source_address.is_signed = FCML_TRUE; is_convertable |= fcml_ifn_asm_try_to_convert_integer_and_set_flag( &source_address, &converted_address, FCML_DS_32, FCML_DS_32, FCML_EN_ASF_32, &flags ); if ( context->assembler_context->entry_point.op_mode == FCML_OM_64_BIT ) { is_convertable |= fcml_ifn_asm_try_to_convert_integer_and_set_flag( &source_address, &converted_address, FCML_DS_64, FCML_DS_64, FCML_EN_ASF_64, &flags ); } else { is_convertable |= fcml_ifn_asm_try_to_convert_integer_and_set_flag( &source_address, &converted_address, FCML_DS_16, FCML_DS_16, FCML_EN_ASF_16, &flags ); } if ( !fcml_ifn_asm_set_size_flag( &( context->optimizer_processing_details.allowed_easa ), flags ) ) { error = FCML_CEH_GEC_INVALID_OPPERAND; } } else { error = FCML_CEH_GEC_INVALID_OPPERAND; } return error; } fcml_ceh_error fcml_ifn_asm_operand_encoder_segment_relative_offset( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( phase == FCML_IEN_ASM_IPPP_FIRST_PHASE ) { fcml_usize asa = context->optimizer_processing_details.easa; if ( asa != FCML_DS_UNDEF ) { fcml_st_address *address = &( operand_def->address ); /* Convert IMM value to address. */ fcml_st_integer offset = { 0 }; error = fcml_fn_utils_offset_to_integer( &( address->offset ), &offset ); if ( !error ) { /* Convert address to size indicated by ASA.*/ error = fcml_fn_utils_convert_integer_to_integer( &offset, &offset, asa, asa ); if ( !error ) { /* Encode offset.*/ fcml_st_memory_stream stream = fcml_ifn_asm_instruction_part_stream( operand_enc ); fcml_fn_utils_encode_integer( &stream, &offset ); operand_enc->code_length = stream.offset; } } } else { /* ASA should be set by optimizer.*/ error = FCML_CEH_GEC_INVALID_OPPERAND; } } return error; } /***************/ /* ModR/M - rm */ /***************/ fcml_ceh_error fcml_ifn_asm_operand_acceptor_rm( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_bool is_reg = FCML_FALSE; fcml_bool is_mem = FCML_FALSE; fcml_sf_def_tma_rm *args = (fcml_sf_def_tma_rm*) addr_mode->addr_mode_args; is_mem = operand_def->type == FCML_OT_ADDRESS; is_reg = operand_def->type == FCML_OT_REGISTER; /* Check operand type.*/ fcml_bool result = ( ( args->flags & FCML_RMF_R ) && is_reg ) || ( ( args->flags & FCML_RMF_M ) && is_mem ); if ( result ) { if ( is_reg ) { if ( args->reg_type != operand_def->reg.type ) { /* Different register type.*/ error = FCML_CEH_GEC_INVALID_OPPERAND; } else if ( ( context->instruction->prefixes & FCML_PREFIX_LOCK ) && addr_mode->access_mode == FCML_AM_WRITE ) { /* Lock prefixes are only allowed for destination memory operands.*/ error = FCML_CEH_GEC_INVALID_OPPERAND; } else { if ( !fcml_ifn_asm_accept_data_size( context, addr_mode_desc, args->encoded_register_operand_size, operand_def->reg.size, FCML_IEN_CT_EQUAL ) ) { FCML_TRACE_MSG( "Unsupported register size." ); error = FCML_CEH_GEC_INVALID_OPPERAND_SIZE; } } } if ( is_mem ) { /* OSA.*/ fcml_usize mem_data_size = fcml_ifn_asm_calculate_operand_size( context, operand_def->address.size_operator, args->encoded_memory_operand_size ); if ( !fcml_ifn_asm_accept_data_size( context, addr_mode_desc, args->encoded_memory_operand_size, mem_data_size, FCML_IEN_CT_EQUAL ) ) { FCML_TRACE_MSG( "Unsupported memory operand size." ); error = FCML_CEH_GEC_INVALID_OPPERAND_SIZE; } if ( !error ) { /* Check VSIB.*/ if ( args->is_vsib ) { fcml_st_register *index = &( operand_def->address.effective_address.index ); if ( index->type == FCML_REG_SIMD ) { fcml_usize vsib_reg_size = args->vector_index_register == FCML_VSIB_XMM ? FCML_DS_128 : FCML_DS_256; if ( vsib_reg_size != index->size ) { FCML_TRACE_MSG( "Wrong VSIB size." ); error = FCML_CEH_GEC_INVALID_OPPERAND_SIZE; } } else { FCML_TRACE_MSG( "VSIB encoding needs SIMD index register." ); error = FCML_CEH_GEC_INVALID_OPPERAND_SIZE; } } /* Accept segment registers if any of them have been set.*/ if ( !error ) { fcml_st_effective_address *effective_address = &( operand_def->address.effective_address ); fcml_st_segment_selector *segment_selector = &( operand_def->address.segment_selector ); fcml_st_register *segment_register = &( segment_selector->segment_selector ); if ( segment_register->reg != FCML_REG_UNDEFINED ) { if ( segment_register->type == FCML_REG_SEG ) { /* Segment register set, so it has to be accepted.*/ if ( addr_mode_desc->instruction_group & FCML_AMT_BRANCH ) { /* For branch instructions only CS register can be used and override is not acceptable.*/ if ( segment_register->reg != FCML_REG_CS ) { error = FCML_CEH_GEC_INVALID_OPPERAND; } } else if ( ( effective_address->base.type == FCML_REG_GPR ) && ( effective_address->base.reg == FCML_REG_BP || effective_address->base.reg == FCML_REG_SP ) ) { /* For SP/BP registers SS segment register has to be used.*/ if ( segment_register->reg != FCML_REG_SS ) { error = FCML_CEH_GEC_INVALID_OPPERAND; } } else { if ( segment_register->reg != FCML_REG_DS ) { context->segment_override = *segment_register; } } if ( error ) { /* Segment register can not be overridden. */ fcml_ifn_ceh_asm_add_error_msg( context, fcml_fn_msg_get_message( FCML_MC_SEGMENT_REGISTER_CAN_NOT_BE_OVERRIDDEN ), FCML_CEH_MEC_ERROR_ILLEGAL_SEG_REG_OVERRIDE ); } } else { /* Wrong register type. */ fcml_ifn_ceh_asm_add_error_msg( context, fcml_fn_msg_get_message( FCML_MC_SEGMENT_WRONG_REGISTER_TYPE_SEG ), FCML_CEH_MEC_ERROR_INVALID_REGISTER_TYPE_SEG ); } } } if ( !error ) { /* ASA.*/ fcml_en_operating_mode op_mode = context->assembler_context->entry_point.op_mode; fcml_st_modrm mod_rm = { 0 }; mod_rm.address = operand_def->address; fcml_flags esa; fcml_fn_modrm_calculate_effective_address_size( &mod_rm, &esa ); if ( ( esa & FCML_EN_ASF_16 ) && op_mode != FCML_OM_64_BIT ) { context->optimizer_processing_details.allowed_easa.flags |= FCML_EN_ASF_16; } if ( esa & FCML_EN_ASF_32 ) { context->optimizer_processing_details.allowed_easa.flags |= FCML_EN_ASF_32; } if ( ( esa & FCML_EN_ASF_64 ) && op_mode != FCML_OM_16_BIT ) { context->optimizer_processing_details.allowed_easa.flags |= FCML_EN_ASF_64; } } } } } else { error = FCML_CEH_GEC_INVALID_OPPERAND; } return error; } fcml_ceh_error fcml_ifn_asm_operand_encoder_rm( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_st_entry_point *entry_point = &( context->assembler_context->entry_point ); fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_sf_def_tma_rm *args = (fcml_sf_def_tma_rm*) addr_mode->addr_mode_args; if ( phase == FCML_IEN_ASM_IPPP_FIRST_PHASE ) { if ( operand_def->type == FCML_OT_REGISTER ) { context->mod_rm.reg.is_not_null = FCML_TRUE; context->mod_rm.reg.value = operand_def->reg.reg; if ( entry_point->op_mode == FCML_OM_64_BIT ) { context->mod_rm.reg_opcode_needs_rex = operand_def->reg.x64_exp; } /* Modify data size flags if there is such need.*/ error = fcml_ifn_asm_decode_dynamic_operand_size( context, args->encoded_register_operand_size, operand_def->reg.size, NULL, FCML_IEN_CT_EQUAL ); } else { /* Set hints for ModR/M instruction part encoder.*/ context->is_sib_alternative_hint = ( operand_def->hints & FCML_OP_HINT_SIB_ENCODING ); if ( entry_point->op_mode == FCML_OM_64_BIT ) { context->is_abs_alternative_hint = ( operand_def->hints & FCML_OP_HINT_ABSOLUTE_ADDRESSING ); context->is_rel_alternative_hint = ( operand_def->hints & FCML_OP_HINT_RELATIVE_ADDRESSING ); } else { context->is_abs_alternative_hint = FCML_FALSE; context->is_rel_alternative_hint = FCML_FALSE; } context->mod_rm.address = operand_def->address; fcml_usize mem_data_size = fcml_ifn_asm_calculate_operand_size( context, operand_def->address.size_operator, args->encoded_memory_operand_size ); error = fcml_ifn_asm_decode_dynamic_operand_size( context, args->encoded_memory_operand_size, mem_data_size, NULL, FCML_IEN_CT_EQUAL ); } } return error; } /**************/ /* ModR/M - r */ /**************/ fcml_ceh_error fcml_ifn_asm_operand_acceptor_r( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_sf_def_tma_r *args = (fcml_sf_def_tma_r*) addr_mode->addr_mode_args; if ( operand_def->type != FCML_OT_REGISTER || operand_def->reg.type != args->reg_type ) { return FCML_CEH_GEC_INVALID_OPPERAND; } /* Some registers allow UNDEF size to be defined for them.*/ if ( ( operand_def->reg.type != FCML_REG_DR && operand_def->reg.type != FCML_REG_CR ) && operand_def->reg.size != FCML_DS_UNDEF ) { if ( !fcml_ifn_asm_accept_data_size( context, addr_mode_desc, args->encoded_register_operand_size, operand_def->reg.size, FCML_IEN_CT_EQUAL ) ) { return FCML_CEH_GEC_INVALID_OPPERAND; } } return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_ifn_asm_operand_encoder_r( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( phase == FCML_IEN_ASM_IPPP_FIRST_PHASE ) { fcml_sf_def_tma_r *args = (fcml_sf_def_tma_r*) addr_mode->addr_mode_args; context->mod_rm.reg_opcode = operand_def->reg.reg; if ( context->assembler_context->entry_point.op_mode == FCML_OM_64_BIT ) { context->mod_rm.reg_opcode_needs_rex = operand_def->reg.x64_exp; } if ( ( operand_def->reg.type != FCML_REG_DR && operand_def->reg.type != FCML_REG_CR ) && operand_def->reg.size != FCML_DS_UNDEF ) { error = fcml_ifn_asm_decode_dynamic_operand_size( context, args->encoded_register_operand_size, operand_def->reg.size, NULL, FCML_IEN_CT_EQUAL ); if ( error ) { error = FCML_CEH_GEC_INVALID_OPPERAND; } } } return error; } /************************/ /* Far pointer indirect */ /************************/ fcml_sf_def_tma_rm fcml_isst_asm_far_pointer_indirect_args = { FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_FPI, FCML_RMF_M }; fcml_ceh_error fcml_ifn_asm_operand_acceptor_far_pointer_indirect( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { /* Prepare modified addressing mode for*/ fcml_st_def_decoded_addr_mode l_addr_mode = *addr_mode; l_addr_mode.addr_mode_args = &fcml_isst_asm_far_pointer_indirect_args; return fcml_ifn_asm_operand_acceptor_rm( context, addr_mode_details, addr_mode_desc, &l_addr_mode, operand_def, operand_enc ); } fcml_ceh_error fcml_ifn_asm_operand_encoder_far_pointer_indirect( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { /* Prepare modified addressing mode for*/ fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( phase == FCML_IEN_ASM_IPPP_FIRST_PHASE ) { fcml_st_def_decoded_addr_mode l_addr_mode = *addr_mode; l_addr_mode.addr_mode_args = &fcml_isst_asm_far_pointer_indirect_args; error = fcml_ifn_asm_operand_encoder_rm( phase, context, addr_mode_desc, &l_addr_mode, operand_def, operand_enc ); } return error; } /********/ /* VVVV */ /********/ fcml_ceh_error fcml_ifn_asm_operand_acceptor_vex_vvvv( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_sf_def_tma_vex_vvvv_reg *args = (fcml_sf_def_tma_vex_vvvv_reg*) addr_mode->addr_mode_args; if ( operand_def->type != FCML_OT_REGISTER || operand_def->reg.type != args->reg_type ) { return FCML_CEH_GEC_INVALID_OPPERAND; } if ( !fcml_ifn_asm_accept_data_size( context, addr_mode_desc, args->encoded_register_size, operand_def->reg.size, FCML_IEN_CT_EQUAL ) ) { return FCML_CEH_GEC_INVALID_OPPERAND; } return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_ifn_asm_operand_encoder_vex_vvvv( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { if ( phase == FCML_IEN_ASM_IPPP_FIRST_PHASE ) { fcml_ist_asm_extension_prefixes_fields *epf = &( context->epf ); fcml_st_register *reg = &( operand_def->reg ); epf->vvvv = reg->reg; } return FCML_CEH_GEC_NO_ERROR; } /*--------*/ /* is4/is5*/ /*--------*/ fcml_ceh_error fcml_ifn_asm_operand_acceptor_isX( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_sf_def_tma_is *is_args = (fcml_sf_def_tma_is*) addr_mode->addr_mode_args; if ( ( is_args->flags & FCML_ISF_IS4 ) || ( is_args->flags & FCML_ISF_IS5_SRC ) ) { /* IS4/IS5(src) */ if ( operand_def->type != FCML_OT_REGISTER || operand_def->reg.type != FCML_REG_SIMD ) { return FCML_CEH_GEC_INVALID_OPPERAND; } if ( !fcml_ifn_asm_accept_data_size( context, addr_mode_desc, FCML_EOS_L, operand_def->reg.size, FCML_IEN_CT_EQUAL ) ) { return FCML_CEH_GEC_INVALID_OPPERAND; } } else if ( operand_def->type == FCML_OT_IMMEDIATE ) { /* IS5 - m2z */ fcml_int8_t imm_value; fcml_ceh_error error = fcml_fn_utils_convert_integer_to_int8( &( operand_def->immediate ), &imm_value ); if ( error ) { return FCML_CEH_GEC_INVALID_OPPERAND; } if ( imm_value > 3 ) { return FCML_CEH_GEC_INVALID_OPPERAND; } /* Store converted value for future use in order to avoid further conversions.*/ context->part_processor_context.cache[context->part_processor_context.part_processor_index].is5_m2z = imm_value; } else { return FCML_CEH_GEC_INVALID_OPPERAND; } return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_ifn_asm_operand_encoder_isX( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { if ( phase == FCML_IEN_ASM_IPPP_FIRST_PHASE ) { fcml_sf_def_tma_is *is_args = (fcml_sf_def_tma_is*) addr_mode->addr_mode_args; if ( is_args->flags & FCML_ISF_IS4 ) { /* is4*/ operand_enc->code[0] = operand_def->reg.reg << 4; operand_enc->code_length = 1; } else if ( is_args->flags & FCML_ISF_IS5_SRC ) { /* Store is5 source register for last is5 instruction part encoder.*/ context->is5_byte = operand_def->reg.reg << 4; } else { /* is5-m2z*/ operand_enc->code[0] = context->is5_byte | context->part_processor_context.cache[context->part_processor_context.part_processor_index].is5_m2z; operand_enc->code_length = 1; } } return FCML_CEH_GEC_NO_ERROR; } /**************/ /* Pseudo-Op. */ /**************/ fcml_ceh_error fcml_ifn_asm_operand_acceptor_pseudo_op( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { fcml_sf_def_tma_pseudo_op *pseudo_op_args = (fcml_sf_def_tma_pseudo_op*) addr_mode->addr_mode_args; fcml_bool is_pseudo_op = context->mnemonic->pseudo_op.is_not_null; if ( operand_def->type == FCML_OT_IMMEDIATE && !is_pseudo_op ) { /* IMM8 encoding is given directly in operand.*/ fcml_st_integer destination; if ( !fcml_ifn_asm_try_to_convert_integer_and_set_flag( &( operand_def->immediate ), &destination, FCML_DS_8, FCML_DS_8, 0, NULL ) ) { return FCML_CEH_GEC_INVALID_OPPERAND; } if ( destination.int8 & ( ~pseudo_op_args->mask ) ) { fcml_ifn_ceh_asm_add_error_msg( context, fcml_fn_msg_get_message( FCML_MC_SEGMENT_INVALID_PSEUDO_OPCODE_IMM ), FCML_CEH_MEC_ERROR_INVALID_PSEUDO_OPCODE_VALUE ); return FCML_CEH_GEC_INVALID_OPPERAND; } } else if ( !is_pseudo_op || operand_def->type != FCML_OT_NONE ) { /* IMM8 is not available in operand, so its value should be given in mnemonic configuration. In such case, operand shouldn't exist.*/ return FCML_CEH_GEC_INVALID_OPPERAND; } return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_ifn_asm_operand_encoder_pseudo_op( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_def_decoded_addr_mode *addr_mode, fcml_st_operand *operand_def, fcml_ist_asm_instruction_part *operand_enc ) { if ( phase == FCML_IEN_ASM_IPPP_FIRST_PHASE ) { if ( operand_def->type == FCML_OT_IMMEDIATE ) { /* IMM8 encoding is given directly in operand.*/ fcml_st_integer destination; if ( !fcml_ifn_asm_try_to_convert_integer_and_set_flag( &( operand_def->immediate ), &destination, FCML_DS_8, FCML_DS_8, 0, NULL ) ) { return FCML_CEH_GEC_INVALID_OPPERAND; } operand_enc->code[0] = destination.int8; } else if ( context->mnemonic->pseudo_op.is_not_null ) { /* IMM8 is not available in operand, so its value should be given in mnemonic configuration.*/ operand_enc->code[0] = context->mnemonic->pseudo_op.value; } operand_enc->code_length = 1; } return FCML_CEH_GEC_NO_ERROR; } fcml_ist_asm_operand_encoder_def fcml_iarr_asm_def_operand_encoders[] = { { NULL, NULL, NULL }, { fcml_ifn_asm_operand_encoder_imm, fcml_ifn_asm_operand_acceptor_imm, NULL }, { fcml_ifn_asm_operand_encoder_explicit_reg, fcml_ifn_asm_operand_acceptor_explicit_reg, NULL }, { fcml_ifn_asm_operand_encoder_opcode_reg, fcml_ifn_asm_operand_acceptor_opcode_reg, NULL }, { fcml_ifn_asm_operand_encoder_immediate_dis_relative, fcml_ifn_asm_operand_acceptor_immediate_dis_relative, NULL }, { fcml_ifn_asm_operand_encoder_far_pointer, fcml_ifn_asm_operand_acceptor_far_pointer, fcml_fn_hts_ihc_far_pointer }, { NULL, fcml_ifn_asm_operand_acceptor_explicit_gps_reg_addressing, NULL }, { fcml_ifn_asm_operand_encoder_explicit_ib, fcml_ifn_asm_operand_acceptor_explicit_ib, NULL }, { fcml_ifn_asm_operand_encoder_segment_relative_offset, fcml_ifn_asm_operand_acceptor_segment_relative_offset, NULL }, { fcml_ifn_asm_operand_encoder_rm, fcml_ifn_asm_operand_acceptor_rm, fcml_fn_hts_ihc_modrm_hints }, { fcml_ifn_asm_operand_encoder_r, fcml_ifn_asm_operand_acceptor_r, NULL }, { fcml_ifn_asm_operand_encoder_vex_vvvv, fcml_ifn_asm_operand_acceptor_vex_vvvv, NULL }, { fcml_ifn_asm_operand_encoder_isX, fcml_ifn_asm_operand_acceptor_isX, NULL }, { fcml_ifn_asm_operand_encoder_rm, fcml_ifn_asm_operand_acceptor_rm, NULL }, { fcml_ifn_asm_operand_encoder_pseudo_op, fcml_ifn_asm_operand_acceptor_pseudo_op, NULL } }; /************************* * Instruction encoders. * *************************/ fcml_ceh_error fcml_ifn_asm_accept_addr_mode( fcml_ist_asm_encoding_context *context, fcml_ist_asm_instruction_addr_mode_encoding_details *addr_mode, fcml_st_instruction *instruction ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; #ifdef FCML_DEBUG FCML_TRACE( "Accepting addressing mode: %d", context->__def_index ); #endif int index = 0; fcml_ist_asm_instruction_part_processor_chain *current_processor = addr_mode->part_processor_chain; while ( current_processor ) { context->last_ipp = index; fcml_ist_asm_instruction_part_processor_descriptor *descriptor = &( current_processor->processor_descriptor ); context->part_processor_context.part_processor_index = index; if ( !context->is_short_form || ( context->is_short_form && descriptor->is_short_form_supported ) ) { if ( descriptor->processor_acceptor != NULL && ( error = descriptor->processor_acceptor( context, &( addr_mode->addr_mode_details ), addr_mode->addr_mode_desc, instruction, descriptor->processor_args ) ) != FCML_CEH_GEC_NO_ERROR ) { FCML_TRACE( "Addressing mode not accepted. Acceptor failed: %d", index ); return error; } } current_processor = current_processor->next_processor; index++; } #ifdef FCML_DEBUG FCML_TRACE( "Accepted addressing mode %d - prefixes: 0x%04X, opcode: 0x%02X.", context->__def_index, addr_mode->addr_mode_desc->allowed_prefixes, addr_mode->addr_mode_desc->opcode_flags ); #endif return error; } /* All currently supported encoding phases. */ fcml_ien_asm_part_processor_phase fcml_iarr_asm_executed_phases[] = { FCML_IEN_ASM_IPPP_FIRST_PHASE, FCML_IEN_ASM_IPPP_SECOND_PHASE, FCML_IEN_ASM_IPPP_THIRD_PHASE }; fcml_nuint8_t fcml_ifn_asm_calculate_instruction_parts_length( fcml_ist_asm_instruction_part *instruction_part, fcml_int parts_num ) { fcml_nuint8_t length = { 0, FCML_TRUE }; while ( parts_num-- > 0 ) { length.value += instruction_part++->code_length; } return length; } /* Responsible for assembling given addressing mode using attributes provided by context.*/ fcml_ceh_error fcml_ifn_asm_process_addr_mode( fcml_ist_asm_encoding_context *context, fcml_ist_asm_instruction_addr_mode_encoding_details *addr_mode, fcml_ist_asm_instruction_part_container *instruction_part_container ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; /* Allocate instruction parts.*/ fcml_ist_asm_instruction_part *instruction_part = (fcml_ist_asm_instruction_part*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_ist_asm_instruction_part) * addr_mode->instruction_parts ); if ( !instruction_part ) { return FCML_CEH_GEC_OUT_OF_MEMORY; } int i; for ( i = 0; !error && i < sizeof( fcml_iarr_asm_executed_phases ) / sizeof(fcml_ien_asm_part_processor_phase); i++ ) { fcml_ist_asm_instruction_part *current_instruction_part = instruction_part; fcml_ist_asm_instruction_part_processor_chain *current_processor = addr_mode->part_processor_chain; fcml_bool first = FCML_TRUE; int index = 0; while ( current_processor ) { context->last_ipp = index; fcml_ist_asm_instruction_part_processor_descriptor *descriptor = &( current_processor->processor_descriptor ); if ( descriptor->processor_encoder && ( !context->is_short_form || ( context->is_short_form && descriptor->is_short_form_supported ) ) ) { if ( !first && descriptor->processor_type == FCML_IEN_ASM_IPPT_ENCODER ) { current_instruction_part++; } first = FCML_FALSE; context->part_processor_context.part_processor_index = index; error = descriptor->processor_encoder( fcml_iarr_asm_executed_phases[i], context, &( addr_mode->addr_mode_details ), addr_mode->addr_mode_desc, descriptor->processor_type == FCML_IEN_ASM_IPPT_VERIFIER ? NULL : current_instruction_part, descriptor->processor_args ); if ( error ) { /* Something failed.*/ break; } } current_processor = current_processor->next_processor; index++; } } if ( !error ) { /* Calculate instruction size.*/ context->instruction_size = fcml_ifn_asm_calculate_instruction_parts_length( instruction_part, addr_mode->instruction_parts ); fcml_bool recalculate_size = FCML_FALSE; /* Execute potential post processors.*/ for ( i = 0; i < addr_mode->instruction_parts; i++ ) { fcml_ist_asm_instruction_part *ip = &( instruction_part[i] ); if ( ip->post_processor ) { error = ip->post_processor( context, ip, ip->post_processor_args ); if ( error ) { break; } recalculate_size = FCML_TRUE; } } if ( recalculate_size ) { context->instruction_size = fcml_ifn_asm_calculate_instruction_parts_length( instruction_part, addr_mode->instruction_parts ); } #ifdef FCML_DEBUG FCML_TRACE( "Proceeded addressing mode %d - prefixes: 0x%04X, opcode: 0x%02X (%s).", context->__def_index, addr_mode->addr_mode_desc->allowed_prefixes, addr_mode->addr_mode_desc->opcode_flags, fcml_idfn_asm_encode_size_flags( &(context->optimizer_processing_details) ) ); #endif } else { #ifdef FCML_DEBUG FCML_TRACE( "Failed to process addressing mode %d - prefixes: 0x%04X, opcode: 0x%02X (%s).", context->__def_index, addr_mode->addr_mode_desc->allowed_prefixes, addr_mode->addr_mode_desc->opcode_flags, fcml_idfn_asm_encode_size_flags( &(context->optimizer_processing_details) ) ); #endif } if ( error ) { fcml_fn_env_memory_free( instruction_part ); } else { instruction_part_container->instruction_parts = instruction_part; instruction_part_container->count = addr_mode->instruction_parts; } return error; } void fcml_ifn_asm_assemble_instruction_parts( fcml_st_assembled_instruction *assembled_instruction, fcml_ist_asm_instruction_part_container *instruction_part_container ) { int i, count = instruction_part_container->count; int offset = 0; for ( i = 0; i < count; i++ ) { fcml_ist_asm_instruction_part *part = &( instruction_part_container->instruction_parts[i] ); if ( part->code_length > 0 ) { fcml_fn_env_memory_copy( assembled_instruction->code + offset, part->code, part->code_length ); offset += part->code_length; } } /* Just to be consequent.*/ assembled_instruction->code_length = offset; } void fcml_ifn_asm_free_assembled_instruction( fcml_st_assembled_instruction *assembled_instruction ) { if ( assembled_instruction ) { if ( assembled_instruction->code ) { fcml_fn_env_memory_free( assembled_instruction->code ); } fcml_fn_ceh_free_errors_only( &( assembled_instruction->warnings ) ); fcml_fn_env_memory_free( assembled_instruction ); } } fcml_ceh_error fcml_ifn_asm_assemble_instruction( fcml_ist_asm_encoding_context *context, fcml_ist_asm_instruction_addr_mode_encoding_details *addr_mode, fcml_st_assembled_instruction **assembled_instruction ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_ist_asm_instruction_part_container instruction_part_container = { 0 }; /* Prepares encoded instruction parts. */ error = fcml_ifn_asm_process_addr_mode( context, addr_mode, &instruction_part_container ); /* Assemble instruction parts.*/ if ( !error ) { fcml_usize code_length = context->instruction_size.value; /* Allocate memory block for assembled code.*/ fcml_st_assembled_instruction *asm_inst = (fcml_st_assembled_instruction*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_assembled_instruction) ); if ( asm_inst ) { asm_inst->code = (fcml_uint8_t*) fcml_fn_env_memory_alloc( code_length ); if ( asm_inst->code ) { asm_inst->code_length = code_length; /* Copies instruction parts to the destination code array. */ fcml_ifn_asm_assemble_instruction_parts( asm_inst, &instruction_part_container ); *assembled_instruction = asm_inst; } else { error = FCML_CEH_GEC_OUT_OF_MEMORY; } } else { error = FCML_CEH_GEC_OUT_OF_MEMORY; } if ( error && asm_inst ) { fcml_fn_env_memory_free( asm_inst ); } } /* Always free instruction parts when they are not needed anymore. */ if ( instruction_part_container.instruction_parts ) { fcml_fn_env_memory_free( instruction_part_container.instruction_parts ); } return error; } /** Arguments passed through the optimization process. */ typedef struct fcml_ist_asm_enc_optimizer_callback_args { /** Currently processed addressing mode. */ fcml_ist_asm_instruction_addr_mode_encoding_details *addr_mode; /** Encoding context instance. */ fcml_ist_asm_encoding_context *context; } fcml_ist_asm_enc_optimizer_callback_args; /** Assembles instruction and puts it to the instructions chain. */ fcml_ceh_error fcml_ifn_asm_assemble_and_collect_instruction( fcml_ptr args ) { /* Restore important information from callback arguments.*/ fcml_ist_asm_enc_optimizer_callback_args *callback_args = (fcml_ist_asm_enc_optimizer_callback_args*) args; fcml_ist_asm_encoding_context *context = callback_args->context; fcml_ist_asm_instruction_addr_mode_encoding_details *addr_mode = callback_args->addr_mode; fcml_st_asm_encoder_result *encoding_result = context->encoder_result; fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_assembled_instruction *assembled_instruction; error = fcml_ifn_asm_assemble_instruction( context, addr_mode, &assembled_instruction ); if ( !error ) { #ifdef FCML_DEBUG assembled_instruction->__def_index = context->__def_index; #endif fcml_bool ignore = FCML_FALSE; /* Check if such instruction has been already assembled. */ fcml_st_assembled_instruction *instruction = encoding_result->instructions; while ( instruction ) { if ( instruction->code_length == assembled_instruction->code_length && fcml_fn_env_memory_cmp( instruction->code, assembled_instruction->code, instruction->code_length ) ) { /* Instructions are the same.*/ ignore = FCML_TRUE; break; } instruction = instruction->next; } if ( !ignore ) { /* Insert newly assembled instruction to the front of the instructions chain. */ fcml_st_assembled_instruction *instructions = encoding_result->instructions; encoding_result->instructions = assembled_instruction; assembled_instruction->next = instructions; encoding_result->number_of_instructions++; } else { /* Free ignored instruction.*/ fcml_ifn_asm_free_assembled_instruction( assembled_instruction ); } } return error; } fcml_bool fcml_ifn_asm_accept_instruction_hints( fcml_hints addr_mode_dest_hints, fcml_hints instruction_hints ) { if ( ( instruction_hints & FCML_HINT_INDIRECT_POINTER ) && !( addr_mode_dest_hints & FCML_HINT_INDIRECT_POINTER ) ) { FCML_TRACE_MSG("Addressing mode doesn't support indirect addressing."); return FCML_FALSE; } if ( ( instruction_hints & FCML_HINT_DIRECT_POINTER ) && !( addr_mode_dest_hints & FCML_HINT_DIRECT_POINTER ) ) { FCML_TRACE_MSG("Addressing mode doesn't support direct addressing."); return FCML_FALSE; } if ( instruction_hints & FCML_HINT_FAR_POINTER ) { return addr_mode_dest_hints & FCML_HINT_FAR_POINTER; } if ( instruction_hints & FCML_HINT_NEAR_POINTER ) { return addr_mode_dest_hints & FCML_HINT_NEAR_POINTER; } return FCML_TRUE; } void fcml_ifn_asm_set_attribute_size_flag_for_size( fcml_usize attribute_size, fcml_st_nullable_size_flags *flags ) { fcml_flags flag = 0; switch ( attribute_size ) { case FCML_DS_16: flag = FCML_EN_ASF_16; break; case FCML_DS_32: flag = FCML_EN_ASF_32; break; case FCML_DS_64: flag = FCML_EN_ASF_64; break; } if ( flag ) { flags->flags |= flag; flags->is_set = FCML_TRUE; } } void fcml_ifn_prepare_optimizer_context( fcml_st_asm_optimizer_context *optimizer_context, fcml_st_assembler_context *assembler_context ) { fcml_st_entry_point *entry_point = &( assembler_context->entry_point ); optimizer_context->op_mode = entry_point->op_mode; optimizer_context->optimizer_flags = assembler_context->configuration.optimizer_flags; optimizer_context->asa = entry_point->address_size_attribute; optimizer_context->osa = entry_point->operand_size_attribute; } void fcml_ifn_chooser_extract( fcml_ptr instruction_ptr, fcml_st_instruction_code *instruction_code ) { if ( instruction_ptr ) { fcml_st_assembled_instruction *instruction = (fcml_st_assembled_instruction*) instruction_ptr; instruction_code->code = instruction->code; instruction_code->code_length = instruction->code_length; } } fcml_ptr fcml_ifn_chooser_next( fcml_ptr instruction_ptr ) { if ( instruction_ptr ) { fcml_st_assembled_instruction *instruction = (fcml_st_assembled_instruction*) instruction_ptr; return instruction->next; } return NULL; } void fcml_fcml_ifn_prepare_chooser_context( fcml_st_chooser_context *context, fcml_st_assembled_instruction *instructions ) { if ( context ) { context->extract = &fcml_ifn_chooser_extract; context->next = &fcml_ifn_chooser_next; context->instruction = instructions; } } void fcml_ifn_prepare_optimizer_processing_details( fcml_st_asm_optimizer_processing_details *processing_details, fcml_ist_asm_instruction_addr_mode_encoding_details *addr_mode ) { /* Apply address attribute size restrictions from mnemonic definition.*/ fcml_usize asa = addr_mode->mnemonic->supported_asa; processing_details->easa = asa; if ( asa ) { fcml_ifn_asm_set_attribute_size_flag_for_size( asa, &( processing_details->allowed_easa ) ); } /* Apply operand attribute size restrictions from mnemonic definition.*/ fcml_usize osa = addr_mode->mnemonic->supported_osa; processing_details->eosa = osa; if ( osa ) { fcml_ifn_asm_set_attribute_size_flag_for_size( osa, &( processing_details->allowed_eosa ) ); } /* Apply L fields restrictions from mnemonic definition. */ processing_details->l = addr_mode->mnemonic->l; } void fcml_ifn_asm_handle_addr_mode_errors( fcml_ist_asm_addr_mode_error *addr_mode_errors, fcml_st_ceh_error_container *addr_mode_error_container, fcml_ceh_error error_code, fcml_int ipp_failed, fcml_ist_addr_mode_processing_phase phase ) { fcml_bool choose_error = FCML_FALSE; /* Priorities are as follows: phase, number of failed ipp, error codes. */ /* Phase. */ if ( phase == addr_mode_errors->phase ) { /* IPP ordinal. */ if ( ipp_failed == addr_mode_errors->ipp_failed ) { /* Error code. */ fcml_ceh_error cec = addr_mode_errors->error_code; if ( cec == FCML_CEH_GEC_NO_ERROR || ( cec == FCML_CEH_GEC_INVALID_OPPERAND && ( cec != error_code ) ) ) { choose_error = FCML_TRUE; } } else if ( ipp_failed > addr_mode_errors->ipp_failed ) { choose_error = FCML_TRUE; } } else if ( phase > addr_mode_errors->phase ) { choose_error = FCML_TRUE; } if ( choose_error ) { /* Treat current error as most important one. */ fcml_fn_ceh_free_errors_only( &( addr_mode_errors->addr_mode_errors ) ); addr_mode_errors->addr_mode_errors = *addr_mode_error_container; addr_mode_errors->error_code = error_code; addr_mode_errors->ipp_failed = ipp_failed; addr_mode_errors->phase = phase; addr_mode_error_container->errors = NULL; addr_mode_error_container->last_error = NULL; } } fcml_ceh_error fcml_ifn_asm_encode_addressing_mode_core( fcml_ist_asm_encoding_context *context, fcml_ist_asm_instruction_addr_mode_encoding_details *addr_mode, fcml_ist_asm_addr_mode_error *addr_mode_errors ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_asm_optimizer_context optimizer_context = { 0 }; fcml_st_ceh_error_container *global_error_container = context->error_container; /* Errors container for current processing. */ fcml_st_ceh_error_container addr_mode_error_container = { 0 }; context->error_container = &addr_mode_error_container; /* Check if addressing mode matches the hints, if there are any. */ if ( !context->instruction->hints || fcml_ifn_asm_accept_instruction_hints( addr_mode->hints, context->instruction->hints ) ) { error = fcml_ifn_asm_accept_addr_mode( context, addr_mode, context->instruction ); if ( !error ) { fcml_ist_asm_enc_optimizer_callback_args args; args.addr_mode = addr_mode; args.context = context; fcml_ifn_prepare_optimizer_context( &optimizer_context, context->assembler_context ); /* Optimizer implementation can be provided by user. */ fcml_fnp_asm_optimizer optimizer = context->assembler_context->configuration.optimizer; if ( !optimizer ) { optimizer = &fcml_fn_asm_default_optimizer; } error = optimizer( &optimizer_context, &( context->optimizer_processing_details ), fcml_ifn_asm_assemble_and_collect_instruction, &args ); } if ( error ) { /* Addressing mode hasn't been proceeded, so handle errors. */ fcml_ifn_asm_handle_addr_mode_errors( addr_mode_errors, &addr_mode_error_container, error, context->last_ipp, FCML_AMPP_PROCESS ); } } else { FCML_TRACE_MSG( "Addressing mode ignored due to hints incompatibility." ); } /* Free errors stored in local container. See: fcml_ifn_asm_handle_addr_mode_errors function for more details * about how they are handled. */ fcml_fn_ceh_free_errors_only( &addr_mode_error_container ); context->error_container = global_error_container; return error; } fcml_ceh_error fcml_ifn_asm_instruction_encoder_IA( fcml_st_assembler_context *asm_context, fcml_st_dialect_context_int *dialect_context, fcml_st_instruction *instruction, fcml_st_asm_encoder_result *result, fcml_st_asm_instruction_addr_modes *addr_modes ) { /* Make a local copy of instruction because it still can be changed by preprocessor.*/ fcml_st_instruction tmp_instruction = *instruction; /* Container for errors related to addressing mode processing. */ fcml_ist_asm_addr_mode_error addr_mode_errors = { FCML_AMPP_UNDEFINED }; fcml_ist_asm_encoding_context context = { 0 }; context.assembler_context = asm_context; context.instruction = &tmp_instruction; context.encoder_result = result; /* Global errors container is set directly to error container from results. */ context.error_container = &( result->errors ); fcml_bool instruction_has_been_changed; fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( addr_modes ) { /* Check if there are any operands available. The short form can be used only if there are no operands set.*/ fcml_bool no_operands = context.instruction->operands[0].type == FCML_OT_NONE; /* Choose addressing mode.*/ if ( addr_modes->addr_modes->size ) { /* Gets first addressing mode available for chosen instruction definition. */ fcml_st_coll_list_element *addr_mode_element = addr_modes->addr_modes->head; #ifdef FCML_DEBUG int index = 0; #endif /* This loop iterates through all available addressing modes one by one. */ while ( addr_mode_element ) { /* This flag is used by preprocessor to signal the fact that instruction has been changed. */ instruction_has_been_changed = FCML_FALSE; error = FCML_CEH_GEC_NO_ERROR; fcml_ist_asm_instruction_addr_mode_encoding_details *addr_mode = (fcml_ist_asm_instruction_addr_mode_encoding_details*) addr_mode_element->item; /* Encoding context has to be prepared for new addressing mode because it is reused. */ fcml_ifn_asm_clean_context( &context ); /* Call instruction preprocessor again, passing found mnemonic definition this time. * Parsed mnemonic can contain some dialect specific information, so we have to provide * dialect a way to modify instruction definition basing on that information. */ fcml_fnp_asm_dialect_prepare_assembler_preprocessor assembler_preprocessor = dialect_context->assembler_preprocessor; if ( assembler_preprocessor ) { assembler_preprocessor( &(context.assembler_context->configuration), (fcml_st_dialect*) dialect_context, &tmp_instruction, addr_mode->addr_mode_desc, addr_mode->instruction, addr_mode->mnemonic, &instruction_has_been_changed ); } /* This information is necessary to ignore operands encoding process.*/ /* Ignore all short forms if there are operands available.*/ fcml_bool is_short_form = addr_mode->mnemonic->is_shortcut && no_operands; context.is_short_form = is_short_form; /* Prepare processing context for optimizer using currently used addressing mode. */ fcml_ifn_prepare_optimizer_processing_details( &( context.optimizer_processing_details ), addr_mode ); /* Make it accessible through encoding context. Certain encoders might need this information. */ context.mnemonic = addr_mode->mnemonic; #ifdef FCML_DEBUG context.__def_index = index; #endif /* Every addressing mode has its own data size calculators. */ context.ds_calculator = addr_mode->addr_mode_details.ds_calculator; context.ds_calculator_args = addr_mode->addr_mode_details.ds_calculator_args; /* Try to encode prepared addressing mode. */ error = fcml_ifn_asm_encode_addressing_mode_core( &context, addr_mode, &addr_mode_errors ); addr_mode_element = addr_mode_element->next; #ifdef FCML_DEBUG index++; #endif /* Restore instruction if preprocessor has changed anything.*/ if ( instruction_has_been_changed ) { tmp_instruction = *instruction; } } /* Addressing modes related errors have higher priority than any others. */ if ( addr_mode_errors.addr_mode_errors.errors ) { /* There might be something collected before addressing mode * processing took place, so is has to be free'd. */ fcml_fn_ceh_free_errors_only( context.error_container ); *( context.error_container ) = addr_mode_errors.addr_mode_errors; } /* Set current error code to the best error collected while * processing addressing modes. */ if ( addr_mode_errors.error_code ) { error = addr_mode_errors.error_code; } /* Check if there is at least one assembled instruction.*/ if ( result->number_of_instructions == 0 ) { /* Instruction has been found but can not be assembled in this form or addressing mode. */ if ( !error ) { /* Just in case. Use more general error code, but in theory it should * never happened because acceptors and optimizers should return more * accurate error codes. */ error = FCML_CEH_GEC_INVALID_INSTRUCTION_FORM; } } else { /* Assemblation succeed so free errors but leave warning as they are. */ fcml_fn_ceh_free_errors_only_with_level( context.error_container, FCML_EN_CEH_EL_ERROR ); /* Last error code should be also cleaned. */ error = FCML_CEH_GEC_NO_ERROR; } if ( !error ) { /* Choose instruction.*/ fcml_fnp_asm_instruction_chooser chooser = asm_context->configuration.chooser; if ( !chooser ) { chooser = &fcml_fn_asm_default_instruction_chooser; } if ( result->number_of_instructions == 1 ) { /* There is only one instruction so chooser is not needed. */ result->chosen_instruction = (fcml_st_assembled_instruction*) result->instructions; } else { /* Prepares chooser context. */ fcml_st_chooser_context chooser_context; fcml_fcml_ifn_prepare_chooser_context( &chooser_context, result->instructions ); /* Chooses most appropriate instruction. */ result->chosen_instruction = (fcml_st_assembled_instruction*) chooser( &chooser_context ); } } } else { FCML_TRACE_MSG( "There is no addressing mode for given instruction. It should never happened, so it's an internal bug." ); error = FCML_CEH_GEC_INTERNAL_ERROR; } } return error; } /*****************************/ /* Processor part factories. */ /*****************************/ void fcml_ifn_asm_free_part_processor_chain( fcml_ist_asm_instruction_part_processor_chain *chain ) { if ( chain ) { fcml_ifn_asm_free_part_processor_chain( chain->next_processor ); fcml_ist_asm_instruction_part_processor_descriptor *descriptor = &( chain->processor_descriptor ); if ( descriptor->processor_args_deallocator ) { descriptor->processor_args_deallocator( descriptor->processor_args ); } fcml_fn_env_memory_free( chain ); } } /************************************/ /* Operand encoder wrapper factory. */ /************************************/ struct fcml_ist_asm_operand_encoder_wrapper_args { /* Decoder operand addressing.*/ fcml_st_def_decoded_addr_mode *decoded_addr_mode; /* Operands acceptor.*/ fcml_ifp_asm_operand_acceptor operand_acceptor; /* Function responsible for encoding operand.*/ fcml_ifp_asm_operand_encoder operand_encoder; /* Index of the operand to encode.*/ int operand_index; /* Operand hints.*/ fcml_hints hints; }; void fcml_ifn_asm_processor_operand_encoder_args_deallocator( fcml_ptr ptr ) { struct fcml_ist_asm_operand_encoder_wrapper_args *wrapper_wrgs = (struct fcml_ist_asm_operand_encoder_wrapper_args*) ptr; if ( wrapper_wrgs->decoded_addr_mode ) { fcml_fnp_def_free_addr_mode( wrapper_wrgs->decoded_addr_mode ); } fcml_fn_env_memory_free( wrapper_wrgs ); } fcml_bool fcml_ifn_asm_accept_operand_hints( fcml_hints addr_mode_desc_operand_hints, fcml_hints operand_hints ) { if ( ( operand_hints & FCML_OP_HINT_MULTIMEDIA_INSTRUCTION ) && !( addr_mode_desc_operand_hints & FCML_OP_HINT_MULTIMEDIA_INSTRUCTION ) ) { return FCML_FALSE; } return FCML_TRUE; } fcml_ceh_error fcml_ifn_asm_instruction_part_processor_acceptor_operand_encoder_wrapper( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_st_instruction *instruction, fcml_ptr args ) { struct fcml_ist_asm_operand_encoder_wrapper_args *wrapper_args = (struct fcml_ist_asm_operand_encoder_wrapper_args*) args; fcml_st_operand *operand = &( instruction->operands[wrapper_args->operand_index] ); if ( wrapper_args->operand_acceptor ) { /* Check hints.*/ fcml_hints operand_hints = operand->hints; if ( !operand_hints || fcml_ifn_asm_accept_operand_hints( wrapper_args->hints, operand_hints ) ) { return wrapper_args->operand_acceptor( context, addr_mode_details, addr_mode_desc, wrapper_args->decoded_addr_mode, operand, NULL ); } else { FCML_TRACE_MSG( "Hints do not match." ); return FCML_CEH_GEC_INVALID_OPPERAND; } } else { /* This operand shouldn't be defined.*/ if ( instruction->operands[wrapper_args->operand_index].type != FCML_OT_NONE ) { return FCML_CEH_GEC_INVALID_OPPERAND; } return FCML_CEH_GEC_NO_ERROR; } } fcml_ceh_error fcml_ifn_asm_instruction_part_processor_operand_encoder_wrapper( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr args ) { struct fcml_ist_asm_operand_encoder_wrapper_args *wrapper_args = (struct fcml_ist_asm_operand_encoder_wrapper_args*) args; fcml_st_operand *operand = &( context->instruction->operands[wrapper_args->operand_index] ); if ( wrapper_args->operand_encoder ) { return wrapper_args->operand_encoder( phase, context, addr_mode_def, wrapper_args->decoded_addr_mode, operand, instruction_part ); } else { return FCML_CEH_GEC_NO_ERROR; } } fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_operand_encoder_wrapper( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; struct fcml_ist_asm_operand_encoder_wrapper_args *wrapper_args = (struct fcml_ist_asm_operand_encoder_wrapper_args*) fcml_fn_env_memory_alloc_clear( sizeof(struct fcml_ist_asm_operand_encoder_wrapper_args) ); if ( !wrapper_args ) { *error = FCML_CEH_GEC_OUT_OF_MEMORY; return descriptor; } if ( addr_mode->opperands[flags] != FCML_NA ) { wrapper_args->decoded_addr_mode = fcml_fn_def_decode_addr_mode_args( addr_mode->opperands[flags], error ); if ( *error ) { fcml_fn_env_memory_free( wrapper_args ); return descriptor; } fcml_ist_asm_operand_encoder_def *encoders_def = &( fcml_iarr_asm_def_operand_encoders[wrapper_args->decoded_addr_mode->addr_mode] ); wrapper_args->operand_encoder = encoders_def->encoder; wrapper_args->operand_acceptor = encoders_def->acceptor; if ( encoders_def->hints_calculator ) { fcml_st_hts_calculated_hints calculated_hints = encoders_def->hints_calculator( addr_mode, wrapper_args->decoded_addr_mode ); *hints |= calculated_hints.instruction_hints; wrapper_args->hints = calculated_hints.operand_hints; } descriptor.processor_type = FCML_IEN_ASM_IPPT_ENCODER; } else { descriptor.processor_type = FCML_IEN_ASM_IPPT_VERIFIER; } wrapper_args->operand_index = flags; descriptor.processor_args_deallocator = fcml_ifn_asm_processor_operand_encoder_args_deallocator; descriptor.processor_encoder = fcml_ifn_asm_instruction_part_processor_operand_encoder_wrapper; descriptor.processor_acceptor = fcml_ifn_asm_instruction_part_processor_acceptor_operand_encoder_wrapper; descriptor.processor_args = wrapper_args; return descriptor; } /***********************************/ /* XOP/VEX opcode encoder factory. */ /***********************************/ fcml_ceh_error fcml_ifn_asm_instruction_part_processor_XOP_VEX_opcode_encoder( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr args ) { if ( phase == FCML_IEN_ASM_IPPP_FIRST_PHASE ) { /* Encoder has to set some flags for XOP/VEX prefix encoder. */ fcml_ist_asm_extension_prefixes_fields *epf = &( context->epf ); int opcode_bytes = FCML_DEF_OPCODE_FLAGS_OPCODE_NUM( addr_mode_def->opcode_flags ); int i = 0; int code_index = 0; fcml_uint8_t opcode_byte = addr_mode_def->opcode[i++]; switch ( opcode_byte ) { case 0x0F: { opcode_byte = addr_mode_def->opcode[i++]; switch ( opcode_byte ) { case 0x38: epf->mmmm = 0x02; break; case 0x3A: epf->mmmm = 0x03; break; default: instruction_part->code[code_index++] = opcode_byte; epf->mmmm = 0x01; break; } break; } case 0x08: case 0x09: case 0x0A: epf->mmmm = opcode_byte; break; } for ( ; i < opcode_bytes; i++ ) { instruction_part->code[code_index++] = addr_mode_def->opcode[i]; } instruction_part->code_length = code_index; } return FCML_CEH_GEC_NO_ERROR; } fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_XOP_VEX_opcode_encoder( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; if ( FCML_DEF_PREFIX_VEX_REQ( addr_mode->allowed_prefixes ) || FCML_DEF_PREFIX_XOP_REQ( addr_mode->allowed_prefixes ) ) { descriptor.processor_type = FCML_IEN_ASM_IPPT_ENCODER; descriptor.processor_args = NULL; descriptor.processor_encoder = fcml_ifn_asm_instruction_part_processor_XOP_VEX_opcode_encoder; descriptor.processor_acceptor = NULL; } return descriptor; } /***********************************/ /* Generic primary opcode encoder. */ /***********************************/ typedef fcml_uint8_t (*fcml_ifp_asm_primary_opcode_byte_encoder)( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_uint8_t opcode ); struct fcml_ist_opcode_byte_encoder_function_wrapper { fcml_ifp_asm_primary_opcode_byte_encoder opcode_byte_encoder; }; fcml_ceh_error fcml_ifn_asm_instruction_part_processor_generic_primary_opcode_encoder( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr args ) { if ( phase == FCML_IEN_ASM_IPPP_SECOND_PHASE ) { fcml_ifp_asm_primary_opcode_byte_encoder opcode_byte_encoder = NULL; struct fcml_ist_opcode_byte_encoder_function_wrapper *wrapper = (struct fcml_ist_opcode_byte_encoder_function_wrapper*) args; if ( wrapper ) { opcode_byte_encoder = wrapper->opcode_byte_encoder; } int opcode_bytes = FCML_DEF_OPCODE_FLAGS_OPCODE_NUM( addr_mode_def->opcode_flags ); int primary_opcode = FCML_DEF_OPCODE_FLAGS_PRIMARY_OPCODE( addr_mode_def->opcode_flags ); int i; for ( i = 0; i < opcode_bytes; i++ ) { fcml_uint8_t opcode_byte = addr_mode_def->opcode[i]; instruction_part->code[i] = ( i == primary_opcode ) ? opcode_byte_encoder( context, addr_mode_details, addr_mode_def, opcode_byte ) : opcode_byte; } instruction_part->code_length = opcode_bytes; } return FCML_CEH_GEC_NO_ERROR; } /**************************************************/ /* Opcode with condition encoded encoder factory. */ /**************************************************/ fcml_uint8_t fcml_ifp_asm_conditional_primary_opcode_byte_encoder( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_uint8_t opcode ) { return ( opcode + addr_mode_details->condition.condition_type * 2 + ( addr_mode_details->condition.is_negation ? 1 : 0 ) ); } struct fcml_ist_opcode_byte_encoder_function_wrapper fcml_conditional_opcode_encoder_wrapper = { &fcml_ifp_asm_conditional_primary_opcode_byte_encoder }; fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_conditional_opcode_encoder( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; if ( FCML_DEF_OPCODE_FLAGS_OPCODE_FIELD_TTTN( addr_mode->opcode_flags ) ) { descriptor.processor_type = FCML_IEN_ASM_IPPT_ENCODER; descriptor.processor_args = &fcml_conditional_opcode_encoder_wrapper; descriptor.processor_encoder = fcml_ifn_asm_instruction_part_processor_generic_primary_opcode_encoder; descriptor.processor_acceptor = NULL; } return descriptor; } /**************************************************/ /* Opcode with register encoded encoder factory. */ /**************************************************/ fcml_uint8_t fcml_ifp_asm_reg_primary_opcode_byte_encoder( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_uint8_t opcode ) { return opcode + context->opcode_reg.opcode_reg; } struct fcml_ist_opcode_byte_encoder_function_wrapper fcml_primary_opcode_encoder_wrapper = { &fcml_ifp_asm_reg_primary_opcode_byte_encoder }; fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_reg_opcode_encoder( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; if ( FCML_DEF_OPCODE_FLAGS_OPCODE_FIELD_REG( addr_mode->opcode_flags ) ) { descriptor.processor_type = FCML_IEN_ASM_IPPT_ENCODER; descriptor.processor_args = &fcml_primary_opcode_encoder_wrapper; descriptor.processor_encoder = fcml_ifn_asm_instruction_part_processor_generic_primary_opcode_encoder; descriptor.processor_acceptor = NULL; } return descriptor; } /**********************************/ /* Simple opcode encoder factory. */ /**********************************/ fcml_ceh_error fcml_ifn_asm_instruction_part_processor_simple_opcode_encoder( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr args ) { if ( phase == FCML_IEN_ASM_IPPP_FIRST_PHASE ) { int opcode_bytes = FCML_DEF_OPCODE_FLAGS_OPCODE_NUM( addr_mode_def->opcode_flags ); int i; for ( i = 0; i < opcode_bytes; i++ ) { instruction_part->code[i] = addr_mode_def->opcode[i]; } instruction_part->code_length = opcode_bytes; } return FCML_CEH_GEC_NO_ERROR; } fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_simple_opcode_encoder( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; descriptor.processor_type = FCML_IEN_ASM_IPPT_ENCODER; descriptor.processor_args = NULL; descriptor.processor_encoder = fcml_ifn_asm_instruction_part_processor_simple_opcode_encoder; descriptor.processor_acceptor = NULL; return descriptor; } /*******************/ /* Suffix encoder. */ /*******************/ fcml_ceh_error fcml_ifn_asm_instruction_part_processor_instruction_suffix_encoder( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr args ) { if ( phase == FCML_IEN_ASM_IPPP_FIRST_PHASE ) { if ( context->mnemonic->suffix.is_not_null ) { instruction_part->code[0] = context->mnemonic->suffix.value; instruction_part->code_length = 1; } } return FCML_CEH_GEC_NO_ERROR; } fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_suffix_encoder( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; if ( FCML_DEF_PREFIX_SUFFIX( addr_mode->allowed_prefixes ) ) { descriptor.processor_type = FCML_IEN_ASM_IPPT_ENCODER; descriptor.processor_args = NULL; descriptor.processor_encoder = fcml_ifn_asm_instruction_part_processor_instruction_suffix_encoder; descriptor.processor_acceptor = NULL; } return descriptor; } /*******************************/ /* Prefixes encoder factories. */ /*******************************/ /* Branch hints.*/ fcml_ceh_error fcml_ifn_asm_instruction_part_processor_branch_hints_prefix_encoder( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr args ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( phase == FCML_IEN_ASM_IPPP_THIRD_PHASE ) { fcml_st_instruction *instruction = context->instruction; if ( instruction->prefixes & FCML_PREFIX_BRANCH_HINT ) { instruction_part->code[0] = 0x3E; instruction_part->code_length = 1; } else if ( instruction->prefixes & FCML_PREFIX_NOBRANCH_HINT ) { instruction_part->code[0] = 0x2E; instruction_part->code_length = 1; } } return error; } fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_branch_hints_prefix_encoder( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; /* Branch hints are allowed only for JCC instructions.*/ if ( instruction->instruction == F_JCC ) { descriptor.processor_type = FCML_IEN_ASM_IPPT_ENCODER; descriptor.processor_args = NULL; descriptor.processor_encoder = fcml_ifn_asm_instruction_part_processor_branch_hints_prefix_encoder; descriptor.processor_acceptor = NULL; } return descriptor; } /* REP prefix.*/ fcml_ceh_error fcml_ifn_asm_instruction_part_processor_rep_prefix_encoder( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr args ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( phase == FCML_IEN_ASM_IPPP_THIRD_PHASE ) { if ( context->instruction->prefixes & FCML_PREFIX_REP ) { instruction_part->code[0] = 0xF3; instruction_part->code_length = 1; } } return error; } fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_rep_prefix_encoder( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; if ( FCML_DEF_PREFIX_REP_XRELEASE_ALLOWED( addr_mode->allowed_prefixes ) && !FCML_DEF_PREFIX_HLE_ENABLED( addr_mode->allowed_prefixes ) ) { descriptor.processor_type = FCML_IEN_ASM_IPPT_ENCODER; descriptor.processor_args = NULL; descriptor.processor_encoder = fcml_ifn_asm_instruction_part_processor_rep_prefix_encoder; descriptor.processor_acceptor = NULL; } return descriptor; } /* REPNE prefix.*/ fcml_ceh_error fcml_ifn_asm_instruction_part_processor_repne_prefix_encoder( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr args ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( phase == FCML_IEN_ASM_IPPP_THIRD_PHASE ) { if ( context->instruction->prefixes & FCML_PREFIX_REPNE ) { instruction_part->code[0] = 0xF2; instruction_part->code_length = 1; } } return error; } fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_repne_prefix_encoder( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; if ( FCML_DEF_PREFIX_REPNE_XACQUIRE_ALLOWED( addr_mode->allowed_prefixes ) && !FCML_DEF_PREFIX_HLE_ENABLED( addr_mode->allowed_prefixes ) ) { descriptor.processor_type = FCML_IEN_ASM_IPPT_ENCODER; descriptor.processor_args = NULL; descriptor.processor_encoder = fcml_ifn_asm_instruction_part_processor_repne_prefix_encoder; descriptor.processor_acceptor = NULL; } return descriptor; } /* HLE prefixes.*/ fcml_ceh_error fcml_ifn_asm_instruction_part_processor_hle_prefixes_prefix_encoder( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr args ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( phase == FCML_IEN_ASM_IPPP_THIRD_PHASE ) { fcml_bool found = FCML_FALSE; if ( context->instruction->prefixes & FCML_PREFIX_XACQUIRE ) { if ( FCML_DEF_PREFIX_REPNE_XACQUIRE_ALLOWED( addr_mode_def->allowed_prefixes ) ) { instruction_part->code[0] = 0xF2; instruction_part->code_length = 1; found = FCML_TRUE; } else { fcml_ifn_ceh_asm_add_error_msg( context, fcml_fn_msg_get_message( FCML_MC_SEGMENT_HLE_PREFIXES_NOT_ALLOWED ), FCML_CEH_MEC_ERROR_HLE_PREFIX_NOT_ALLOWED ); return FCML_CEH_GEC_INVALID_PREFIX; } } if ( context->instruction->prefixes & FCML_PREFIX_XRELEASE ) { if ( found ) { /* Only one HLA prefix is allowed for instruction.*/ fcml_ifn_ceh_asm_add_error_msg( context, fcml_fn_msg_get_message( FCML_MC_SEGMENT_HLE_MORE_THAN_ONE_PREFIX ), FCML_CEH_MEC_ERROR_HLE_MORE_THAN_ONE_PREFIX ); return FCML_CEH_GEC_INVALID_PREFIX; } if ( FCML_DEF_PREFIX_REP_XRELEASE_ALLOWED( addr_mode_def->allowed_prefixes ) ) { instruction_part->code[0] = 0xF3; instruction_part->code_length = 1; } else { fcml_ifn_ceh_asm_add_error_msg( context, fcml_fn_msg_get_message( FCML_MC_SEGMENT_HLE_PREFIXES_NOT_ALLOWED ), FCML_CEH_MEC_ERROR_HLE_PREFIX_NOT_ALLOWED ); return FCML_CEH_GEC_INVALID_PREFIX; } } } return error; } fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_hle_prefixes_encoder( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; if ( FCML_DEF_PREFIX_HLE_ENABLED( addr_mode->allowed_prefixes ) ) { descriptor.processor_type = FCML_IEN_ASM_IPPT_ENCODER; descriptor.processor_args = NULL; descriptor.processor_encoder = fcml_ifn_asm_instruction_part_processor_hle_prefixes_prefix_encoder; descriptor.processor_acceptor = NULL; } return descriptor; } /* Lock prefix.*/ fcml_ceh_error fcml_ifn_asm_instruction_part_processor_lock_prefix_encoder( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr args ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( phase == FCML_IEN_ASM_IPPP_THIRD_PHASE ) { /* For instruction that supports LOCK prefixes as well as HLA ones,*/ /* LOCK prefix is mandatory. XCHG is only one exception from that rule, and in its case*/ /* lock prefix can be ignored.*/ if ( FCML_DEF_PREFIX_HLE_ENABLED( addr_mode_def->allowed_prefixes ) && ( ( context->instruction->prefixes & FCML_PREFIX_XACQUIRE ) || ( context->instruction->prefixes & FCML_PREFIX_XRELEASE ) ) ) { if ( !( context->instruction->prefixes & FCML_PREFIX_LOCK ) ) { /* XCHG instruction do not need LOCK prefix.*/ if ( addr_mode_def->opcode[0] != 0x86 && addr_mode_def->opcode[0] != 0x87 ) { return FCML_CEH_GEC_INVALID_PREFIX; } } } if ( context->instruction->prefixes & FCML_PREFIX_LOCK ) { instruction_part->code[0] = 0xF0; instruction_part->code_length = 1; } } return error; } fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_lock_prefix_encoder( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; if ( FCML_DEF_PREFIX_LOCK_ALLOWED( addr_mode->allowed_prefixes ) ) { descriptor.processor_type = FCML_IEN_ASM_IPPT_ENCODER; descriptor.processor_args = NULL; descriptor.processor_encoder = fcml_ifn_asm_instruction_part_processor_lock_prefix_encoder; descriptor.processor_acceptor = NULL; } return descriptor; } /* Segment override prefix.*/ fcml_uint8_t fcml_iarr_asm_prefix_override_mapping[] = { 0x26, 0x2e, 0x36, 0x3e, 0x64, 0x65 }; fcml_ceh_error fcml_ifn_asm_instruction_part_processor_segment_override_prefix_encoder( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr args ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( phase == FCML_IEN_ASM_IPPP_THIRD_PHASE ) { if ( context->segment_override.type == FCML_REG_SEG ) { fcml_uint8_t seg_reg_num = context->segment_override.reg; if ( seg_reg_num <= 5 ) { instruction_part->code[0] = fcml_iarr_asm_prefix_override_mapping[seg_reg_num]; instruction_part->code_length = 1; } else { /* Wrong register type. This check is done just is case, this code should never be invoked due to earlier sanity checks. */ FCML_TRACE_MSG( "Unknown segment register found." ); error = FCML_CEH_GEC_INTERNAL_ERROR; } } } return error; } fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_segment_override_prefix_encoder( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; descriptor.processor_type = FCML_IEN_ASM_IPPT_ENCODER; descriptor.processor_args = NULL; descriptor.processor_encoder = fcml_ifn_asm_instruction_part_processor_segment_override_prefix_encoder; descriptor.processor_acceptor = NULL; return descriptor; } /* Mandatory prefixes.*/ fcml_ceh_error fcml_ifn_asm_instruction_part_processor_mandatory_prefixes_encoder( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr args ) { if ( phase == FCML_IEN_ASM_IPPP_THIRD_PHASE ) { fcml_uint8_t prefix = 0x66; if ( FCML_DEF_PREFIX_MANDATORY_F2( addr_mode_def->allowed_prefixes ) ) { prefix = 0xF2; } else if ( FCML_DEF_PREFIX_MANDATORY_F3( addr_mode_def->allowed_prefixes ) ) { prefix = 0xF3; } instruction_part->code[0] = prefix; instruction_part->code_length = 1; } return FCML_CEH_GEC_NO_ERROR; } fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_mandatory_prefixes_encoder( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; fcml_bool is_mandatory = FCML_DEF_PREFIX_MANDATORY_66( addr_mode->allowed_prefixes ) || FCML_DEF_PREFIX_MANDATORY_F2( addr_mode->allowed_prefixes ) || FCML_DEF_PREFIX_MANDATORY_F3( addr_mode->allowed_prefixes ); /* Mandatory prefixes can be applied to instructions without neither XOP nor VEX prefixes.*/ if ( is_mandatory && !FCML_DEF_PREFIX_VEX_REQ( addr_mode->allowed_prefixes ) && !FCML_DEF_PREFIX_XOP_REQ( addr_mode->allowed_prefixes ) ) { descriptor.processor_type = FCML_IEN_ASM_IPPT_ENCODER; descriptor.processor_args = NULL; descriptor.processor_encoder = fcml_ifn_asm_instruction_part_processor_mandatory_prefixes_encoder; descriptor.processor_acceptor = NULL; } return descriptor; } /* 66 prefix.*/ fcml_ceh_error fcml_ifn_asm_instruction_part_processor_66_prefix_encoder( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr args ) { if ( phase == FCML_IEN_ASM_IPPP_THIRD_PHASE ) { fcml_bool encode = FCML_FALSE; fcml_uint64_t addr_type = addr_mode_def->instruction_group; /* Mandatory 0x66 prefix is encoded in different way in case of VEX encoded instructions.*/ if ( !( addr_type & FCML_AMT_VEXx ) ) { if ( FCML_DEF_PREFIX_MANDATORY_66( addr_mode_def->allowed_prefixes ) ) { encode = FCML_TRUE; /* SIMD instructions do not need 0x66 to change EOSA.*/ } else if ( !( addr_type & FCML_AMT_SIMD ) ) { fcml_st_entry_point *entry_point = &( context->assembler_context->entry_point ); encode = ( entry_point->operand_size_attribute == FCML_DS_16 && context->optimizer_processing_details.eosa == FCML_DS_32 ) || ( entry_point->operand_size_attribute == FCML_DS_32 && context->optimizer_processing_details.eosa == FCML_DS_16 ) || ( entry_point->operand_size_attribute == FCML_DS_64 && context->optimizer_processing_details.eosa == FCML_DS_32 ); } if ( encode ) { instruction_part->code[0] = 0x66; instruction_part->code_length = 1; } } } return FCML_CEH_GEC_NO_ERROR; } fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_66_prefix_encoder( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; /* Mandatory prefixes are handled by dedicated IPP.*/ if ( !FCML_DEF_PREFIX_MANDATORY_66( addr_mode->allowed_prefixes ) && !FCML_DEF_PREFIX_VEX_REQ( addr_mode->allowed_prefixes ) && !FCML_DEF_PREFIX_XOP_REQ( addr_mode->allowed_prefixes ) ) { descriptor.processor_type = FCML_IEN_ASM_IPPT_ENCODER; descriptor.processor_args = NULL; descriptor.processor_encoder = fcml_ifn_asm_instruction_part_processor_66_prefix_encoder; descriptor.processor_acceptor = NULL; } return descriptor; } /* 67 prefix. */ fcml_ceh_error fcml_ifn_asm_instruction_part_processor_67_prefix_encoder( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr args ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( phase == FCML_IEN_ASM_IPPP_THIRD_PHASE ) { /* If effective address size is not set, it means that instruction is not interested in ASA and just doesn't use it.*/ fcml_st_entry_point *entry_point = &( context->assembler_context->entry_point ); if ( context->optimizer_processing_details.easa && ( entry_point->address_size_attribute != context->optimizer_processing_details.easa ) ) { fcml_bool encode = ( entry_point->address_size_attribute == FCML_DS_16 && context->optimizer_processing_details.easa == FCML_DS_32 ) || ( entry_point->address_size_attribute == FCML_DS_32 && context->optimizer_processing_details.easa == FCML_DS_16 ) || ( entry_point->address_size_attribute == FCML_DS_64 && context->optimizer_processing_details.easa == FCML_DS_32 ); if ( encode ) { instruction_part->code[0] = 0x67; instruction_part->code_length = 1; } else { error = FCML_CEH_GEC_INVALID_ADDRESS_SIZE; } } } return error; } fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_67_prefix_encoder( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; /* 67 prefix can be applied to instructions without neither XOP nor VEX prefixes.*/ if ( !FCML_DEF_PREFIX_VEX_REQ( addr_mode->allowed_prefixes ) && !FCML_DEF_PREFIX_XOP_REQ( addr_mode->allowed_prefixes ) ) { descriptor.processor_type = FCML_IEN_ASM_IPPT_ENCODER; descriptor.processor_args = NULL; descriptor.processor_encoder = fcml_ifn_asm_instruction_part_processor_67_prefix_encoder; descriptor.processor_acceptor = NULL; } return descriptor; } /********************/ /** VEX/XOP Prefix **/ /********************/ fcml_ceh_error fcml_ifn_asm_instruction_part_processor_VEX_XOP_prefix_encoder( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr args ) { if ( phase == FCML_IEN_ASM_IPPP_FIRST_PHASE ) { if ( FCML_DEF_PREFIX_L_1( addr_mode_def->allowed_prefixes ) ) { context->optimizer_processing_details.l.is_not_null = FCML_TRUE; context->optimizer_processing_details.l.value = 0x01; } else if ( FCML_DEF_PREFIX_L_0( addr_mode_def->allowed_prefixes ) ) { context->optimizer_processing_details.l.is_not_null = FCML_TRUE; context->optimizer_processing_details.l.value = 0x00; } } if ( phase == FCML_IEN_ASM_IPPP_THIRD_PHASE ) { fcml_ist_asm_extension_prefixes_fields *epf = &( context->epf ); fcml_st_encoded_modrm *encoded_mod_rm = &( context->encoded_mod_rm ); /* Check if one byte VEX encoding can be used.*/ fcml_bool is_vex = FCML_DEF_PREFIX_VEX_REQ( addr_mode_def->allowed_prefixes ); /* Remember, the 2-byte VEX implies a leading 0Fh opcode byte, it's why "m-mmmm" field should be 1.*/ fcml_bool is_two_bytes_vex = ( !context->assembler_context->configuration.force_three_byte_VEX && is_vex && epf->mmmm == 0x01 && !FCML_DEF_PREFIX_W_1( addr_mode_def->allowed_prefixes ) && !encoded_mod_rm->ext_x && !encoded_mod_rm->ext_b ); fcml_uint8_t prefix_bytes[3]; fcml_uint8_t prefix_size = 0; /* Encode PP.*/ fcml_uint8_t pp = 0; if ( FCML_DEF_PREFIX_MANDATORY_66( addr_mode_def->allowed_prefixes ) ) { pp = 0x01; } else if ( FCML_DEF_PREFIX_MANDATORY_F2( addr_mode_def->allowed_prefixes ) ) { pp = 0x03; } else if ( FCML_DEF_PREFIX_MANDATORY_F3( addr_mode_def->allowed_prefixes ) ) { pp = 0x02; } fcml_uint8_t prefix = 0; /* If an instruction syntax can be encoded using the two-byte form, it can also be encoded using the three byte form of VEX.*/ /* Three byte VEX can be forced using configuration or "long_form" instruction level hint.*/ if ( context->assembler_context->configuration.force_three_byte_VEX || ( context->instruction->hints & FCML_HINT_LONG_FORM_POINTER ) ) { is_two_bytes_vex = FCML_FALSE; } if ( is_two_bytes_vex ) { /* Two bytes VEX prefix.*/ prefix = FCML_ENCODE_VEXOP_R( prefix, encoded_mod_rm->ext_r ); prefix = FCML_ENCODE_VEXOP_VVVV( prefix, epf->vvvv ); if ( context->optimizer_processing_details.l.is_not_null ) { prefix = FCML_ENCODE_VEXOP_L( prefix, context->optimizer_processing_details.l.value ); } prefix = FCML_ENCODE_VEXOP_PP( prefix, pp ); prefix_bytes[0] = 0xC5; prefix_bytes[1] = prefix; prefix_size = 2; } else { /* Three bytes VEX or XOP prefix. */ prefix_bytes[0] = ( is_vex ) ? 0xC4 : 0x8F; prefix = FCML_ENCODE_VEXOP_R( prefix, encoded_mod_rm->ext_r ); prefix = FCML_ENCODE_VEXOP_X( prefix, encoded_mod_rm->ext_x ); prefix = FCML_ENCODE_VEXOP_B( prefix, encoded_mod_rm->ext_b ); prefix = FCML_ENCODE_VEXOP_MMMM( prefix, epf->mmmm ); prefix_bytes[1] = prefix; prefix = 0; prefix = FCML_ENCODE_VEXOP_W( prefix, FCML_DEF_PREFIX_W_1( addr_mode_def->allowed_prefixes ) ); prefix = FCML_ENCODE_VEXOP_VVVV( prefix, epf->vvvv ); if ( context->optimizer_processing_details.l.is_not_null ) { prefix = FCML_ENCODE_VEXOP_L( prefix, context->optimizer_processing_details.l.value ); } prefix = FCML_ENCODE_VEXOP_PP( prefix, pp ); prefix_bytes[2] = prefix; prefix_size = 3; } int i; for ( i = 0; i < prefix_size; i++ ) { instruction_part->code[i] = prefix_bytes[i]; } instruction_part->code_length = prefix_size; } return FCML_CEH_GEC_NO_ERROR; } fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_VEX_XOP_prefix_encoder( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; if ( FCML_DEF_PREFIX_VEX_REQ( addr_mode->allowed_prefixes ) || FCML_DEF_PREFIX_XOP_REQ( addr_mode->allowed_prefixes ) ) { descriptor.processor_type = FCML_IEN_ASM_IPPT_ENCODER; descriptor.processor_args = NULL; descriptor.processor_encoder = fcml_ifn_asm_instruction_part_processor_VEX_XOP_prefix_encoder; descriptor.processor_acceptor = NULL; } return descriptor; } /* REX prefix.*/ fcml_ceh_error fcml_ifn_asm_instruction_part_processor_REX_prefix_encoder( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr args ) { if ( phase == FCML_IEN_ASM_IPPP_FIRST_PHASE ) { if ( FCML_DEF_PREFIX_W_1( addr_mode_def->allowed_prefixes ) ) { context->optimizer_processing_details.eosa = FCML_DS_64; } } if ( phase == FCML_IEN_ASM_IPPP_THIRD_PHASE ) { /* REX prefix is only available in 64 bit mode. Neither VEX nor XOP are allowed here,*/ /* but it's checked before this encoder is registered for*/ if ( context->assembler_context->entry_point.op_mode == FCML_OM_64_BIT ) { fcml_uint8_t rex = FCML_ENCODE_REX_BASE; fcml_st_asm_optimizer_processing_details *size_flags = &( context->optimizer_processing_details ); fcml_st_encoded_modrm *encoded_mod_rm = &( context->encoded_mod_rm ); fcml_st_modrm *mod_rm = &( context->mod_rm ); /* W field.*/ fcml_usize eosa = size_flags->eosa; if ( FCML_DEF_PREFIX_W_1( addr_mode_def->allowed_prefixes ) ) { if ( eosa != 0 && eosa != FCML_DS_64 ) { /* Operand size should be 64 bits.*/ return FCML_CEH_GEC_INVALID_OPPERAND_SIZE; } rex = FCML_ENCODE_REX_W( rex, 1 ); } else if ( eosa == FCML_DS_64 && !FCML_DEF_OPCODE_FLAGS_FORCE_64BITS_EOSA( addr_mode_def->opcode_flags ) && !FCML_DEF_OPCODE_FLAGS_64BITS_EOSA_BY_DEFAULT( addr_mode_def->opcode_flags ) ) { /* When OSA is forced to 64 bits, W flag is needless.*/ rex = FCML_ENCODE_REX_W( rex, 1 ); } /* Fields.*/ rex = FCML_ENCODE_REX_R( rex, encoded_mod_rm->ext_r ); rex = FCML_ENCODE_REX_X( rex, encoded_mod_rm->ext_x ); rex = FCML_ENCODE_REX_B( rex, encoded_mod_rm->ext_b ); rex = FCML_ENCODE_REX_B( rex, context->opcode_reg.ext_b ); /* Assembler configuration.*/ fcml_st_assembler_conf *cfg = &( context->assembler_context->configuration ); /* Even if REX do not contains any flags set in some cases registers BPL, SPL, DIL, SIL needs REX to be defined.*/ /* Additionally we can force it to occur by setting a configuration flag.*/ if ( rex != FCML_ENCODE_REX_BASE || ( FCML_DEF_OPCODE_FLAGS_OPCODE_IS_MODRM( addr_mode_def->opcode_flags ) && cfg->force_rex_prefix ) || mod_rm->reg_opcode_needs_rex || context->reg_opcode_needs_rex ) { instruction_part->code[0] = rex; instruction_part->code_length = 1; } } } return FCML_CEH_GEC_NO_ERROR; } fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_REX_prefix_encoder( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; /* 66 prefix can be applied to instructions without neither XOP nor VEX prefixes. Remember that this prefix can bes mandatory one.*/ if ( FCML_DEF_OPCODE_FLAGS_64_BIT_MODE_SUPPORTED( addr_mode->opcode_flags ) && !( FCML_DEF_PREFIX_VEX_REQ( addr_mode->allowed_prefixes ) || FCML_DEF_PREFIX_XOP_REQ( addr_mode->allowed_prefixes ) ) ) { descriptor.processor_type = FCML_IEN_ASM_IPPT_ENCODER; descriptor.processor_args = NULL; descriptor.processor_encoder = fcml_ifn_asm_instruction_part_processor_REX_prefix_encoder; descriptor.processor_acceptor = NULL; } return descriptor; } /*****************************/ /* ModR/M encoder factories. */ /*****************************/ fcml_ceh_error fcml_ifn_asm_instruction_part_rip_post_processor( fcml_ist_asm_encoding_context *context, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr post_processor_args ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_assembler_context *assembler_context = context->assembler_context; fcml_st_encoded_modrm *encoded_mod_rm = &( context->encoded_mod_rm ); if ( !context->instruction_size.is_not_null ) { /* Should never happened.*/ FCML_TRACE_MSG( "instruction can not be null here." ); error = FCML_CEH_GEC_INTERNAL_ERROR; } else { /* Encode ModR/M and displacement.*/ fcml_st_memory_stream stream = fcml_ifn_asm_instruction_part_stream( instruction_part ); fcml_fn_stream_write( &stream, encoded_mod_rm->modrm ); error = fcml_fn_modrm_encode_rip_offset( &stream, assembler_context->entry_point.ip, context->instruction_size.value, encoded_mod_rm ); } return error; } fcml_ceh_error fcml_ifn_asm_instruction_part_processor_ModRM_encoder( fcml_ien_asm_part_processor_phase phase, fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_ist_asm_instruction_part *instruction_part, fcml_ptr args ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_assembler_context *assembler_context = context->assembler_context; if ( phase == FCML_IEN_ASM_IPPP_SECOND_PHASE ) { fcml_st_modrm_encoder_context ctx; ctx.op_mode = assembler_context->entry_point.op_mode; /* Hints have higher precedence than configuration.*/ /* Chooses relative or absolute addressing. Configuration as well as rel/abs hints take*/ /* effect only in 64 bit addressing mode.*/ ctx.choose_rip_encoding = !assembler_context->configuration.choose_abs_encoding; ctx.choose_sib_encoding = assembler_context->configuration.choose_sib_encoding; if ( context->is_sib_alternative_hint ) { ctx.choose_sib_encoding = FCML_TRUE; /* SIB hint has higher precedence than RIP configuration. There is no way to encode RIP using SIB, so*/ /* RIP flag has to be cleared in order to encode absolute offset using requested SIB encoding.*/ ctx.choose_rip_encoding = FCML_FALSE; } if ( context->is_rel_alternative_hint ) { /* RIP encoding has been forced by using "rel" hint.*/ ctx.choose_rip_encoding = FCML_TRUE; } if ( context->is_abs_alternative_hint ) { /* Absolute offset encoding has been forced by using "abs" hint.*/ ctx.choose_rip_encoding = FCML_FALSE; } ctx.chosen_effective_address_size = 0; ctx.effective_address_size = fcml_ifn_asm_get_effective_address_size( context ); ctx.is_sib_alternative = FCML_FALSE; if ( FCML_DEF_OPCODE_FLAGS_OPCODE_IS_EXT( addr_mode_def->opcode_flags ) ) { context->mod_rm.reg_opcode = FCML_DEF_OPCODE_FLAGS_OPCODE_EXT( addr_mode_def->opcode_flags ); } /* Encodes ModR/M bytes.*/ error = fcml_fn_modrm_encode( &ctx, &( context->mod_rm ), &( context->encoded_mod_rm ) ); if ( !error ) { if ( context->optimizer_processing_details.easa == ctx.chosen_effective_address_size ) { if ( context->encoded_mod_rm.is_rip && !context->encoded_mod_rm.is_rip_encoded ) { /* ModR/M + 4bytes displacement.*/ instruction_part->code_length = 5; instruction_part->post_processor = fcml_ifn_asm_instruction_part_rip_post_processor; instruction_part->post_processor_args = NULL; } else { fcml_st_memory_stream stream = fcml_ifn_asm_instruction_part_stream( instruction_part ); fcml_st_encoded_modrm *encoded_modrm = &( context->encoded_mod_rm ); fcml_fn_stream_write( &stream, encoded_modrm->modrm ); if ( encoded_modrm->sib.is_not_null ) { fcml_fn_stream_write( &stream, encoded_modrm->sib.value ); } if ( encoded_modrm->displacement_size ) { fcml_fn_stream_write_bytes( &stream, &( encoded_modrm->displacement ), encoded_modrm->displacement_size ); } instruction_part->code_length = stream.offset; } context->is_sib_alternative_encoding = ctx.is_sib_alternative; } else { /* ModRM encoded to the form not supported by current addressing mode. For example, addressing mode needs ASA 32, but asembled ModRM required 16 bit ASA.*/ error = FCML_CEH_GEC_INVALID_ADDRESS_SIZE; } } } return error; } fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_ModRM_encoder( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; /* Check if instruction has ModR/M byte.*/ if ( FCML_DEF_OPCODE_FLAGS_OPCODE_IS_MODRM( addr_mode->opcode_flags ) ) { descriptor.processor_type = FCML_IEN_ASM_IPPT_ENCODER; descriptor.processor_args = NULL; descriptor.processor_encoder = fcml_ifn_asm_instruction_part_processor_ModRM_encoder; descriptor.processor_acceptor = NULL; } return descriptor; } /*******************************/ /* Addressing mode validators. */ /*******************************/ fcml_ceh_error fcml_ifn_asm_instruction_part_processor_addr_mode_acceptor( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_st_instruction *instruction, fcml_ptr args ) { fcml_en_operating_mode op_mode = context->assembler_context->entry_point.op_mode; if ( !FCML_DEF_OPCODE_FLAGS_64_BIT_MODE_SUPPORTED( addr_mode_def->opcode_flags ) && op_mode == FCML_OM_64_BIT ) { return FCML_CEH_GEC_INVALID_OPERATING_MODE; } else if ( !FCML_DEF_OPCODE_FLAGS_16_32_BIT_MODE_SUPPORTED( addr_mode_def->opcode_flags ) && ( op_mode == FCML_OM_16_BIT || op_mode == FCML_OM_32_BIT ) ) { return FCML_CEH_GEC_INVALID_OPERATING_MODE; } /* Set restrictions if there are any.*/ if ( addr_mode_details->allowed_osa != FCML_EN_ASF_ANY ) { context->optimizer_processing_details.allowed_eosa.flags = addr_mode_details->allowed_osa; context->optimizer_processing_details.allowed_eosa.is_set = FCML_TRUE; } if ( addr_mode_details->allowed_asa != FCML_EN_ASF_ANY ) { context->optimizer_processing_details.allowed_easa.flags = addr_mode_details->allowed_asa; context->optimizer_processing_details.allowed_easa.is_set = FCML_TRUE; } /* Force 64 bit OSA in 64 bit addressing mode.*/ if ( op_mode == FCML_OM_64_BIT ) { if ( FCML_DEF_OPCODE_FLAGS_FORCE_64BITS_EOSA( addr_mode_def->opcode_flags ) ) { context->optimizer_processing_details.allowed_eosa.flags = FCML_EN_ASF_64; context->optimizer_processing_details.allowed_eosa.is_set = FCML_TRUE; } else if ( FCML_DEF_OPCODE_FLAGS_64BITS_EOSA_BY_DEFAULT( addr_mode_def->opcode_flags ) ) { /* Remember, if 64 bit EOSA is used by default it can be overridden to 16 bits only. */ context->optimizer_processing_details.allowed_eosa.flags = ( FCML_EN_ASF_64 | FCML_EN_ASF_16 ); context->optimizer_processing_details.allowed_eosa.is_set = FCML_TRUE; } } return FCML_CEH_GEC_NO_ERROR; } fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_addr_mode_acceptor( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; descriptor.processor_type = FCML_IEN_ASM_IPPT_VERIFIER; descriptor.processor_args = NULL; descriptor.processor_encoder = NULL; descriptor.processor_acceptor = fcml_ifn_asm_instruction_part_processor_addr_mode_acceptor; return descriptor; } /************************/ /* Prefixes validators. */ /************************/ fcml_ceh_error fcml_ifn_asm_instruction_part_processor_prefixes_acceptor( fcml_ist_asm_encoding_context *context, fcml_ist_asm_addr_mode_desc_details *addr_mode_details, fcml_st_def_addr_mode_desc *addr_mode_def, fcml_st_instruction *instruction, fcml_ptr args ) { /* Check if LOCK prefix is allowed for given addressing mode.*/ if ( instruction->prefixes ) { if ( ( instruction->prefixes & FCML_PREFIX_LOCK ) && !FCML_DEF_PREFIX_LOCK_ALLOWED( addr_mode_def->allowed_prefixes ) ) { return FCML_CEH_GEC_INVALID_PREFIX; } /* Check if REP prefix is allowed for given addressing mode.*/ if ( ( instruction->prefixes & FCML_PREFIX_REP ) && !FCML_DEF_PREFIX_REP_XRELEASE_ALLOWED( addr_mode_def->allowed_prefixes ) ) { return FCML_CEH_GEC_INVALID_PREFIX; } /* Check if REPNE prefix is allowed for given addressing mode.*/ if ( ( instruction->prefixes & FCML_PREFIX_REPNE ) && !FCML_DEF_PREFIX_REPNE_XACQUIRE_ALLOWED( addr_mode_def->allowed_prefixes ) ) { return FCML_CEH_GEC_INVALID_PREFIX; } /* Check if XACQUIRED prefix is allowed for given addressing mode.*/ if ( ( instruction->prefixes & FCML_PREFIX_XACQUIRE ) && ( !FCML_DEF_PREFIX_HLE_ENABLED( addr_mode_def->allowed_prefixes ) || !FCML_DEF_PREFIX_REPNE_XACQUIRE_ALLOWED( addr_mode_def->allowed_prefixes ) ) ) { return FCML_CEH_GEC_INVALID_PREFIX; } /* Check if XRELEASE prefix is allowed for given addressing mode.*/ if ( ( instruction->prefixes & FCML_PREFIX_XRELEASE ) && ( !FCML_DEF_PREFIX_HLE_ENABLED( addr_mode_def->allowed_prefixes ) || !FCML_DEF_PREFIX_REP_XRELEASE_ALLOWED( addr_mode_def->allowed_prefixes ) ) ) { return FCML_CEH_GEC_INVALID_PREFIX; } } return FCML_CEH_GEC_NO_ERROR; } fcml_ist_asm_instruction_part_processor_descriptor fcml_ifn_asm_instruction_part_processor_factory_prefixes_acceptor( fcml_uint32_t flags, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_hints *hints, fcml_ceh_error *error ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = { 0 }; descriptor.processor_type = FCML_IEN_ASM_IPPT_VERIFIER; descriptor.processor_args = NULL; descriptor.processor_encoder = NULL; descriptor.processor_acceptor = fcml_ifn_asm_instruction_part_processor_prefixes_acceptor; return descriptor; } /********************************************/ /* Instruction parts factories definitions. */ /********************************************/ typedef struct fcml_ist_asm_instruction_part_factory_details { fcml_ifp_asm_instruction_part_processor_factory factory; fcml_uint32_t flags; } fcml_ist_asm_instruction_part_factory_details; typedef enum fcml_ist_instruction_part_choice_type { FCML_IPCT_ONE, FCML_IPCT_ALL, } fcml_ist_instruction_part_choice_type; typedef struct fcml_ist_asm_instruction_part_factory_sequence { fcml_ist_asm_instruction_part_factory_details *details; fcml_ist_instruction_part_choice_type choice_type; fcml_bool is_short_form_supported; } fcml_ist_asm_instruction_part_factory_sequence; /* List of instruction part encoders for instruction opcode.*/ fcml_ist_asm_instruction_part_factory_details fcml_iarr_asm_instruction_part_processor_factories_opcode_for_IA[] = { { fcml_ifn_asm_instruction_part_processor_factory_XOP_VEX_opcode_encoder, 0 }, { fcml_ifn_asm_instruction_part_processor_factory_reg_opcode_encoder, 0 }, { fcml_ifn_asm_instruction_part_processor_factory_conditional_opcode_encoder, 0 }, { fcml_ifn_asm_instruction_part_processor_factory_simple_opcode_encoder, 0 }, { NULL, 0 } }; /* List of instruction addressing mode acceptors.*/ fcml_ist_asm_instruction_part_factory_details fcml_iarr_asm_instruction_part_processor_factories_acceptors_IA[] = { { fcml_ifn_asm_instruction_part_processor_factory_addr_mode_acceptor, 0 }, { fcml_ifn_asm_instruction_part_processor_factory_prefixes_acceptor, 0 }, { NULL, 0 } }; /* List of instruction part encoders for instruction prefixes.*/ fcml_ist_asm_instruction_part_factory_details fcml_iarr_asm_instruction_part_processor_factories_prefixes_for_IA[] = { { fcml_ifn_asm_instruction_part_processor_factory_branch_hints_prefix_encoder, 0 }, { fcml_ifn_asm_instruction_part_processor_factory_rep_prefix_encoder, 0 }, { fcml_ifn_asm_instruction_part_processor_factory_repne_prefix_encoder, 0 }, { fcml_ifn_asm_instruction_part_processor_factory_hle_prefixes_encoder, 0 }, { fcml_ifn_asm_instruction_part_processor_factory_lock_prefix_encoder, 0 }, { fcml_ifn_asm_instruction_part_processor_factory_segment_override_prefix_encoder, 0 }, { fcml_ifn_asm_instruction_part_processor_factory_66_prefix_encoder, 0 }, { fcml_ifn_asm_instruction_part_processor_factory_67_prefix_encoder, 0 }, { fcml_ifn_asm_instruction_part_processor_factory_mandatory_prefixes_encoder, 0 }, { fcml_ifn_asm_instruction_part_processor_factory_REX_prefix_encoder, 0 }, { fcml_ifn_asm_instruction_part_processor_factory_VEX_XOP_prefix_encoder, 0 }, { NULL, 0 } }; /* ModR/M byte encoder.*/ fcml_ist_asm_instruction_part_factory_details fcml_iarr_asm_instruction_part_processor_factories_ModRM_for_IA[] = { { fcml_ifn_asm_instruction_part_processor_factory_ModRM_encoder, 0 }, { NULL, 0 } }; /* List of instruction part encoders for instruction operands.*/ fcml_ist_asm_instruction_part_factory_details fcml_iarr_asm_instruction_part_processor_factories_operands_for_IA[] = { { fcml_ifn_asm_instruction_part_processor_factory_operand_encoder_wrapper, 0 }, { fcml_ifn_asm_instruction_part_processor_factory_operand_encoder_wrapper, 1 }, { fcml_ifn_asm_instruction_part_processor_factory_operand_encoder_wrapper, 2 }, { fcml_ifn_asm_instruction_part_processor_factory_operand_encoder_wrapper, 3 }, { fcml_ifn_asm_instruction_part_processor_factory_operand_encoder_wrapper, 4 }, { NULL, 0 } }; fcml_ist_asm_instruction_part_factory_details fcml_iarr_asm_instruction_part_processor_factories_suffixes_for_IA[] = { { fcml_ifn_asm_instruction_part_processor_factory_suffix_encoder, 0 }, { NULL, 0 } }; fcml_ist_asm_instruction_part_factory_sequence fcml_iarr_asm_instruction_part_processor_factory_sequences_for_IA[] = { { fcml_iarr_asm_instruction_part_processor_factories_acceptors_IA, FCML_IPCT_ALL, FCML_TRUE }, { fcml_iarr_asm_instruction_part_processor_factories_prefixes_for_IA, FCML_IPCT_ALL, FCML_TRUE }, { fcml_iarr_asm_instruction_part_processor_factories_opcode_for_IA, FCML_IPCT_ONE, FCML_TRUE }, { fcml_iarr_asm_instruction_part_processor_factories_ModRM_for_IA, FCML_IPCT_ALL, FCML_FALSE }, { fcml_iarr_asm_instruction_part_processor_factories_operands_for_IA, FCML_IPCT_ALL, FCML_FALSE }, { fcml_iarr_asm_instruction_part_processor_factories_suffixes_for_IA, FCML_IPCT_ALL, FCML_FALSE }, { NULL } }; fcml_ist_asm_instruction_part_processor_chain* fcml_ifn_asm_instruction_part_processor_factory_dispatcher_IA( fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, int *parts, fcml_hints *hints, fcml_ceh_error *error ) { int instruction_parts = 0; fcml_ist_asm_instruction_part_processor_chain *chain = NULL; fcml_ist_asm_instruction_part_processor_chain *current_chain = NULL; fcml_ist_asm_instruction_part_factory_sequence *current_factories_sequence = &fcml_iarr_asm_instruction_part_processor_factory_sequences_for_IA[0]; while ( current_factories_sequence->details ) { int processor_counter = 0; fcml_ist_instruction_part_choice_type choice = current_factories_sequence->choice_type; fcml_ist_asm_instruction_part_factory_details *current_factory = current_factories_sequence->details; while ( current_factory->factory ) { fcml_ist_asm_instruction_part_processor_descriptor descriptor = current_factory->factory( current_factory->flags, instruction, addr_mode, hints, error ); if ( descriptor.processor_encoder || descriptor.processor_acceptor ) { processor_counter++; descriptor.is_short_form_supported = current_factories_sequence->is_short_form_supported; /* Check max number of the instruction part processors.*/ if ( processor_counter > FCML_ASM_MAX_PART_PROCESSORS ) { FCML_TRACE_MSG("Max number of instructions part processors has been reached."); *error = FCML_CEH_GEC_INTERNAL_ERROR; /* Free processor arguments if there are any in the descriptor. */ if ( descriptor.processor_args_deallocator ) { descriptor.processor_args_deallocator( descriptor.processor_args ); } fcml_ifn_asm_free_part_processor_chain( chain ); return NULL; } /* Allocate chain element for new instruction part encoder.*/ fcml_ist_asm_instruction_part_processor_chain *new_chain = (fcml_ist_asm_instruction_part_processor_chain*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_ist_asm_instruction_part_processor_chain) ); if ( !new_chain ) { *error = FCML_CEH_GEC_OUT_OF_MEMORY; if ( descriptor.processor_args_deallocator ) { descriptor.processor_args_deallocator( descriptor.processor_args ); } fcml_ifn_asm_free_part_processor_chain( chain ); return NULL; } if ( !chain ) { chain = new_chain; current_chain = new_chain; } else { current_chain->next_processor = new_chain; current_chain = new_chain; } current_chain->processor_descriptor = descriptor; if ( descriptor.processor_type == FCML_IEN_ASM_IPPT_ENCODER ) { instruction_parts++; } if ( choice == FCML_IPCT_ONE ) { break; } } if ( *error ) { fcml_ifn_asm_free_part_processor_chain( chain ); return NULL; } current_factory++; } current_factories_sequence++; } *parts = instruction_parts; return chain; } fcml_ifp_asm_instruction_part_processor_factory_dispatcher fcml_ifn_get_instruction_part_processor_factory_dispatcher_for_instruction_type( fcml_en_def_instruction_type instruction_type ) { fcml_ifp_asm_instruction_part_processor_factory_dispatcher dispatcher = NULL; switch ( instruction_type ) { case FCML_EN_IT_IA: dispatcher = fcml_ifn_asm_instruction_part_processor_factory_dispatcher_IA; break; } return dispatcher; } /* Default data size calculator. */ typedef struct fcml_ist_asm_def_data_size_calc_args { fcml_int mem_index; fcml_int reg_index; } fcml_ist_asm_def_data_size_calc_args; fcml_usize fcml_ifp_asm_default_reg_based_memory_data_size_calculator( fcml_st_instruction *instruction, fcml_ptr args ) { fcml_usize data = FCML_DS_UNDEF; fcml_ist_asm_def_data_size_calc_args *dsc_args = (fcml_ist_asm_def_data_size_calc_args*) args; if ( instruction->operands_count >= dsc_args->reg_index + 1 ) { fcml_st_operand *operand = &( instruction->operands[dsc_args->reg_index] ); if ( operand->type == FCML_OT_REGISTER ) { return operand->reg.size; } } return data; } fcml_ceh_error fcml_ifn_asm_prepare_mem_data_size_calculator( fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_ist_asm_addr_mode_desc_details *details ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_int mem_index = -1; fcml_int reg_index = -1; /* Just in case.*/ details->ds_calculator = NULL; details->ds_calculator_args = NULL; fcml_int i; for ( i = 0; i < FCML_OPERANDS_COUNT; i++ ) { fcml_uint32_t addr_mode = addr_mode_desc->opperands[i]; if ( addr_mode == FCML_NA ) { break; } if ( FCMP_DEF_IS_ADDR_MODE( FCML_GET_ADDR_MODE( addr_mode ), FCML_OP_RM_BASE ) ) { fcml_st_def_decoded_addr_mode *dec_addr_mode = fcml_fn_def_decode_addr_mode_args( addr_mode, &error ); if ( error ) { return error; } fcml_sf_def_tma_rm *rm_args = (fcml_sf_def_tma_rm*) dec_addr_mode->addr_mode_args; if ( !rm_args ) { return FCML_CEH_GEC_OUT_OF_MEMORY; } if ( rm_args->flags & FCML_RMF_M ) { mem_index = i; } fcml_fnp_def_free_addr_mode( dec_addr_mode ); } if ( FCMP_DEF_IS_ADDR_MODE( FCML_GET_ADDR_MODE( addr_mode ), FCML_OP_R_BASE ) || FCMP_DEF_IS_ADDR_MODE( FCML_GET_ADDR_MODE( addr_mode ), FCML_OP_OPCODE_REG_BASE ) || FCMP_DEF_IS_ADDR_MODE( FCML_GET_ADDR_MODE( addr_mode ), FCML_OP_EXPLICIT_REG_BASE ) || FCMP_DEF_IS_ADDR_MODE( FCML_GET_ADDR_MODE( addr_mode ), FCML_OP_VEX_VVVV_REG_BASE ) ) { reg_index = i; } } if ( mem_index != -1 && reg_index != -1 ) { fcml_ist_asm_def_data_size_calc_args *args = (fcml_ist_asm_def_data_size_calc_args*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_ist_asm_def_data_size_calc_args) ); if ( !args ) { return FCML_CEH_GEC_OUT_OF_MEMORY; } args->mem_index = mem_index; args->reg_index = reg_index; details->ds_calculator = &fcml_ifp_asm_default_reg_based_memory_data_size_calculator; details->ds_calculator_args = args; } return error; } /* Precalculates some data using given addressing mode. By precalculating them we can * get some performance benefits further. */ fcml_ceh_error fcml_ifn_asm_precalculate_addr_mode( fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_ist_asm_addr_mode_desc_details *details ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_uint16_t allowed_prefixes = addr_mode_desc->allowed_prefixes; fcml_uint32_t opcode_flags = addr_mode_desc->opcode_flags; /* Calculate OSA and ASA flags.*/ fcml_flags osa_flags = FCML_EN_ASF_ANY; fcml_flags asa_flags = FCML_EN_ASF_ANY; if ( !( addr_mode_desc->instruction_group & FCML_AMT_SIMD ) ) { if ( FCML_DEF_PREFIX_W_1( allowed_prefixes ) ) { osa_flags |= FCML_EN_ASF_64; asa_flags |= ( FCML_EN_ASF_32 | FCML_EN_ASF_64 ); } if ( FCML_DEF_PREFIX_W_0( allowed_prefixes ) ) { osa_flags |= ( FCML_EN_ASF_32 | FCML_EN_ASF_16 ); } } if ( FCML_DEF_OPCODE_FLAGS_IS_EOSA_RESTRICTION( opcode_flags ) ) { fcml_flags osa_restriction_flags = FCML_EN_ASF_ANY; if ( FCML_DEF_OPCODE_FLAGS_EOSA_16( opcode_flags ) ) { osa_restriction_flags |= FCML_EN_ASF_16; } if ( FCML_DEF_OPCODE_FLAGS_EOSA_32( opcode_flags ) ) { osa_restriction_flags |= FCML_EN_ASF_32; } if ( FCML_DEF_OPCODE_FLAGS_EOSA_64( opcode_flags ) ) { osa_restriction_flags |= FCML_EN_ASF_64; } osa_flags = ( osa_flags == FCML_EN_ASF_ANY ) ? osa_restriction_flags : osa_flags & osa_restriction_flags; } if ( FCML_DEF_OPCODE_FLAGS_IS_EASA_RESTRICTION( opcode_flags ) ) { fcml_flags asa_restriction_flags = FCML_EN_ASF_ANY; if ( FCML_DEF_OPCODE_FLAGS_EASA_16( opcode_flags ) ) { asa_restriction_flags |= FCML_EN_ASF_16; } if ( FCML_DEF_OPCODE_FLAGS_EASA_32( opcode_flags ) ) { asa_restriction_flags |= FCML_EN_ASF_32; } if ( FCML_DEF_OPCODE_FLAGS_EASA_64( opcode_flags ) ) { asa_restriction_flags |= FCML_EN_ASF_64; } asa_flags = ( asa_flags == FCML_EN_ASF_ANY ) ? asa_restriction_flags : asa_flags & asa_restriction_flags; } /* Sets calculated values in details.*/ details->allowed_asa = asa_flags; details->allowed_osa = osa_flags; return error; } void fcml_ifn_asm_free_instruction_addr_mode_item_handler( fcml_ptr item_value, fcml_ptr args ) { fcml_ist_asm_instruction_addr_mode_encoding_details *addr_mode = (fcml_ist_asm_instruction_addr_mode_encoding_details*) item_value; /* Do not free clones. Processor chains and calculator arguments are shared. */ if ( !addr_mode->is_cloned ) { /* Free processor chain.*/ if ( addr_mode->part_processor_chain ) { fcml_ifn_asm_free_part_processor_chain( addr_mode->part_processor_chain ); } /* Free arguments allocated for memory data size calculator if there are any.*/ if ( addr_mode->addr_mode_details.ds_calculator_args ) { fcml_fn_env_memory_free( addr_mode->addr_mode_details.ds_calculator_args ); } } fcml_st_dialect_context_int *dialect_context = (fcml_st_dialect_context_int*) args; /* Free all mnemonics.*/ if ( addr_mode->mnemonic ) { dialect_context->free_mnemonic( addr_mode->mnemonic ); } fcml_fn_env_memory_free( addr_mode ); } void fcml_ifn_asm_free_instruction_entry( fcml_ptr key, fcml_ptr value, fcml_ptr args ) { fcml_st_asm_instruction_addr_modes *addr_modes = (fcml_st_asm_instruction_addr_modes*) value; if ( addr_modes ) { if ( addr_modes->addr_modes ) { fcml_fn_coll_list_free( addr_modes->addr_modes, fcml_ifn_asm_free_instruction_addr_mode_item_handler, args ); } fcml_fn_env_memory_free( addr_modes ); } } fcml_fnp_asm_instruction_encoder fcml_ifn_asm_choose_instruction_encoder( fcml_en_def_instruction_type instruction_type ) { fcml_fnp_asm_instruction_encoder encoder = NULL; switch ( instruction_type ) { case FCML_EN_IT_IA: encoder = fcml_ifn_asm_instruction_encoder_IA; break; } return encoder; } /* *******************************************/ /* Addressing mode encoding details builders.*/ /* *******************************************/ typedef fcml_ceh_error (*fcml_ifp_asm_instruction_addr_mode_encoding_details_handler)( fcml_ist_asm_init_context *init_context, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_ist_asm_instruction_addr_mode_encoding_details *addr_mode ); typedef fcml_ceh_error (*fcml_ifp_asm_addr_mode_encoding_details_builder)( fcml_ist_asm_init_context *init_context, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_ifp_asm_instruction_addr_mode_encoding_details_handler addr_mode_handler ); typedef void (*fcml_ifp_asm_generic_addr_mode_encoding_details_enricher)( fcml_ist_asm_instruction_addr_mode_encoding_details *addr_mode, fcml_ptr args ); fcml_ceh_error fcml_ifn_asm_generic_addr_mode_encoding_details_builder( fcml_ist_asm_init_context *init_context, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_ifp_asm_instruction_addr_mode_encoding_details_handler addr_mode_handler, fcml_ifp_asm_generic_addr_mode_encoding_details_enricher enricher, fcml_ptr enricher_args ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_ist_asm_instruction_addr_mode_encoding_details *addr_mode = (fcml_ist_asm_instruction_addr_mode_encoding_details *) fcml_fn_env_memory_alloc_clear( sizeof(fcml_ist_asm_instruction_addr_mode_encoding_details) ); if ( !addr_mode ) { return FCML_CEH_GEC_OUT_OF_MEMORY; } /* Copy instruction hints from instruction form definition. */ addr_mode->hints = addr_mode_desc->instruction_hints; addr_mode->addr_mode_desc = addr_mode_desc; /* Prepare addressing mode details.*/ error = fcml_ifn_asm_precalculate_addr_mode( addr_mode_desc, &( addr_mode->addr_mode_details ) ); if ( error ) { fcml_fn_env_memory_free( addr_mode ); return error; } error = fcml_ifn_asm_prepare_mem_data_size_calculator( addr_mode_desc, &( addr_mode->addr_mode_details ) ); if ( error ) { fcml_fn_env_memory_free( addr_mode ); return error; } if ( enricher ) { enricher( addr_mode, enricher_args ); } int instruction_parts; fcml_ifp_asm_instruction_part_processor_factory_dispatcher factory_dispatcher = fcml_ifn_get_instruction_part_processor_factory_dispatcher_for_instruction_type( instruction->instruction_type ); addr_mode->part_processor_chain = factory_dispatcher( instruction, addr_mode_desc, &instruction_parts, &( addr_mode->hints ), &error ); if ( !error ) { addr_mode->instruction_parts = instruction_parts; error = addr_mode_handler( init_context, instruction, addr_mode_desc, addr_mode ); if ( error ) { fcml_ifn_asm_free_part_processor_chain( addr_mode->part_processor_chain ); if ( addr_mode->addr_mode_details.ds_calculator_args ) { fcml_fn_env_memory_free( addr_mode->addr_mode_details.ds_calculator_args ); } fcml_fn_env_memory_free( addr_mode ); } } else { if ( addr_mode->addr_mode_details.ds_calculator_args ) { fcml_fn_env_memory_free( addr_mode->addr_mode_details.ds_calculator_args ); } fcml_fn_env_memory_free( addr_mode ); } return error; } typedef struct fcml_ist_sonditional_anricher_args { /* Instruction condition code. */ fcml_int condition_num; } fcml_ist_sonditional_anricher_args; void fcml_ifn_asm_generic_addr_more_conditional_enricher( fcml_ist_asm_instruction_addr_mode_encoding_details *addr_mode, fcml_ptr args ) { fcml_ist_sonditional_anricher_args *enricher_args = (fcml_ist_sonditional_anricher_args*) args; fcml_ist_asm_addr_mode_desc_details *addr_mode_details = &( addr_mode->addr_mode_details ); addr_mode_details->is_conditional = FCML_TRUE; addr_mode_details->condition.is_negation = ( enricher_args->condition_num % 2 == 1 ); addr_mode_details->condition.condition_type = (fcml_en_condition_type) ( enricher_args->condition_num / 2 ); } fcml_ceh_error fcml_ifn_asm_conditional_instruction_addr_mode_encoding_details_builder( fcml_ist_asm_init_context *init_context, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_ifp_asm_instruction_addr_mode_encoding_details_handler addr_mode_handler ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; int i; for ( i = 0; i < FCML_NUMBER_OF_CONDITIONS * 2 && !error; i++ ) { fcml_ist_sonditional_anricher_args enricher_args; enricher_args.condition_num = i; error = fcml_ifn_asm_generic_addr_mode_encoding_details_builder( init_context, instruction, addr_mode_desc, addr_mode_handler, &fcml_ifn_asm_generic_addr_more_conditional_enricher, &enricher_args ); } return error; } fcml_ceh_error fcml_ifn_asm_default_addr_mode_encoding_details_builder( fcml_ist_asm_init_context *init_context, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_ifp_asm_instruction_addr_mode_encoding_details_handler addr_mode_handler ) { return fcml_ifn_asm_generic_addr_mode_encoding_details_builder( init_context, instruction, addr_mode_desc, addr_mode_handler, NULL, NULL ); } fcml_ifp_asm_addr_mode_encoding_details_builder fcml_ifn_asm_conditional_instruction_addr_mode_encoding_details_builder_factory( fcml_st_def_addr_mode_desc *addr_mode_desc ) { if ( FCML_DEF_OPCODE_FLAGS_OPCODE_FIELD_TTTN( addr_mode_desc->opcode_flags ) ) { return &fcml_ifn_asm_conditional_instruction_addr_mode_encoding_details_builder; } return &fcml_ifn_asm_default_addr_mode_encoding_details_builder; } /* *******************************************/ /* Addressing mode encoding details handlers.*/ /* *******************************************/ fcml_ceh_error fcml_ifn_asm_encoded_handle_instruction_addr_mode_decoding( fcml_ist_asm_init_context *init_context, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_ist_asm_instruction_addr_mode_encoding_details *addr_mode ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; /* Space for mnemonics.*/ fcml_st_mp_mnemonic *mnemonics[FCML_ASM_DIALECT_MAX_MNEMONIC_COUNT]; /* Instruction can be registered for more than one mnemonic.*/ int mnemonic_count = 0; error = init_context->dialect_context->get_mnemonic( (fcml_st_dialect*) init_context->dialect_context, instruction, addr_mode_desc, addr_mode->addr_mode_details.is_conditional ? &( addr_mode->addr_mode_details.condition ) : NULL, mnemonics, &mnemonic_count ); if ( error ) { return error; } /* Prepare addressing mode encoders for every mnemonic. */ int i; for ( i = 0; i < mnemonic_count && !error; i++ ) { fcml_st_asm_instruction_addr_modes *addr_modes = (fcml_st_asm_instruction_addr_modes*) fcml_fn_coll_map_get( init_context->instructions_map, mnemonics[i]->mnemonic ); if ( !addr_modes ) { /* Allocate space for new mnemonic. */ addr_modes = (fcml_st_asm_instruction_addr_modes*) fcml_fn_env_memory_alloc( sizeof(fcml_st_asm_instruction_addr_modes) ); if ( addr_modes ) { /* Allocate list for addressing modes. */ addr_modes->addr_modes = fcml_fn_coll_list_alloc(); if ( addr_modes->addr_modes ) { /* Do not care about freeing this piece of memory. Procedure responsible for freeing addressing mode is responsible for it.*/ addr_modes->mnemonic = mnemonics[i]->mnemonic; addr_modes->instruction_encoder = fcml_ifn_asm_choose_instruction_encoder( instruction->instruction_type ); /* Puts prepared structure under mnemonic key.*/ fcml_int map_error; fcml_fn_coll_map_put( init_context->instructions_map, mnemonics[i]->mnemonic, addr_modes, &map_error ); if ( map_error ) { fcml_fn_coll_list_free( addr_modes->addr_modes, fcml_ifn_asm_free_instruction_addr_mode_item_handler, &( init_context->dialect_context ) ); fcml_fn_env_memory_free( addr_modes ); error = fcml_fn_utils_convert_map_error( map_error ); } } else { fcml_fn_env_memory_free( addr_modes ); error = FCML_CEH_GEC_OUT_OF_MEMORY; } } else { /* Out of memory.*/ error = FCML_CEH_GEC_OUT_OF_MEMORY; } } if ( !error ) { fcml_bool is_cloned = ( i > 0 ); fcml_ist_asm_instruction_addr_mode_encoding_details *addr_mode_encoding_details = addr_mode; addr_mode_encoding_details->instruction = instruction->instruction; if ( is_cloned ) { /* Clone encoding details for secondary mnemonics.*/ fcml_ist_asm_instruction_addr_mode_encoding_details *clone_addr_mode_enc_details = (fcml_ist_asm_instruction_addr_mode_encoding_details*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_ist_asm_instruction_addr_mode_encoding_details) ); if ( clone_addr_mode_enc_details ) { *clone_addr_mode_enc_details = *addr_mode_encoding_details; clone_addr_mode_enc_details->is_cloned = FCML_TRUE; addr_mode_encoding_details = clone_addr_mode_enc_details; } else { error = FCML_CEH_GEC_OUT_OF_MEMORY; } } /* Every addressing mode has its own mnemonic configuration, it doesn't matter if it is cloned addressing mode or not*/ /* it is responsible for deallocating it.*/ addr_mode_encoding_details->mnemonic = mnemonics[i]; if ( !error && !fcml_fn_coll_list_add_back( addr_modes->addr_modes, addr_mode_encoding_details ) ) { /* Free holder allocated earlier.*/ if ( is_cloned ) { fcml_fn_env_memory_free( addr_mode_encoding_details ); } error = FCML_CEH_GEC_OUT_OF_MEMORY; } } if ( error ) { /* In case of error free all mnemonics which haven't been added to the addressing mode list.*/ for ( ; i < mnemonic_count; i++ ) { fcml_fn_asm_dialect_free_mnemonic( mnemonics[i] ); } } } return error; } /* *****************************************/ /* Addressing mode encoders initialization.*/ /* *****************************************/ void fcml_ifn_asm_prepare_instruction_encoding_details( fcml_ist_asm_init_context *init_context, fcml_st_def_instruction_desc *instruction, fcml_ceh_error *error ) { /* Prepare encoders for given instruction.*/ int i; for ( i = 0; i < instruction->opcode_desc_count; i++ ) { fcml_st_def_addr_mode_desc *addr_mode_desc = &( instruction->addr_modes[i] ); fcml_ifp_asm_addr_mode_encoding_details_builder encoding_details_builder = fcml_ifn_asm_conditional_instruction_addr_mode_encoding_details_builder_factory( addr_mode_desc ); /* Prepare encoders for given addressing mode.*/ *error = encoding_details_builder( init_context, instruction, addr_mode_desc, &fcml_ifn_asm_encoded_handle_instruction_addr_mode_decoding ); if ( *error ) { break; } addr_mode_desc++; } } fcml_ceh_error fcml_fn_asm_init_instruction_encodings( fcml_st_dialect_context_int *dialect_context, fcml_coll_map *inst_map ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_coll_map instructions_map; /* Allocate map for all instructions.*/ fcml_st_coll_map_descriptor inst_map_desc = fcml_coll_map_descriptor_string; inst_map_desc.entry_free_function = fcml_ifn_asm_free_instruction_entry; inst_map_desc.entry_free_args = dialect_context; fcml_int map_error; instructions_map = fcml_fn_coll_map_alloc( &inst_map_desc, 64, &map_error ); if ( map_error ) { return fcml_fn_utils_convert_map_error( map_error ); } fcml_ist_asm_init_context init_context; init_context.dialect_context = dialect_context; init_context.instructions_map = instructions_map; int i = 0; fcml_st_def_instruction_desc *instruction = &( fcml_ext_instructions_def[i++] ); while ( instruction->mnemonic && !error ) { fcml_ifn_asm_prepare_instruction_encoding_details( &init_context, instruction, &error ); instruction = &( fcml_ext_instructions_def[i++] ); } if ( error ) { /* Something failed, so free everything that have been properly allocated.*/ fcml_fn_coll_map_free( instructions_map ); } *inst_map = instructions_map; return error; } void fcml_fn_asm_free_instruction_encodings( fcml_coll_map instructions_map ) { if ( instructions_map ) { fcml_fn_coll_map_free( instructions_map ); } } fcml_ceh_error fcml_fn_asm_get_instruction_encodings( fcml_coll_map instructions_map, fcml_string mnemonic, fcml_st_asm_instruction_addr_modes **addr_modes ) { if ( !instructions_map ) { return FCML_CEH_GEC_NOT_INITIALIZED; } *addr_modes = (fcml_st_asm_instruction_addr_modes*) fcml_fn_coll_map_get( instructions_map, mnemonic ); if ( !*addr_modes ) { return FCML_CEH_GEC_UNKNOWN_MNEMONIC; } return FCML_CEH_GEC_NO_ERROR; } fcml-1.1.1/src/fcml_intel_dialect.c0000644000175000017500000030176112560745216014130 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "fcml_dialect_int.h" #include "fcml_intel_dialect.h" #include "fcml_mnemonic_parser.h" #include "fcml_env_int.h" #include "fcml_coll.h" #include "fcml_intel_rend.h" #include "fcml_intel_parser.h" #include "fcml_common_dialect.h" /* **************/ /* * MNEMONICS **/ /* **************/ fcml_st_dialect_mnemonic fcml_arr_dialect_intel_mnemonics[] = { { FCML_TEXT("aaa"), FCML_ASM_DIALECT_INSTRUCTION( F_AAA, FCML_AM_ALL ), 0 }, { FCML_TEXT("aad"), FCML_ASM_DIALECT_INSTRUCTION( F_AAD, FCML_AM_ALL ), 0 }, { FCML_TEXT("aam"), FCML_ASM_DIALECT_INSTRUCTION( F_AAM, FCML_AM_ALL ), 0 }, { FCML_TEXT("aas"), FCML_ASM_DIALECT_INSTRUCTION( F_AAS, FCML_AM_ALL ), 0 }, { FCML_TEXT("adc"), FCML_ASM_DIALECT_INSTRUCTION( F_ADC, FCML_AM_ALL ), 0 }, { FCML_TEXT("add"), FCML_ASM_DIALECT_INSTRUCTION( F_ADD, FCML_AM_ALL ), 0 }, { FCML_TEXT("addpd"), FCML_ASM_DIALECT_INSTRUCTION( F_ADDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaddpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VADDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("addps"), FCML_ASM_DIALECT_INSTRUCTION( F_ADDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaddps"), FCML_ASM_DIALECT_INSTRUCTION( F_VADDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("addsd"), FCML_ASM_DIALECT_INSTRUCTION( F_ADDSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaddsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VADDSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("addss"), FCML_ASM_DIALECT_INSTRUCTION( F_ADDSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaddss"), FCML_ASM_DIALECT_INSTRUCTION( F_VADDSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("addsubpd"), FCML_ASM_DIALECT_INSTRUCTION( F_ADDSUBPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaddsubpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VADDSUBPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("addsubps"), FCML_ASM_DIALECT_INSTRUCTION( F_ADDSUBPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaddsubps"), FCML_ASM_DIALECT_INSTRUCTION( F_VADDSUBPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("aesdec"), FCML_ASM_DIALECT_INSTRUCTION( F_AESDEC, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaesdec"), FCML_ASM_DIALECT_INSTRUCTION( F_VAESDEC, FCML_AM_ALL ), 0 }, { FCML_TEXT("aesdeclast"), FCML_ASM_DIALECT_INSTRUCTION( F_AESDECLAST, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaesdeclast"), FCML_ASM_DIALECT_INSTRUCTION( F_VAESDECLAST, FCML_AM_ALL ), 0 }, { FCML_TEXT("aesenc"), FCML_ASM_DIALECT_INSTRUCTION( F_AESENC, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaesenc"), FCML_ASM_DIALECT_INSTRUCTION( F_VAESENC, FCML_AM_ALL ), 0 }, { FCML_TEXT("aesenclast"), FCML_ASM_DIALECT_INSTRUCTION( F_AESENCLAST, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaesenclast"), FCML_ASM_DIALECT_INSTRUCTION( F_VAESENCLAST, FCML_AM_ALL ), 0 }, { FCML_TEXT("aesimc"), FCML_ASM_DIALECT_INSTRUCTION( F_AESIMC, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaesimc"), FCML_ASM_DIALECT_INSTRUCTION( F_VAESIMC, FCML_AM_ALL ), 0 }, { FCML_TEXT("aeskeygenassist"), FCML_ASM_DIALECT_INSTRUCTION( F_AESKEYGENASSIST, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaeskeygenassist"), FCML_ASM_DIALECT_INSTRUCTION( F_VAESKEYGENASSIST, FCML_AM_ALL ), 0 }, { FCML_TEXT("and"), FCML_ASM_DIALECT_INSTRUCTION( F_AND, FCML_AM_ALL ), 0 }, { FCML_TEXT("andpd"), FCML_ASM_DIALECT_INSTRUCTION( F_ANDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vandpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VANDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("andps"), FCML_ASM_DIALECT_INSTRUCTION( F_ANDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vandps"), FCML_ASM_DIALECT_INSTRUCTION( F_VANDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("andnpd"), FCML_ASM_DIALECT_INSTRUCTION( F_ANDNPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vandnpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VANDNPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("andnps"), FCML_ASM_DIALECT_INSTRUCTION( F_ANDNPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vandnps"), FCML_ASM_DIALECT_INSTRUCTION( F_VANDNPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("arpl"), FCML_ASM_DIALECT_INSTRUCTION( F_ARPL, FCML_AM_ALL ), 0 }, { FCML_TEXT("andn"), FCML_ASM_DIALECT_INSTRUCTION( F_ANDN, FCML_AM_ALL ), 0 }, { FCML_TEXT("adcx"), FCML_ASM_DIALECT_INSTRUCTION( F_ADCX, FCML_AM_ALL ), 0 }, { FCML_TEXT("adox"), FCML_ASM_DIALECT_INSTRUCTION( F_ADOX, FCML_AM_ALL ), 0 }, { FCML_TEXT("blendpd"), FCML_ASM_DIALECT_INSTRUCTION( F_BLENDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vblendpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VBLENDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("blendps"), FCML_ASM_DIALECT_INSTRUCTION( F_BLENDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vblendps"), FCML_ASM_DIALECT_INSTRUCTION( F_VBLENDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("blendvpd"), FCML_ASM_DIALECT_INSTRUCTION( F_BLENDVPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vblendvpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VBLENDVPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("blendvps"), FCML_ASM_DIALECT_INSTRUCTION( F_BLENDVPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vblendvps"), FCML_ASM_DIALECT_INSTRUCTION( F_VBLENDVPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("bound"), FCML_ASM_DIALECT_INSTRUCTION( F_BOUND, FCML_AM_ALL ), 0 }, { FCML_TEXT("bsf"), FCML_ASM_DIALECT_INSTRUCTION( F_BSF, FCML_AM_ALL ), 0 }, { FCML_TEXT("bsr"), FCML_ASM_DIALECT_INSTRUCTION( F_BSR, FCML_AM_ALL ), 0 }, { FCML_TEXT("bswap"), FCML_ASM_DIALECT_INSTRUCTION( F_BSWAP, FCML_AM_ALL ), 0 }, { FCML_TEXT("bt"), FCML_ASM_DIALECT_INSTRUCTION( F_BT, FCML_AM_ALL ), 0 }, { FCML_TEXT("btc"), FCML_ASM_DIALECT_INSTRUCTION( F_BTC, FCML_AM_ALL ), 0 }, { FCML_TEXT("btr"), FCML_ASM_DIALECT_INSTRUCTION( F_BTR, FCML_AM_ALL ), 0 }, { FCML_TEXT("bts"), FCML_ASM_DIALECT_INSTRUCTION( F_BTS, FCML_AM_ALL ), 0 }, { FCML_TEXT("bexr;bextr"), FCML_ASM_DIALECT_INSTRUCTION( F_BEXR, FCML_AM_ALL ), 0 }, { FCML_TEXT("blcfill"), FCML_ASM_DIALECT_INSTRUCTION( F_BLCFILL, FCML_AM_ALL ), 0 }, { FCML_TEXT("blci"), FCML_ASM_DIALECT_INSTRUCTION( F_BLCI, FCML_AM_ALL ), 0 }, { FCML_TEXT("blcic"), FCML_ASM_DIALECT_INSTRUCTION( F_BLCIC, FCML_AM_ALL ), 0 }, { FCML_TEXT("blcmsk"), FCML_ASM_DIALECT_INSTRUCTION( F_BLCMSK, FCML_AM_ALL ), 0 }, { FCML_TEXT("blcs"), FCML_ASM_DIALECT_INSTRUCTION( F_BLCS, FCML_AM_ALL ), 0 }, { FCML_TEXT("blsfill"), FCML_ASM_DIALECT_INSTRUCTION( F_BLSFILL, FCML_AM_ALL ), 0 }, { FCML_TEXT("blsi"), FCML_ASM_DIALECT_INSTRUCTION( F_BLSI, FCML_AM_ALL ), 0 }, { FCML_TEXT("blsic"), FCML_ASM_DIALECT_INSTRUCTION( F_BLSIC, FCML_AM_ALL ), 0 }, { FCML_TEXT("blsmsk"), FCML_ASM_DIALECT_INSTRUCTION( F_BLSMSK, FCML_AM_ALL ), 0 }, { FCML_TEXT("blsr"), FCML_ASM_DIALECT_INSTRUCTION( F_BLSR, FCML_AM_ALL ), 0 }, { FCML_TEXT("bzhi"), FCML_ASM_DIALECT_INSTRUCTION( F_BZHI, FCML_AM_ALL ), 0 }, { FCML_TEXT("call"), FCML_ASM_DIALECT_INSTRUCTION( F_CALL, FCML_AM_ALL ), 0 }, { FCML_TEXT("cbw[ow];cwde[od];cdqe[oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_CBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("clc"), FCML_ASM_DIALECT_INSTRUCTION( F_CLC, FCML_AM_ALL ), 0 }, { FCML_TEXT("cld"), FCML_ASM_DIALECT_INSTRUCTION( F_CLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("clflush"), FCML_ASM_DIALECT_INSTRUCTION( F_CLFLUSH, FCML_AM_ALL ), 0 }, { FCML_TEXT("cli"), FCML_ASM_DIALECT_INSTRUCTION( F_CLI, FCML_AM_ALL ), 0 }, { FCML_TEXT("clgi"), FCML_ASM_DIALECT_INSTRUCTION( F_CLGI, FCML_AM_ALL ), 0 }, { FCML_TEXT("clts"), FCML_ASM_DIALECT_INSTRUCTION( F_CLTS, FCML_AM_ALL ), 0 }, { FCML_TEXT("cmc"), FCML_ASM_DIALECT_INSTRUCTION( F_CMC, FCML_AM_ALL ), 0 }, { FCML_TEXT("cmov"), FCML_ASM_DIALECT_INSTRUCTION( F_CMOV, FCML_AM_ALL ), 0 }, { FCML_TEXT("cmp"), FCML_ASM_DIALECT_INSTRUCTION( F_CMP, FCML_AM_ALL ), 0 }, { FCML_TEXT("cmppd"), FCML_ASM_DIALECT_INSTRUCTION( F_CMPPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcmppd"), FCML_ASM_DIALECT_INSTRUCTION( F_VCMPPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("cmpps"), FCML_ASM_DIALECT_INSTRUCTION( F_CMPPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcmpps"), FCML_ASM_DIALECT_INSTRUCTION( F_VCMPPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("cmps;cmpsb[ts]"), FCML_ASM_DIALECT_INSTRUCTION( F_CMPS, FCML_AM_M8_M8 ), 0 }, { FCML_TEXT("cmps;cmpsw[ts,ow,a*];cmpsd[ts,od,a*];cmpsq[ts,oq,a*]"), FCML_ASM_DIALECT_INSTRUCTION( F_CMPS, FCML_AM_MO_MO ), 0 }, { FCML_TEXT("cmpsd;cmpeqsd[p00];cmpltsd[p01];cmplesd[p02];cmpunordsd[p03];cmpneqsd[p04];cmpnltsd[p05];cmpnlesd[p06];cmpordsd[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_CMPSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcmpsd;vcmpeqsd[p00];vcmpltsd[p01];vcmplesd[p02];vcmpunordsd[p03];vcmpneqsd[p04];vcmpnltsd[p05];vcmpnlesd[p06];vcmpordsd[p07];vcmpeq_uqsd[p08];vcmpngesd[p09];vcmpngtsd[p0a];vcmpfalsesd[p0b];vcmpneq_oqsd[p0c];vcmpgesd[p0d];vcmpgtsd[p0e];vcmptruesd[p0f];vcmpeq_ossd[p10];vcmplt_oqsd[p11];vcmple_oqsd[p12];vcmpunord_ssd[p13];vcmpneq_ussd[p14];vcmpnlt_uqsd[p15];vcmpnle_uqsd[p16];vcmpord_ssd[p17];vcmpeq_ussd[p18];vcmpnge_uqsd[p19];vcmpngt_uqsd[p1a];vcmpfalse_ossd[p1b];vcmpneq_ossd[p1c];vcmpge_oqsd[p1d];vcmpgt_oqsd[p1e];vcmptrue_ussd[p1f]"), FCML_ASM_DIALECT_INSTRUCTION( F_VCMPSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("cmpss;cmpeqss[p00];cmpltss[p01];cmpless[p02];cmpunordss[p03];cmpneqss[p04];cmpnltss[p05];cmpnless[p06];cmpordss[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_CMPSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcmpss;vcmpeqss[p00];vcmpltss[p01];vcmpless[p02];vcmpunordss[p03];vcmpneqss[p04];vcmpnltss[p05];vcmpnless[p06];vcmpordss[p07];vcmpeq_uqss[p08];vcmpngess[p09];vcmpngtss[p0a];vcmpfalsess[p0b];vcmpneq_oqss[p0c];vcmpgess[p0d];vcmpgtss[p0e];vcmptruess[p0f];vcmpeq_osss[p10];vcmplt_oqss[p11];vcmple_oqss[p12];vcmpunord_sss[p13];vcmpneq_usss[p14];vcmpnlt_uqss[p15];vcmpnle_uqss[p16];vcmpord_sss[p17];vcmpeq_usss[p18];vcmpnge_uqss[p19];vcmpngt_uqss[p1a];vcmpfalse_osss[p1b];vcmpneq_osss[p1c];vcmpge_oqss[p1d];vcmpgt_oqss[p1e];vcmptrue_usss[p1f]"), FCML_ASM_DIALECT_INSTRUCTION( F_VCMPSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("cmpxchg"), FCML_ASM_DIALECT_INSTRUCTION( F_CMPXCHG, FCML_AM_ALL ), 0 }, { FCML_TEXT("cmpxchg8b"), FCML_ASM_DIALECT_INSTRUCTION( F_CMPXCHGxB, FCML_AM_M64 ), 0 }, { FCML_TEXT("cmpxchg16b"), FCML_ASM_DIALECT_INSTRUCTION( F_CMPXCHGxB, FCML_AM_M128 ), 0 }, { FCML_TEXT("cpuid"), FCML_ASM_DIALECT_INSTRUCTION( F_CPUID, FCML_AM_ALL ), 0 }, { FCML_TEXT("crc32"), FCML_ASM_DIALECT_INSTRUCTION( F_CRC32, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtdq2pd"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTDQ2PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtdq2pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTDQ2PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtdq2ps"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTDQ2PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtdq2ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTDQ2PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtpd2dq"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTPD2DQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtpd2dq"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTPD2DQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtpd2pi"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTPD2PI, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtpd2ps"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTPD2PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtpd2ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTPD2PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtpi2pd"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTPI2PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtpi2ps"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTPI2PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtps2dq"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTPS2DQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtps2dq"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTPS2DQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtps2pd"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTPS2PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtps2pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTPS2PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtps2pi"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTPS2PI, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtsd2si"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTSD2SI, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtsd2si"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTSD2SI, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtsd2ss"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTSD2SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtsd2ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTSD2SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtsi2sd"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTSI2SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtsi2sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTSI2SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtsi2ss"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTSI2SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtsi2ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTSI2SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtss2sd"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTSS2SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtss2sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTSS2SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtss2si"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTSS2SI, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtss2si"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTSS2SI, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvttpd2dq"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTTPD2DQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvttpd2dq"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTTPD2DQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvttpd2pi"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTTPD2PI, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvttps2dq"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTTPS2DQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvttps2dq"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTTPS2DQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvttps2pi"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTTPS2PI, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvttsd2si"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTTSD2SI, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvttsd2si"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTTSD2SI, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvttss2si"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTTSS2SI, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvttss2si"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTTSS2SI, FCML_AM_ALL ), 0 }, { FCML_TEXT("cwd[ow];cdq[od];cqo[oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_CWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("comisd"), FCML_ASM_DIALECT_INSTRUCTION( F_COMISD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcomisd"), FCML_ASM_DIALECT_INSTRUCTION( F_VCOMISD, FCML_AM_ALL ), 0 }, { FCML_TEXT("comiss"), FCML_ASM_DIALECT_INSTRUCTION( F_COMISS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcomiss"), FCML_ASM_DIALECT_INSTRUCTION( F_VCOMISS, FCML_AM_ALL ), 0 }, { FCML_TEXT("daa"), FCML_ASM_DIALECT_INSTRUCTION( F_DAA, FCML_AM_ALL ), 0 }, { FCML_TEXT("das"), FCML_ASM_DIALECT_INSTRUCTION( F_DAS, FCML_AM_ALL ), 0 }, { FCML_TEXT("dec"), FCML_ASM_DIALECT_INSTRUCTION( F_DEC, FCML_AM_ALL ), 0 }, { FCML_TEXT("div"), FCML_ASM_DIALECT_INSTRUCTION( F_DIV, FCML_AM_ALL ), 0 }, { FCML_TEXT("divpd"), FCML_ASM_DIALECT_INSTRUCTION( F_DIVPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vdivpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VDIVPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("divps"), FCML_ASM_DIALECT_INSTRUCTION( F_DIVPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vdivps"), FCML_ASM_DIALECT_INSTRUCTION( F_VDIVPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("divsd"), FCML_ASM_DIALECT_INSTRUCTION( F_DIVSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vdivsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VDIVSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("divss"), FCML_ASM_DIALECT_INSTRUCTION( F_DIVSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vdivss"), FCML_ASM_DIALECT_INSTRUCTION( F_VDIVSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("dppd"), FCML_ASM_DIALECT_INSTRUCTION( F_DPPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vdppd"), FCML_ASM_DIALECT_INSTRUCTION( F_VDPPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("dpps"), FCML_ASM_DIALECT_INSTRUCTION( F_DPPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vdpps"), FCML_ASM_DIALECT_INSTRUCTION( F_VDPPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("emms"), FCML_ASM_DIALECT_INSTRUCTION( F_EMMS, FCML_AM_ALL ), 0 }, { FCML_TEXT("enter"), FCML_ASM_DIALECT_INSTRUCTION( F_ENTER, FCML_AM_ALL ), 0 }, { FCML_TEXT("extractps"), FCML_ASM_DIALECT_INSTRUCTION( F_EXTRACTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vextractps"), FCML_ASM_DIALECT_INSTRUCTION( F_VEXTRACTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("extrq"), FCML_ASM_DIALECT_INSTRUCTION( F_EXTRQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("f2xm1"), FCML_ASM_DIALECT_INSTRUCTION( F_F2XM1, FCML_AM_ALL ), 0 }, { FCML_TEXT("fabs"), FCML_ASM_DIALECT_INSTRUCTION( F_FABS, FCML_AM_ALL ), 0 }, { FCML_TEXT("fadd"), FCML_ASM_DIALECT_INSTRUCTION( F_FADD, FCML_AM_ALL ), 0 }, { FCML_TEXT("fiadd"), FCML_ASM_DIALECT_INSTRUCTION( F_FIADD, FCML_AM_ALL ), 0 }, { FCML_TEXT("faddp"), FCML_ASM_DIALECT_INSTRUCTION( F_FADDP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fbld"), FCML_ASM_DIALECT_INSTRUCTION( F_FBLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("fbstp"), FCML_ASM_DIALECT_INSTRUCTION( F_FBSTP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fchs"), FCML_ASM_DIALECT_INSTRUCTION( F_FCHS, FCML_AM_ALL ), 0 }, { FCML_TEXT("fclex"), FCML_ASM_DIALECT_INSTRUCTION( F_FCLEX, FCML_AM_ALL ), 0 }, { FCML_TEXT("fnclex"), FCML_ASM_DIALECT_INSTRUCTION( F_FNCLEX, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcmovb"), FCML_ASM_DIALECT_INSTRUCTION( F_FCMOVB, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcmove"), FCML_ASM_DIALECT_INSTRUCTION( F_FCMOVE, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcmovbe"), FCML_ASM_DIALECT_INSTRUCTION( F_FCMOVBE, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcmovu"), FCML_ASM_DIALECT_INSTRUCTION( F_FCMOVU, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcmovnb"), FCML_ASM_DIALECT_INSTRUCTION( F_FCMOVNB, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcmovne"), FCML_ASM_DIALECT_INSTRUCTION( F_FCMOVNE, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcmovnbe"), FCML_ASM_DIALECT_INSTRUCTION( F_FCMOVNBE, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcmovnu"), FCML_ASM_DIALECT_INSTRUCTION( F_FCMOVNU, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcos"), FCML_ASM_DIALECT_INSTRUCTION( F_FCOS, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcom"), FCML_ASM_DIALECT_INSTRUCTION( F_FCOM, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcomp"), FCML_ASM_DIALECT_INSTRUCTION( F_FCOMP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcompp"), FCML_ASM_DIALECT_INSTRUCTION( F_FCOMPP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcomi"), FCML_ASM_DIALECT_INSTRUCTION( F_FCOMI, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcomip"), FCML_ASM_DIALECT_INSTRUCTION( F_FCOMIP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fucomi"), FCML_ASM_DIALECT_INSTRUCTION( F_FUCOMI, FCML_AM_ALL ), 0 }, { FCML_TEXT("fucomip"), FCML_ASM_DIALECT_INSTRUCTION( F_FUCOMIP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fdecstp"), FCML_ASM_DIALECT_INSTRUCTION( F_FDECSTP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fdiv"), FCML_ASM_DIALECT_INSTRUCTION( F_FDIV, FCML_AM_ALL ), 0 }, { FCML_TEXT("fdivp"), FCML_ASM_DIALECT_INSTRUCTION( F_FDIVP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fidiv"), FCML_ASM_DIALECT_INSTRUCTION( F_FIDIV, FCML_AM_ALL ), 0 }, { FCML_TEXT("fdivr"), FCML_ASM_DIALECT_INSTRUCTION( F_FDIVR, FCML_AM_ALL ), 0 }, { FCML_TEXT("fdivrp"), FCML_ASM_DIALECT_INSTRUCTION( F_FDIVRP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fidivr"), FCML_ASM_DIALECT_INSTRUCTION( F_FIDIVR, FCML_AM_ALL ), 0 }, { FCML_TEXT("ffree"), FCML_ASM_DIALECT_INSTRUCTION( F_FFREE, FCML_AM_ALL ), 0 }, { FCML_TEXT("ficom"), FCML_ASM_DIALECT_INSTRUCTION( F_FICOM, FCML_AM_ALL ), 0 }, { FCML_TEXT("ficomp"), FCML_ASM_DIALECT_INSTRUCTION( F_FICOMP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fild"), FCML_ASM_DIALECT_INSTRUCTION( F_FILD, FCML_AM_ALL ), 0 }, { FCML_TEXT("fincstp"), FCML_ASM_DIALECT_INSTRUCTION( F_FINCSTP, FCML_AM_ALL ), 0 }, { FCML_TEXT("finit"), FCML_ASM_DIALECT_INSTRUCTION( F_FINIT, FCML_AM_ALL ), 0 }, { FCML_TEXT("fninit"), FCML_ASM_DIALECT_INSTRUCTION( F_FNINIT, FCML_AM_ALL ), 0 }, { FCML_TEXT("fist"), FCML_ASM_DIALECT_INSTRUCTION( F_FIST, FCML_AM_ALL ), 0 }, { FCML_TEXT("fistp"), FCML_ASM_DIALECT_INSTRUCTION( F_FISTP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fld"), FCML_ASM_DIALECT_INSTRUCTION( F_FLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("fld1"), FCML_ASM_DIALECT_INSTRUCTION( F_FLD1, FCML_AM_ALL ), 0 }, { FCML_TEXT("fldl2t"), FCML_ASM_DIALECT_INSTRUCTION( F_FLDL2T, FCML_AM_ALL ), 0 }, { FCML_TEXT("fldl2e"), FCML_ASM_DIALECT_INSTRUCTION( F_FLDL2E, FCML_AM_ALL ), 0 }, { FCML_TEXT("fldpi"), FCML_ASM_DIALECT_INSTRUCTION( F_FLDPI, FCML_AM_ALL ), 0 }, { FCML_TEXT("fldlg2"), FCML_ASM_DIALECT_INSTRUCTION( F_FLDLG2, FCML_AM_ALL ), 0 }, { FCML_TEXT("fldln2"), FCML_ASM_DIALECT_INSTRUCTION( F_FLDLN2, FCML_AM_ALL ), 0 }, { FCML_TEXT("fldz"), FCML_ASM_DIALECT_INSTRUCTION( F_FLDZ, FCML_AM_ALL ), 0 }, { FCML_TEXT("fldcw"), FCML_ASM_DIALECT_INSTRUCTION( F_FLDCW, FCML_AM_ALL ), 0 }, { FCML_TEXT("fldenv"), FCML_ASM_DIALECT_INSTRUCTION( F_FLDENV, FCML_AM_ALL ), 0 }, { FCML_TEXT("fmul"), FCML_ASM_DIALECT_INSTRUCTION( F_FMUL, FCML_AM_ALL ), 0 }, { FCML_TEXT("fmulp"), FCML_ASM_DIALECT_INSTRUCTION( F_FMULP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fimul"), FCML_ASM_DIALECT_INSTRUCTION( F_FIMUL, FCML_AM_ALL ), 0 }, { FCML_TEXT("fnop"), FCML_ASM_DIALECT_INSTRUCTION( F_FNOP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fpatan"), FCML_ASM_DIALECT_INSTRUCTION( F_FPATAN, FCML_AM_ALL ), 0 }, { FCML_TEXT("fprem"), FCML_ASM_DIALECT_INSTRUCTION( F_FPREM, FCML_AM_ALL ), 0 }, { FCML_TEXT("fprem1"), FCML_ASM_DIALECT_INSTRUCTION( F_FPREM1, FCML_AM_ALL ), 0 }, { FCML_TEXT("fptan"), FCML_ASM_DIALECT_INSTRUCTION( F_FPTAN, FCML_AM_ALL ), 0 }, { FCML_TEXT("frndint"), FCML_ASM_DIALECT_INSTRUCTION( F_FRNDINT, FCML_AM_ALL ), 0 }, { FCML_TEXT("frstor"), FCML_ASM_DIALECT_INSTRUCTION( F_FRSTOR, FCML_AM_ALL ), 0 }, { FCML_TEXT("fsave"), FCML_ASM_DIALECT_INSTRUCTION( F_FSAVE, FCML_AM_ALL ), 0 }, { FCML_TEXT("fnsave"), FCML_ASM_DIALECT_INSTRUCTION( F_FNSAVE, FCML_AM_ALL ), 0 }, { FCML_TEXT("fscale"), FCML_ASM_DIALECT_INSTRUCTION( F_FSCALE, FCML_AM_ALL ), 0 }, { FCML_TEXT("fsin"), FCML_ASM_DIALECT_INSTRUCTION( F_FSIN, FCML_AM_ALL ), 0 }, { FCML_TEXT("fsincos"), FCML_ASM_DIALECT_INSTRUCTION( F_FSINCOS, FCML_AM_ALL ), 0 }, { FCML_TEXT("fsqrt"), FCML_ASM_DIALECT_INSTRUCTION( F_FSQRT, FCML_AM_ALL ), 0 }, { FCML_TEXT("fst"), FCML_ASM_DIALECT_INSTRUCTION( F_FST, FCML_AM_ALL ), 0 }, { FCML_TEXT("fstp"), FCML_ASM_DIALECT_INSTRUCTION( F_FSTP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fstcw"), FCML_ASM_DIALECT_INSTRUCTION( F_FSTCW, FCML_AM_ALL ), 0 }, { FCML_TEXT("fnstcw"), FCML_ASM_DIALECT_INSTRUCTION( F_FNSTCW, FCML_AM_ALL ), 0 }, { FCML_TEXT("fstenv"), FCML_ASM_DIALECT_INSTRUCTION( F_FSTENV, FCML_AM_ALL ), 0 }, { FCML_TEXT("fnstenv"), FCML_ASM_DIALECT_INSTRUCTION( F_FNSTENV, FCML_AM_ALL ), 0 }, { FCML_TEXT("fstsw"), FCML_ASM_DIALECT_INSTRUCTION( F_FSTSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("fnstsw"), FCML_ASM_DIALECT_INSTRUCTION( F_FNSTSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("fsub"), FCML_ASM_DIALECT_INSTRUCTION( F_FSUB, FCML_AM_ALL ), 0 }, { FCML_TEXT("fsubp"), FCML_ASM_DIALECT_INSTRUCTION( F_FSUBP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fisub"), FCML_ASM_DIALECT_INSTRUCTION( F_FISUB, FCML_AM_ALL ), 0 }, { FCML_TEXT("fsubr"), FCML_ASM_DIALECT_INSTRUCTION( F_FSUBR, FCML_AM_ALL ), 0 }, { FCML_TEXT("fsubrp"), FCML_ASM_DIALECT_INSTRUCTION( F_FSUBRP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fisubr"), FCML_ASM_DIALECT_INSTRUCTION( F_FISUBR, FCML_AM_ALL ), 0 }, { FCML_TEXT("ftst"), FCML_ASM_DIALECT_INSTRUCTION( F_FTST, FCML_AM_ALL ), 0 }, { FCML_TEXT("fucom"), FCML_ASM_DIALECT_INSTRUCTION( F_FUCOM, FCML_AM_ALL ), 0 }, { FCML_TEXT("fucomp"), FCML_ASM_DIALECT_INSTRUCTION( F_FUCOMP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fucompp"), FCML_ASM_DIALECT_INSTRUCTION( F_FUCOMPP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fxam"), FCML_ASM_DIALECT_INSTRUCTION( F_FXAM, FCML_AM_ALL ), 0 }, { FCML_TEXT("fxch"), FCML_ASM_DIALECT_INSTRUCTION( F_FXCH, FCML_AM_ALL ), 0 }, { FCML_TEXT("fxrstor"), FCML_ASM_DIALECT_INSTRUCTION( F_FXRSTOR, FCML_AM_ALL ), 0 }, { FCML_TEXT("fxrstor64"), FCML_ASM_DIALECT_INSTRUCTION( F_FXRSTOR64, FCML_AM_ALL ), 0 }, { FCML_TEXT("fxsave"), FCML_ASM_DIALECT_INSTRUCTION( F_FXSAVE, FCML_AM_ALL ), 0 }, { FCML_TEXT("fxsave64"), FCML_ASM_DIALECT_INSTRUCTION( F_FXSAVE64, FCML_AM_ALL ), 0 }, { FCML_TEXT("fxtract"), FCML_ASM_DIALECT_INSTRUCTION( F_FXTRACT, FCML_AM_ALL ), 0 }, { FCML_TEXT("fyl2x"), FCML_ASM_DIALECT_INSTRUCTION( F_FYL2X, FCML_AM_ALL ), 0 }, { FCML_TEXT("fyl2xp1"), FCML_ASM_DIALECT_INSTRUCTION( F_FYL2XP1, FCML_AM_ALL ), 0 }, { FCML_TEXT("femms"), FCML_ASM_DIALECT_INSTRUCTION( F_FEMMS, FCML_AM_ALL ), 0 }, { FCML_TEXT("fisttp"), FCML_ASM_DIALECT_INSTRUCTION( F_FISTTP, FCML_AM_ALL ), 0 }, { FCML_TEXT("getsec"), FCML_ASM_DIALECT_INSTRUCTION( F_GETSEC, FCML_AM_ALL ), 0 }, { FCML_TEXT("haddpd"), FCML_ASM_DIALECT_INSTRUCTION( F_HADDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vhaddpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VHADDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("haddps"), FCML_ASM_DIALECT_INSTRUCTION( F_HADDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vhaddps"), FCML_ASM_DIALECT_INSTRUCTION( F_VHADDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("hlt"), FCML_ASM_DIALECT_INSTRUCTION( F_HLT, FCML_AM_ALL ), 0 }, { FCML_TEXT("hsubpd"), FCML_ASM_DIALECT_INSTRUCTION( F_HSUBPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vhsubpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VHSUBPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("hsubps"), FCML_ASM_DIALECT_INSTRUCTION( F_HSUBPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vhsubps"), FCML_ASM_DIALECT_INSTRUCTION( F_VHSUBPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("invept"), FCML_ASM_DIALECT_INSTRUCTION( F_INVEPT, FCML_AM_ALL ), 0 }, { FCML_TEXT("invvpid"), FCML_ASM_DIALECT_INSTRUCTION( F_INVVPID, FCML_AM_ALL ), 0 }, { FCML_TEXT("idiv"), FCML_ASM_DIALECT_INSTRUCTION( F_IDIV, FCML_AM_ALL ), 0 }, { FCML_TEXT("imul"), FCML_ASM_DIALECT_INSTRUCTION( F_IMUL, FCML_AM_ALL ), 0 }, { FCML_TEXT("in"), FCML_ASM_DIALECT_INSTRUCTION( F_IN, FCML_AM_ALL ), 0 }, { FCML_TEXT("inc"), FCML_ASM_DIALECT_INSTRUCTION( F_INC, FCML_AM_ALL ), 0 }, { FCML_TEXT("ins;insb[ts]"), FCML_ASM_DIALECT_INSTRUCTION( F_INS, FCML_AM_M8 ), 0 }, { FCML_TEXT("ins;insw[ts]"), FCML_ASM_DIALECT_INSTRUCTION( F_INS, FCML_AM_M16 ), 0 }, { FCML_TEXT("ins;insd[ts]"), FCML_ASM_DIALECT_INSTRUCTION( F_INS, FCML_AM_M32 ), 0 }, { FCML_TEXT("insertps"), FCML_ASM_DIALECT_INSTRUCTION( F_INSERTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vinsertps"), FCML_ASM_DIALECT_INSTRUCTION( F_VINSERTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vextractf128"), FCML_ASM_DIALECT_INSTRUCTION( F_VEXTRACTF128, FCML_AM_ALL ), 0 }, { FCML_TEXT("vinsertf128"), FCML_ASM_DIALECT_INSTRUCTION( F_VINSERTF128, FCML_AM_ALL ), 0 }, { FCML_TEXT("insertq"), FCML_ASM_DIALECT_INSTRUCTION( F_INSERTQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("int3"), FCML_ASM_DIALECT_INSTRUCTION( F_INT3, FCML_AM_ALL ), 0 }, { FCML_TEXT("int"), FCML_ASM_DIALECT_INSTRUCTION( F_INT, FCML_AM_ALL ), 0 }, { FCML_TEXT("into"), FCML_ASM_DIALECT_INSTRUCTION( F_INTO, FCML_AM_ALL ), 0 }, { FCML_TEXT("invd"), FCML_ASM_DIALECT_INSTRUCTION( F_INVD, FCML_AM_ALL ), 0 }, { FCML_TEXT("invlpg"), FCML_ASM_DIALECT_INSTRUCTION( F_INVLPG, FCML_AM_ALL ), 0 }, { FCML_TEXT("invlpga"), FCML_ASM_DIALECT_INSTRUCTION( F_INVLPGA, FCML_AM_ALL ), 0 }, { FCML_TEXT("invpcid"), FCML_ASM_DIALECT_INSTRUCTION( F_INVPCID, FCML_AM_ALL ), 0 }, { FCML_TEXT("iret[sf,ow];iretd[sf,od];iretq[sf,oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_IRET, FCML_AM_ALL ), 0 }, { FCML_TEXT("jcxz[aw];jecxz[ad];jrcxz[aq]"), FCML_ASM_DIALECT_INSTRUCTION( F_JCXZ, FCML_AM_ALL ), 0 }, { FCML_TEXT("j"), FCML_ASM_DIALECT_INSTRUCTION( F_JCC, FCML_AM_ALL ), 0 }, { FCML_TEXT("jmp"), FCML_ASM_DIALECT_INSTRUCTION( F_JMP, FCML_AM_ALL ), 0 }, { FCML_TEXT("lar"), FCML_ASM_DIALECT_INSTRUCTION( F_LAR, FCML_AM_ALL ), 0 }, { FCML_TEXT("lahf"), FCML_ASM_DIALECT_INSTRUCTION( F_LAHF, FCML_AM_ALL ), 0 }, { FCML_TEXT("lddqu"), FCML_ASM_DIALECT_INSTRUCTION( F_LDDQU, FCML_AM_ALL ), 0 }, { FCML_TEXT("vlddqu"), FCML_ASM_DIALECT_INSTRUCTION( F_VLDDQU, FCML_AM_ALL ), 0 }, { FCML_TEXT("ldmxcsr"), FCML_ASM_DIALECT_INSTRUCTION( F_LDMXCSR, FCML_AM_ALL ), 0 }, { FCML_TEXT("vldmxcsr"), FCML_ASM_DIALECT_INSTRUCTION( F_VLDMXCSR, FCML_AM_ALL ), 0 }, { FCML_TEXT("lds"), FCML_ASM_DIALECT_INSTRUCTION( F_LDS, FCML_AM_ALL ), 0 }, { FCML_TEXT("lss"), FCML_ASM_DIALECT_INSTRUCTION( F_LSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("les"), FCML_ASM_DIALECT_INSTRUCTION( F_LES, FCML_AM_ALL ), 0 }, { FCML_TEXT("lfs"), FCML_ASM_DIALECT_INSTRUCTION( F_LFS, FCML_AM_ALL ), 0 }, { FCML_TEXT("lgs"), FCML_ASM_DIALECT_INSTRUCTION( F_LGS, FCML_AM_ALL ), 0 }, { FCML_TEXT("lea"), FCML_ASM_DIALECT_INSTRUCTION( F_LEA, FCML_AM_ALL ), 0 }, { FCML_TEXT("leave"), FCML_ASM_DIALECT_INSTRUCTION( F_LEAVE, FCML_AM_ALL ), 0 }, { FCML_TEXT("lfence"), FCML_ASM_DIALECT_INSTRUCTION( F_LFENCE, FCML_AM_ALL ), 0 }, { FCML_TEXT("llwpcb"), FCML_ASM_DIALECT_INSTRUCTION( F_LLWPCB, FCML_AM_ALL ), 0 }, { FCML_TEXT("lgdt"), FCML_ASM_DIALECT_INSTRUCTION( F_LGDT, FCML_AM_ALL ), 0 }, { FCML_TEXT("lidt"), FCML_ASM_DIALECT_INSTRUCTION( F_LIDT, FCML_AM_ALL ), 0 }, { FCML_TEXT("lldt"), FCML_ASM_DIALECT_INSTRUCTION( F_LLDT, FCML_AM_ALL ), 0 }, { FCML_TEXT("lmsw"), FCML_ASM_DIALECT_INSTRUCTION( F_LMSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("lods;lodsb[ts]"), FCML_ASM_DIALECT_INSTRUCTION( F_LODS, FCML_AM_RM8 ), 0 }, { FCML_TEXT("lods;lodsw[ts,ow,a*];lodsd[ts,od,a*];lodsq[ts,oq,a*]"), FCML_ASM_DIALECT_INSTRUCTION( F_LODS, FCML_AM_RMO ), 0 }, { FCML_TEXT("loop"), FCML_ASM_DIALECT_INSTRUCTION( F_LOOP, FCML_AM_ALL ), 0 }, { FCML_TEXT("loope;loopz"), FCML_ASM_DIALECT_INSTRUCTION( F_LOOPE, FCML_AM_ALL ), 0 }, { FCML_TEXT("loopne;loopnz"), FCML_ASM_DIALECT_INSTRUCTION( F_LOOPNE, FCML_AM_ALL ), 0 }, { FCML_TEXT("lwpins"), FCML_ASM_DIALECT_INSTRUCTION( F_LWPINS, FCML_AM_ALL ), 0 }, { FCML_TEXT("lwpval"), FCML_ASM_DIALECT_INSTRUCTION( F_LWPVAL, FCML_AM_ALL ), 0 }, { FCML_TEXT("lsl"), FCML_ASM_DIALECT_INSTRUCTION( F_LSL, FCML_AM_ALL ), 0 }, { FCML_TEXT("ltr"), FCML_ASM_DIALECT_INSTRUCTION( F_LTR, FCML_AM_ALL ), 0 }, { FCML_TEXT("lzcnt"), FCML_ASM_DIALECT_INSTRUCTION( F_LZCNT, FCML_AM_ALL ), 0 }, { FCML_TEXT("maskmovdqu"), FCML_ASM_DIALECT_INSTRUCTION( F_MASKMOVDQU, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmaskmovdqu"), FCML_ASM_DIALECT_INSTRUCTION( F_VMASKMOVDQU, FCML_AM_ALL ), 0 }, { FCML_TEXT("maskmovq"), FCML_ASM_DIALECT_INSTRUCTION( F_MASKMOVQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmaskmovps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMASKMOVPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmaskmovpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMASKMOVPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaskmovd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMASKMOVD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaskmov"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMASKMOV, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaskmovq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMASKMOVQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("maxpd"), FCML_ASM_DIALECT_INSTRUCTION( F_MAXPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmaxpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMAXPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("maxps"), FCML_ASM_DIALECT_INSTRUCTION( F_MAXPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmaxps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMAXPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("maxsd"), FCML_ASM_DIALECT_INSTRUCTION( F_MAXSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmaxsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMAXSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("maxss"), FCML_ASM_DIALECT_INSTRUCTION( F_MAXSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmaxss"), FCML_ASM_DIALECT_INSTRUCTION( F_VMAXSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("mfence"), FCML_ASM_DIALECT_INSTRUCTION( F_MFENCE, FCML_AM_ALL ), 0 }, { FCML_TEXT("minpd"), FCML_ASM_DIALECT_INSTRUCTION( F_MINPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vminpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMINPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("minps"), FCML_ASM_DIALECT_INSTRUCTION( F_MINPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vminps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMINPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("minsd"), FCML_ASM_DIALECT_INSTRUCTION( F_MINSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vminsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMINSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("minss"), FCML_ASM_DIALECT_INSTRUCTION( F_MINSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vminss"), FCML_ASM_DIALECT_INSTRUCTION( F_VMINSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("monitor[tb]"), FCML_ASM_DIALECT_INSTRUCTION( F_MONITOR, FCML_AM_ALL ), 0 }, { FCML_TEXT("movapd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVAPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovapd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVAPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movaps"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVAPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovaps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVAPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movbe"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVBE, FCML_AM_ALL ), 0 }, { FCML_TEXT("mov"), FCML_ASM_DIALECT_INSTRUCTION( F_MOV, FCML_AM_ALL ), 0 }, { FCML_TEXT("movd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movq"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovq"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("movddup"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVDDUP, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovddup"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVDDUP, FCML_AM_ALL ), 0 }, { FCML_TEXT("movdqa"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVDQA, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovdqa"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVDQA, FCML_AM_ALL ), 0 }, { FCML_TEXT("movdqu"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVDQU, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovdqu"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVDQU, FCML_AM_ALL ), 0 }, { FCML_TEXT("movdq2q"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVDQ2Q, FCML_AM_ALL ), 0 }, { FCML_TEXT("movhlps"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVHLPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovhlps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVHLPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movhpd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVHPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovhpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVHPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movhps"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVHPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovhps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVHPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movlhps"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVLHPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovlhps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVLHPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movlpd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVLPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovlpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVLPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movlps"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVLPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovlps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVLPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movmskpd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVMSKPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovmskpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVMSKPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movmskps"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVMSKPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovmskps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVMSKPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movntdqa"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVNTDQA, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovntdqa"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVNTDQA, FCML_AM_ALL ), 0 }, { FCML_TEXT("movntdq"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVNTDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovntdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVNTDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("movs;movsb[ts]"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVS, FCML_AM_M8_M8 ), 0 }, { FCML_TEXT("movs;movsw[ts,ow,a*];movsd[ts,od,a*];movsq[ts,oq,a*]"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVS, FCML_AM_MO_MO ), 0 }, { FCML_TEXT("movnti"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVNTI, FCML_AM_ALL ), 0 }, { FCML_TEXT("movntpd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVNTPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovntpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVNTPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movntps"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVNTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovntps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVNTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movntsd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVNTSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movntss"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVNTSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movntq"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVNTQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("movq"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("movq2dq"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVQ2DQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("movsd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movshdup"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVSHDUP, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovshdup"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVSHDUP, FCML_AM_ALL ), 0 }, { FCML_TEXT("movsldup"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVSLDUP, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovsldup"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVSLDUP, FCML_AM_ALL ), 0 }, { FCML_TEXT("movss"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovss"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movsx"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVSX, FCML_AM_ALL ), 0 }, { FCML_TEXT("movsxd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVSXD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movupd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVUPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovupd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVUPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movups"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVUPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovups"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVUPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movzx"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVZX, FCML_AM_ALL ), 0 }, { FCML_TEXT("mpsadbw"), FCML_ASM_DIALECT_INSTRUCTION( F_MPSADBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmpsadbw"), FCML_ASM_DIALECT_INSTRUCTION( F_VMPSADBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("mul"), FCML_ASM_DIALECT_INSTRUCTION( F_MUL, FCML_AM_ALL ), 0 }, { FCML_TEXT("mulpd"), FCML_ASM_DIALECT_INSTRUCTION( F_MULPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmulpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMULPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("mulps"), FCML_ASM_DIALECT_INSTRUCTION( F_MULPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmulps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMULPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("mulsd"), FCML_ASM_DIALECT_INSTRUCTION( F_MULSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmulsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMULSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("mulss"), FCML_ASM_DIALECT_INSTRUCTION( F_MULSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmulss"), FCML_ASM_DIALECT_INSTRUCTION( F_VMULSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("mwait"), FCML_ASM_DIALECT_INSTRUCTION( F_MWAIT, FCML_AM_ALL ), 0 }, { FCML_TEXT("neg"), FCML_ASM_DIALECT_INSTRUCTION( F_NEG, FCML_AM_ALL ), 0 }, { FCML_TEXT("nop"), FCML_ASM_DIALECT_INSTRUCTION( F_NOP, FCML_AM_ALL ), 0 }, { FCML_TEXT("not"), FCML_ASM_DIALECT_INSTRUCTION( F_NOT, FCML_AM_ALL ), 0 }, { FCML_TEXT("or"), FCML_ASM_DIALECT_INSTRUCTION( F_OR, FCML_AM_ALL ), 0 }, { FCML_TEXT("orpd"), FCML_ASM_DIALECT_INSTRUCTION( F_ORPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vorpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VORPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("orps"), FCML_ASM_DIALECT_INSTRUCTION( F_ORPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vorps"), FCML_ASM_DIALECT_INSTRUCTION( F_VORPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("out"), FCML_ASM_DIALECT_INSTRUCTION( F_OUT, FCML_AM_ALL ), 0 }, { FCML_TEXT("outs;outsb[ts]"), FCML_ASM_DIALECT_INSTRUCTION( F_OUTS, FCML_AM_M8 ), 0 }, { FCML_TEXT("outs;outsw[ts]"), FCML_ASM_DIALECT_INSTRUCTION( F_OUTS, FCML_AM_M16 ), 0 }, { FCML_TEXT("outs;outsd[ts]"), FCML_ASM_DIALECT_INSTRUCTION( F_OUTS, FCML_AM_M32 ), 0 }, { FCML_TEXT("pabsw"), FCML_ASM_DIALECT_INSTRUCTION( F_PABSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pabsb"), FCML_ASM_DIALECT_INSTRUCTION( F_PABSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pabsd"), FCML_ASM_DIALECT_INSTRUCTION( F_PABSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpabsb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPABSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpabsw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPABSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpabsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPABSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpacksswb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPACKSSWB, FCML_AM_ALL ), 0 }, { FCML_TEXT("packsswb"), FCML_ASM_DIALECT_INSTRUCTION( F_PACKSSWB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpackssdw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPACKSSDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("packssdw"), FCML_ASM_DIALECT_INSTRUCTION( F_PACKSSDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("packusdw"), FCML_ASM_DIALECT_INSTRUCTION( F_PACKUSDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpackusdw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPACKUSDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("packuswb"), FCML_ASM_DIALECT_INSTRUCTION( F_PACKUSWB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpackuswb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPACKUSWB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpaddw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPADDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("paddw"), FCML_ASM_DIALECT_INSTRUCTION( F_PADDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpaddb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPADDB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpaddd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPADDD, FCML_AM_ALL ), 0 }, { FCML_TEXT("paddb"), FCML_ASM_DIALECT_INSTRUCTION( F_PADDB, FCML_AM_ALL ), 0 }, { FCML_TEXT("paddd"), FCML_ASM_DIALECT_INSTRUCTION( F_PADDD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpaddsw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPADDSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("paddsb"), FCML_ASM_DIALECT_INSTRUCTION( F_PADDSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("paddsw"), FCML_ASM_DIALECT_INSTRUCTION( F_PADDSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpaddsb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPADDSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("paddusw"), FCML_ASM_DIALECT_INSTRUCTION( F_PADDUSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("paddusb"), FCML_ASM_DIALECT_INSTRUCTION( F_PADDUSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpaddusw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPADDUSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpaddusb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPADDUSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("paddq"), FCML_ASM_DIALECT_INSTRUCTION( F_PADDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpaddq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPADDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pop"), FCML_ASM_DIALECT_INSTRUCTION( F_POP, FCML_AM_ALL ), 0 }, { FCML_TEXT("push"), FCML_ASM_DIALECT_INSTRUCTION( F_PUSH, FCML_AM_ALL ), 0 }, { FCML_TEXT("popa"), FCML_ASM_DIALECT_INSTRUCTION( F_POPA, FCML_AM_ALL ), 0 }, { FCML_TEXT("popad"), FCML_ASM_DIALECT_INSTRUCTION( F_POPAD, FCML_AM_ALL ), 0 }, { FCML_TEXT("popf"), FCML_ASM_DIALECT_INSTRUCTION( F_POPF, FCML_AM_ALL ), 0 }, { FCML_TEXT("popfq"), FCML_ASM_DIALECT_INSTRUCTION( F_POPFQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("popfd"), FCML_ASM_DIALECT_INSTRUCTION( F_POPFD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pusha"), FCML_ASM_DIALECT_INSTRUCTION( F_PUSHA, FCML_AM_ALL ), 0 }, { FCML_TEXT("pushf"), FCML_ASM_DIALECT_INSTRUCTION( F_PUSHF, FCML_AM_ALL ), 0 }, { FCML_TEXT("pushad"), FCML_ASM_DIALECT_INSTRUCTION( F_PUSHAD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pushfq"), FCML_ASM_DIALECT_INSTRUCTION( F_PUSHFQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pushfd"), FCML_ASM_DIALECT_INSTRUCTION( F_PUSHFD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pavgusb[Sbf];pf2id[S1d];pfacc[Sae];pfadd[S9e];pfcmpeq[Sb0];pfcmpge[S90];pfcmpgt[Sa0];pfmax[Sa4];pfmin[S94];pfmul[Sb4];pfrcp[S96];pfrcpit1[Sa6];pfrcpit2[Sb6];pfrsqit1[Sa7];pfrsqrt[S97];pfsub[S9a];pfsubr[Saa];pi2fd[S0d];pmulhrw[Sb7];pf2iw[S1c];pfnacc[S8a];pfpnacc[S8e];pi2fw[S0c];pswapd[Sbb]"), FCML_ASM_DIALECT_INSTRUCTION( FCML_MULTI_INSTRUCTION( FCML_MI_AMD3DNOW ), FCML_AM_ALL ), 0 }, { FCML_TEXT("palignr"), FCML_ASM_DIALECT_INSTRUCTION( F_PALIGNR, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpalignr"), FCML_ASM_DIALECT_INSTRUCTION( F_VPALIGNR, FCML_AM_ALL ), 0 }, { FCML_TEXT("pand"), FCML_ASM_DIALECT_INSTRUCTION( F_PAND, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpand"), FCML_ASM_DIALECT_INSTRUCTION( F_VPAND, FCML_AM_ALL ), 0 }, { FCML_TEXT("pandn"), FCML_ASM_DIALECT_INSTRUCTION( F_PANDN, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpandn"), FCML_ASM_DIALECT_INSTRUCTION( F_VPANDN, FCML_AM_ALL ), 0 }, { FCML_TEXT("pause"), FCML_ASM_DIALECT_INSTRUCTION( F_PAUSE, FCML_AM_ALL ), 0 }, { FCML_TEXT("pavgw"), FCML_ASM_DIALECT_INSTRUCTION( F_PAVGW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pavgb"), FCML_ASM_DIALECT_INSTRUCTION( F_PAVGB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpavgw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPAVGW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpavgb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPAVGB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pblendvb"), FCML_ASM_DIALECT_INSTRUCTION( F_PBLENDVB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpblendvb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPBLENDVB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pblendw"), FCML_ASM_DIALECT_INSTRUCTION( F_PBLENDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpblendw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPBLENDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpblendd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPBLENDD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pclmulqdq"), FCML_ASM_DIALECT_INSTRUCTION( F_PCLMULQDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpclmulqdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCLMULQDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpeqw"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPEQW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpeqb"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPEQB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpeqd"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPEQD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpeqd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPEQD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpeqw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPEQW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpeqb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPEQB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpeqq"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPEQQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpeqq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPEQQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpestri"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPESTRI, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpestri"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPESTRI, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpestrm"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPESTRM, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpestrm"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPESTRM, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpgtw"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPGTW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpgtd"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPGTD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpgtb"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPGTB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpgtw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPGTW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpgtd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPGTD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpgtb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPGTB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpgtq"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPGTQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpgtq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPGTQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpistri"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPISTRI, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpistri"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPISTRI, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpistrm"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPISTRM, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpistrm"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPISTRM, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpextrb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPEXTRB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpextrq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPEXTRQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pextrq"), FCML_ASM_DIALECT_INSTRUCTION( F_PEXTRQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pextrb"), FCML_ASM_DIALECT_INSTRUCTION( F_PEXTRB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pextrd"), FCML_ASM_DIALECT_INSTRUCTION( F_PEXTRD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpextrd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPEXTRD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pextrw"), FCML_ASM_DIALECT_INSTRUCTION( F_PEXTRW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpextrw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPEXTRW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDD, FCML_AM_ALL ), 0 }, { FCML_TEXT("phaddd"), FCML_ASM_DIALECT_INSTRUCTION( F_PHADDD, FCML_AM_ALL ), 0 }, { FCML_TEXT("phaddw"), FCML_ASM_DIALECT_INSTRUCTION( F_PHADDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("phaddsw"), FCML_ASM_DIALECT_INSTRUCTION( F_PHADDSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddsw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("phminposuw"), FCML_ASM_DIALECT_INSTRUCTION( F_PHMINPOSUW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphminposuw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHMINPOSUW, FCML_AM_ALL ), 0 }, { FCML_TEXT("phsubd"), FCML_ASM_DIALECT_INSTRUCTION( F_PHSUBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("phsubw"), FCML_ASM_DIALECT_INSTRUCTION( F_PHSUBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphsubd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHSUBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphsubw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHSUBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("phsubsw"), FCML_ASM_DIALECT_INSTRUCTION( F_PHSUBSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphsubsw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHSUBSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pinsrd"), FCML_ASM_DIALECT_INSTRUCTION( F_PINSRD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpinsrq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPINSRQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pinsrq"), FCML_ASM_DIALECT_INSTRUCTION( F_PINSRQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pinsrb"), FCML_ASM_DIALECT_INSTRUCTION( F_PINSRB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpinsrd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPINSRD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpinsrb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPINSRB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pinsrw"), FCML_ASM_DIALECT_INSTRUCTION( F_PINSRW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpinsrw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPINSRW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmaddubsw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMADDUBSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaddubsw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMADDUBSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmaddwd"), FCML_ASM_DIALECT_INSTRUCTION( F_PMADDWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaddwd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMADDWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmaxsb"), FCML_ASM_DIALECT_INSTRUCTION( F_PMAXSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaxsb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMAXSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmaxsd"), FCML_ASM_DIALECT_INSTRUCTION( F_PMAXSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaxsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMAXSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmaxsw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMAXSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaxsw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMAXSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmaxub"), FCML_ASM_DIALECT_INSTRUCTION( F_PMAXUB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaxub"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMAXUB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmaxud"), FCML_ASM_DIALECT_INSTRUCTION( F_PMAXUD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaxud"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMAXUD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmaxuw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMAXUW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaxuw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMAXUW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pminsb"), FCML_ASM_DIALECT_INSTRUCTION( F_PMINSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpminsb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMINSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pminsd"), FCML_ASM_DIALECT_INSTRUCTION( F_PMINSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpminsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMINSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pminsw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMINSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpminsw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMINSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pminuw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMINUW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpminuw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMINUW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pminub"), FCML_ASM_DIALECT_INSTRUCTION( F_PMINUB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpminub"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMINUB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pminud"), FCML_ASM_DIALECT_INSTRUCTION( F_PMINUD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpminud"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMINUD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovmskb"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVMSKB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovmskb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVMSKB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovsxbq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVSXBQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovsxbw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVSXBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovsxwq"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVSXWQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovsxwq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVSXWQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovsxwd"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVSXWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovsxbd"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVSXBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovsxdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVSXDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovsxwd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVSXWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovsxbq"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVSXBQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovsxbw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVSXBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovsxdq"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVSXDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovsxbd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVSXBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovzxwd"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVZXWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovzxdq"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVZXDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovzxdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVZXDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovzxwq"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVZXWQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovzxbq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVZXBQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovzxbq"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVZXBQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovzxwd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVZXWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovzxbd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVZXBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovzxwq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVZXWQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovzxbd"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVZXBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovzxbw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVZXBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovzxbw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVZXBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmuldq"), FCML_ASM_DIALECT_INSTRUCTION( F_PMULDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmulhrsw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMULHRSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmulhuw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMULHUW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmuldq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMULDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmulhrsw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMULHRSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmulhuw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMULHUW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmulhw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMULHW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmulhw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMULHW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmuludq"), FCML_ASM_DIALECT_INSTRUCTION( F_PMULUDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmuludq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMULUDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmullw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMULLW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmulld"), FCML_ASM_DIALECT_INSTRUCTION( F_PMULLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmulld"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMULLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmullw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMULLW, FCML_AM_ALL ), 0 }, { FCML_TEXT("popcnt"), FCML_ASM_DIALECT_INSTRUCTION( F_POPCNT, FCML_AM_ALL ), 0 }, { FCML_TEXT("por"), FCML_ASM_DIALECT_INSTRUCTION( F_POR, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpor"), FCML_ASM_DIALECT_INSTRUCTION( F_VPOR, FCML_AM_ALL ), 0 }, { FCML_TEXT("prefetcht2"), FCML_ASM_DIALECT_INSTRUCTION( F_PREFETCHT2, FCML_AM_ALL ), 0 }, { FCML_TEXT("prefetchw"), FCML_ASM_DIALECT_INSTRUCTION( F_PREFETCHW, FCML_AM_ALL ), 0 }, { FCML_TEXT("prefetcht1"), FCML_ASM_DIALECT_INSTRUCTION( F_PREFETCHT1, FCML_AM_ALL ), 0 }, { FCML_TEXT("prefetchnta"), FCML_ASM_DIALECT_INSTRUCTION( F_PREFETCHNTA, FCML_AM_ALL ), 0 }, { FCML_TEXT("prefetcht0"), FCML_ASM_DIALECT_INSTRUCTION( F_PREFETCHT0, FCML_AM_ALL ), 0 }, { FCML_TEXT("psadbw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSADBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsadbw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSADBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pshufb"), FCML_ASM_DIALECT_INSTRUCTION( F_PSHUFB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pshufd"), FCML_ASM_DIALECT_INSTRUCTION( F_PSHUFD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pshufhw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSHUFHW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshufd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHUFD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshufb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHUFB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pshuflw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSHUFLW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pshufw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSHUFW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshuflw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHUFLW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshufhw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHUFHW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsignb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSIGNB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsignd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSIGND, FCML_AM_ALL ), 0 }, { FCML_TEXT("psignw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSIGNW, FCML_AM_ALL ), 0 }, { FCML_TEXT("psignb"), FCML_ASM_DIALECT_INSTRUCTION( F_PSIGNB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsignw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSIGNW, FCML_AM_ALL ), 0 }, { FCML_TEXT("psignd"), FCML_ASM_DIALECT_INSTRUCTION( F_PSIGND, FCML_AM_ALL ), 0 }, { FCML_TEXT("pslldq"), FCML_ASM_DIALECT_INSTRUCTION( F_PSLLDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpslldq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSLLDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("psllq"), FCML_ASM_DIALECT_INSTRUCTION( F_PSLLQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pslld"), FCML_ASM_DIALECT_INSTRUCTION( F_PSLLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsllw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSLLW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsllq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSLLQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("psllw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSLLW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpslld"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSLLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsraw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSRAW, FCML_AM_ALL ), 0 }, { FCML_TEXT("psrad"), FCML_ASM_DIALECT_INSTRUCTION( F_PSRAD, FCML_AM_ALL ), 0 }, { FCML_TEXT("psraw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSRAW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsrad"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSRAD, FCML_AM_ALL ), 0 }, { FCML_TEXT("psrldq"), FCML_ASM_DIALECT_INSTRUCTION( F_PSRLDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsrldq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSRLDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsrlq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSRLQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("psrlq"), FCML_ASM_DIALECT_INSTRUCTION( F_PSRLQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("psrld"), FCML_ASM_DIALECT_INSTRUCTION( F_PSRLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("psrlw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSRLW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsrld"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSRLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsrlw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSRLW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsubd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSUBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("psubd"), FCML_ASM_DIALECT_INSTRUCTION( F_PSUBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("psubw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSUBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsubb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSUBB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsubq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSUBQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("psubb"), FCML_ASM_DIALECT_INSTRUCTION( F_PSUBB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsubw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSUBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("psubq"), FCML_ASM_DIALECT_INSTRUCTION( F_PSUBQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("psubsb"), FCML_ASM_DIALECT_INSTRUCTION( F_PSUBSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsubsw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSUBSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsubsb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSUBSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("psubsw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSUBSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsubusw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSUBUSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsubusb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSUBUSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("psubusb"), FCML_ASM_DIALECT_INSTRUCTION( F_PSUBUSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("psubusw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSUBUSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vptest"), FCML_ASM_DIALECT_INSTRUCTION( F_VPTEST, FCML_AM_ALL ), 0 }, { FCML_TEXT("ptest"), FCML_ASM_DIALECT_INSTRUCTION( F_PTEST, FCML_AM_ALL ), 0 }, { FCML_TEXT("punpcklbw"), FCML_ASM_DIALECT_INSTRUCTION( F_PUNPCKLBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("punpcklqdq"), FCML_ASM_DIALECT_INSTRUCTION( F_PUNPCKLQDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpunpcklwd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPUNPCKLWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpunpcklqdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPUNPCKLQDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpunpcklbw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPUNPCKLBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("punpcklwd"), FCML_ASM_DIALECT_INSTRUCTION( F_PUNPCKLWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("punpckldq"), FCML_ASM_DIALECT_INSTRUCTION( F_PUNPCKLDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpunpckldq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPUNPCKLDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpunpckhwd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPUNPCKHWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("punpckhdq"), FCML_ASM_DIALECT_INSTRUCTION( F_PUNPCKHDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("punpckhwd"), FCML_ASM_DIALECT_INSTRUCTION( F_PUNPCKHWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("punpckhqdq"), FCML_ASM_DIALECT_INSTRUCTION( F_PUNPCKHQDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpunpckhqdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPUNPCKHQDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpunpckhbw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPUNPCKHBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("punpckhbw"), FCML_ASM_DIALECT_INSTRUCTION( F_PUNPCKHBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpunpckhdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPUNPCKHDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pxor"), FCML_ASM_DIALECT_INSTRUCTION( F_PXOR, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpxor"), FCML_ASM_DIALECT_INSTRUCTION( F_VPXOR, FCML_AM_ALL ), 0 }, { FCML_TEXT("prefetch"), FCML_ASM_DIALECT_INSTRUCTION( F_PREFETCH, FCML_AM_ALL ), 0 }, { FCML_TEXT("rcl"), FCML_ASM_DIALECT_INSTRUCTION( F_RCL, FCML_AM_ALL ), 0 }, { FCML_TEXT("rcr"), FCML_ASM_DIALECT_INSTRUCTION( F_RCR, FCML_AM_ALL ), 0 }, { FCML_TEXT("rol"), FCML_ASM_DIALECT_INSTRUCTION( F_ROL, FCML_AM_ALL ), 0 }, { FCML_TEXT("ror"), FCML_ASM_DIALECT_INSTRUCTION( F_ROR, FCML_AM_ALL ), 0 }, { FCML_TEXT("ret"), FCML_ASM_DIALECT_INSTRUCTION( F_RET, FCML_AM_ALL ), 0 }, { FCML_TEXT("retf"), FCML_ASM_DIALECT_INSTRUCTION( F_RETF, FCML_AM_ALL ), 0 }, { FCML_TEXT("rcpps"), FCML_ASM_DIALECT_INSTRUCTION( F_RCPPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vrcpps"), FCML_ASM_DIALECT_INSTRUCTION( F_VRCPPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("rcpss"), FCML_ASM_DIALECT_INSTRUCTION( F_RCPSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vrcpss"), FCML_ASM_DIALECT_INSTRUCTION( F_VRCPSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("rdfsbase"), FCML_ASM_DIALECT_INSTRUCTION( F_RDFSBASE, FCML_AM_ALL ), 0 }, { FCML_TEXT("rdgsbase"), FCML_ASM_DIALECT_INSTRUCTION( F_RDGSBASE, FCML_AM_ALL ), 0 }, { FCML_TEXT("rdrand"), FCML_ASM_DIALECT_INSTRUCTION( F_RDRAND, FCML_AM_ALL ), 0 }, { FCML_TEXT("rdtscp"), FCML_ASM_DIALECT_INSTRUCTION( F_RDTSCP, FCML_AM_ALL ), 0 }, { FCML_TEXT("rdtsc"), FCML_ASM_DIALECT_INSTRUCTION( F_RDTSC, FCML_AM_ALL ), 0 }, { FCML_TEXT("rdpmc"), FCML_ASM_DIALECT_INSTRUCTION( F_RDPMC, FCML_AM_ALL ), 0 }, { FCML_TEXT("rdmsr"), FCML_ASM_DIALECT_INSTRUCTION( F_RDMSR, FCML_AM_ALL ), 0 }, { FCML_TEXT("roundpd"), FCML_ASM_DIALECT_INSTRUCTION( F_ROUNDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vroundpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VROUNDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("roundps"), FCML_ASM_DIALECT_INSTRUCTION( F_ROUNDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vroundps"), FCML_ASM_DIALECT_INSTRUCTION( F_VROUNDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("roundsd"), FCML_ASM_DIALECT_INSTRUCTION( F_ROUNDSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vroundsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VROUNDSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("roundss"), FCML_ASM_DIALECT_INSTRUCTION( F_ROUNDSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vroundss"), FCML_ASM_DIALECT_INSTRUCTION( F_VROUNDSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("rsm"), FCML_ASM_DIALECT_INSTRUCTION( F_RSM, FCML_AM_ALL ), 0 }, { FCML_TEXT("rsqrtps"), FCML_ASM_DIALECT_INSTRUCTION( F_RSQRTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vrsqrtps"), FCML_ASM_DIALECT_INSTRUCTION( F_VRSQRTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("rsqrtss"), FCML_ASM_DIALECT_INSTRUCTION( F_RSQRTSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vrsqrtss"), FCML_ASM_DIALECT_INSTRUCTION( F_VRSQRTSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("sahf"), FCML_ASM_DIALECT_INSTRUCTION( F_SAHF, FCML_AM_ALL ), 0 }, { FCML_TEXT("sar"), FCML_ASM_DIALECT_INSTRUCTION( F_SAR, FCML_AM_ALL ), 0 }, { FCML_TEXT("shl;sal"), FCML_ASM_DIALECT_INSTRUCTION( F_SHL, FCML_AM_ALL ), 0 }, { FCML_TEXT("shr"), FCML_ASM_DIALECT_INSTRUCTION( F_SHR, FCML_AM_ALL ), 0 }, { FCML_TEXT("sbb"), FCML_ASM_DIALECT_INSTRUCTION( F_SBB, FCML_AM_ALL ), 0 }, { FCML_TEXT("scas;scasb[ts]"), FCML_ASM_DIALECT_INSTRUCTION( F_SCAS, FCML_AM_RM8 ), 0 }, { FCML_TEXT("scas;scasw[ts,ow,a*];scasd[ts,od,a*];scasq[ts,oq,a*]"), FCML_ASM_DIALECT_INSTRUCTION( F_SCAS, FCML_AM_RMO ), 0 }, { FCML_TEXT("set"), FCML_ASM_DIALECT_INSTRUCTION( F_SET, FCML_AM_ALL ), 0 }, { FCML_TEXT("stos;stosb[ts]"), FCML_ASM_DIALECT_INSTRUCTION( F_STOS, FCML_AM_RM8 ), 0 }, { FCML_TEXT("stos;stosw[ts,ow,a*];stosd[ts,od,a*];stosq[ts,oq,a*]"), FCML_ASM_DIALECT_INSTRUCTION( F_STOS, FCML_AM_RMO ), 0 }, { FCML_TEXT("sub"), FCML_ASM_DIALECT_INSTRUCTION( F_SUB, FCML_AM_ALL ), 0 }, { FCML_TEXT("sfence"), FCML_ASM_DIALECT_INSTRUCTION( F_SFENCE, FCML_AM_ALL ), 0 }, { FCML_TEXT("sgdt"), FCML_ASM_DIALECT_INSTRUCTION( F_SGDT, FCML_AM_ALL ), 0 }, { FCML_TEXT("shld"), FCML_ASM_DIALECT_INSTRUCTION( F_SHLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("shrd"), FCML_ASM_DIALECT_INSTRUCTION( F_SHRD, FCML_AM_ALL ), 0 }, { FCML_TEXT("skinit"), FCML_ASM_DIALECT_INSTRUCTION( F_SKINIT, FCML_AM_ALL ), 0 }, { FCML_TEXT("slwpcb"), FCML_ASM_DIALECT_INSTRUCTION( F_SLWPCB, FCML_AM_ALL ), 0 }, { FCML_TEXT("shufpd"), FCML_ASM_DIALECT_INSTRUCTION( F_SHUFPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vshufpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VSHUFPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("shufps"), FCML_ASM_DIALECT_INSTRUCTION( F_SHUFPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vshufps"), FCML_ASM_DIALECT_INSTRUCTION( F_VSHUFPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("sidt"), FCML_ASM_DIALECT_INSTRUCTION( F_SIDT, FCML_AM_ALL ), 0 }, { FCML_TEXT("sldt"), FCML_ASM_DIALECT_INSTRUCTION( F_SLDT, FCML_AM_ALL ), 0 }, { FCML_TEXT("smsw"), FCML_ASM_DIALECT_INSTRUCTION( F_SMSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("sqrtpd"), FCML_ASM_DIALECT_INSTRUCTION( F_SQRTPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vsqrtpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VSQRTPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("sqrtps"), FCML_ASM_DIALECT_INSTRUCTION( F_SQRTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vsqrtps"), FCML_ASM_DIALECT_INSTRUCTION( F_VSQRTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("sqrtsd"), FCML_ASM_DIALECT_INSTRUCTION( F_SQRTSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vsqrtsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VSQRTSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("sqrtss"), FCML_ASM_DIALECT_INSTRUCTION( F_SQRTSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vsqrtss"), FCML_ASM_DIALECT_INSTRUCTION( F_VSQRTSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("stc"), FCML_ASM_DIALECT_INSTRUCTION( F_STC, FCML_AM_ALL ), 0 }, { FCML_TEXT("std"), FCML_ASM_DIALECT_INSTRUCTION( F_STD, FCML_AM_ALL ), 0 }, { FCML_TEXT("stgi"), FCML_ASM_DIALECT_INSTRUCTION( F_STGI, FCML_AM_ALL ), 0 }, { FCML_TEXT("sti"), FCML_ASM_DIALECT_INSTRUCTION( F_STI, FCML_AM_ALL ), 0 }, { FCML_TEXT("stmxcsr"), FCML_ASM_DIALECT_INSTRUCTION( F_STMXCSR, FCML_AM_ALL ), 0 }, { FCML_TEXT("vstmxcsr"), FCML_ASM_DIALECT_INSTRUCTION( F_VSTMXCSR, FCML_AM_ALL ), 0 }, { FCML_TEXT("str"), FCML_ASM_DIALECT_INSTRUCTION( F_STR, FCML_AM_ALL ), 0 }, { FCML_TEXT("subpd"), FCML_ASM_DIALECT_INSTRUCTION( F_SUBPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vsubpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VSUBPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("subps"), FCML_ASM_DIALECT_INSTRUCTION( F_SUBPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vsubps"), FCML_ASM_DIALECT_INSTRUCTION( F_VSUBPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("subsd"), FCML_ASM_DIALECT_INSTRUCTION( F_SUBSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vsubsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VSUBSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("subss"), FCML_ASM_DIALECT_INSTRUCTION( F_SUBSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vsubss"), FCML_ASM_DIALECT_INSTRUCTION( F_VSUBSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("swapgs"), FCML_ASM_DIALECT_INSTRUCTION( F_SWAPGS, FCML_AM_ALL ), 0 }, { FCML_TEXT("syscall"), FCML_ASM_DIALECT_INSTRUCTION( F_SYSCALL, FCML_AM_ALL ), 0 }, { FCML_TEXT("sysenter"), FCML_ASM_DIALECT_INSTRUCTION( F_SYSENTER, FCML_AM_ALL ), 0 }, { FCML_TEXT("sysexit"), FCML_ASM_DIALECT_INSTRUCTION( F_SYSEXIT, FCML_AM_ALL ), 0 }, { FCML_TEXT("sysret"), FCML_ASM_DIALECT_INSTRUCTION( F_SYSRET, FCML_AM_ALL ), 0 }, { FCML_TEXT("test"), FCML_ASM_DIALECT_INSTRUCTION( F_TEST, FCML_AM_ALL ), 0 }, { FCML_TEXT("t1mskc"), FCML_ASM_DIALECT_INSTRUCTION( F_T1MSKC, FCML_AM_ALL ), 0 }, { FCML_TEXT("ucomisd"), FCML_ASM_DIALECT_INSTRUCTION( F_UCOMISD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vucomisd"), FCML_ASM_DIALECT_INSTRUCTION( F_VUCOMISD, FCML_AM_ALL ), 0 }, { FCML_TEXT("ucomiss"), FCML_ASM_DIALECT_INSTRUCTION( F_UCOMISS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vucomiss"), FCML_ASM_DIALECT_INSTRUCTION( F_VUCOMISS, FCML_AM_ALL ), 0 }, { FCML_TEXT("ud2"), FCML_ASM_DIALECT_INSTRUCTION( F_UD2, FCML_AM_ALL ), 0 }, { FCML_TEXT("unpckhpd"), FCML_ASM_DIALECT_INSTRUCTION( F_UNPCKHPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vunpckhpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VUNPCKHPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("unpckhps"), FCML_ASM_DIALECT_INSTRUCTION( F_UNPCKHPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vunpckhps"), FCML_ASM_DIALECT_INSTRUCTION( F_VUNPCKHPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("unpcklpd"), FCML_ASM_DIALECT_INSTRUCTION( F_UNPCKLPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vunpcklpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VUNPCKLPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("unpcklps"), FCML_ASM_DIALECT_INSTRUCTION( F_UNPCKLPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vunpcklps"), FCML_ASM_DIALECT_INSTRUCTION( F_VUNPCKLPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmload"), FCML_ASM_DIALECT_INSTRUCTION( F_VMLOAD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmrun"), FCML_ASM_DIALECT_INSTRUCTION( F_VMRUN, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmsave"), FCML_ASM_DIALECT_INSTRUCTION( F_VMSAVE, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfrczpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFRCZPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfrczps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFRCZPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfrczsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFRCZSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfrczss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFRCZSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmov"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMOV, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpermil2pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERMIL2PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpermil2ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERMIL2PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddbd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddbw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddbq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDBQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphadddq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddubd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDUBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddubq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDUBQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddubw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDUBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddudq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDUDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphadduwd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDUWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphadduwq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDUWQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddwd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddwq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDWQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphsubbw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHSUBBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphsubdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHSUBDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphsubdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHSUBDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphsubwd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHSUBWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacsdd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSDD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacsdqh"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSDQH, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacsdql"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSDQL, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacssdd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSSDD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacssdqh"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSSDQH, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacssdql"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSSDQL, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacsswd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSSWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacssww"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSSWW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacswd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacsww"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSWW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmadcsswd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMADCSSWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmadcswd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMADCSWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpperm"), FCML_ASM_DIALECT_INSTRUCTION( F_VPPERM, FCML_AM_ALL ), 0 }, { FCML_TEXT("vprotd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPROTD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vprotb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPROTB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vprotq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPROTQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vprotw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPROTW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshab"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHAB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshad"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHAD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshaq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHAQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshaw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHAW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshlb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHLB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshld"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshlq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHLQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshlw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHLW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd213pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD213PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd132pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD132PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd231pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD231PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd231ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD231PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd132ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD132PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd213ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD213PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd132sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD132SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd213sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD213SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd231sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD231SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd132ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD132SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd213ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD213SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd231ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD231SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddsub132pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSUB132PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddsub213pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSUB213PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddsubpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSUBPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddsub231pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSUB231PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddsub231ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSUB231PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddsubps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSUBPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddsub132ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSUB132PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddsub213ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSUB213PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubaddpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBADDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubadd213pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBADD213PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubadd132pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBADD132PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubadd231pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBADD231PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubaddps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBADDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubadd213ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBADD213PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubadd132ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBADD132PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubadd231ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBADD231PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub213pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB213PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub132pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB132PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub231pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB231PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub213ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB213PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub132ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB132PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub231ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB231PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub231sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB231SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub132sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB132SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub213sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB213SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub231ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB231SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub213ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB213SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub132ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB132SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd231pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD231PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmaddpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd132pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD132PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd213pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD213PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd231ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD231PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd132ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD132PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd213ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD213PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmaddps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd213sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD213SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmaddsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADDSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd231sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD231SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd132sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD132SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd213ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD213SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmaddss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADDSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd231ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD231SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd132ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD132SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub132pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB132PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub213pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB213PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub231pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB231PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsubpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUBPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsubps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUBPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub213ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB213PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub132ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB132PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub231ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB231PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsubsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUBSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub231sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB231SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub213sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB213SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub132sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB132SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsubss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUBSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub132ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB132SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub213ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB213SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub231ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB231SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("bextr"), FCML_ASM_DIALECT_INSTRUCTION( F_BEXTR, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpbroadcastw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPBROADCASTW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpbroadcastb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPBROADCASTB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpbroadcastd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPBROADCASTD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpbroadcastq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPBROADCASTQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmptrld"), FCML_ASM_DIALECT_INSTRUCTION( F_VMPTRLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmptrst"), FCML_ASM_DIALECT_INSTRUCTION( F_VMPTRST, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmclear"), FCML_ASM_DIALECT_INSTRUCTION( F_VMCLEAR, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmread"), FCML_ASM_DIALECT_INSTRUCTION( F_VMREAD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmwrite"), FCML_ASM_DIALECT_INSTRUCTION( F_VMWRITE, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmlaunch"), FCML_ASM_DIALECT_INSTRUCTION( F_VMLAUNCH, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmresume"), FCML_ASM_DIALECT_INSTRUCTION( F_VMRESUME, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmxoff"), FCML_ASM_DIALECT_INSTRUCTION( F_VMXOFF, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmxon"), FCML_ASM_DIALECT_INSTRUCTION( F_VMXON, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmcall"), FCML_ASM_DIALECT_INSTRUCTION( F_VMCALL, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmfunc"), FCML_ASM_DIALECT_INSTRUCTION( F_VMFUNC, FCML_AM_ALL ), 0 }, { FCML_TEXT("vbroadcastsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VBROADCASTSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vbroadcastss"), FCML_ASM_DIALECT_INSTRUCTION( F_VBROADCASTSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vbroadcasti128"), FCML_ASM_DIALECT_INSTRUCTION( F_VBROADCASTI128, FCML_AM_ALL ), 0 }, { FCML_TEXT("vbroadcastf128"), FCML_ASM_DIALECT_INSTRUCTION( F_VBROADCASTF128, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtph2ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTPH2PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtps2ph"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTPS2PH, FCML_AM_ALL ), 0 }, { FCML_TEXT("verr"), FCML_ASM_DIALECT_INSTRUCTION( F_VERR, FCML_AM_ALL ), 0 }, { FCML_TEXT("verw"), FCML_ASM_DIALECT_INSTRUCTION( F_VERW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmmcall"), FCML_ASM_DIALECT_INSTRUCTION( F_VMMCALL, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpermilpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERMILPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpermilps"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERMILPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsllvq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSLLVQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vperm2f128"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERM2F128, FCML_AM_ALL ), 0 }, { FCML_TEXT("vperm2i128"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERM2I128, FCML_AM_ALL ), 0 }, { FCML_TEXT("vextracti128"), FCML_ASM_DIALECT_INSTRUCTION( F_VEXTRACTI128, FCML_AM_ALL ), 0 }, { FCML_TEXT("vinserti128"), FCML_ASM_DIALECT_INSTRUCTION( F_VINSERTI128, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsravd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSRAVD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpermd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERMD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsllvd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSLLVD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsrlvd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSRLVD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsrlvq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSRLVQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpermpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERMPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpermq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERMQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpermps"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERMPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vtestps"), FCML_ASM_DIALECT_INSTRUCTION( F_VTESTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vtestpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VTESTPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vgatherdpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VGATHERDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vgatherqpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VGATHERQPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vgatherdps"), FCML_ASM_DIALECT_INSTRUCTION( F_VGATHERDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vgatherqps"), FCML_ASM_DIALECT_INSTRUCTION( F_VGATHERQPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpgatherdd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPGATHERDD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpgatherqd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPGATHERQD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpgatherdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPGATHERDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpgatherqq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPGATHERQQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vzeroall"), FCML_ASM_DIALECT_INSTRUCTION( F_VZEROALL, FCML_AM_ALL ), 0 }, { FCML_TEXT("vzeroupper"), FCML_ASM_DIALECT_INSTRUCTION( F_VZEROUPPER, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcomb;vpcomltb[p00];vpcomleb[p01];vpcomgtb[p02];vpcomgeb[p03];vpcomeqb[p04];vpcomneqb[p05];vpcomfalseb[p06];vpcomtrueb[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCOMB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcomw;vpcomltw[p00];vpcomlew[p01];vpcomgtw[p02];vpcomgew[p03];vpcomeqw[p04];vpcomneqw[p05];vpcomfalsew[p06];vpcomtruew[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCOMW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcomd;vpcomltd[p00];vpcomled[p01];vpcomgtd[p02];vpcomged[p03];vpcomeqd[p04];vpcomneqd[p05];vpcomfalsed[p06];vpcomtrued[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCOMD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcomq;vpcomltq[p00];vpcomleq[p01];vpcomgtq[p02];vpcomgeq[p03];vpcomeqq[p04];vpcomneqq[p05];vpcomfalseq[p06];vpcomtrueq[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCOMQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcomub;vpcomltub[p00];vpcomleub[p01];vpcomgtub[p02];vpcomgeub[p03];vpcomequb[p04];vpcomnequb[p05];vpcomfalseub[p06];vpcomtrueub[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCOMUB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcomuw;vpcomltuw[p00];vpcomleuw[p01];vpcomgtuw[p02];vpcomgeuw[p03];vpcomequw[p04];vpcomnequw[p05];vpcomfalseuw[p06];vpcomtrueuw[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCOMUW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcomud;vpcomltud[p00];vpcomleud[p01];vpcomgtud[p02];vpcomgeud[p03];vpcomequd[p04];vpcomnequd[p05];vpcomfalseud[p06];vpcomtrueud[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCOMUD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcomuq;vpcomltuq[p00];vpcomleuq[p01];vpcomgtuq[p02];vpcomgeuq[p03];vpcomequq[p04];vpcomnequq[p05];vpcomfalseuq[p06];vpcomtrueuq[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCOMUQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("wait;fwait"), FCML_ASM_DIALECT_INSTRUCTION( F_WAIT, FCML_AM_ALL ), 0 }, { FCML_TEXT("wbinvd"), FCML_ASM_DIALECT_INSTRUCTION( F_WBINVD, FCML_AM_ALL ), 0 }, { FCML_TEXT("wrfsbase"), FCML_ASM_DIALECT_INSTRUCTION( F_WRFSBASE, FCML_AM_ALL ), 0 }, { FCML_TEXT("wrgsbase"), FCML_ASM_DIALECT_INSTRUCTION( F_WRGSBASE, FCML_AM_ALL ), 0 }, { FCML_TEXT("wrmsr"), FCML_ASM_DIALECT_INSTRUCTION( F_WRMSR, FCML_AM_ALL ), 0 }, { FCML_TEXT("xlat;xlatb[ts]"), FCML_ASM_DIALECT_INSTRUCTION( F_XLAT, FCML_AM_ALL ), 0 }, { FCML_TEXT("xor"), FCML_ASM_DIALECT_INSTRUCTION( F_XOR, FCML_AM_ALL ), 0 }, { FCML_TEXT("xadd"), FCML_ASM_DIALECT_INSTRUCTION( F_XADD, FCML_AM_ALL ), 0 }, { FCML_TEXT("xchg"), FCML_ASM_DIALECT_INSTRUCTION( F_XCHG, FCML_AM_ALL ), 0 }, { FCML_TEXT("xgetbv"), FCML_ASM_DIALECT_INSTRUCTION( F_XGETBV, FCML_AM_ALL ), 0 }, { FCML_TEXT("xorpd"), FCML_ASM_DIALECT_INSTRUCTION( F_XORPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vxorpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VXORPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("xorps"), FCML_ASM_DIALECT_INSTRUCTION( F_XORPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vxorps"), FCML_ASM_DIALECT_INSTRUCTION( F_VXORPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("xrstor"), FCML_ASM_DIALECT_INSTRUCTION( F_XRSTOR, FCML_AM_ALL ), 0 }, { FCML_TEXT("xrstor64"), FCML_ASM_DIALECT_INSTRUCTION( F_XRSTOR64, FCML_AM_ALL ), 0 }, { FCML_TEXT("xsave"), FCML_ASM_DIALECT_INSTRUCTION( F_XSAVE, FCML_AM_ALL ), 0 }, { FCML_TEXT("xsave64"), FCML_ASM_DIALECT_INSTRUCTION( F_XSAVE64, FCML_AM_ALL ), 0 }, { FCML_TEXT("xsaveopt"), FCML_ASM_DIALECT_INSTRUCTION( F_XSAVEOPT, FCML_AM_ALL ), 0 }, { FCML_TEXT("xsaveopt64"), FCML_ASM_DIALECT_INSTRUCTION( F_XSAVEOPT64, FCML_AM_ALL ), 0 }, { FCML_TEXT("xsetbv"), FCML_ASM_DIALECT_INSTRUCTION( F_XSETBV, FCML_AM_ALL ), 0 }, { FCML_TEXT("mulx"), FCML_ASM_DIALECT_INSTRUCTION( F_MULX, FCML_AM_ALL ), 0 }, { FCML_TEXT("pdep"), FCML_ASM_DIALECT_INSTRUCTION( F_PDEP, FCML_AM_ALL ), 0 }, { FCML_TEXT("pext"), FCML_ASM_DIALECT_INSTRUCTION( F_PEXT, FCML_AM_ALL ), 0 }, { FCML_TEXT("rorx"), FCML_ASM_DIALECT_INSTRUCTION( F_RORX, FCML_AM_ALL ), 0 }, { FCML_TEXT("shlx"), FCML_ASM_DIALECT_INSTRUCTION( F_SHLX, FCML_AM_ALL ), 0 }, { FCML_TEXT("shrx"), FCML_ASM_DIALECT_INSTRUCTION( F_SHRX, FCML_AM_ALL ), 0 }, { FCML_TEXT("sarx"), FCML_ASM_DIALECT_INSTRUCTION( F_SARX, FCML_AM_ALL ), 0 }, { FCML_TEXT("tzcnt"), FCML_ASM_DIALECT_INSTRUCTION( F_TZCNT, FCML_AM_ALL ), 0 }, { FCML_TEXT("tzmsk"), FCML_ASM_DIALECT_INSTRUCTION( F_TZMSK, FCML_AM_ALL ), 0 }, { FCML_TEXT("xabort"), FCML_ASM_DIALECT_INSTRUCTION( F_XABORT, FCML_AM_ALL ), 0 }, { FCML_TEXT("xbegin"), FCML_ASM_DIALECT_INSTRUCTION( F_XBEGIN, FCML_AM_ALL ), 0 }, { FCML_TEXT("xend"), FCML_ASM_DIALECT_INSTRUCTION( F_XEND, FCML_AM_ALL ), 0 }, { FCML_TEXT("xtest"), FCML_ASM_DIALECT_INSTRUCTION( F_XTEST, FCML_AM_ALL ), 0 }, { FCML_TEXT("rdseed"), FCML_ASM_DIALECT_INSTRUCTION( F_RDSEED, FCML_AM_ALL ), 0 }, { FCML_TEXT("clac"), FCML_ASM_DIALECT_INSTRUCTION( F_CLAC, FCML_AM_ALL ), 0 }, { FCML_TEXT("stac"), FCML_ASM_DIALECT_INSTRUCTION( F_STAC, FCML_AM_ALL ), 0 }, { NULL, 0, 0 } }; /* *********************/ /* * END OF MNEMONICS **/ /* *********************/ fcml_ceh_error fcml_ifn_asm_dialect_get_register_intel( const fcml_st_register *reg, fcml_string buffer, fcml_int buffer_length, fcml_bool is_rex ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_string printable_reg; error = fcml_fn_cmn_dialect_get_register( reg, &printable_reg, is_rex ); if ( error ) { return error; } fcml_fn_env_str_strncpy( buffer, printable_reg, buffer_length ); return error; } fcml_ceh_error fcml_ifn_asm_dialect_get_parsed_mnemonics_intel( const fcml_st_dialect *dialect, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_st_mp_mnemonic_set **mnemonics ) { fcml_string mnemonic_pattern = NULL; fcml_uint32_t keys[] = { FCML_ASM_DIALECT_INSTRUCTION( instruction->instruction, addr_mode->addr_mode ), FCML_ASM_DIALECT_INSTRUCTION( instruction->instruction, FCML_AM_ALL ) }; fcml_st_dialect_context_int *dialect_context = (fcml_st_dialect_context_int*) dialect; int i; for ( i = 0; i < sizeof( keys ) / sizeof(fcml_uint32_t) && !mnemonic_pattern; i++ ) { fcml_st_dialect_mnemonic *dialect_mnemonic = (fcml_st_dialect_mnemonic*) fcml_fn_coll_map_get( dialect_context->dialect_mnemonics_lookup, &( keys[i] ) ); if ( dialect_mnemonic ) { mnemonic_pattern = dialect_mnemonic->mnemonic; } } if ( !mnemonic_pattern ) { /* Choose best mnemonic for instruction.*/ mnemonic_pattern = instruction->mnemonic; } return fcml_fn_mp_parse_mnemonics( mnemonic_pattern, mnemonics ); } /** * Gets mnemonics for given addressing mode. This method is used by the assembler in order to get all mnemonics * that have to be supported for given addressing mode. Bear in mind that there are addressing modes/instruction forms which * have more than one mnemonics available. */ fcml_ceh_error fcml_ifn_asm_dialect_get_mnemonic_intel( const fcml_st_dialect *dialect, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_st_condition *condition, fcml_st_mp_mnemonic **mnemonics, int *mnemonics_counter ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_mp_mnemonic_set *mnemonic_set; error = fcml_ifn_asm_dialect_get_parsed_mnemonics_intel( dialect, instruction, addr_mode, &mnemonic_set ); if ( !error ) { error = fcml_fn_cmn_dialect_get_mnemonic( dialect, mnemonic_set, mnemonics, condition, mnemonics_counter ); fcml_fn_mp_free_mnemonics( mnemonic_set ); } return error; } fcml_ceh_error fcml_ifn_asm_dialect_assembler_preprocessor_intel( const fcml_st_assembler_conf *configuration, const fcml_st_dialect *dialect, fcml_st_instruction *instrunction, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_en_instruction instruction_code, fcml_st_mp_mnemonic *mnemonic, fcml_bool *has_been_changed ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_bool changed = FCML_FALSE; if ( mnemonic ) { /* * In case of Intel dialect, offsets encoded as effective addresses of type OFFSET * are always treated as indirect pointers. It means that every time you encode * offset as effective address of FCML_AF_OFFSET type it'll be encoded as * an indirect pointer. This rule is used to make Intel parser, where the immediate operands * are treated as direct pointers and offsets are always interpreted as indirect ones, works * as expected. */ /* JMP and CALL needs hint FCML_HINT_INDIRECT_POINTER explicitly set if * absolute offsets are used instead of immediate values. It has to be done * in order to make a difference between operands encoded as absolute offsets, * because without hints they would be assembled to indirect and direct branches. */ if ( ( instruction_code == F_JMP || instruction_code == F_CALL ) && instrunction->operands_count == 1 && instrunction->operands[0].type == FCML_OT_ADDRESS && instrunction->operands[0].address.address_form == FCML_AF_OFFSET ) { if ( !( instrunction->hints & ( FCML_HINT_DIRECT_POINTER | FCML_HINT_FAR_POINTER ) ) ) { instrunction->hints |= FCML_HINT_INDIRECT_POINTER; changed = FCML_TRUE; } if ( !( instrunction->hints & FCML_HINT_FAR_POINTER ) ) { instrunction->hints |= FCML_HINT_NEAR_POINTER; changed = FCML_TRUE; } } if ( has_been_changed ) { *has_been_changed = changed; } } return error; } fcml_string fcml_fnp_asm_dialect_get_pseudo_operation_mnemonic_intel( fcml_en_pseudo_operations pseudo_operation ) { fcml_string mnemonic = NULL; switch ( pseudo_operation ) { case FP_DB: mnemonic = fcml_fn_env_str_strdup( FCML_TEXT( "db" ) ); break; default: break; } return mnemonic; } fcml_st_dialect_pseudpo_operation_mnemonic fcml_iarr_dialect_pseudpo_operation_mnemonic_intel[] = { { "db", FP_DB }, { NULL, FP_NO_PSEUDO_OP } }; fcml_st_dialect_pseudpo_operation_mnemonic *fcml_ifn_asm_get_pseudo_operation_mnemonics_intel( void ) { return &fcml_iarr_dialect_pseudpo_operation_mnemonic_intel[0]; } fcml_ceh_error LIB_CALL fcml_fn_dialect_init_intel( fcml_uint32_t config_flags, fcml_st_dialect **dialect ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_dialect_context_int *dialect_context_intel = NULL; error = fcml_fn_asm_dialect_alloc_mnemonic_lookup( &dialect_context_intel, fcml_arr_dialect_intel_mnemonics, sizeof( fcml_arr_dialect_intel_mnemonics ) / sizeof(fcml_st_dialect_mnemonic) ); if ( error ) { fcml_fn_env_memory_free( dialect_context_intel ); return error; } /* Prepares dialect instance.*/ dialect_context_intel->get_mnemonic = &fcml_ifn_asm_dialect_get_mnemonic_intel; dialect_context_intel->get_parsed_mnemonics = &fcml_ifn_asm_dialect_get_parsed_mnemonics_intel; dialect_context_intel->render_mnemonic = &fcml_fn_cmn_dialect_render_mnemonic; dialect_context_intel->get_pseudo_operation_mnemonics = &fcml_ifn_asm_get_pseudo_operation_mnemonics_intel; dialect_context_intel->get_pseudo_operation_mnemonic = &fcml_fnp_asm_dialect_get_pseudo_operation_mnemonic_intel; dialect_context_intel->free_mnemonic = &fcml_fn_asm_dialect_free_mnemonic; dialect_context_intel->instruction_renderer = &fcml_fn_rend_render_instruction_intel; dialect_context_intel->instruction_parser = &fcml_fn_intel_parse_instruction_to_ast; dialect_context_intel->get_register = &fcml_ifn_asm_dialect_get_register_intel; dialect_context_intel->free_dialect = &fcml_fn_cmn_dialect_free; dialect_context_intel->assembler_preprocessor = &fcml_ifn_asm_dialect_assembler_preprocessor_intel; dialect_context_intel->disassembler_postprocessor = NULL; *dialect = (fcml_st_dialect*) dialect_context_intel; return error; } fcml-1.1.1/src/fcml_stream.c0000644000175000017500000001654112560745216012622 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_stream.h" #include "fcml_env_int.h" void fcml_fn_stream_seek( fcml_st_memory_stream *stream, fcml_int32_t offset, fcml_en_stream_seek_type type ) { switch ( type ) { case FCML_EN_ST_START: stream->offset = offset; break; case FCML_EN_ST_CURRENT: stream->offset += offset; break; case FCML_EN_ST_END: stream->offset = ( stream->size + offset ); break; } if ( stream->offset < 0 ) { stream->offset = 0; } if ( stream->offset > stream->size ) { stream->offset = stream->size; } } void fcml_fn_stream_clean( fcml_st_memory_stream *stream ) { fcml_fn_env_memory_clear( stream->base_address, stream->size ); stream->offset = 0; } fcml_uint8_t fcml_fn_stream_read( fcml_st_memory_stream *stream, fcml_bool *result ) { fcml_uint8_t *base_address = (fcml_uint8_t *) stream->base_address; *result = ( stream->offset == stream->size ) ? FCML_FALSE : FCML_TRUE; if ( *result ) { return base_address[stream->offset++]; } return 0; } fcml_bool fcml_fn_stream_write( fcml_st_memory_stream *stream, fcml_uint8_t data ) { fcml_bool result = FCML_FALSE; if ( stream->offset < stream->size ) { fcml_uint8_t *base_address = (fcml_uint8_t *) stream->base_address; base_address[stream->offset++] = data; result = FCML_TRUE; } return result; } fcml_uint8_t fcml_fn_stream_peek( fcml_st_memory_stream *stream, fcml_bool *result ) { fcml_uint8_t *base_address = (fcml_uint8_t *) stream->base_address; *result = ( stream->offset == stream->size ) ? FCML_FALSE : FCML_TRUE; if ( *result ) return base_address[stream->offset]; return 0; } fcml_int32_t fcml_fn_stream_size( const fcml_st_memory_stream *stream ) { return stream->size - stream->offset; } int fcml_fn_stream_read_bytes( fcml_st_memory_stream *stream, fcml_ptr buffer, fcml_usize size ) { if ( size == 0 ) { return 0; } fcml_uint8_t *destination_buffer = (fcml_uint8_t*) buffer; fcml_uint8_t *source_buffer = (fcml_uint8_t*) stream->base_address; fcml_usize i = 0; while ( stream->offset < stream->size && i < size ) { destination_buffer[i++] = source_buffer[stream->offset++]; } return i; } int fcml_fn_stream_write_bytes( fcml_st_memory_stream *stream, fcml_ptr buffer, fcml_usize size ) { if ( size == 0 ) { return 0; } fcml_uint8_t *source_buffer = (fcml_uint8_t*) buffer; fcml_uint8_t *destination_buffer = (fcml_uint8_t*) stream->base_address; fcml_usize i = 0; while ( stream->offset < stream->size && i < size ) { destination_buffer[stream->offset++] = source_buffer[i++]; } return i; } fcml_uint16_t fcml_fn_stream_read_word( fcml_st_memory_stream *stream, fcml_bool *result ) { fcml_uint16_t value = 0; if ( stream->size - stream->offset >= sizeof(fcml_uint16_t) ) { int offset = stream->offset; value |= ( (fcml_uint8_t*) stream->base_address )[offset]; value |= ( (fcml_uint8_t*) stream->base_address )[offset + 1] << 8; stream->offset += sizeof(fcml_uint16_t); *result = FCML_TRUE; } else { *result = FCML_FALSE; } return value; } fcml_uint32_t fcml_fn_stream_read_dword( fcml_st_memory_stream *stream, fcml_bool *result ) { fcml_uint32_t value = 0; if ( stream->size - stream->offset >= sizeof(fcml_uint32_t) ) { int offset = stream->offset; value |= ( (fcml_uint8_t*) stream->base_address )[offset]; value |= ( (fcml_uint8_t*) stream->base_address )[offset + 1] << 8; value |= ( (fcml_uint8_t*) stream->base_address )[offset + 2] << 16; value |= ( (fcml_uint8_t*) stream->base_address )[offset + 3] << 24; stream->offset += sizeof(fcml_uint32_t); *result = FCML_TRUE; } else { *result = FCML_FALSE; } return value; } fcml_uint64_t fcml_fn_stream_read_qword( fcml_st_memory_stream *stream, fcml_bool *result ) { fcml_uint64_t value = 0; if ( stream->size - stream->offset >= sizeof(fcml_uint64_t) ) { int i; int offset = stream->offset; for ( i = 0; i < sizeof(fcml_uint64_t); i++ ) { value |= ( (fcml_uint64_t) ( (fcml_uint8_t*) stream->base_address )[offset + i] ) << ( i << 3 ); } stream->offset += sizeof(fcml_uint64_t); *result = FCML_TRUE; } else { *result = FCML_FALSE; } return value; } fcml_bool fcml_fn_stream_write_word( fcml_st_memory_stream *stream, fcml_uint16_t data ) { fcml_bool result = FCML_FALSE; if ( stream->size - stream->offset >= sizeof(fcml_uint16_t) ) { int offset = stream->offset; fcml_uint8_t *buffer = (fcml_uint8_t*) stream->base_address; buffer[offset] = data & 0x00FF; buffer[offset + 1] = data >> 8; stream->offset += sizeof(fcml_uint16_t); result = FCML_TRUE; } return result; } fcml_bool fcml_fn_stream_write_dword( fcml_st_memory_stream *stream, fcml_uint32_t data ) { fcml_bool result = FCML_FALSE; if ( stream->size - stream->offset >= sizeof(fcml_uint32_t) ) { int offset = stream->offset; ( (fcml_uint8_t*) stream->base_address )[offset] = data; ( (fcml_uint8_t*) stream->base_address )[offset + 1] = data >> 8; ( (fcml_uint8_t*) stream->base_address )[offset + 2] = data >> 16; ( (fcml_uint8_t*) stream->base_address )[offset + 3] = data >> 24; stream->offset += sizeof(fcml_uint32_t); result = FCML_TRUE; } return result; } fcml_bool fcml_fn_stream_write_qword( fcml_st_memory_stream *stream, fcml_uint64_t data ) { fcml_bool result = FCML_FALSE; if ( stream->size - stream->offset >= sizeof(fcml_uint64_t) ) { int i; int offset = stream->offset; fcml_uint8_t *buffer = (fcml_uint8_t*) stream->base_address; for ( i = 0; i < sizeof(fcml_uint64_t); i++ ) { buffer[offset + i] = (fcml_uint8_t) ( data >> ( i << 3 ) ); } stream->offset += sizeof(fcml_uint64_t); result = FCML_TRUE; } return result; } fcml_stream_pointer fcml_fn_stream_save_point( const fcml_st_memory_stream *stream ) { return stream->offset; } void fcml_fn_stream_restore_point( fcml_st_memory_stream *stream, const fcml_stream_pointer stream_pointer ) { stream->offset = stream_pointer; } fcml_st_memory_stream fcml_fn_stream_wrap( fcml_string buffer, fcml_usize length ) { fcml_st_memory_stream stream = { 0 }; stream.base_address = buffer; stream.offset = 0; stream.size = length; return stream; } fcml-1.1.1/src/fcml_dialect_int.h0000644000175000017500000001236012560745216013606 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_ASM_DIALECT_INT_H_ #define FCML_ASM_DIALECT_INT_H_ #include #include #include #include #include #include #include "fcml_parser_int.h" #include "fcml_def.h" #include "fcml_stream.h" #include "fcml_mnemonic_parser.h" #define FCML_ASM_DIALECT_MAX_MNEMONIC_COUNT 50 #define FCML_ASM_DIALECT_INSTRUCTION( x, y ) ( ( ( x ) << 16 ) | ( y ) ) #define FCML_ASM_DIALECT_GET_INSTRUCTION( x ) ( ( x ) >> 16 ) #define FCML_ASM_DIALECT_GET_ADDR_MODE( x ) ( ( x ) & 0x0000FFFF ) typedef struct fcml_st_dialect_mnemonic { fcml_string mnemonic; fcml_uint32_t instruction; fcml_uint32_t flags; } fcml_st_dialect_mnemonic; typedef struct fcml_st_dialect_pseudpo_operation_mnemonic { fcml_string mnemonic; fcml_en_pseudo_operations pseudo_operation; } fcml_st_dialect_pseudpo_operation_mnemonic; typedef void (*fcml_fnp_asm_dialect_free_mnemonic)( fcml_st_mp_mnemonic *mnemonics ); typedef fcml_ceh_error (*fcml_fnp_asm_dialect_get_mnemonic)( const fcml_st_dialect *dialect, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_st_condition *condition, fcml_st_mp_mnemonic **mnemonics, int *mnemonic_counter ); typedef fcml_ceh_error (*fcml_fnp_asm_dialect_get_parsed_mnemonics)( const fcml_st_dialect *dialect, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_st_mp_mnemonic_set **mnemonics ); typedef fcml_string (*fcml_fnp_asm_dialect_render_mnemonic)( fcml_string mnemonic, fcml_st_condition *condition, fcml_uint8_t conditional_group, fcml_bool show_carry ); typedef fcml_string (*fcml_fnp_asm_dialect_get_pseudo_operation_mnemonic)( fcml_en_pseudo_operations pseudo_operation ); typedef fcml_ceh_error (*fcml_fnp_asm_dialect_get_register)( const fcml_st_register *reg, fcml_string buffer, fcml_int buffer_length, fcml_bool is_rex ); typedef fcml_ceh_error (*fcml_fnp_asm_dialect_prepare_assembler_preprocessor)( const fcml_st_assembler_conf *conf, const fcml_st_dialect *dialect, fcml_st_instruction *instrunction, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_en_instruction instruction, fcml_st_mp_mnemonic *mnemonic, fcml_bool *has_been_changed ); typedef fcml_ceh_error (*fcml_fnp_asm_dialect_prepare_disassembler_postprocessor)( const fcml_st_disassembler_conf *conf, const fcml_st_mp_mnemonic *mnemonic, fcml_st_disassembler_result *disassembler_result ); typedef fcml_ceh_error (*fcml_fnp_parse_instruction)( fcml_ip ip, const fcml_string asm_mnemonic, fcml_st_parser_ast *ast ); typedef fcml_ceh_error (*fcml_fnp_render_instruction)( const fcml_st_dialect *dialect, const fcml_st_render_config *config, fcml_st_memory_stream *output_stream, const fcml_st_disassembler_result *result ); typedef fcml_st_dialect_pseudpo_operation_mnemonic *(*fcml_fnp_asm_get_pseudo_operation_mnemonics)(); typedef void (*fcml_fnp_asm_dialect_free)( fcml_st_dialect *dialect ); /* Internal representation of dialect context.*/ typedef struct fcml_st_dialect_context_int { fcml_coll_map dialect_mnemonics_lookup; fcml_fnp_asm_dialect_get_mnemonic get_mnemonic; fcml_fnp_asm_get_pseudo_operation_mnemonics get_pseudo_operation_mnemonics; fcml_fnp_asm_dialect_get_parsed_mnemonics get_parsed_mnemonics; fcml_fnp_asm_dialect_get_pseudo_operation_mnemonic get_pseudo_operation_mnemonic; fcml_fnp_asm_dialect_free_mnemonic free_mnemonic; fcml_fnp_asm_dialect_render_mnemonic render_mnemonic; fcml_fnp_asm_dialect_get_register get_register; fcml_fnp_asm_dialect_prepare_assembler_preprocessor assembler_preprocessor; fcml_fnp_asm_dialect_prepare_disassembler_postprocessor disassembler_postprocessor; fcml_fnp_asm_dialect_free free_dialect; fcml_fnp_render_instruction instruction_renderer; fcml_fnp_parse_instruction instruction_parser; fcml_uint32_t config_flags; } fcml_st_dialect_context_int; fcml_st_mp_mnemonic *fcml_fn_asm_dialect_alloc_mnemonic_with_suffix( fcml_st_mp_mnemonic *mnemonic, fcml_string suffix ); fcml_st_mp_mnemonic *fcml_fn_asm_dialect_alloc_mnemonic( fcml_st_mp_mnemonic *mnemonic ); void fcml_fn_asm_dialect_free_mnemonic( fcml_st_mp_mnemonic *mnemonic ); fcml_ceh_error fcml_fn_asm_dialect_alloc_mnemonic_lookup( fcml_st_dialect_context_int **dialect_context, fcml_st_dialect_mnemonic *mnemonic, fcml_usize capacity ); void fcml_fn_asm_dialect_free_mnemonic_lookup( fcml_st_dialect_context_int *dialect_context ); #endif /* FCML_ASM_DIALECT_INT_H_ */ fcml-1.1.1/src/fcml_intel_parser_def.c0000644000175000017500000022167512560745216014642 00000000000000/* A Bison parser, made by GNU Bison 2.7.12-4996. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2013 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 . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this 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. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.7.12-4996" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 1 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Substitute the variable and function names. */ #define yyparse intel_parse #define yylex intel_lex #define yyerror intel_error #define yylval intel_lval #define yychar intel_char #define yydebug intel_debug #define yynerrs intel_nerrs /* Copy the first part of user declarations. */ /* Line 371 of yacc.c */ #line 24 "fcml_intel_parser_def.y" #include #include "fcml_parser_utils.h" void intel_error( struct fcml_st_parser_data *pd, const char *error ); /* Macro responsible for handling 'Out of memory' errors. */ #define HANDLE_ERRORS(x) if( !x ) { yyerror(pd, "Out of memory."); YYERROR; } /* Macro responsible for adding error messages to result. */ #define ADD_ERROR_MSG(x) { yyerror( pd, x ); } /* Line 371 of yacc.c */ #line 90 "fcml_intel_parser_def.c" # 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 # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* In a future release of Bison, this section will be replaced by #include "y.tab.h". */ #ifndef YY_INTEL_Y_TAB_H_INCLUDED # define YY_INTEL_Y_TAB_H_INCLUDED /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int intel_debug; #endif /* Tokens. */ #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 }; #endif /* Tokens. */ #define FCML_TK_UNEXPECTED 258 #define FCML_TK_REG_GPR 259 #define FCML_TK_REG_SIMD 260 #define FCML_TK_REG_FPU 261 #define FCML_TK_REG_SEG 262 #define FCML_TK_REG_CR 263 #define FCML_TK_REG_DR 264 #define FCML_TK_REG_RIP 265 #define FCML_TK_INTEGER 266 #define FCML_TK_FLOAT 267 #define FCML_TK_SIZE_OPERATOR 268 #define FCML_TK_SYMBOL 269 #define FCML_TK_HINTS 270 #define FCML_TK_EAO_HINTS 271 #define FCML_TK_SIB_HINT 272 #define FCML_TK_PREFIX 273 #define FCML_OP_UMINUS 274 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 387 of yacc.c */ #line 104 "fcml_intel_parser_def.y" /*Complex values.*/ fcml_st_ast_val_integer integer_value; fcml_st_ast_val_float float_value; fcml_st_register reg_value; fcml_st_ast_node *ast; struct { fcml_string text; int length; } symbol; fcml_st_size_operator size_operator; fcml_hints hints; fcml_prefixes prefixes; /* Line 387 of yacc.c */ #line 187 "fcml_intel_parser_def.c" } 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 intel_parse (void *YYPARSE_PARAM); #else int intel_parse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int intel_parse (struct fcml_st_parser_data *pd); #else int intel_parse (); #endif #endif /* ! YYPARSE_PARAM */ #endif /* !YY_INTEL_Y_TAB_H_INCLUDED */ /* Copy the second part of user declarations. */ /* Line 390 of yacc.c */ #line 119 "fcml_intel_parser_def.y" #include "fcml_intel_lexer.h" #define YYLEX_PARAM ((yyscan_t)pd->scannerInfo) /* Line 390 of yacc.c */ #line 219 "fcml_intel_parser_def.c" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ # define YY_(Msgid) Msgid # endif #endif #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if (! defined __GNUC__ || __GNUC__ < 2 \ || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) # define __attribute__(Spec) /* empty */ # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) #else # define YYUSE(E) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(N) (N) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int yyi) #else static int YYID (yyi) int yyi; #endif { return yyi; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ while (YYID (0)) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 8 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 166 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 30 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 14 /* YYNRULES -- Number of rules. */ #define YYNRULES 60 /* YYNRULES -- Number of states. */ #define YYNSTATES 99 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 274 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 28, 29, 21, 20, 25, 19, 2, 22, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 24, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 26, 2, 27, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 23 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 4, 6, 9, 13, 15, 18, 22, 25, 29, 34, 36, 39, 41, 43, 46, 48, 52, 54, 56, 58, 60, 64, 69, 74, 80, 82, 85, 87, 91, 97, 105, 113, 119, 125, 129, 133, 138, 142, 147, 149, 152, 155, 158, 162, 164, 166, 170, 174, 178, 182, 184, 187, 191, 193, 195, 197, 199, 201 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 31, 0, -1, -1, 32, -1, 14, 24, -1, 14, 24, 32, -1, 34, -1, 34, 36, -1, 34, 35, 36, -1, 33, 34, -1, 33, 34, 36, -1, 33, 34, 35, 36, -1, 18, -1, 33, 18, -1, 14, -1, 15, -1, 35, 15, -1, 37, -1, 36, 25, 37, -1, 42, -1, 41, -1, 38, -1, 43, -1, 26, 39, 27, -1, 13, 26, 39, 27, -1, 40, 26, 39, 27, -1, 13, 40, 26, 39, 27, -1, 43, -1, 17, 43, -1, 10, -1, 43, 20, 43, -1, 43, 20, 43, 21, 11, -1, 43, 20, 43, 21, 11, 20, 42, -1, 43, 20, 43, 21, 11, 19, 42, -1, 43, 20, 43, 20, 42, -1, 43, 20, 43, 19, 42, -1, 43, 20, 42, -1, 10, 20, 42, -1, 17, 43, 20, 42, -1, 43, 19, 42, -1, 17, 43, 19, 42, -1, 42, -1, 16, 42, -1, 17, 42, -1, 7, 24, -1, 42, 24, 42, -1, 11, -1, 12, -1, 42, 19, 42, -1, 42, 20, 42, -1, 42, 22, 42, -1, 42, 21, 42, -1, 14, -1, 19, 42, -1, 28, 42, 29, -1, 4, -1, 5, -1, 6, -1, 7, -1, 8, -1, 9, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { 0, 131, 131, 132, 133, 134, 137, 138, 139, 140, 141, 142, 145, 146, 149, 152, 153, 156, 157, 160, 161, 162, 163, 166, 167, 168, 169, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 191, 194, 197, 198, 199, 200, 201, 202, 203, 204, 205, 209, 210, 211, 212, 213, 214 }; #endif #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[] = { "$end", "error", "$undefined", "FCML_TK_UNEXPECTED", "FCML_TK_REG_GPR", "FCML_TK_REG_SIMD", "FCML_TK_REG_FPU", "FCML_TK_REG_SEG", "FCML_TK_REG_CR", "FCML_TK_REG_DR", "FCML_TK_REG_RIP", "FCML_TK_INTEGER", "FCML_TK_FLOAT", "FCML_TK_SIZE_OPERATOR", "FCML_TK_SYMBOL", "FCML_TK_HINTS", "FCML_TK_EAO_HINTS", "FCML_TK_SIB_HINT", "FCML_TK_PREFIX", "'-'", "'+'", "'*'", "'/'", "FCML_OP_UMINUS", "':'", "','", "'['", "']'", "'('", "')'", "$accept", "start", "instruction", "inst_prefixes", "mnemonic", "hint_list", "operand_list", "operand", "effective_address", "effective_address_components", "segment_selector", "far_pointer", "exp", "reg", YY_NULL }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 45, 43, 42, 47, 274, 58, 44, 91, 93, 40, 41 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 30, 31, 31, 31, 31, 32, 32, 32, 32, 32, 32, 33, 33, 34, 35, 35, 36, 36, 37, 37, 37, 37, 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 40, 41, 42, 42, 42, 42, 42, 42, 42, 42, 42, 43, 43, 43, 43, 43, 43 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 1, 2, 3, 1, 2, 3, 2, 3, 4, 1, 2, 1, 1, 2, 1, 3, 1, 1, 1, 1, 3, 4, 4, 5, 1, 2, 1, 3, 5, 7, 7, 5, 5, 3, 3, 4, 3, 4, 1, 2, 2, 2, 3, 1, 1, 3, 3, 3, 3, 1, 2, 3, 1, 1, 1, 1, 1, 1 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 2, 14, 12, 0, 3, 0, 6, 4, 1, 14, 13, 9, 55, 56, 57, 58, 59, 60, 46, 47, 0, 52, 15, 0, 0, 0, 0, 7, 17, 21, 0, 20, 19, 22, 5, 0, 10, 44, 0, 0, 0, 53, 58, 29, 0, 0, 0, 41, 27, 0, 16, 8, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 42, 43, 28, 23, 0, 0, 54, 18, 0, 48, 49, 51, 50, 45, 24, 0, 37, 0, 0, 39, 36, 30, 25, 26, 40, 38, 0, 0, 0, 35, 34, 31, 0, 0, 33, 32 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 3, 4, 5, 6, 26, 27, 28, 29, 46, 30, 31, 32, 33 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -24 static const yytype_int16 yypact[] = { 6, -14, -24, 42, -24, 23, 0, 35, -24, -24, -24, 0, -24, -24, -24, -1, -24, -24, -24, -24, 10, -24, -24, 36, 70, 36, 88, 27, -24, -24, 30, -24, 89, -24, -24, 88, 27, -24, -1, 70, 37, -24, -24, 45, 36, 138, 41, 114, 51, 109, -24, 27, 113, 70, 36, 36, 36, 36, 36, 27, 56, 70, 36, 114, 114, 71, -24, 36, 138, -24, -24, 58, 83, 83, -24, -24, 114, -24, 61, 114, 36, 36, 114, 114, 40, -24, -24, 114, 114, 36, 36, 95, 114, 114, 134, 36, 36, 114, 114 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -24, -24, 105, -24, 110, 112, -8, 85, -24, -10, 120, -24, -23, 1 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 static const yytype_uint8 yytable[] = { 41, 47, 49, 36, 12, 13, 14, 15, 16, 17, 7, 18, 19, 20, 21, 22, 47, 38, 51, 23, 1, 63, 64, 37, 2, 48, 24, 59, 25, 60, 47, 72, 73, 74, 75, 76, 39, 9, 47, 79, 48, 10, 8, 71, 82, 83, 65, 18, 19, 9, 21, 78, 52, 2, 48, 23, 53, 87, 88, 89, 90, 91, 48, 61, 25, 62, 92, 93, 66, 84, 67, 68, 97, 98, 12, 13, 14, 42, 16, 17, 43, 18, 19, 77, 21, 85, 44, 45, 86, 23, 80, 81, 12, 13, 14, 15, 16, 17, 25, 18, 19, 20, 21, 50, 56, 57, 94, 23, 54, 55, 56, 57, 34, 58, 24, 11, 25, 12, 13, 14, 15, 16, 17, 35, 18, 19, 20, 21, 54, 55, 56, 57, 23, 54, 55, 56, 57, 70, 69, 24, 40, 25, 12, 13, 14, 42, 16, 17, 0, 18, 19, 0, 21, 95, 96, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 25 }; #define yypact_value_is_default(Yystate) \ (!!((Yystate) == (-24))) #define yytable_value_is_error(Yytable_value) \ YYID (0) static const yytype_int8 yycheck[] = { 23, 24, 25, 11, 4, 5, 6, 7, 8, 9, 24, 11, 12, 13, 14, 15, 39, 7, 26, 19, 14, 44, 45, 24, 18, 24, 26, 35, 28, 39, 53, 54, 55, 56, 57, 58, 26, 14, 61, 62, 39, 18, 0, 53, 67, 68, 45, 11, 12, 14, 14, 61, 25, 18, 53, 19, 26, 80, 81, 19, 20, 21, 61, 26, 28, 20, 89, 90, 27, 68, 19, 20, 95, 96, 4, 5, 6, 7, 8, 9, 10, 11, 12, 27, 14, 27, 16, 17, 27, 19, 19, 20, 4, 5, 6, 7, 8, 9, 28, 11, 12, 13, 14, 15, 21, 22, 11, 19, 19, 20, 21, 22, 7, 24, 26, 5, 28, 4, 5, 6, 7, 8, 9, 11, 11, 12, 13, 14, 19, 20, 21, 22, 19, 19, 20, 21, 22, 52, 29, 26, 20, 28, 4, 5, 6, 7, 8, 9, -1, 11, 12, -1, 14, 19, 20, -1, -1, 19, -1, -1, -1, -1, -1, -1, -1, -1, 28 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 14, 18, 31, 32, 33, 34, 24, 0, 14, 18, 34, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 19, 26, 28, 35, 36, 37, 38, 40, 41, 42, 43, 32, 35, 36, 24, 7, 26, 40, 42, 7, 10, 16, 17, 39, 42, 43, 42, 15, 36, 25, 26, 19, 20, 21, 22, 24, 36, 39, 26, 20, 42, 42, 43, 27, 19, 20, 29, 37, 39, 42, 42, 42, 42, 42, 27, 39, 42, 19, 20, 42, 42, 43, 27, 27, 42, 42, 19, 20, 21, 42, 42, 11, 19, 20, 42, 42 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. However, YYFAIL appears to be in use. Nevertheless, it is formally deprecated in Bison 2.4.2's NEWS entry, where a plan to phase it out is discussed. */ #define YYFAIL goto yyerrlab #if defined YYFAIL /* This is here to suppress warnings from the GCC cpp's -Wunused-macros. Normally we don't worry about that warning, but some users do, and we want to make it easy for users to remove YYFAIL uses, which will produce warnings from Bison 2.5. */ #endif #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (yylen); \ yystate = *yyssp; \ goto yybackup; \ } \ else \ { \ yyerror (pd, YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) /* Error token number */ #define YYTERROR 1 #define YYERRCODE 256 /* 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 (&yylval, YYLEX_PARAM) #else # define YYLEX yylex (&yylval) #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value, pd); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct fcml_st_parser_data *pd) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep, pd) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; struct fcml_st_parser_data *pd; #endif { FILE *yyo = yyoutput; YYUSE (yyo); if (!yyvaluep) return; YYUSE (pd); # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { case 4: /* FCML_TK_REG_GPR */ /* Line 818 of yacc.c */ #line 102 "fcml_intel_parser_def.y" { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( ((*yyvaluep).reg_value).type ), ((*yyvaluep).reg_value).size, ((*yyvaluep).reg_value).reg, ((*yyvaluep).reg_value).x64_exp); }; /* Line 818 of yacc.c */ #line 845 "fcml_intel_parser_def.c" break; case 5: /* FCML_TK_REG_SIMD */ /* Line 818 of yacc.c */ #line 102 "fcml_intel_parser_def.y" { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( ((*yyvaluep).reg_value).type ), ((*yyvaluep).reg_value).size, ((*yyvaluep).reg_value).reg, ((*yyvaluep).reg_value).x64_exp); }; /* Line 818 of yacc.c */ #line 852 "fcml_intel_parser_def.c" break; case 6: /* FCML_TK_REG_FPU */ /* Line 818 of yacc.c */ #line 102 "fcml_intel_parser_def.y" { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( ((*yyvaluep).reg_value).type ), ((*yyvaluep).reg_value).size, ((*yyvaluep).reg_value).reg, ((*yyvaluep).reg_value).x64_exp); }; /* Line 818 of yacc.c */ #line 859 "fcml_intel_parser_def.c" break; case 7: /* FCML_TK_REG_SEG */ /* Line 818 of yacc.c */ #line 102 "fcml_intel_parser_def.y" { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( ((*yyvaluep).reg_value).type ), ((*yyvaluep).reg_value).size, ((*yyvaluep).reg_value).reg, ((*yyvaluep).reg_value).x64_exp); }; /* Line 818 of yacc.c */ #line 866 "fcml_intel_parser_def.c" break; case 8: /* FCML_TK_REG_CR */ /* Line 818 of yacc.c */ #line 102 "fcml_intel_parser_def.y" { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( ((*yyvaluep).reg_value).type ), ((*yyvaluep).reg_value).size, ((*yyvaluep).reg_value).reg, ((*yyvaluep).reg_value).x64_exp); }; /* Line 818 of yacc.c */ #line 873 "fcml_intel_parser_def.c" break; case 9: /* FCML_TK_REG_DR */ /* Line 818 of yacc.c */ #line 102 "fcml_intel_parser_def.y" { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( ((*yyvaluep).reg_value).type ), ((*yyvaluep).reg_value).size, ((*yyvaluep).reg_value).reg, ((*yyvaluep).reg_value).x64_exp); }; /* Line 818 of yacc.c */ #line 880 "fcml_intel_parser_def.c" break; case 10: /* FCML_TK_REG_RIP */ /* Line 818 of yacc.c */ #line 102 "fcml_intel_parser_def.y" { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( ((*yyvaluep).reg_value).type ), ((*yyvaluep).reg_value).size, ((*yyvaluep).reg_value).reg, ((*yyvaluep).reg_value).x64_exp); }; /* Line 818 of yacc.c */ #line 887 "fcml_intel_parser_def.c" break; case 11: /* FCML_TK_INTEGER */ /* Line 818 of yacc.c */ #line 99 "fcml_intel_parser_def.y" { YYFPRINTF(yyoutput, "Integer: %d Overflow: %d", ((*yyvaluep).integer_value).value, ((*yyvaluep).integer_value).overflow); }; /* Line 818 of yacc.c */ #line 894 "fcml_intel_parser_def.c" break; case 12: /* FCML_TK_FLOAT */ /* Line 818 of yacc.c */ #line 100 "fcml_intel_parser_def.y" { YYFPRINTF(yyoutput, "Float: %f Overflow: %d", ((*yyvaluep).float_value).value, ((*yyvaluep).float_value).overflow); }; /* Line 818 of yacc.c */ #line 901 "fcml_intel_parser_def.c" break; case 32: /* instruction */ /* Line 818 of yacc.c */ #line 101 "fcml_intel_parser_def.y" { YYFPRINTF(yyoutput, "AST-Type: %d", ((*yyvaluep).ast)->type); }; /* Line 818 of yacc.c */ #line 908 "fcml_intel_parser_def.c" break; case 36: /* operand_list */ /* Line 818 of yacc.c */ #line 101 "fcml_intel_parser_def.y" { YYFPRINTF(yyoutput, "AST-Type: %d", ((*yyvaluep).ast)->type); }; /* Line 818 of yacc.c */ #line 915 "fcml_intel_parser_def.c" break; case 37: /* operand */ /* Line 818 of yacc.c */ #line 101 "fcml_intel_parser_def.y" { YYFPRINTF(yyoutput, "AST-Type: %d", ((*yyvaluep).ast)->type); }; /* Line 818 of yacc.c */ #line 922 "fcml_intel_parser_def.c" break; case 38: /* effective_address */ /* Line 818 of yacc.c */ #line 101 "fcml_intel_parser_def.y" { YYFPRINTF(yyoutput, "AST-Type: %d", ((*yyvaluep).ast)->type); }; /* Line 818 of yacc.c */ #line 929 "fcml_intel_parser_def.c" break; case 39: /* effective_address_components */ /* Line 818 of yacc.c */ #line 101 "fcml_intel_parser_def.y" { YYFPRINTF(yyoutput, "AST-Type: %d", ((*yyvaluep).ast)->type); }; /* Line 818 of yacc.c */ #line 936 "fcml_intel_parser_def.c" break; case 40: /* segment_selector */ /* Line 818 of yacc.c */ #line 102 "fcml_intel_parser_def.y" { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( ((*yyvaluep).reg_value).type ), ((*yyvaluep).reg_value).size, ((*yyvaluep).reg_value).reg, ((*yyvaluep).reg_value).x64_exp); }; /* Line 818 of yacc.c */ #line 943 "fcml_intel_parser_def.c" break; case 41: /* far_pointer */ /* Line 818 of yacc.c */ #line 101 "fcml_intel_parser_def.y" { YYFPRINTF(yyoutput, "AST-Type: %d", ((*yyvaluep).ast)->type); }; /* Line 818 of yacc.c */ #line 950 "fcml_intel_parser_def.c" break; case 42: /* exp */ /* Line 818 of yacc.c */ #line 101 "fcml_intel_parser_def.y" { YYFPRINTF(yyoutput, "AST-Type: %d", ((*yyvaluep).ast)->type); }; /* Line 818 of yacc.c */ #line 957 "fcml_intel_parser_def.c" break; case 43: /* reg */ /* Line 818 of yacc.c */ #line 102 "fcml_intel_parser_def.y" { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( ((*yyvaluep).reg_value).type ), ((*yyvaluep).reg_value).size, ((*yyvaluep).reg_value).reg, ((*yyvaluep).reg_value).x64_exp); }; /* Line 818 of yacc.c */ #line 964 "fcml_intel_parser_def.c" break; default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct fcml_st_parser_data *pd) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep, pd) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; struct fcml_st_parser_data *pd; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep, pd); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) yytype_int16 *yybottom; yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct fcml_st_parser_data *pd) #else static void yy_reduce_print (yyvsp, yyrule, pd) YYSTYPE *yyvsp; int yyrule; struct fcml_st_parser_data *pd; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) , pd); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule, pd); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message about the unexpected token YYTOKEN for the state stack whose top is YYSSP. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return 2 if the required number of bytes is too large to store. */ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ 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 "expected"). */ int yycount = 0; /* There are many possibilities here to consider: - Assume YYFAIL is not used. It's too flawed to consider. See for details. YYERROR is fine as it does not invoke this function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - The only way there can be no lookahead present (in yychar) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to report. In that case, just report a simple "syntax error". - Don't assume there isn't a lookahead just because this state is a consistent state with a default action. There might have been a previous inconsistent state, consistent state with a non-default action, or user semantic action that manipulated yychar. - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the scanner and before detecting a syntax error. Thus, state merging (from LALR or IELR) and default reductions corrupt the expected token list. However, the list is correct for canonical LR with one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ if (yytoken != YYEMPTY) { int yyn = yypact[*yyssp]; yyarg[yycount++] = yytname[yytoken]; if (!yypact_value_is_default (yyn)) { /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. In other words, skip the first -YYN actions for this state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyx; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR && !yytable_value_is_error (yytable[yyx + yyn])) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; break; } yyarg[yycount++] = yytname[yyx]; { YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } } } } switch (yycount) { # define YYCASE_(N, S) \ case N: \ yyformat = S; \ break YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); # undef YYCASE_ } { YYSIZE_T yysize1 = yysize + yystrlen (yyformat); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } if (*yymsg_alloc < yysize) { *yymsg_alloc = 2 * yysize; if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; return 1; } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; int yyi = 0; while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyformat += 2; } else { yyp++; yyformat++; } } return 0; } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct fcml_st_parser_data *pd) #else static void yydestruct (yymsg, yytype, yyvaluep, pd) const char *yymsg; int yytype; YYSTYPE *yyvaluep; struct fcml_st_parser_data *pd; #endif { YYUSE (yyvaluep); YYUSE (pd); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { case 32: /* instruction */ /* Line 1393 of yacc.c */ #line 96 "fcml_intel_parser_def.y" { fcml_fn_ast_free_node(((*yyvaluep).ast)); }; /* Line 1393 of yacc.c */ #line 1370 "fcml_intel_parser_def.c" break; case 36: /* operand_list */ /* Line 1393 of yacc.c */ #line 96 "fcml_intel_parser_def.y" { fcml_fn_ast_free_node(((*yyvaluep).ast)); }; /* Line 1393 of yacc.c */ #line 1377 "fcml_intel_parser_def.c" break; case 37: /* operand */ /* Line 1393 of yacc.c */ #line 96 "fcml_intel_parser_def.y" { fcml_fn_ast_free_node(((*yyvaluep).ast)); }; /* Line 1393 of yacc.c */ #line 1384 "fcml_intel_parser_def.c" break; case 38: /* effective_address */ /* Line 1393 of yacc.c */ #line 96 "fcml_intel_parser_def.y" { fcml_fn_ast_free_node(((*yyvaluep).ast)); }; /* Line 1393 of yacc.c */ #line 1391 "fcml_intel_parser_def.c" break; case 39: /* effective_address_components */ /* Line 1393 of yacc.c */ #line 96 "fcml_intel_parser_def.y" { fcml_fn_ast_free_node(((*yyvaluep).ast)); }; /* Line 1393 of yacc.c */ #line 1398 "fcml_intel_parser_def.c" break; case 41: /* far_pointer */ /* Line 1393 of yacc.c */ #line 96 "fcml_intel_parser_def.y" { fcml_fn_ast_free_node(((*yyvaluep).ast)); }; /* Line 1393 of yacc.c */ #line 1405 "fcml_intel_parser_def.c" break; case 42: /* exp */ /* Line 1393 of yacc.c */ #line 96 "fcml_intel_parser_def.y" { fcml_fn_ast_free_node(((*yyvaluep).ast)); }; /* Line 1393 of yacc.c */ #line 1412 "fcml_intel_parser_def.c" break; default: break; } } /*----------. | yyparse. | `----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (struct fcml_st_parser_data *pd) #else int yyparse (pd) struct fcml_st_parser_data *pd; #endif #endif { /* The lookahead symbol. */ int yychar; #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else /* Default value used for initialization, for pacifying older GCCs or non-GCC compilers. */ static YYSTYPE yyval_default; # define YY_INITIAL_VALUE(Value) = Value #endif #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 YY_INITIAL_VALUE(yyval_default); /* Number of syntax errors so far. */ int yynerrs; int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: `yyss': related to states. `yyvs': related to semantic values. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yyssp = yyss = yyssa; yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* User initialization code. */ /* Line 1570 of yacc.c */ #line 124 "fcml_intel_parser_def.y" { /* Uncomment it in order to enable debugging */ /* yydebug = 1; */ } /* Line 1570 of yacc.c */ #line 1544 "fcml_intel_parser_def.c" goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yytable_value_is_error (yyn)) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 3: /* Line 1787 of yacc.c */ #line 132 "fcml_intel_parser_def.y" { pd->tree = (yyvsp[(1) - (1)].ast); pd->symbol = NULL; } break; case 4: /* Line 1787 of yacc.c */ #line 133 "fcml_intel_parser_def.y" { pd->tree = NULL; pd->symbol = fcml_fn_ast_alloc_node_define_symbol( pd->ip, (yyvsp[(1) - (2)].symbol).text, (yyvsp[(1) - (2)].symbol).length ); HANDLE_ERRORS( pd->symbol ); } break; case 5: /* Line 1787 of yacc.c */ #line 134 "fcml_intel_parser_def.y" { pd->tree = (yyvsp[(3) - (3)].ast); pd->symbol = fcml_fn_ast_alloc_node_define_symbol( pd->ip, (yyvsp[(1) - (3)].symbol).text, (yyvsp[(1) - (3)].symbol).length ); HANDLE_ERRORS( pd->symbol ); } break; case 6: /* Line 1787 of yacc.c */ #line 137 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_instruction( 0, (yyvsp[(1) - (1)].symbol).text, (yyvsp[(1) - (1)].symbol).length, 0, NULL ); HANDLE_ERRORS((yyval.ast)); } break; case 7: /* Line 1787 of yacc.c */ #line 138 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_instruction( 0, (yyvsp[(1) - (2)].symbol).text, (yyvsp[(1) - (2)].symbol).length, 0, (yyvsp[(2) - (2)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; case 8: /* Line 1787 of yacc.c */ #line 139 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_instruction( 0, (yyvsp[(1) - (3)].symbol).text, (yyvsp[(1) - (3)].symbol).length, (yyvsp[(2) - (3)].hints), (yyvsp[(3) - (3)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; case 9: /* Line 1787 of yacc.c */ #line 140 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_instruction( (yyvsp[(1) - (2)].prefixes), (yyvsp[(2) - (2)].symbol).text, (yyvsp[(2) - (2)].symbol).length, 0, NULL ); HANDLE_ERRORS((yyval.ast)); } break; case 10: /* Line 1787 of yacc.c */ #line 141 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_instruction( (yyvsp[(1) - (3)].prefixes), (yyvsp[(2) - (3)].symbol).text, (yyvsp[(2) - (3)].symbol).length, 0, (yyvsp[(3) - (3)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; case 11: /* Line 1787 of yacc.c */ #line 142 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_instruction( (yyvsp[(1) - (4)].prefixes), (yyvsp[(2) - (4)].symbol).text, (yyvsp[(2) - (4)].symbol).length, (yyvsp[(3) - (4)].hints), (yyvsp[(4) - (4)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; case 13: /* Line 1787 of yacc.c */ #line 146 "fcml_intel_parser_def.y" { if( (yyvsp[(1) - (2)].prefixes) & (yyvsp[(2) - (2)].prefixes) ) { ADD_ERROR_MSG( "Doubled prefixes." ); YYERROR; } else { (yyval.prefixes) = (yyvsp[(1) - (2)].prefixes) | (yyvsp[(2) - (2)].prefixes); } } break; case 16: /* Line 1787 of yacc.c */ #line 153 "fcml_intel_parser_def.y" { (yyval.hints) = (yyvsp[(1) - (2)].hints) | (yyvsp[(2) - (2)].hints); } break; case 17: /* Line 1787 of yacc.c */ #line 156 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_operand_list( (yyvsp[(1) - (1)].ast), NULL ); HANDLE_ERRORS((yyval.ast)); } break; case 18: /* Line 1787 of yacc.c */ #line 157 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_operand_list( (yyvsp[(1) - (3)].ast), (yyvsp[(3) - (3)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; case 22: /* Line 1787 of yacc.c */ #line 163 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_register( &(yyvsp[(1) - (1)].reg_value) ); HANDLE_ERRORS((yyval.ast)); } break; case 23: /* Line 1787 of yacc.c */ #line 166 "fcml_intel_parser_def.y" { (yyval.ast) = (yyvsp[(2) - (3)].ast); } break; case 24: /* Line 1787 of yacc.c */ #line 167 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_set_effective_address_details( NULL, &(yyvsp[(1) - (4)].size_operator), (yyvsp[(3) - (4)].ast) ); } break; case 25: /* Line 1787 of yacc.c */ #line 168 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_set_effective_address_details( &(yyvsp[(1) - (4)].reg_value), FCML_OS_UNDEFINED, (yyvsp[(3) - (4)].ast) ); } break; case 26: /* Line 1787 of yacc.c */ #line 169 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_set_effective_address_details( &(yyvsp[(2) - (5)].reg_value), &(yyvsp[(1) - (5)].size_operator), (yyvsp[(4) - (5)].ast) ); } break; case 27: /* Line 1787 of yacc.c */ #line 172 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( &(yyvsp[(1) - (1)].reg_value), NULL, NULL, NULL, FCML_FALSE, 0 ); } break; case 28: /* Line 1787 of yacc.c */ #line 173 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( &(yyvsp[(2) - (2)].reg_value), NULL, NULL, NULL, FCML_FALSE, (yyvsp[(1) - (2)].hints) ); } break; case 29: /* Line 1787 of yacc.c */ #line 174 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( &(yyvsp[(1) - (1)].reg_value), NULL, NULL, NULL, FCML_FALSE, 0 ); } break; case 30: /* Line 1787 of yacc.c */ #line 175 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( &(yyvsp[(1) - (3)].reg_value), &(yyvsp[(3) - (3)].reg_value), NULL, NULL, FCML_FALSE, 0 ); } break; case 31: /* Line 1787 of yacc.c */ #line 176 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( &(yyvsp[(1) - (5)].reg_value), &(yyvsp[(3) - (5)].reg_value), &(yyvsp[(5) - (5)].integer_value), NULL, FCML_FALSE, 0 ); } break; case 32: /* Line 1787 of yacc.c */ #line 177 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( &(yyvsp[(1) - (7)].reg_value), &(yyvsp[(3) - (7)].reg_value), &(yyvsp[(5) - (7)].integer_value), (yyvsp[(7) - (7)].ast), FCML_FALSE, 0 ); } break; case 33: /* Line 1787 of yacc.c */ #line 178 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( &(yyvsp[(1) - (7)].reg_value), &(yyvsp[(3) - (7)].reg_value), &(yyvsp[(5) - (7)].integer_value), (yyvsp[(7) - (7)].ast), FCML_TRUE, 0 ); } break; case 34: /* Line 1787 of yacc.c */ #line 179 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( &(yyvsp[(1) - (5)].reg_value), &(yyvsp[(3) - (5)].reg_value), NULL, (yyvsp[(5) - (5)].ast), FCML_FALSE, 0 ); } break; case 35: /* Line 1787 of yacc.c */ #line 180 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( &(yyvsp[(1) - (5)].reg_value), &(yyvsp[(3) - (5)].reg_value), NULL, (yyvsp[(5) - (5)].ast), FCML_TRUE, 0 ); } break; case 36: /* Line 1787 of yacc.c */ #line 181 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( &(yyvsp[(1) - (3)].reg_value), NULL, NULL, (yyvsp[(3) - (3)].ast), FCML_FALSE, 0 ); } break; case 37: /* Line 1787 of yacc.c */ #line 182 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( &(yyvsp[(1) - (3)].reg_value), NULL, NULL, (yyvsp[(3) - (3)].ast), FCML_FALSE, 0 ); } break; case 38: /* Line 1787 of yacc.c */ #line 183 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( &(yyvsp[(2) - (4)].reg_value), NULL, NULL, (yyvsp[(4) - (4)].ast), FCML_FALSE, (yyvsp[(1) - (4)].hints) ); } break; case 39: /* Line 1787 of yacc.c */ #line 184 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( &(yyvsp[(1) - (3)].reg_value), NULL, NULL, (yyvsp[(3) - (3)].ast), FCML_TRUE, 0 ); } break; case 40: /* Line 1787 of yacc.c */ #line 185 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( &(yyvsp[(2) - (4)].reg_value), NULL, NULL, (yyvsp[(4) - (4)].ast), FCML_TRUE, (yyvsp[(1) - (4)].hints) ); } break; case 41: /* Line 1787 of yacc.c */ #line 186 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( NULL, NULL, NULL, (yyvsp[(1) - (1)].ast), FCML_FALSE, 0); } break; case 42: /* Line 1787 of yacc.c */ #line 187 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( NULL, NULL, NULL, (yyvsp[(2) - (2)].ast), FCML_FALSE, (yyvsp[(1) - (2)].hints)); } break; case 43: /* Line 1787 of yacc.c */ #line 188 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( NULL, NULL, NULL, (yyvsp[(2) - (2)].ast), FCML_FALSE, (yyvsp[(1) - (2)].hints)); } break; case 44: /* Line 1787 of yacc.c */ #line 191 "fcml_intel_parser_def.y" { (yyval.reg_value) = (yyvsp[(1) - (2)].reg_value); } break; case 45: /* Line 1787 of yacc.c */ #line 194 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_far_pointer( (yyvsp[(1) - (3)].ast), (yyvsp[(3) - (3)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; case 46: /* Line 1787 of yacc.c */ #line 197 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_integer( &(yyvsp[(1) - (1)].integer_value) ); HANDLE_ERRORS((yyval.ast)); } break; case 47: /* Line 1787 of yacc.c */ #line 198 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_float( &(yyvsp[(1) - (1)].float_value) ); HANDLE_ERRORS((yyval.ast)); } break; case 48: /* Line 1787 of yacc.c */ #line 199 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_exp( FCML_EN_EXN_SUB, (yyvsp[(1) - (3)].ast), (yyvsp[(3) - (3)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; case 49: /* Line 1787 of yacc.c */ #line 200 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_exp( FCML_EN_EXN_ADD, (yyvsp[(1) - (3)].ast), (yyvsp[(3) - (3)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; case 50: /* Line 1787 of yacc.c */ #line 201 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_exp( FCML_EN_EXN_DIV, (yyvsp[(1) - (3)].ast), (yyvsp[(3) - (3)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; case 51: /* Line 1787 of yacc.c */ #line 202 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_exp( FCML_EN_EXN_MUL, (yyvsp[(1) - (3)].ast), (yyvsp[(3) - (3)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; case 52: /* Line 1787 of yacc.c */ #line 203 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_use_symbol( (yyvsp[(1) - (1)].symbol).text, (yyvsp[(1) - (1)].symbol).length ); HANDLE_ERRORS((yyval.ast)); } break; case 53: /* Line 1787 of yacc.c */ #line 204 "fcml_intel_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_uminus( (yyvsp[(2) - (2)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; case 54: /* Line 1787 of yacc.c */ #line 205 "fcml_intel_parser_def.y" { (yyval.ast) = (yyvsp[(2) - (3)].ast); } break; /* Line 1787 of yacc.c */ #line 2001 "fcml_intel_parser_def.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (pd, YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken) { char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; yysyntax_error_status = YYSYNTAX_ERROR; if (yysyntax_error_status == 0) yymsgp = yymsg; else if (yysyntax_error_status == 1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); if (!yymsg) { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = 2; } else { yysyntax_error_status = YYSYNTAX_ERROR; yymsgp = yymsg; } } yyerror (pd, yymsgp); if (yysyntax_error_status == 2) goto yyexhaustedlab; } # undef YYSYNTAX_ERROR #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval, pd); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp, pd); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (pd, YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, pd); } /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp, pd); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } /* Line 2050 of yacc.c */ #line 217 "fcml_intel_parser_def.y" fcml-1.1.1/src/fcml_intel_rend.h0000644000175000017500000000243612560745216013455 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_INTEL_REND_H_ #define FCML_INTEL_REND_H_ #include #include #include #include #include #include "fcml_stream.h" fcml_ceh_error fcml_fn_rend_render_instruction_intel( const fcml_st_dialect *dialect_context, const fcml_st_render_config *config, fcml_st_memory_stream *output_stream, const fcml_st_disassembler_result *result ); #endif /* FCML_INTEL_REND_H_ */ fcml-1.1.1/src/fcml_gas_parser_def.c0000644000175000017500000020663612560745216014301 00000000000000/* A Bison parser, made by GNU Bison 2.7.12-4996. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2013 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 . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this 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. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.7.12-4996" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 1 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Substitute the variable and function names. */ #define yyparse gas_parse #define yylex gas_lex #define yyerror gas_error #define yylval gas_lval #define yychar gas_char #define yydebug gas_debug #define yynerrs gas_nerrs /* Copy the first part of user declarations. */ /* Line 371 of yacc.c */ #line 24 "fcml_gas_parser_def.y" #include #include "fcml_parser_utils.h" void gas_error( struct fcml_st_parser_data *pd, const char *error ); /* Macro responsible for handling 'Out of memory' errors. */ #define HANDLE_ERRORS(x) if( !x ) { yyerror(pd, "Out of memory."); YYERROR; } /* Macro responsible for adding error messages to result. */ #define ADD_ERROR_MSG(x) { yyerror( pd, x ); } /* Line 371 of yacc.c */ #line 90 "fcml_gas_parser_def.c" # 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 # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* In a future release of Bison, this section will be replaced by #include "y.tab.h". */ #ifndef YY_GAS_Y_TAB_H_INCLUDED # define YY_GAS_Y_TAB_H_INCLUDED /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int gas_debug; #endif /* Tokens. */ #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 }; #endif /* Tokens. */ #define FCML_TK_UNEXPECTED 258 #define FCML_TK_REG_GPR 259 #define FCML_TK_REG_SIMD 260 #define FCML_TK_REG_FPU 261 #define FCML_TK_REG_SEG 262 #define FCML_TK_REG_CR 263 #define FCML_TK_REG_DR 264 #define FCML_TK_REG_RIP 265 #define FCML_TK_INTEGER 266 #define FCML_TK_SYMBOL 267 #define FCML_TK_PREFIX 268 #define FCML_TK_PO_BYTE 269 #define FCML_OP_UMINUS 270 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 387 of yacc.c */ #line 97 "fcml_gas_parser_def.y" /*Complex values.*/ fcml_st_ast_val_integer integer_value; fcml_st_register reg_value; fcml_st_ast_node *ast; struct { fcml_string text; int length; } symbol; fcml_hints hints; fcml_prefixes prefixes; /* Line 387 of yacc.c */ #line 177 "fcml_gas_parser_def.c" } 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 */ /* Copy the second part of user declarations. */ /* Line 390 of yacc.c */ #line 110 "fcml_gas_parser_def.y" #include "fcml_gas_lexer.h" #define YYLEX_PARAM ((yyscan_t)pd->scannerInfo) /* Line 390 of yacc.c */ #line 209 "fcml_gas_parser_def.c" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ # define YY_(Msgid) Msgid # endif #endif #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if (! defined __GNUC__ || __GNUC__ < 2 \ || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) # define __attribute__(Spec) /* empty */ # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) #else # define YYUSE(E) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(N) (N) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int yyi) #else static int YYID (yyi) int yyi; #endif { return yyi; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ while (YYID (0)) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 15 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 110 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 25 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 14 /* YYNRULES -- Number of rules. */ #define YYNRULES 47 /* YYNRULES -- Number of states. */ #define YYNSTATES 76 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 270 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 22, 2, 2, 2, 23, 24, 17, 16, 21, 15, 2, 18, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 20, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 19 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 4, 6, 8, 11, 15, 19, 21, 24, 27, 31, 33, 36, 38, 40, 44, 47, 49, 52, 54, 56, 59, 61, 64, 66, 70, 74, 80, 85, 93, 100, 103, 105, 109, 113, 117, 121, 123, 126, 130, 132, 134, 136, 138, 140, 142 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 26, 0, -1, -1, 27, -1, 38, -1, 12, 20, -1, 12, 20, 27, -1, 12, 20, 38, -1, 29, -1, 29, 30, -1, 28, 29, -1, 28, 29, 30, -1, 13, -1, 28, 13, -1, 12, -1, 31, -1, 30, 21, 31, -1, 22, 36, -1, 32, -1, 17, 32, -1, 37, -1, 33, -1, 35, 33, -1, 34, -1, 36, 34, -1, 36, -1, 23, 10, 24, -1, 23, 37, 24, -1, 23, 37, 21, 37, 24, -1, 23, 21, 37, 24, -1, 23, 37, 21, 37, 21, 11, 24, -1, 23, 21, 37, 21, 11, 24, -1, 7, 20, -1, 11, -1, 36, 15, 36, -1, 36, 16, 36, -1, 36, 18, 36, -1, 36, 17, 36, -1, 12, -1, 15, 36, -1, 23, 36, 24, -1, 4, -1, 5, -1, 6, -1, 7, -1, 8, -1, 9, -1, 14, 36, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { 0, 122, 122, 123, 124, 125, 126, 127, 130, 131, 132, 133, 136, 137, 140, 143, 144, 147, 148, 149, 150, 153, 154, 158, 159, 160, 164, 165, 166, 167, 168, 169, 172, 176, 177, 178, 179, 180, 181, 182, 183, 187, 188, 189, 190, 191, 192, 197 }; #endif #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[] = { "$end", "error", "$undefined", "FCML_TK_UNEXPECTED", "FCML_TK_REG_GPR", "FCML_TK_REG_SIMD", "FCML_TK_REG_FPU", "FCML_TK_REG_SEG", "FCML_TK_REG_CR", "FCML_TK_REG_DR", "FCML_TK_REG_RIP", "FCML_TK_INTEGER", "FCML_TK_SYMBOL", "FCML_TK_PREFIX", "FCML_TK_PO_BYTE", "'-'", "'+'", "'*'", "'/'", "FCML_OP_UMINUS", "':'", "','", "'$'", "'('", "')'", "$accept", "start", "instruction", "inst_prefixes", "mnemonic", "operand_list", "operand", "effective_address", "effective_address_components", "effective_address_components_without_dis", "segment_selector", "exp", "reg", "pseudo_operation", YY_NULL }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 45, 43, 42, 47, 270, 58, 44, 36, 40, 41 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 25, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 28, 28, 29, 30, 30, 31, 31, 31, 31, 32, 32, 33, 33, 33, 34, 34, 34, 34, 34, 34, 35, 36, 36, 36, 36, 36, 36, 36, 36, 37, 37, 37, 37, 37, 37, 38 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 1, 1, 2, 3, 3, 1, 2, 2, 3, 1, 2, 1, 1, 3, 2, 1, 2, 1, 1, 2, 1, 2, 1, 3, 3, 5, 4, 7, 6, 2, 1, 3, 3, 3, 3, 1, 2, 3, 1, 1, 1, 1, 1, 1, 2 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 2, 14, 12, 0, 0, 3, 0, 8, 4, 5, 33, 38, 0, 0, 47, 1, 14, 13, 10, 41, 42, 43, 44, 45, 46, 0, 0, 0, 9, 15, 18, 21, 23, 0, 25, 20, 6, 7, 39, 0, 0, 0, 0, 0, 11, 32, 0, 19, 17, 44, 0, 0, 0, 0, 22, 0, 24, 40, 34, 35, 37, 36, 26, 0, 0, 27, 16, 0, 29, 0, 0, 0, 28, 31, 0, 30 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 4, 5, 6, 7, 28, 29, 30, 31, 32, 33, 34, 35, 8 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -24 static const yytype_int8 yypact[] = { 22, -8, -24, -10, 7, -24, 39, 38, -24, 68, -24, -24, -10, -10, 41, -24, -24, -24, 38, -24, -24, -24, 28, -24, -24, 62, -10, 10, 6, -24, -24, -24, -24, 60, 75, -24, -24, -24, -24, 71, -10, -10, -10, -10, 6, -24, 28, -24, 41, -24, 30, 95, -18, 38, -24, 58, -24, -24, 79, 79, -24, -24, -24, -13, 95, -24, -24, 19, -24, 5, 46, 65, -24, -24, 54, -24 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -24, -24, 85, -24, 78, 87, 53, 82, 76, 74, -24, -3, -23, 101 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 static const yytype_uint8 yytable[] = { 14, 10, 11, 64, 52, 12, 65, 15, 67, 38, 39, 68, 9, 13, 19, 20, 21, 49, 23, 24, 50, 10, 11, 48, 39, 12, 71, 53, 63, 72, 70, 51, 52, 13, 1, 2, 3, 58, 59, 60, 61, 69, 19, 20, 21, 22, 23, 24, 45, 10, 11, 16, 17, 12, 62, 25, 40, 41, 42, 43, 26, 27, 19, 20, 21, 49, 23, 24, 50, 46, 73, 10, 11, 10, 11, 12, 74, 12, 75, 51, 16, 2, 3, 27, 18, 27, 40, 41, 42, 43, 40, 41, 42, 43, 36, 57, 42, 43, 55, 19, 20, 21, 49, 23, 24, 44, 66, 47, 56, 54, 37 }; #define yypact_value_is_default(Yystate) \ (!!((Yystate) == (-24))) #define yytable_value_is_error(Yytable_value) \ YYID (0) static const yytype_uint8 yycheck[] = { 3, 11, 12, 21, 27, 15, 24, 0, 21, 12, 13, 24, 20, 23, 4, 5, 6, 7, 8, 9, 10, 11, 12, 26, 27, 15, 21, 21, 51, 24, 11, 21, 55, 23, 12, 13, 14, 40, 41, 42, 43, 64, 4, 5, 6, 7, 8, 9, 20, 11, 12, 12, 13, 15, 24, 17, 15, 16, 17, 18, 22, 23, 4, 5, 6, 7, 8, 9, 10, 7, 24, 11, 12, 11, 12, 15, 11, 15, 24, 21, 12, 13, 14, 23, 6, 23, 15, 16, 17, 18, 15, 16, 17, 18, 9, 24, 17, 18, 23, 4, 5, 6, 7, 8, 9, 18, 53, 25, 34, 33, 9 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 12, 13, 14, 26, 27, 28, 29, 38, 20, 11, 12, 15, 23, 36, 0, 12, 13, 29, 4, 5, 6, 7, 8, 9, 17, 22, 23, 30, 31, 32, 33, 34, 35, 36, 37, 27, 38, 36, 36, 15, 16, 17, 18, 30, 20, 7, 32, 36, 7, 10, 21, 37, 21, 33, 23, 34, 24, 36, 36, 36, 36, 24, 37, 21, 24, 31, 21, 24, 37, 11, 21, 24, 24, 11, 24 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. However, YYFAIL appears to be in use. Nevertheless, it is formally deprecated in Bison 2.4.2's NEWS entry, where a plan to phase it out is discussed. */ #define YYFAIL goto yyerrlab #if defined YYFAIL /* This is here to suppress warnings from the GCC cpp's -Wunused-macros. Normally we don't worry about that warning, but some users do, and we want to make it easy for users to remove YYFAIL uses, which will produce warnings from Bison 2.5. */ #endif #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (yylen); \ yystate = *yyssp; \ goto yybackup; \ } \ else \ { \ yyerror (pd, YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) /* Error token number */ #define YYTERROR 1 #define YYERRCODE 256 /* 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 (&yylval, YYLEX_PARAM) #else # define YYLEX yylex (&yylval) #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value, pd); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct fcml_st_parser_data *pd) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep, pd) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; struct fcml_st_parser_data *pd; #endif { FILE *yyo = yyoutput; YYUSE (yyo); if (!yyvaluep) return; YYUSE (pd); # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { case 4: /* FCML_TK_REG_GPR */ /* Line 818 of yacc.c */ #line 95 "fcml_gas_parser_def.y" { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( ((*yyvaluep).reg_value).type ), ((*yyvaluep).reg_value).size, ((*yyvaluep).reg_value).reg, ((*yyvaluep).reg_value).x64_exp); }; /* Line 818 of yacc.c */ #line 805 "fcml_gas_parser_def.c" break; case 5: /* FCML_TK_REG_SIMD */ /* Line 818 of yacc.c */ #line 95 "fcml_gas_parser_def.y" { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( ((*yyvaluep).reg_value).type ), ((*yyvaluep).reg_value).size, ((*yyvaluep).reg_value).reg, ((*yyvaluep).reg_value).x64_exp); }; /* Line 818 of yacc.c */ #line 812 "fcml_gas_parser_def.c" break; case 6: /* FCML_TK_REG_FPU */ /* Line 818 of yacc.c */ #line 95 "fcml_gas_parser_def.y" { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( ((*yyvaluep).reg_value).type ), ((*yyvaluep).reg_value).size, ((*yyvaluep).reg_value).reg, ((*yyvaluep).reg_value).x64_exp); }; /* Line 818 of yacc.c */ #line 819 "fcml_gas_parser_def.c" break; case 7: /* FCML_TK_REG_SEG */ /* Line 818 of yacc.c */ #line 95 "fcml_gas_parser_def.y" { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( ((*yyvaluep).reg_value).type ), ((*yyvaluep).reg_value).size, ((*yyvaluep).reg_value).reg, ((*yyvaluep).reg_value).x64_exp); }; /* Line 818 of yacc.c */ #line 826 "fcml_gas_parser_def.c" break; case 8: /* FCML_TK_REG_CR */ /* Line 818 of yacc.c */ #line 95 "fcml_gas_parser_def.y" { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( ((*yyvaluep).reg_value).type ), ((*yyvaluep).reg_value).size, ((*yyvaluep).reg_value).reg, ((*yyvaluep).reg_value).x64_exp); }; /* Line 818 of yacc.c */ #line 833 "fcml_gas_parser_def.c" break; case 9: /* FCML_TK_REG_DR */ /* Line 818 of yacc.c */ #line 95 "fcml_gas_parser_def.y" { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( ((*yyvaluep).reg_value).type ), ((*yyvaluep).reg_value).size, ((*yyvaluep).reg_value).reg, ((*yyvaluep).reg_value).x64_exp); }; /* Line 818 of yacc.c */ #line 840 "fcml_gas_parser_def.c" break; case 10: /* FCML_TK_REG_RIP */ /* Line 818 of yacc.c */ #line 95 "fcml_gas_parser_def.y" { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( ((*yyvaluep).reg_value).type ), ((*yyvaluep).reg_value).size, ((*yyvaluep).reg_value).reg, ((*yyvaluep).reg_value).x64_exp); }; /* Line 818 of yacc.c */ #line 847 "fcml_gas_parser_def.c" break; case 11: /* FCML_TK_INTEGER */ /* Line 818 of yacc.c */ #line 92 "fcml_gas_parser_def.y" { YYFPRINTF(yyoutput, "Integer: %ld Overflow: %d", ((*yyvaluep).integer_value).value, ((*yyvaluep).integer_value).overflow); }; /* Line 818 of yacc.c */ #line 854 "fcml_gas_parser_def.c" break; case 27: /* instruction */ /* Line 818 of yacc.c */ #line 94 "fcml_gas_parser_def.y" { YYFPRINTF(yyoutput, "AST-Type: %d", ((*yyvaluep).ast)->type); }; /* Line 818 of yacc.c */ #line 861 "fcml_gas_parser_def.c" break; case 30: /* operand_list */ /* Line 818 of yacc.c */ #line 94 "fcml_gas_parser_def.y" { YYFPRINTF(yyoutput, "AST-Type: %d", ((*yyvaluep).ast)->type); }; /* Line 818 of yacc.c */ #line 868 "fcml_gas_parser_def.c" break; case 31: /* operand */ /* Line 818 of yacc.c */ #line 94 "fcml_gas_parser_def.y" { YYFPRINTF(yyoutput, "AST-Type: %d", ((*yyvaluep).ast)->type); }; /* Line 818 of yacc.c */ #line 875 "fcml_gas_parser_def.c" break; case 32: /* effective_address */ /* Line 818 of yacc.c */ #line 94 "fcml_gas_parser_def.y" { YYFPRINTF(yyoutput, "AST-Type: %d", ((*yyvaluep).ast)->type); }; /* Line 818 of yacc.c */ #line 882 "fcml_gas_parser_def.c" break; case 33: /* effective_address_components */ /* Line 818 of yacc.c */ #line 94 "fcml_gas_parser_def.y" { YYFPRINTF(yyoutput, "AST-Type: %d", ((*yyvaluep).ast)->type); }; /* Line 818 of yacc.c */ #line 889 "fcml_gas_parser_def.c" break; case 34: /* effective_address_components_without_dis */ /* Line 818 of yacc.c */ #line 94 "fcml_gas_parser_def.y" { YYFPRINTF(yyoutput, "AST-Type: %d", ((*yyvaluep).ast)->type); }; /* Line 818 of yacc.c */ #line 896 "fcml_gas_parser_def.c" break; case 35: /* segment_selector */ /* Line 818 of yacc.c */ #line 95 "fcml_gas_parser_def.y" { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( ((*yyvaluep).reg_value).type ), ((*yyvaluep).reg_value).size, ((*yyvaluep).reg_value).reg, ((*yyvaluep).reg_value).x64_exp); }; /* Line 818 of yacc.c */ #line 903 "fcml_gas_parser_def.c" break; case 36: /* exp */ /* Line 818 of yacc.c */ #line 94 "fcml_gas_parser_def.y" { YYFPRINTF(yyoutput, "AST-Type: %d", ((*yyvaluep).ast)->type); }; /* Line 818 of yacc.c */ #line 910 "fcml_gas_parser_def.c" break; case 37: /* reg */ /* Line 818 of yacc.c */ #line 95 "fcml_gas_parser_def.y" { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( ((*yyvaluep).reg_value).type ), ((*yyvaluep).reg_value).size, ((*yyvaluep).reg_value).reg, ((*yyvaluep).reg_value).x64_exp); }; /* Line 818 of yacc.c */ #line 917 "fcml_gas_parser_def.c" break; case 38: /* pseudo_operation */ /* Line 818 of yacc.c */ #line 94 "fcml_gas_parser_def.y" { YYFPRINTF(yyoutput, "AST-Type: %d", ((*yyvaluep).ast)->type); }; /* Line 818 of yacc.c */ #line 924 "fcml_gas_parser_def.c" break; default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct fcml_st_parser_data *pd) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep, pd) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; struct fcml_st_parser_data *pd; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep, pd); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) yytype_int16 *yybottom; yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule, struct fcml_st_parser_data *pd) #else static void yy_reduce_print (yyvsp, yyrule, pd) YYSTYPE *yyvsp; int yyrule; struct fcml_st_parser_data *pd; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) , pd); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule, pd); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message about the unexpected token YYTOKEN for the state stack whose top is YYSSP. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return 2 if the required number of bytes is too large to store. */ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ 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 "expected"). */ int yycount = 0; /* There are many possibilities here to consider: - Assume YYFAIL is not used. It's too flawed to consider. See for details. YYERROR is fine as it does not invoke this function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - The only way there can be no lookahead present (in yychar) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to report. In that case, just report a simple "syntax error". - Don't assume there isn't a lookahead just because this state is a consistent state with a default action. There might have been a previous inconsistent state, consistent state with a non-default action, or user semantic action that manipulated yychar. - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the scanner and before detecting a syntax error. Thus, state merging (from LALR or IELR) and default reductions corrupt the expected token list. However, the list is correct for canonical LR with one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ if (yytoken != YYEMPTY) { int yyn = yypact[*yyssp]; yyarg[yycount++] = yytname[yytoken]; if (!yypact_value_is_default (yyn)) { /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. In other words, skip the first -YYN actions for this state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyx; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR && !yytable_value_is_error (yytable[yyx + yyn])) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; break; } yyarg[yycount++] = yytname[yyx]; { YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } } } } switch (yycount) { # define YYCASE_(N, S) \ case N: \ yyformat = S; \ break YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); # undef YYCASE_ } { YYSIZE_T yysize1 = yysize + yystrlen (yyformat); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } if (*yymsg_alloc < yysize) { *yymsg_alloc = 2 * yysize; if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; return 1; } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; int yyi = 0; while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyformat += 2; } else { yyp++; yyformat++; } } return 0; } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct fcml_st_parser_data *pd) #else static void yydestruct (yymsg, yytype, yyvaluep, pd) const char *yymsg; int yytype; YYSTYPE *yyvaluep; struct fcml_st_parser_data *pd; #endif { YYUSE (yyvaluep); YYUSE (pd); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { case 27: /* instruction */ /* Line 1393 of yacc.c */ #line 89 "fcml_gas_parser_def.y" { fcml_fn_ast_free_node(((*yyvaluep).ast)); }; /* Line 1393 of yacc.c */ #line 1330 "fcml_gas_parser_def.c" break; case 30: /* operand_list */ /* Line 1393 of yacc.c */ #line 89 "fcml_gas_parser_def.y" { fcml_fn_ast_free_node(((*yyvaluep).ast)); }; /* Line 1393 of yacc.c */ #line 1337 "fcml_gas_parser_def.c" break; case 31: /* operand */ /* Line 1393 of yacc.c */ #line 89 "fcml_gas_parser_def.y" { fcml_fn_ast_free_node(((*yyvaluep).ast)); }; /* Line 1393 of yacc.c */ #line 1344 "fcml_gas_parser_def.c" break; case 32: /* effective_address */ /* Line 1393 of yacc.c */ #line 89 "fcml_gas_parser_def.y" { fcml_fn_ast_free_node(((*yyvaluep).ast)); }; /* Line 1393 of yacc.c */ #line 1351 "fcml_gas_parser_def.c" break; case 33: /* effective_address_components */ /* Line 1393 of yacc.c */ #line 89 "fcml_gas_parser_def.y" { fcml_fn_ast_free_node(((*yyvaluep).ast)); }; /* Line 1393 of yacc.c */ #line 1358 "fcml_gas_parser_def.c" break; case 34: /* effective_address_components_without_dis */ /* Line 1393 of yacc.c */ #line 89 "fcml_gas_parser_def.y" { fcml_fn_ast_free_node(((*yyvaluep).ast)); }; /* Line 1393 of yacc.c */ #line 1365 "fcml_gas_parser_def.c" break; case 36: /* exp */ /* Line 1393 of yacc.c */ #line 89 "fcml_gas_parser_def.y" { fcml_fn_ast_free_node(((*yyvaluep).ast)); }; /* Line 1393 of yacc.c */ #line 1372 "fcml_gas_parser_def.c" break; case 38: /* pseudo_operation */ /* Line 1393 of yacc.c */ #line 89 "fcml_gas_parser_def.y" { fcml_fn_ast_free_node(((*yyvaluep).ast)); }; /* Line 1393 of yacc.c */ #line 1379 "fcml_gas_parser_def.c" break; default: break; } } /*----------. | yyparse. | `----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (struct fcml_st_parser_data *pd) #else int yyparse (pd) struct fcml_st_parser_data *pd; #endif #endif { /* The lookahead symbol. */ int yychar; #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else /* Default value used for initialization, for pacifying older GCCs or non-GCC compilers. */ static YYSTYPE yyval_default; # define YY_INITIAL_VALUE(Value) = Value #endif #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 YY_INITIAL_VALUE(yyval_default); /* Number of syntax errors so far. */ int yynerrs; int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: `yyss': related to states. `yyvs': related to semantic values. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yyssp = yyss = yyssa; yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* User initialization code. */ /* Line 1570 of yacc.c */ #line 115 "fcml_gas_parser_def.y" { /* Uncomment it in order to enable debugging */ /* gas_debug = 1; */ } /* Line 1570 of yacc.c */ #line 1511 "fcml_gas_parser_def.c" goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yytable_value_is_error (yyn)) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 3: /* Line 1787 of yacc.c */ #line 123 "fcml_gas_parser_def.y" { pd->tree = (yyvsp[(1) - (1)].ast); pd->symbol = NULL; } break; case 4: /* Line 1787 of yacc.c */ #line 124 "fcml_gas_parser_def.y" { pd->tree = (yyvsp[(1) - (1)].ast); pd->symbol = NULL; } break; case 5: /* Line 1787 of yacc.c */ #line 125 "fcml_gas_parser_def.y" { pd->tree = NULL; pd->symbol = fcml_fn_ast_alloc_node_define_symbol( pd->ip, (yyvsp[(1) - (2)].symbol).text, (yyvsp[(1) - (2)].symbol).length ); HANDLE_ERRORS( pd->symbol ); } break; case 6: /* Line 1787 of yacc.c */ #line 126 "fcml_gas_parser_def.y" { pd->tree = (yyvsp[(3) - (3)].ast); pd->symbol = fcml_fn_ast_alloc_node_define_symbol( pd->ip, (yyvsp[(1) - (3)].symbol).text, (yyvsp[(1) - (3)].symbol).length ); HANDLE_ERRORS( pd->symbol ); } break; case 7: /* Line 1787 of yacc.c */ #line 127 "fcml_gas_parser_def.y" { pd->tree = (yyvsp[(3) - (3)].ast); pd->symbol = fcml_fn_ast_alloc_node_define_symbol( pd->ip, (yyvsp[(1) - (3)].symbol).text, (yyvsp[(1) - (3)].symbol).length ); HANDLE_ERRORS( pd->symbol ); } break; case 8: /* Line 1787 of yacc.c */ #line 130 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_instruction( 0, (yyvsp[(1) - (1)].symbol).text, (yyvsp[(1) - (1)].symbol).length, 0, NULL ); HANDLE_ERRORS((yyval.ast)); } break; case 9: /* Line 1787 of yacc.c */ #line 131 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_instruction( 0, (yyvsp[(1) - (2)].symbol).text, (yyvsp[(1) - (2)].symbol).length, 0, (yyvsp[(2) - (2)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; case 10: /* Line 1787 of yacc.c */ #line 132 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_instruction( (yyvsp[(1) - (2)].prefixes), (yyvsp[(2) - (2)].symbol).text, (yyvsp[(2) - (2)].symbol).length, 0, NULL ); HANDLE_ERRORS((yyval.ast)); } break; case 11: /* Line 1787 of yacc.c */ #line 133 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_instruction( (yyvsp[(1) - (3)].prefixes), (yyvsp[(2) - (3)].symbol).text, (yyvsp[(2) - (3)].symbol).length, 0, (yyvsp[(3) - (3)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; case 13: /* Line 1787 of yacc.c */ #line 137 "fcml_gas_parser_def.y" { if( (yyvsp[(1) - (2)].prefixes) & (yyvsp[(2) - (2)].prefixes) ) { ADD_ERROR_MSG( "Doubled prefixes." ); YYERROR; } else { (yyval.prefixes) = (yyvsp[(1) - (2)].prefixes) | (yyvsp[(2) - (2)].prefixes); } } break; case 15: /* Line 1787 of yacc.c */ #line 143 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_operand_list( (yyvsp[(1) - (1)].ast), NULL ); HANDLE_ERRORS((yyval.ast)); } break; case 16: /* Line 1787 of yacc.c */ #line 144 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_operand_list( (yyvsp[(1) - (3)].ast), (yyvsp[(3) - (3)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; case 17: /* Line 1787 of yacc.c */ #line 147 "fcml_gas_parser_def.y" { (yyval.ast) = (yyvsp[(2) - (2)].ast); } break; case 19: /* Line 1787 of yacc.c */ #line 149 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_set_effective_address_hins( (yyvsp[(2) - (2)].ast), FCML_HINT_INDIRECT_POINTER ); } break; case 20: /* Line 1787 of yacc.c */ #line 150 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_register( &(yyvsp[(1) - (1)].reg_value) ); HANDLE_ERRORS((yyval.ast)); } break; case 22: /* Line 1787 of yacc.c */ #line 154 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_set_effective_address_details( &(yyvsp[(1) - (2)].reg_value), FCML_OS_UNDEFINED, (yyvsp[(2) - (2)].ast) ); } break; case 24: /* Line 1787 of yacc.c */ #line 159 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_set_displacemnt( (yyvsp[(1) - (2)].ast), (yyvsp[(2) - (2)].ast) ); } break; case 25: /* Line 1787 of yacc.c */ #line 160 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( NULL, NULL, NULL, (yyvsp[(1) - (1)].ast), FCML_FALSE, 0); } break; case 26: /* Line 1787 of yacc.c */ #line 164 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( &(yyvsp[(2) - (3)].reg_value), NULL, NULL, NULL, FCML_FALSE, 0 ); } break; case 27: /* Line 1787 of yacc.c */ #line 165 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( &(yyvsp[(2) - (3)].reg_value), NULL, NULL, NULL, FCML_FALSE, 0 ); } break; case 28: /* Line 1787 of yacc.c */ #line 166 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( &(yyvsp[(2) - (5)].reg_value), &(yyvsp[(4) - (5)].reg_value), NULL, NULL, FCML_FALSE, 0 ); } break; case 29: /* Line 1787 of yacc.c */ #line 167 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( NULL, &(yyvsp[(3) - (4)].reg_value), NULL, NULL, FCML_FALSE, 0 ); } break; case 30: /* Line 1787 of yacc.c */ #line 168 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( &(yyvsp[(2) - (7)].reg_value), &(yyvsp[(4) - (7)].reg_value), &(yyvsp[(6) - (7)].integer_value), NULL, FCML_FALSE, 0 ); } break; case 31: /* Line 1787 of yacc.c */ #line 169 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_effective_address( NULL, &(yyvsp[(3) - (6)].reg_value), &(yyvsp[(5) - (6)].integer_value), NULL, FCML_FALSE, 0 ); } break; case 32: /* Line 1787 of yacc.c */ #line 172 "fcml_gas_parser_def.y" { (yyval.reg_value) = (yyvsp[(1) - (2)].reg_value); } break; case 33: /* Line 1787 of yacc.c */ #line 176 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_integer( &(yyvsp[(1) - (1)].integer_value) ); HANDLE_ERRORS((yyval.ast)); } break; case 34: /* Line 1787 of yacc.c */ #line 177 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_exp( FCML_EN_EXN_SUB, (yyvsp[(1) - (3)].ast), (yyvsp[(3) - (3)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; case 35: /* Line 1787 of yacc.c */ #line 178 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_exp( FCML_EN_EXN_ADD, (yyvsp[(1) - (3)].ast), (yyvsp[(3) - (3)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; case 36: /* Line 1787 of yacc.c */ #line 179 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_exp( FCML_EN_EXN_DIV, (yyvsp[(1) - (3)].ast), (yyvsp[(3) - (3)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; case 37: /* Line 1787 of yacc.c */ #line 180 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_exp( FCML_EN_EXN_MUL, (yyvsp[(1) - (3)].ast), (yyvsp[(3) - (3)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; case 38: /* Line 1787 of yacc.c */ #line 181 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_use_symbol( (yyvsp[(1) - (1)].symbol).text, (yyvsp[(1) - (1)].symbol).length ); HANDLE_ERRORS((yyval.ast)); } break; case 39: /* Line 1787 of yacc.c */ #line 182 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_uminus( (yyvsp[(2) - (2)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; case 40: /* Line 1787 of yacc.c */ #line 183 "fcml_gas_parser_def.y" { (yyval.ast) = (yyvsp[(2) - (3)].ast); } break; case 47: /* Line 1787 of yacc.c */ #line 197 "fcml_gas_parser_def.y" { (yyval.ast) = fcml_fn_ast_alloc_node_pseudo_operation( (yyvsp[(1) - (2)].symbol).text, (yyvsp[(1) - (2)].symbol).length, (yyvsp[(2) - (2)].ast) ); HANDLE_ERRORS((yyval.ast)); } break; /* Line 1787 of yacc.c */ #line 1896 "fcml_gas_parser_def.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (pd, YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken) { char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; yysyntax_error_status = YYSYNTAX_ERROR; if (yysyntax_error_status == 0) yymsgp = yymsg; else if (yysyntax_error_status == 1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); if (!yymsg) { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = 2; } else { yysyntax_error_status = YYSYNTAX_ERROR; yymsgp = yymsg; } } yyerror (pd, yymsgp); if (yysyntax_error_status == 2) goto yyexhaustedlab; } # undef YYSYNTAX_ERROR #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval, pd); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp, pd); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (pd, YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, pd); } /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp, pd); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } /* Line 2050 of yacc.c */ #line 200 "fcml_gas_parser_def.y" fcml-1.1.1/src/fcml_apc_ast.c0000644000175000017500000011227512560745216012742 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include #include #include "fcml_env_int.h" #include "fcml_apc_ast.h" #include "fcml_utils.h" #include "fcml_trace.h" #include "fcml_messages.h" struct fcml_ist_ast_extracted_symbols { /* List of extracted symbols. */ fcml_st_coll_list *symbols; }; fcml_st_ast_node *fcml_fn_ast_alloc_node_integer( fcml_st_ast_val_integer *integer_value ) { fcml_st_ast_node *node = (fcml_st_ast_node*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node) ); if (!node) { return NULL; } fcml_st_ast_node_value *value_node = (fcml_st_ast_node_value*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node_value) ); if (!value_node) { fcml_fn_env_memory_free( node ); return NULL; } value_node->type = FCML_EN_ET_INTEGER; value_node->integer_value = *integer_value; node->type = FCML_EN_TN_VALUE; node->node = value_node; return node; } fcml_st_ast_node *fcml_fn_ast_alloc_node_float( fcml_st_ast_val_float *float_value ) { fcml_st_ast_node *node = (fcml_st_ast_node*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node) ); if (!node) { return NULL; } fcml_st_ast_node_value *exp_node = (fcml_st_ast_node_value*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node_value) ); if (!exp_node) { fcml_fn_env_memory_free( node ); return NULL; } exp_node->type = FCML_EN_ET_FLOAT; exp_node->float_value = *float_value; node->type = FCML_EN_TN_VALUE; node->node = exp_node; return node; } fcml_st_ast_node *fcml_fn_ast_alloc_node_pseudo_operation( fcml_string mnemonic, fcml_usize length, fcml_st_ast_node *exp ) { fcml_st_ast_node *operand_list = fcml_fn_ast_alloc_node_operand_list( exp, NULL ); if (!operand_list) { return NULL; } fcml_st_ast_node *pseudo_operation = fcml_fn_ast_alloc_node_instruction( 0, mnemonic, length, 0, operand_list ); if (!pseudo_operation) { fcml_fn_ast_free_node( operand_list ); return NULL; } return pseudo_operation; } fcml_st_ast_node *fcml_fn_ast_alloc_node_instruction( fcml_prefixes prefixes, fcml_string mnemonic, fcml_usize length, fcml_hints hints, fcml_st_ast_node *operands_list ) { fcml_st_ast_node *node = (fcml_st_ast_node*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node) ); if (!node) { return NULL; } fcml_st_ast_node_instruction *instruction_node = (fcml_st_ast_node_instruction*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node_instruction) ); if (!instruction_node) { fcml_fn_env_memory_free( node ); return NULL; } instruction_node->mnemonic = (fcml_string) fcml_fn_env_str_strldup( mnemonic, length ); if (!instruction_node->mnemonic) { fcml_fn_env_memory_free( node ); fcml_fn_env_memory_free( instruction_node ); return NULL; } instruction_node->operands = operands_list; instruction_node->hints = hints; instruction_node->prefixes = prefixes; node->type = FCML_EN_TN_INSTRUCTION; node->node = instruction_node; return node; } fcml_st_ast_node *fcml_fn_ast_alloc_node_register( fcml_st_register *reg ) { fcml_st_ast_node *node = (fcml_st_ast_node*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node) ); if (!node) { return NULL; } fcml_st_ast_node_register *reg_node = (fcml_st_ast_node_register*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node_register) ); if (!reg_node) { fcml_fn_env_memory_free( node ); return NULL; } reg_node->reg = *reg; node->type = FCML_EN_TN_REG; node->node = reg_node; return node; } fcml_st_ast_node *fcml_fn_ast_alloc_node_operand_list( fcml_st_ast_node *operand_l, fcml_st_ast_node *operand_r ) { fcml_st_ast_node *operand_list_node = NULL; fcml_st_ast_node_operand_list *operand_list = NULL; if (operand_l->type != FCML_EN_TN_OPERAND_LIST) { operand_list_node = (fcml_st_ast_node*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node) ); if (!operand_list_node) { return NULL; } operand_list = (fcml_st_ast_node_operand_list*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node_operand_list) ); if (!operand_list) { fcml_fn_env_memory_free( operand_list_node ); return NULL; } operand_list_node->type = FCML_EN_TN_OPERAND_LIST; operand_list_node->node = operand_list; operand_list->operands = fcml_fn_coll_list_alloc(); if (!operand_list->operands) { fcml_fn_env_memory_free( operand_list_node ); fcml_fn_env_memory_free( operand_list ); return NULL; } if (!fcml_fn_coll_list_add_back( operand_list->operands, operand_l ) || ( operand_r != NULL && !fcml_fn_coll_list_add_back( operand_list->operands, operand_r ) )) { fcml_fn_env_memory_free( operand_list_node ); fcml_fn_env_memory_free( operand_list ); fcml_fn_coll_list_free( operand_list->operands, NULL, NULL ); return NULL; } } else { operand_list_node = operand_l; operand_list = (fcml_st_ast_node_operand_list*) operand_l->node; if (!fcml_fn_coll_list_add_back( operand_list->operands, operand_r )) { return NULL; } } return operand_list_node; } fcml_st_symbol *fcml_fn_ast_alloc_node_define_symbol( fcml_ip ip, fcml_string symbol_name, fcml_usize length ) { fcml_st_symbol *symbol = (fcml_st_symbol*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_symbol) ); if (!symbol) { return FCML_FALSE; } /* Allocate symbol. */ symbol->symbol = (fcml_string) fcml_fn_env_str_strldup( symbol_name, length ); if (!symbol->symbol) { fcml_fn_env_memory_free( symbol ); return NULL; } symbol->value = (fcml_int64_t) ip; return symbol; } fcml_st_ast_node *fcml_fn_ast_alloc_node_use_symbol( fcml_string symbol_name, fcml_usize length ) { fcml_st_ast_node *node = (fcml_st_ast_node*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node) ); if (!node) { return NULL; } fcml_st_ast_node_use_symbol *symbol_node = (fcml_st_ast_node_use_symbol*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node_use_symbol) ); if (!symbol_node) { fcml_fn_env_memory_free( node ); return NULL; } /* Allocate symbol name. */ symbol_node->symbol = (fcml_string) fcml_fn_env_str_strldup( symbol_name, length ); if (!symbol_node->symbol) { fcml_fn_env_memory_free( symbol_node ); fcml_fn_env_memory_free( node ); return NULL; } node->node = symbol_node; node->type = FCML_EN_TN_USE_SYMBOL; return node; } fcml_st_ast_node *fcml_fn_ast_alloc_node_exp( fcml_en_ast_exp_node_operator op, fcml_st_ast_node *exp_left, fcml_st_ast_node *exp_right ) { fcml_st_ast_node *node = (fcml_st_ast_node*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node) ); if (!node) { return NULL; } fcml_st_ast_node_exp *exp_node = (fcml_st_ast_node_exp*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node_exp) ); if (!exp_node) { fcml_fn_env_memory_free( node ); return NULL; } exp_node->l = exp_left; exp_node->r = exp_right; exp_node->op = op; node->type = FCML_EN_TN_EXP; node->node = exp_node; return node; } fcml_st_ast_node *fcml_fn_ast_alloc_node_far_pointer( fcml_st_ast_node *segment_selector, fcml_st_ast_node *offset ) { fcml_st_ast_node *node = (fcml_st_ast_node*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node) ); if (!node) { return NULL; } fcml_st_ast_node_far_pointer *fp_node = (fcml_st_ast_node_far_pointer*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node_far_pointer) ); if (!fp_node) { fcml_fn_env_memory_free( node ); return NULL; } fp_node->segment_selector = segment_selector; fp_node->offset = offset; node->type = FCML_EN_TN_FAR_POINTER; node->node = fp_node; return node; } fcml_st_ast_node *fcml_fn_ast_set_effective_address_hins( fcml_st_ast_node *effective_address_node, fcml_hints hints ) { fcml_st_ast_node_effective_address *effective_address = (fcml_st_ast_node_effective_address *) effective_address_node->node; effective_address->instruction_hints |= hints; return effective_address_node; } fcml_st_ast_node *fcml_fn_ast_set_effective_address_details( fcml_st_register *segment_selector, fcml_st_size_operator *size_operator, fcml_st_ast_node *effective_address_node ) { fcml_st_ast_node_effective_address *effective_address = (fcml_st_ast_node_effective_address *) effective_address_node->node; if (segment_selector) { effective_address->segment_selector = *segment_selector; } /* Size operator is optional because not all assembler dialects allows to specify it here.*/ if (size_operator) { effective_address->size_operator = size_operator->size; if (size_operator->multimedia) { effective_address->addressing_hints |= FCML_OP_HINT_MULTIMEDIA_INSTRUCTION; } } return effective_address_node; } fcml_st_ast_node *fcml_fn_ast_set_displacemnt( fcml_st_ast_node *displacement, fcml_st_ast_node *effective_address_node ) { fcml_st_ast_node_effective_address *effective_address = (fcml_st_ast_node_effective_address *) effective_address_node->node; if (displacement) { effective_address->displacement = displacement; } return effective_address_node; } fcml_st_ast_node *fcml_fn_ast_alloc_node_effective_address( fcml_st_register *base, fcml_st_register *index, fcml_st_ast_val_integer *scale_factor, fcml_st_ast_node *displacement, fcml_bool uminus_displacement, fcml_hints hints ) { fcml_st_ast_node *node = (fcml_st_ast_node*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node) ); if (!node) { return NULL; } fcml_st_ast_node_effective_address *ea_node = (fcml_st_ast_node_effective_address*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node_effective_address) ); if (!ea_node) { fcml_fn_env_memory_free( node ); return NULL; } ea_node->addressing_hints = hints; if (base) { ea_node->base = *base; } if (index) { ea_node->index = *index; } if (scale_factor) { ea_node->scale_factor = *scale_factor; } if (displacement) { ea_node->displacement = ( uminus_displacement ) ? fcml_fn_ast_alloc_node_uminus( displacement ) : displacement; if (!ea_node->displacement) { /* Out of memory. */ fcml_fn_env_memory_free( node ); fcml_fn_env_memory_free( ea_node ); return NULL; } } node->node = ea_node; node->type = FCML_EN_TN_EFFECTIVE_ADDRESS; return node; } fcml_st_ast_node *fcml_fn_ast_alloc_node_uminus( fcml_st_ast_node *exp ) { fcml_st_ast_node *node; fcml_st_ast_node_uminus *uminus_node; /* Two unary minuses, so they can be reduced here. */ if (exp->type == FCML_EN_TN_UMINUS) { uminus_node = (fcml_st_ast_node_uminus*) exp->node; node = uminus_node->exp; fcml_fn_env_memory_free( exp ); fcml_fn_env_memory_free( uminus_node ); return node; } node = (fcml_st_ast_node*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node) ); if (!node) { return NULL; } uminus_node = (fcml_st_ast_node_uminus*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ast_node_uminus) ); if (!uminus_node) { fcml_fn_env_memory_free( node ); return NULL; } uminus_node->exp = exp; node->node = uminus_node; node->type = FCML_EN_TN_UMINUS; return node; } void fcml_ifn_ast_free_operand_node_list_action( fcml_ptr item_value, fcml_ptr args ) { fcml_st_ast_node *node = (fcml_st_ast_node*) item_value; fcml_fn_ast_free_node( node ); } void fcml_fn_ast_free_node( fcml_st_ast_node *exp ) { if (!exp) { return; } else { switch ( exp->type ) { case FCML_EN_TN_INSTRUCTION: { fcml_st_ast_node_instruction *instruction = (fcml_st_ast_node_instruction*) exp->node; if (instruction->mnemonic) { fcml_fn_env_str_strfree( instruction->mnemonic ); } fcml_fn_ast_free_node( instruction->operands ); } break; case FCML_EN_TN_OPERAND_LIST: { fcml_st_ast_node_operand_list *operand_list = (fcml_st_ast_node_operand_list*) exp->node; fcml_fn_coll_list_free( operand_list->operands, fcml_ifn_ast_free_operand_node_list_action, NULL ); } break; case FCML_EN_TN_EXP: { fcml_st_ast_node_exp *expr = (fcml_st_ast_node_exp*) exp->node; fcml_fn_ast_free_node( expr->l ); fcml_fn_ast_free_node( expr->r ); } break; case FCML_EN_TN_UMINUS: { fcml_st_ast_node_uminus *uminus = (fcml_st_ast_node_uminus*) exp->node; fcml_fn_ast_free_node( uminus->exp ); } break; case FCML_EN_TN_FAR_POINTER: { fcml_st_ast_node_far_pointer *far_pointer = (fcml_st_ast_node_far_pointer*) exp->node; fcml_fn_ast_free_node( far_pointer->offset ); fcml_fn_ast_free_node( far_pointer->segment_selector ); } break; case FCML_EN_TN_EFFECTIVE_ADDRESS: { fcml_st_ast_node_effective_address *effective_address = (fcml_st_ast_node_effective_address*) exp->node; fcml_fn_ast_free_node( effective_address->displacement ); } break; case FCML_EN_TN_USE_SYMBOL: { fcml_st_ast_node_use_symbol *symbol_node = (fcml_st_ast_node_use_symbol*) exp->node; if (symbol_node->symbol) { fcml_fn_env_str_strfree( symbol_node->symbol ); } } break; default: break; } if (exp->node) { fcml_fn_env_memory_free( exp->node ); } fcml_fn_env_memory_free( exp ); } } fcml_ceh_error fcml_fn_ast_visit_nodes( fcml_st_ast_node *ast_node, fcml_fnp_ast_node_visitor visitor, fcml_ptr visitor_args ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if (ast_node) { switch ( ast_node->type ) { case FCML_EN_TN_INSTRUCTION: { fcml_st_ast_node_instruction *node_instruction = (fcml_st_ast_node_instruction*) ast_node->node; error = fcml_fn_ast_visit_nodes( node_instruction->operands, visitor, visitor_args ); if (error) break; break; } case FCML_EN_TN_OPERAND_LIST: { fcml_st_ast_node_operand_list *operand_list = (fcml_st_ast_node_operand_list*) ast_node->node; fcml_st_coll_list_element *current = operand_list->operands->head; int i = 0; while ( current && i < FCML_OPERANDS_COUNT ) { error = fcml_fn_ast_visit_nodes( (fcml_st_ast_node*) current->item, visitor, visitor_args ); if (error) break; current = current->next; } break; } case FCML_EN_TN_EXP: { fcml_st_ast_node_exp *exp_node = (fcml_st_ast_node_exp*) ast_node->node; error = fcml_fn_ast_visit_nodes( exp_node->l, visitor, visitor_args ); if (error) break; error = fcml_fn_ast_visit_nodes( exp_node->r, visitor, visitor_args ); if (error) break; break; } case FCML_EN_TN_UMINUS: { fcml_st_ast_node_uminus *uminus_node = (fcml_st_ast_node_uminus*) ast_node->node; error = fcml_fn_ast_visit_nodes( uminus_node->exp, visitor, visitor_args ); if (error) break; break; } case FCML_EN_TN_FAR_POINTER: { fcml_st_ast_node_far_pointer *far_pointer_node = (fcml_st_ast_node_far_pointer*) ast_node->node; error = fcml_fn_ast_visit_nodes( far_pointer_node->offset, visitor, visitor_args ); if (error) break; error = fcml_fn_ast_visit_nodes( far_pointer_node->segment_selector, visitor, visitor_args ); if (error) break; break; } case FCML_EN_TN_EFFECTIVE_ADDRESS: { fcml_st_ast_node_effective_address *eff_addr_node = (fcml_st_ast_node_effective_address*) ast_node->node; error = fcml_fn_ast_visit_nodes( eff_addr_node->displacement, visitor, visitor_args ); if (error) break; break; } default: /* Just visit current node. */ break; } /* Visit original node. */ error = visitor( ast_node, visitor_args ); } return error; } /* Visitor responsible for extracting used symbols. */ fcml_ceh_error fcml_ifn_ast_extract_symbols_visitor( fcml_st_ast_node *node, fcml_ptr visitor_args ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if (node->type == FCML_EN_TN_USE_SYMBOL) { fcml_st_ast_node_use_symbol *symbol_node = (fcml_st_ast_node_use_symbol*) node->node; if (symbol_node->symbol) { struct fcml_ist_ast_extracted_symbols *extracted_symbols = (struct fcml_ist_ast_extracted_symbols*) visitor_args; if (!extracted_symbols->symbols) { extracted_symbols->symbols = fcml_fn_coll_list_alloc(); if (!extracted_symbols->symbols) { return FCML_CEH_GEC_OUT_OF_MEMORY; } } if (!fcml_fn_coll_list_add_front( extracted_symbols->symbols, symbol_node->symbol )) { return FCML_CEH_GEC_OUT_OF_MEMORY; } } } return error; } /* Extracts all symbols used by whole instruction AST tree. */ fcml_ceh_error fcml_fn_ast_extract_used_symbols( fcml_st_ast_node *ast_tree, fcml_st_coll_list **extracted_symbols ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; struct fcml_ist_ast_extracted_symbols symbols; symbols.symbols = NULL; error = fcml_fn_ast_visit_nodes( ast_tree, &fcml_ifn_ast_extract_symbols_visitor, &symbols ); if (error) { if (symbols.symbols) { fcml_fn_coll_list_free( symbols.symbols, NULL, NULL ); symbols.symbols = NULL; } } *extracted_symbols = symbols.symbols; return error; } void fcml_fn_ast_free_converted_cif( fcml_st_instruction *cif_instruction ) { if (cif_instruction) { if (cif_instruction->mnemonic) { fcml_fn_env_str_strfree( cif_instruction->mnemonic ); } fcml_fn_env_memory_free( cif_instruction ); } } float fcml_ifn_ast_get_float_value( fcml_st_ast_node_value *value ) { return value->float_value.value; } fcml_int64_t fcml_ifn_ast_get_integer_value( fcml_st_ast_node_value *value ) { return (fcml_int64_t) value->integer_value.value; } fcml_st_ast_val_integer fcml_ifn_ast_convert_to_val_integer( fcml_int64_t val ) { fcml_st_ast_val_integer int_value; int_value.value = (fcml_uint64_t) val; int_value.is_signed = val < 0; int_value.overflow = FCML_FALSE; return int_value; } fcml_ceh_error fcml_ifn_ast_eval_symbol( fcml_st_cif_converter_context *context, fcml_st_ast_node_use_symbol *symbol_node, fcml_st_ast_node_value *result ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; /* Get symbol definition from symbol table. */ fcml_st_symbol *symbol_def = fcml_fn_symbol_get( context->symbol_table, symbol_node->symbol ); if (!symbol_def && !context->ignore_undefined_symbols) { /* Symbol is undefined. */ fcml_fn_msg_add_error_message( context->errors, FCML_MC_SEGMENT_UNDEFINED_SYMBOL, FCML_CEH_MEC_ERROR_UNDEFINED_SYMBOL, FCML_EN_CEH_EL_ERROR, symbol_node->symbol ); error = FCML_CEH_GEC_UNDEFINED_SYMBOL; } else { /* Ignored symbols are treated as 0. Possibility to ignore * symbols is used in case of load-and-go assembler. */ if (!symbol_def) { context->ignored_symbols++; } context->evaluated_symbols++; result->type = FCML_EN_ET_INTEGER; result->integer_value.is_signed = FCML_TRUE; result->integer_value.overflow = FCML_FALSE; result->integer_value.value = symbol_def ? symbol_def->value : 0L; } return error; } fcml_ceh_error fcml_ifn_ast_eval_exp( fcml_st_cif_converter_context *context, fcml_st_ast_node *exp, fcml_st_ast_node_value *result ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; switch ( exp->type ) { case FCML_EN_TN_VALUE: { *result = *( (fcml_st_ast_node_value*) exp->node ); if (result->integer_value.overflow) { fcml_fn_ceh_add_error( context->errors, fcml_fn_msg_get_message( FCML_MC_CEH_GEC_VALUE_OUT_OF_RANGE ), FCML_CEH_MEW_WARN_VALUE_OUT_OF_RANGE, FCML_EN_CEH_EL_WARN ); } break; } case FCML_EN_TN_UMINUS: { error = fcml_ifn_ast_eval_exp( context, ( (fcml_st_ast_node_uminus*) exp->node )->exp, result ); if (error) { return error; } if (result->type == FCML_EN_ET_INTEGER) { result->integer_value = fcml_ifn_ast_convert_to_val_integer( -( (fcml_int64_t) result->integer_value.value ) ); } else { result->float_value.value = -result->float_value.value; } break; } case FCML_EN_TN_USE_SYMBOL: { fcml_st_ast_node_use_symbol *symbol_node = (fcml_st_ast_node_use_symbol*) exp->node; error = fcml_ifn_ast_eval_symbol( context, symbol_node, result ); break; } case FCML_EN_TN_EXP: { fcml_st_ast_node_exp *exp_node = (fcml_st_ast_node_exp*) exp->node; fcml_st_ast_node_value lval = { (fcml_st_ast_value_node_type) 0 }; fcml_st_ast_node_value rval = { (fcml_st_ast_value_node_type) 0 }; fcml_ceh_error error = fcml_ifn_ast_eval_exp( context, exp_node->l, &lval ); if (error) { return error; } error = fcml_ifn_ast_eval_exp( context, exp_node->r, &rval ); if (error) { return error; } fcml_bool is_float = FCML_FALSE; result->type = FCML_EN_ET_INTEGER; if (lval.type == FCML_EN_ET_FLOAT || rval.type == FCML_EN_ET_FLOAT) { result->type = FCML_EN_ET_FLOAT; is_float = FCML_TRUE; } switch ( exp_node->op ) { case FCML_EN_EXN_SUB: if (is_float) { result->float_value.value = fcml_ifn_ast_get_float_value( &lval ) - fcml_ifn_ast_get_float_value( &rval ); } else { result->integer_value = fcml_ifn_ast_convert_to_val_integer( fcml_ifn_ast_get_integer_value( &lval ) - fcml_ifn_ast_get_integer_value( &rval ) ); } break; case FCML_EN_EXN_ADD: if (is_float) { result->float_value.value = fcml_ifn_ast_get_float_value( &lval ) + fcml_ifn_ast_get_float_value( &rval ); } else { result->integer_value = fcml_ifn_ast_convert_to_val_integer( fcml_ifn_ast_get_integer_value( &lval ) + fcml_ifn_ast_get_integer_value( &rval ) ); } break; case FCML_EN_EXN_MUL: if (is_float) { result->float_value.value = fcml_ifn_ast_get_float_value( &lval ) * fcml_ifn_ast_get_float_value( &rval ); } else { result->integer_value = fcml_ifn_ast_convert_to_val_integer( fcml_ifn_ast_get_integer_value( &lval ) * fcml_ifn_ast_get_integer_value( &rval ) ); } break; case FCML_EN_EXN_DIV: if (is_float) { result->float_value.value = fcml_ifn_ast_get_float_value( &lval ) / fcml_ifn_ast_get_float_value( &rval ); } else { fcml_int64_t divisor = fcml_ifn_ast_get_integer_value( &rval ); if (divisor == 0) { fcml_fn_ceh_add_error( context->errors, "Division by zero.", FCML_CEH_MEC_ERROR_DIVISION_BY_0, FCML_EN_CEH_EL_ERROR ); error = FCML_CEH_GEC_INVALID_INPUT; } else { result->integer_value = fcml_ifn_ast_convert_to_val_integer( fcml_ifn_ast_get_integer_value( &lval ) / divisor ); } } break; } break; } default: FCML_TRACE( "Unsupported AST node %d.", exp->type ); error = FCML_CEH_GEC_INTERNAL_ERROR; break; } return error; } fcml_ceh_error fcml_ifn_ast_util_convert_value_to_immediate( fcml_st_ast_node_value *value, fcml_st_integer *immediate ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; immediate->is_signed = FCML_FALSE; if (value->type == FCML_EN_ET_FLOAT) { /* Floats are not supported yet. */ error = FCML_CEH_GEC_FEATURE_NOT_SUPPORTED; } else if (value->type == FCML_EN_ET_INTEGER) { error = fcml_fn_utils_int64_to_integer( value->integer_value.value, value->integer_value.is_signed, immediate, FCML_ENUSF_ALL ); } else { /* Unknown value type.*/ FCML_TRACE( "Unknown value type: %d.", value->type ); error = FCML_CEH_GEC_INTERNAL_ERROR; } return error; } fcml_ceh_error fcml_ifn_ast_util_convert_far_pointer_node_to_operand( fcml_st_cif_converter_context *context, fcml_st_ast_node_far_pointer *far_pointer_node, fcml_st_far_pointer *far_pointer_operand ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_ast_node *segment_selector_node = far_pointer_node->segment_selector; fcml_st_ast_node *offset_node = far_pointer_node->offset; fcml_st_ast_node_value segment_selector_value; fcml_st_ast_node_value offset_value; /* Evaluate expressions.*/ if (( error = fcml_ifn_ast_eval_exp( context, segment_selector_node, &segment_selector_value ) )) { return error; } if (( error = fcml_ifn_ast_eval_exp( context, offset_node, &offset_value ) )) { return error; } /* Segment selector and offset have to be integers.*/ if (segment_selector_value.type != FCML_EN_ET_INTEGER || offset_value.type != FCML_EN_ET_INTEGER) { /* Only integer values are supported here.*/ if (!fcml_fn_ceh_add_error( context->errors, "Segment selector and offset have to be an integer values.", FCML_CEH_MEC_ERROR_WRONG_VALUE_FORMAT, FCML_EN_CEH_EL_ERROR )) { error = FCML_CEH_GEC_OUT_OF_MEMORY; } else { error = FCML_CEH_GEC_INVALID_INPUT; } return error; } /* Set segment selector.*/ fcml_bool overflow = FCML_FALSE; if (segment_selector_value.integer_value.is_signed) { fcml_int64_t segment = (fcml_int64_t) segment_selector_value.integer_value.value; if (segment <= FCML_INT16_MAX && segment >= FCML_INT16_MIN) { far_pointer_operand->segment = (fcml_int16_t) segment; } else { overflow = FCML_TRUE; } } else { if (segment_selector_value.integer_value.value <= FCML_UINT16_MAX) { far_pointer_operand->segment = (fcml_uint16_t) segment_selector_value.integer_value.value; } else { overflow = FCML_TRUE; } } /* In case of far pointer calculation such problem is reported as an error. */ if (overflow) { if (!fcml_fn_ceh_add_error( context->errors, "Segment selector out of range.", FCML_CEH_MEC_ERROR_VALUE_OUT_OF_RANGE, FCML_EN_CEH_EL_ERROR )) { error = FCML_CEH_GEC_OUT_OF_MEMORY; } else { error = FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } return error; } /* Set offset.*/ if (offset_value.integer_value.is_signed) { fcml_int64_t offset = (fcml_int64_t) offset_value.integer_value.value; if (offset <= FCML_INT16_MAX && offset >= FCML_INT16_MIN) { far_pointer_operand->offset16 = (fcml_int16_t) offset; far_pointer_operand->offset_size = FCML_DS_16; } else if (offset <= FCML_INT32_MAX && offset >= FCML_INT32_MIN) { far_pointer_operand->offset32 = (fcml_int32_t) offset; far_pointer_operand->offset_size = FCML_DS_32; } else { overflow = FCML_TRUE; } } else { fcml_uint64_t offset = offset_value.integer_value.value; if (offset <= FCML_UINT16_MAX) { far_pointer_operand->offset16 = (fcml_int16_t) offset_value.integer_value.value; far_pointer_operand->offset_size = FCML_DS_16; } else if (offset <= FCML_UINT32_MAX) { far_pointer_operand->offset32 = (fcml_uint32_t) offset_value.integer_value.value; far_pointer_operand->offset_size = FCML_DS_32; } else { overflow = FCML_TRUE; } } if (overflow) { if (!fcml_fn_ceh_add_error( context->errors, "Offset out of range.", FCML_CEH_MEC_ERROR_VALUE_OUT_OF_RANGE, FCML_EN_CEH_EL_ERROR )) { error = FCML_CEH_GEC_OUT_OF_MEMORY; } else { error = FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } } return error; } fcml_ceh_error fcml_ifn_ast_util_convert_effective_address_node_to_operand( fcml_st_cif_converter_context *context, fcml_st_instruction *cif_instruction, fcml_st_ast_node_effective_address *effective_address_node, fcml_en_effective_address_form address_form, fcml_st_operand *operand ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_address *address = &( operand->address ); /* Copy operands and instruction hints.*/ operand->hints |= effective_address_node->addressing_hints; cif_instruction->hints |= effective_address_node->instruction_hints; fcml_st_effective_address *effective_address = &( address->effective_address ); fcml_bool is_combined = !fcml_fn_utils_is_reg_undef( &( effective_address_node->base ) ) || !fcml_fn_utils_is_reg_undef( &( effective_address_node->index ) ); address->address_form = is_combined ? FCML_AF_COMBINED : FCML_AF_OFFSET; /* Evaluate displacement.*/ if (effective_address_node->displacement) { fcml_st_ast_node_value value; if (( error = fcml_ifn_ast_eval_exp( context, effective_address_node->displacement, &value ) )) { return error; } if (value.type != FCML_EN_ET_INTEGER) { fcml_fn_ceh_add_error( context->errors, "Displacement has to be an integer value.", FCML_CEH_MEC_ERROR_WRONG_VALUE_FORMAT, FCML_EN_CEH_EL_ERROR ); error = FCML_CEH_GEC_INVALID_INPUT; return error; } fcml_st_integer disp_value; error = fcml_fn_utils_int64_to_integer( value.integer_value.value, value.integer_value.is_signed, &disp_value, is_combined ? FCML_ENUSF_ALL : (fcml_en_utils_size_flags) ( FCML_ENUSF_16 | FCML_ENUSF_32 | FCML_ENUSF_64 ) ); if (error) { return error; } if (is_combined) { effective_address->displacement = disp_value; } else { error = fcml_fn_utils_integer_to_offset( &disp_value, &( address->offset ) ); if (error) { return error; } } } if (is_combined) { effective_address->base = effective_address_node->base; effective_address->index = effective_address_node->index; fcml_uint32_t scale_factor = (fcml_uint32_t) effective_address_node->scale_factor.value; if (( scale_factor == 0 || scale_factor == 1 || scale_factor == 2 || scale_factor == 4 || scale_factor == 8 )) { effective_address->scale_factor = (fcml_uint8_t) scale_factor; } else { fcml_fn_ceh_add_error( context->errors, "Wrong scale factor value.", FCML_CEH_MEC_ERROR_WRONG_VALUE_FORMAT, FCML_EN_CEH_EL_ERROR ); return FCML_CEH_GEC_INVALID_INPUT; } } address->segment_selector.segment_selector = effective_address_node->segment_selector; address->size_operator = effective_address_node->size_operator; return error; } fcml_ceh_error fcml_ifn_ast_handle_ast_node( fcml_st_cif_converter_context *context, fcml_st_instruction *cif_instruction, fcml_st_operand *current_operand, fcml_st_ast_node *ast_node ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; switch ( ast_node->type ) { case FCML_EN_TN_INSTRUCTION: { fcml_st_ast_node_instruction *node_instruction = (fcml_st_ast_node_instruction*) ast_node->node; /* Handle mnemonic.*/ cif_instruction->prefixes = node_instruction->prefixes; cif_instruction->hints |= node_instruction->hints; cif_instruction->mnemonic = fcml_fn_env_str_strdup( node_instruction->mnemonic ); if (cif_instruction->mnemonic) { /* Handle operands.*/ if (node_instruction->operands) { error = fcml_ifn_ast_handle_ast_node( context, cif_instruction, NULL, node_instruction->operands ); } } else { error = FCML_CEH_GEC_OUT_OF_MEMORY; } break; } case FCML_EN_TN_OPERAND_LIST: { fcml_st_ast_node_operand_list *operand_list = (fcml_st_ast_node_operand_list*) ast_node->node; if (operand_list->operands->size > FCML_OPERANDS_COUNT) { fcml_fn_ceh_add_error( context->errors, "Too many operands.", FCML_CEH_MEC_ERROR_TO_MANY_OPERANDS, FCML_EN_CEH_EL_ERROR ); error = FCML_CEH_GEC_INVALID_INPUT; } else { fcml_st_coll_list_element *current = operand_list->operands->head; int i = 0; while ( current && i < FCML_OPERANDS_COUNT ) { error = fcml_ifn_ast_handle_ast_node( context, cif_instruction, &( cif_instruction->operands[i++] ), (fcml_st_ast_node*) current->item ); if (error) { return error; } current = current->next; } cif_instruction->operands_count = operand_list->operands->size; } break; } case FCML_EN_TN_USE_SYMBOL: case FCML_EN_TN_EXP: case FCML_EN_TN_VALUE: case FCML_EN_TN_UMINUS: { fcml_st_ast_node_value value; error = fcml_ifn_ast_eval_exp( context, ast_node, &value ); if (!error) { if (current_operand != NULL) { /* Convert value to immediate operand.*/ error = fcml_ifn_ast_util_convert_value_to_immediate( &value, &( current_operand->immediate ) ); if (!error) { current_operand->type = FCML_OT_IMMEDIATE; } } else { FCML_TRACE_MSG( "Operand is mandatory here." ); error = FCML_CEH_GEC_INTERNAL_ERROR; } } break; } case FCML_EN_TN_REG: { fcml_st_ast_node_register *node_register = (fcml_st_ast_node_register*) ast_node->node; current_operand->reg = node_register->reg; current_operand->type = FCML_OT_REGISTER; break; } case FCML_EN_TN_FAR_POINTER: { fcml_st_ast_node_far_pointer *far_pointer_node = (fcml_st_ast_node_far_pointer*) ast_node->node; error = fcml_ifn_ast_util_convert_far_pointer_node_to_operand( context, far_pointer_node, &( current_operand->far_pointer ) ); current_operand->type = FCML_OT_FAR_POINTER; break; } case FCML_EN_TN_EFFECTIVE_ADDRESS: { fcml_st_ast_node_effective_address *effective_address_node = (fcml_st_ast_node_effective_address*) ast_node->node; error = fcml_ifn_ast_util_convert_effective_address_node_to_operand( context, cif_instruction, effective_address_node, effective_address_node->address_form, current_operand ); current_operand->type = FCML_OT_ADDRESS; break; } default: /* Unsupported node type. */ error = FCML_CEH_GEC_INTERNAL_ERROR; break; } return error; } fcml_ceh_error fcml_fn_ast_to_cif_converter( fcml_st_cif_converter_context *context, fcml_st_ast_node *ast_instruction_node, fcml_st_instruction **out_instruction ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; context->evaluated_symbols = 0; fcml_st_instruction *instruction = (fcml_st_instruction*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_instruction) ); if (instruction) { error = fcml_ifn_ast_handle_ast_node( context, instruction, NULL, ast_instruction_node ); if (error) { fcml_fn_ast_free_converted_cif( instruction ); } else { *out_instruction = instruction; } } return error; } fcml-1.1.1/src/fcml_env_int.h0000644000175000017500000000465712560745216013003 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_ENVIRONMENT_H_ #define FCML_ENVIRONMENT_H_ #include #include #include "fcml_types.h" /* Memory. */ fcml_ptr fcml_fn_env_memory_alloc( fcml_usize size ); fcml_ptr fcml_fn_env_memory_realloc( fcml_ptr ptr, fcml_usize size ); fcml_ptr fcml_fn_env_memory_alloc_clear( fcml_usize size ); void fcml_fn_env_memory_copy( fcml_ptr dest, const fcml_ptr src, fcml_usize len ); void fcml_fn_env_memory_clear( fcml_ptr src, fcml_usize len ); fcml_bool fcml_fn_env_memory_cmp( const fcml_ptr src1, const fcml_ptr src2, fcml_usize len ); void fcml_fn_env_memory_free( fcml_ptr ptr ); /* Strings. */ fcml_bool fcml_fn_env_str_strblank( const fcml_string str ); fcml_usize fcml_fn_env_str_strlen( const fcml_string str ); fcml_string fcml_fn_env_str_stralloc( fcml_usize len ); fcml_string fcml_fn_env_str_strdup( const fcml_string str ); void fcml_fn_env_str_strcpy( fcml_string src, const fcml_string dst ); fcml_bool fcml_fn_env_str_strcmp( const fcml_string src1, const fcml_string src2 ); void fcml_fn_env_str_strncpy( fcml_string dst, const fcml_string src, fcml_usize len ); void fcml_fn_env_str_strclr( fcml_string str ); fcml_string fcml_fn_env_str_strldup( const fcml_string str, fcml_usize size ); void fcml_fn_env_str_strfree( fcml_string str ); void fcml_fn_env_str_vsnprintf( fcml_string buffer, fcml_usize maxlen, const fcml_string format, va_list args ); void fcml_fn_env_str_snprintf( fcml_string buffer, fcml_usize maxlen, fcml_string format, ... ); /* Characters. */ fcml_bool fcml_fn_env_is_alpha( fcml_char c ); fcml_bool fcml_fn_env_is_digit( fcml_char c ); #endif /* FCML_ENVIRONMENT_H_ */ fcml-1.1.1/src/fcml_common_lex.h0000644000175000017500000000613012560745216013465 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_COMMON_LEX_H_ #define FCML_COMMON_LEX_H_ #include #include #include "fcml_env_int.h" #include "fcml_parser_utils.h" /*GPR*/ #define FCML_FM_GPRS_8_REG(x) { fcml_fn_pu_parse_register( FCML_REG_GPR, FCML_DS_8, x, FCML_FALSE, &(yylval->reg_value) ); return FCML_TK_REG_GPR; } #define FCML_FM_GPRS_8_X_REG(x) { fcml_fn_pu_parse_register( FCML_REG_GPR, FCML_DS_8, x, FCML_TRUE, &(yylval->reg_value) ); return FCML_TK_REG_GPR; } #define FCML_FM_GPRS_16_REG(x) { fcml_fn_pu_parse_register( FCML_REG_GPR, FCML_DS_16, x, FCML_FALSE, &(yylval->reg_value) ); return FCML_TK_REG_GPR; } #define FCML_FM_GPRS_32_REG(x) { fcml_fn_pu_parse_register( FCML_REG_GPR, FCML_DS_32, x, FCML_FALSE, &(yylval->reg_value) ); return FCML_TK_REG_GPR; } #define FCML_FM_GPRS_64_REG(x) { fcml_fn_pu_parse_register( FCML_REG_GPR, FCML_DS_64, x, FCML_FALSE, &(yylval->reg_value) ); return FCML_TK_REG_GPR; } /*SIMD*/ #define FCML_FM_SIMD_64_REG(x) { fcml_fn_pu_parse_register( FCML_REG_SIMD, FCML_DS_64, x, FCML_FALSE, &(yylval->reg_value) ); return FCML_TK_REG_SIMD; } #define FCML_FM_SIMD_128_REG(x) { fcml_fn_pu_parse_register( FCML_REG_SIMD, FCML_DS_128, x, FCML_FALSE, &(yylval->reg_value) ); return FCML_TK_REG_SIMD; } #define FCML_FM_SIMD_256_REG(x) { fcml_fn_pu_parse_register( FCML_REG_SIMD, FCML_DS_256, x, FCML_FALSE, &(yylval->reg_value) ); return FCML_TK_REG_SIMD; } /*FPU*/ #define FCML_FM_FPU_REG(x) { fcml_fn_pu_parse_register( FCML_REG_FPU, FCML_DS_UNDEF, x, FCML_FALSE, &(yylval->reg_value) ); return FCML_TK_REG_FPU; } /*Control registers.*/ #define FCML_FM_CR_REG(x) { fcml_fn_pu_parse_register( FCML_REG_CR, FCML_DS_UNDEF, x, FCML_FALSE, &(yylval->reg_value) ); return FCML_TK_REG_CR; } /*Debug registers.*/ #define FCML_FM_DR_REG(x) { fcml_fn_pu_parse_register( FCML_REG_DR, FCML_DS_UNDEF, x, FCML_FALSE, &(yylval->reg_value) ); return FCML_TK_REG_DR; } /*Segment registers.*/ #define FCML_FM_SEG_REG(x) { fcml_fn_pu_parse_register( FCML_REG_SEG, FCML_DS_UNDEF, x, FCML_FALSE, &(yylval->reg_value) ); return FCML_TK_REG_SEG; } /*RIP*/ #define FCML_FM_RIP { fcml_fn_pu_parse_register( FCML_REG_IP, FCML_DS_64, FCML_REG_UNDEFINED, FCML_FALSE, &(yylval->reg_value) ); return FCML_TK_REG_RIP; } #endif /* FCML_COMMON_LEX_H_ */ fcml-1.1.1/src/fcml_hints.c0000644000175000017500000000571512560745216012455 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_hints.h" fcml_st_hts_calculated_hints fcml_fn_hts_ihc_far_pointer( fcml_st_def_addr_mode_desc *addr_mode, fcml_st_def_decoded_addr_mode *decoded_addr_mode ) { fcml_st_hts_calculated_hints hints; hints.instruction_hints = FCML_HINT_FAR_POINTER; hints.operand_hints = 0; return hints; } fcml_st_hts_calculated_hints fcml_fn_hts_ihc_modrm_hints( fcml_st_def_addr_mode_desc *addr_mode, fcml_st_def_decoded_addr_mode *decoded_addr_mode ) { fcml_st_hts_calculated_hints hints = { 0 }; fcml_sf_def_tma_rm *rm_args = (fcml_sf_def_tma_rm*) decoded_addr_mode->addr_mode_args; if ( rm_args->flags & FCML_RMF_M ) { hints.operand_hints = 0; if ( rm_args->reg_type == FCML_REG_SIMD ) { /* SIMD media instruction. */ hints.operand_hints |= FCML_OP_HINT_MULTIMEDIA_INSTRUCTION; } if ( FCML_GET_OS( rm_args->encoded_memory_operand_size ) == FCML_EOS_FP ) { /* Far pointer. */ hints.instruction_hints |= FCML_HINT_FAR_POINTER; } else if ( FCML_GET_OS( rm_args->encoded_memory_operand_size ) != FCML_EOS_FPI ) { /* If not far, then near :) */ hints.instruction_hints |= FCML_HINT_NEAR_POINTER; } if ( rm_args->flags & FCML_RMF_I ) { hints.instruction_hints |= FCML_HINT_INDIRECT_POINTER; } /* Every ModR/M encoded operand supports SIB hint. */ hints.operand_hints |= FCML_OP_HINT_SIB_ENCODING; } else { hints.operand_hints = 0; } return hints; } fcml_st_hts_calculated_hints fcml_fn_hts_ihc_immediate_dis_relative( fcml_st_def_addr_mode_desc *addr_mode, fcml_st_def_decoded_addr_mode *decoded_addr_mode ) { fcml_st_hts_calculated_hints hints; hints.instruction_hints = 0; hints.operand_hints = FCML_OP_HINT_DISPLACEMENT_RELATIVE_ADDRESS; return hints; } fcml_st_hts_calculated_hints fcml_fn_hts_ihc_pseudo_opcode( fcml_st_def_addr_mode_desc *addr_mode, fcml_st_def_decoded_addr_mode *decoded_addr_mode ) { fcml_st_hts_calculated_hints hints; hints.instruction_hints = 0; hints.operand_hints = FCML_OP_HINT_PSEUDO_OPCODE; return hints; } fcml-1.1.1/src/fcml_def.h0000644000175000017500000012206612560745216012072 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_DEF_H_ #define FCML_DEF_H_ #include #include #include #include "fcml_ceh.h" /* Constants used to encode operand size on one byte. Used only in instruction descriptions. */ /* Take into account that every size is given in a number of bytes. */ #define FCML_EOS_UNDEFINED 0 #define FCML_EOS_512B FCML_EOS_UNDEFINED #define FCML_EOS_BYTE 1 #define FCML_EOS_WORD 2 #define FCML_EOS_DWORD 4 #define FCML_EOS_FWORD 6 #define FCML_EOS_QWORD 8 #define FCML_EOS_MWORD 8 #define FCML_EOS_TBYTE 10 #define FCML_EOS_OWORD 16 #define FCML_EOS_XWORD 16 #define FCML_EOS_YWORD 32 /* Dynamic encoded operand sizes calculated at runtime. */ #define FCML_EOS_DYNAMIC_BASE 0x70 #define FCML_EOS_OPT 0x80 /* Operand size calculated by Effective Operand Size Attribute and Effective Address Size Attribute. */ #define FCML_EOS_EOSA 0x7F #define FCML_EOS_EASA 0x7E /* Operand size calculated on L field. */ #define FCML_EOS_L 0x7D /* Operand sizes that cannot be simply written as number of bytes.*/ #define FCML_EOS_14_28 0x7C #define FCML_EOS_94_108 0x7B #define FCML_EOS_32_64 0x7A /* Far pointer indirect.*/ #define FCML_EOS_FPI 0x79 /* Far pointer.*/ #define FCML_EOS_FP 0x78 /* True if encoded operand size is a dynamic one.*/ #define FCML_IS_EOS_DYNAMIC(x) ( ( x & 0x40 ) != 0 ) #define FCML_IS_EOS_OPT(x) ( ( x & 0x80 ) != 0 ) #define FCML_GET_OS(x) ( ( x ) & ~FCML_EOS_OPT ) /* Instruction and addressing mode types. */ typedef enum fcml_en_def_instruction_type { /* Intel IA.*/ FCML_EN_IT_IA } fcml_en_def_instruction_type; /****************/ /* Instructions */ /****************/ /* Multi instructions. */ #define FCML_MI_AMD3DNOW 0x0001 /*******************/ /* Addressing mode */ /*******************/ /* Wild card for mnemonic used by default.*/ #define FCML_AM_ALL 0 /*********************************************/ /* Instruction groups. */ /* Bit fields are not compatible with CPUID. */ /*********************************************/ #define FCML_IS_MULTI_INSTRUCTION(x) ( 0x8000 & ( x ) ) #define FCML_MULTI_INSTRUCTION(x) ( 0x8000 | ( x ) ) /* Structures used to describe instructions with they all allowed addressing modes. */ typedef struct fcml_st_def_addr_mode_desc { /* Addressing mode type.*/ fcml_uint64_t instruction_group; /* Flags describing allowed prefixes.*/ fcml_uint16_t allowed_prefixes; /* Some flags that contains various information about opcode.*/ fcml_uint32_t opcode_flags; /* Opcode bytes.*/ fcml_uint8_t opcode[3]; /* Addressing of instruction operands.*/ fcml_uint32_t opperands[FCML_OPERANDS_COUNT]; /* Addressing mode.*/ fcml_uint16_t addr_mode; /* Instruction hints. */ fcml_hints instruction_hints; } fcml_st_def_addr_mode_desc; /* Instruction code definition for multi instructions. Currently only the instructions with suffixes uses this mechanism.*/ typedef struct fcml_st_def_instruction_code_desc { /* Instruction code.*/ fcml_uint16_t instruction; /* Suffix.*/ fcml_uint8_t suffix; } fcml_st_def_instruction_code_desc; /* Describes one addressing mode of instruction. */ typedef struct fcml_st_def_instruction_desc { /* Instruction code.*/ fcml_en_instruction instruction; /* Optional array of multi-instruction codes.*/ fcml_st_def_instruction_code_desc *multi_instruction; /* Mnemonic.*/ fcml_string mnemonic; /* Type of the instruction.*/ fcml_en_def_instruction_type instruction_type; /* Number of opcodes descriptions.*/ fcml_uint8_t opcode_desc_count; /* Opcodes descriptions.*/ fcml_st_def_addr_mode_desc *addr_modes; } fcml_st_def_instruction_desc; /* Operands encoding */ #define FCML_IA_INSTRUCTION(i,x,y) { i, NULL, x, FCML_EN_IT_IA, ( sizeof( y ) / sizeof( struct fcml_st_def_addr_mode_desc ) ), y } #define FCML_IA_MULTI_INSTRUCTION(i,x,y) { (fcml_en_instruction)FCML_MULTI_INSTRUCTION( i ), x, FCML_EMPTY_MNEMONIC, FCML_EN_IT_IA, ( sizeof( y ) / sizeof( struct fcml_st_def_addr_mode_desc ) ), y } #define FCML_REG_FIELD_NUMBER_OF_REGISTERS 8 #define FCML_REG_FIELD_NUMBER_OF_CONDITIONS 16 /********************************* * Prefix fields. *********************************/ #define FCML_DEF_PREFIX_LOCK_ALLOWED(x) FCML_TP_GET_BIT(x,0) #define FCML_DEF_PREFIX_REPNE_XACQUIRE_ALLOWED(x) FCML_TP_GET_BIT(x,1) #define FCML_DEF_PREFIX_REP_XRELEASE_ALLOWED(x) FCML_TP_GET_BIT(x,2) #define FCML_DEF_PREFIX_W_1(x) FCML_TP_GET_BIT(x,3) #define FCML_DEF_PREFIX_W_0(x) FCML_TP_GET_BIT(x,4) #define FCML_DEF_PREFIX_L_1(x) FCML_TP_GET_BIT(x,5) #define FCML_DEF_PREFIX_L_0(x) FCML_TP_GET_BIT(x,6) #define FCML_DEF_PREFIX_VEX_REQ(x) FCML_TP_GET_BIT(x,7) #define FCML_DEF_PREFIX_VEXOP_VVVV(x) FCML_TP_GET_BIT(x,8) #define FCML_DEF_PREFIX_L_IGNORE_OS(x) FCML_TP_GET_BIT(x,9) #define FCML_DEF_PREFIX_XOP_REQ(x) FCML_TP_GET_BIT(x,10) #define FCML_DEF_PREFIX_HLE_ENABLED(x) FCML_TP_GET_BIT(x,11) #define FCML_DEF_PREFIX_MANDATORY_66(x) FCML_TP_GET_BIT(x,12) #define FCML_DEF_PREFIX_MANDATORY_F2(x) FCML_TP_GET_BIT(x,13) #define FCML_DEF_PREFIX_MANDATORY_F3(x) FCML_TP_GET_BIT(x,14) #define FCML_DEF_PREFIX_SUFFIX(x) FCML_TP_GET_BIT(x,15) /********************************* * Opcode fields extractors. *********************************/ #define FCML_DEF_OPCODE_FLAGS_OPCODE_FIELD_REG(x) ( x & 0x00000001 ) #define FCML_DEF_OPCODE_FLAGS_OPCODE_FIELD_W(x) ( x & 0x00000002 ) #define FCML_DEF_OPCODE_FLAGS_OPCODE_FIELD_S(x) ( x & 0x00000004 ) #define FCML_DEF_OPCODE_FLAGS_OPCODE_FIELD_TTTN(x) ( x & 0x00000040 ) #define FCML_DEF_OPCODE_FLAGS_64BITS_EOSA_BY_DEFAULT(x) ( x & 0x00000080 ) #define FCML_DEF_OPCODE_FLAGS_POS(x) ( ( x & 0x00000700 ) >> 8 ) #define FCML_DEF_OPCODE_FLAGS_OPCODE_EXT(x) ( ( x & 0x00007800 ) >> 11 ) #define FCML_DEF_OPCODE_FLAGS_OPCODE_IS_MODRM(x) FCML_TP_GET_BIT(x,15) #define FCML_DEF_OPCODE_FLAGS_OPCODE_IS_EXT(x) FCML_TP_GET_BIT(x,16) #define FCML_DEF_OPCODE_FLAGS_OPCODE_NUM(x) ( ( x & 0x000C0000 ) >> 18 ) #define FCML_DEF_OPCODE_FLAGS_PRIMARY_OPCODE(x) ( ( x & 0x00300000 ) >> 20 ) #define FCML_DEF_OPCODE_FLAGS_64_BIT_MODE_SUPPORTED(x) ( x & 0x00800000 ) #define FCML_DEF_OPCODE_FLAGS_16_32_BIT_MODE_SUPPORTED(x) ( x & 0x00400000 ) #define FCML_DEF_OPCODE_FLAGS_EOSA_16(x) ( x & 0x01000000 ) #define FCML_DEF_OPCODE_FLAGS_EOSA_32(x) ( x & 0x02000000 ) #define FCML_DEF_OPCODE_FLAGS_EOSA_64(x) ( x & 0x04000000 ) #define FCML_DEF_OPCODE_FLAGS_IS_EOSA_RESTRICTION(x) ( x & 0x07000000 ) #define FCML_DEF_OPCODE_FLAGS_EASA_16(x) ( x & 0x08000000 ) #define FCML_DEF_OPCODE_FLAGS_EASA_32(x) ( x & 0x10000000 ) #define FCML_DEF_OPCODE_FLAGS_EASA_64(x) ( x & 0x20000000 ) #define FCML_DEF_OPCODE_FLAGS_IS_EASA_RESTRICTION(x) ( x & 0x38000000 ) #define FCML_DEF_OPCODE_FLAGS_FORCE_64BITS_EOSA(x) ( x & 0x40000000 ) /********************************* * Addressing modes. *********************************/ /* Operand access mode (source/destination).*/ #define FCML_OA_R 0x80000000 #define FCML_OA_W 0x40000000 #define FCML_OA_RW ( FCML_OA_R | FCML_OA_W ) #define FCML_NA 0x00000000 /* Immediate data.*/ #define FCML_OP_IMM_BASE 0x01000000 #define FCML_OP_IMM(encoded_size, encoded_ex_size) ( FCML_OP_IMM_BASE | ( encoded_size ) << 8 | ( encoded_ex_size ) ) #define FCML_OP_IMM_64 ( FCML_OP_IMM_BASE | ( 1 << 16 ) | ( FCML_EOS_EOSA ) << 8 | ( FCML_EOS_UNDEFINED ) ) /* Register explicitly set.*/ #define FCML_OP_EXPLICIT_REG_BASE 0x02000000 #define FCML_OP_EXPLICIT_REG(reg_type, reg_num, encoded_reg_size) ( FCML_OP_EXPLICIT_REG_BASE | ( reg_type ) << 12 | ( reg_num ) << 8 | encoded_reg_size ) /* Register field in opcode byte.*/ #define FCML_OP_OPCODE_REG_BASE 0x03000000 #define FCML_OP_OPCODE_REG(reg_type, encoded_reg_size) ( FCML_OP_OPCODE_REG_BASE | ( reg_type ) << 8 | encoded_reg_size ) /* Relative addressing.*/ #define FCML_OP_IMMEDIATE_DIS_RELATIVE_BASE 0x04000000 #define FCML_OP_IMMEDIATE_DIS_RELATIVE( encoded_size ) ( FCML_OP_IMMEDIATE_DIS_RELATIVE_BASE | encoded_size ) /* Far pointers.*/ #define FCML_OP_FAR_POINTER 0x05000000 /* Addressing by explicit GPR register. (Used by CMPS for instance.)*/ #define FCML_OP_EXPLICIT_GPS_REG_ADDRESSING_BASE 0x06000000 #define FCML_OP_EXPLICIT_GPS_REG_ADDRESSING(reg_num, encoded_operand_size, encoded_segment_register) ( FCML_OP_EXPLICIT_GPS_REG_ADDRESSING_BASE | ( reg_num ) << 16 | ( encoded_operand_size ) << 8 | ( encoded_segment_register ) ) /* It allows defining explicit IMM8 operand type. See INT instruction.*/ #define FCML_OP_EXPLICIT_IB_BASE 0x07000000 #define FCML_OP_EXPLICIT_IB(value) ( FCML_OP_EXPLICIT_IB_BASE | value ) /* Segment relative addressing.*/ #define FCML_OP_SEGMENT_RELATIVE_OFFSET_BASE 0x08000000 #define FCML_OP_SEGMENT_RELATIVE_OFFSET( operand_size, encoded_segment_register ) ( FCML_OP_SEGMENT_RELATIVE_OFFSET_BASE | ( operand_size ) << 8 | ( encoded_segment_register ) ) /********************************/ /* ModR/M encoding. */ /********************************/ /* Allows to encode all common ModR/M based addressing modes using only one macro.*/ /* Only register addressing is allowed.*/ #define FCML_RMF_R 0x01 /* Only memory addressing is allowed.*/ #define FCML_RMF_M 0x02 /* Indirect addressing.*/ #define FCML_RMF_I 0x04 /* Shortcut, operand acts as source and destination.*/ #define FCML_RMF_RM ( FCML_RMF_R | FCML_RMF_M ) #define FCML_OP_RM_BASE 0x09000000 #define FCML_OP_RM(reg_type, encoded_register_operand_size, encoded_memory_operand_size, flags ) ( FCML_OP_RM_BASE | ( ( encoded_memory_operand_size ) << 16 ) | ( ( encoded_register_operand_size ) << 8 ) | ( ( reg_type ) << 4 ) | ( flags ) ) #define FCML_OP_RM_W(reg_type, encoded_register_operand_size, encoded_memory_operand_size, flags ) ( FCML_OP_RM(reg_type, encoded_register_operand_size, encoded_memory_operand_size, flags) | FCML_OA_W ) #define FCML_OP_R_BASE 0x0A000000 #define FCML_OP_R( reg_type, encoded_register_operand_size ) ( FCML_OP_R_BASE | ( encoded_register_operand_size << 4 ) | reg_type ) /******************************/ /* XOP/VEX specific encoding. */ /******************************/ #define FCML_OP_VEX_VVVV_REG_BASE 0x0B000000 #define FCML_OP_VEX_VVVV_REG( reg_type, encoded_register_size ) ( FCML_OP_VEX_VVVV_REG_BASE | ( encoded_register_size << 4 ) | reg_type ) /*****************************/ /* IS4/IS5 operand decoding. */ /*****************************/ #define FCML_ISF_IS4 0x01 #define FCML_ISF_IS5 0x02 #define FCML_ISF_IS5_SRC 0x10 #define FCML_ISF_IS5_M2Z 0x20 #define FCML_OP_OPERAND_ISx_BASE 0x0C000000 #define FCML_OP_OPERAND_IS4 ( FCML_OP_OPERAND_ISx_BASE | FCML_ISF_IS4 ) #define FCML_OP_OPERAND_IS5( flags ) ( FCML_OP_OPERAND_ISx_BASE | FCML_ISF_IS5 | flags ) /**************************/ /* VSIB operand decoding. */ /**************************/ /* Vector index register.*/ #define FCML_VSIB_XMM 0x01 #define FCML_VSIB_YMM 0x02 #define FCML_OP_VSIB_BASE 0x0D000000 #define FCML_OP_VSIB( vector_index_register, encoded_index_value_size ) ( FCML_OP_VSIB_BASE | ( vector_index_register ) << 8 | encoded_index_value_size ) /**************/ /* Pseudo-Op. */ /**************/ #define FCML_OP_PSEUDO_OP_BASE 0x0E000000 #define FCML_OP_PSEUDO_OP( mask ) ( FCML_OP_PSEUDO_OP_BASE | ( mask ) ) /*******************************/ /* Segment registers encoding. */ /*******************************/ #define FCML_SEG_ALLOW_OVERRIDE 0x80 #define FCML_SEG_DENY_OVERRIDE 0x00 #define FCML_SEG_ENCODE_REGISTER( reg_num, override ) ( reg_num | override ) #define FCML_SEG_DECODE_IS_OVERRIDE_ALLOWED( encoded ) ( FCML_SEG_ALLOW_OVERRIDE & encoded ) #define FCML_SEG_DECODE_REGISTER( encoded ) ( encoded & ~FCML_SEG_ALLOW_OVERRIDE ) /* Useful macros related to addressing modes.*/ #define FCMP_DEF_IS_ADDR_MODE( x, y ) ( ( x ) == ( ( y ) >> 24 ) ) /* Shorthands*/ #define FCML_OP_MODRM_RM_8 FCML_OP_RM(FCML_REG_GPR, FCML_EOS_BYTE, FCML_EOS_BYTE, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_8_W ( FCML_OP_MODRM_RM_8 | FCML_OA_W ) #define FCML_OP_MODRM_RM_8_RW ( FCML_OP_MODRM_RM_8 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_16 FCML_OP_RM(FCML_REG_GPR, FCML_EOS_WORD, FCML_EOS_WORD, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_16_W ( FCML_OP_MODRM_RM_16 | FCML_OA_W ) #define FCML_OP_MODRM_RM_16_RW ( FCML_OP_MODRM_RM_16 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_32 FCML_OP_RM(FCML_REG_GPR, FCML_EOS_DWORD, FCML_EOS_DWORD, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_32_W ( FCML_OP_MODRM_RM_32 | FCML_OA_W ) #define FCML_OP_MODRM_RM_32_RW ( FCML_OP_MODRM_RM_32 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_64 FCML_OP_RM(FCML_REG_GPR, FCML_EOS_QWORD, FCML_EOS_QWORD, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_64_W ( FCML_OP_MODRM_RM_64 | FCML_OA_W ) #define FCML_OP_MODRM_RM_64_RW ( FCML_OP_MODRM_RM_64 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_128 FCML_OP_RM(FCML_REG_GPR, FCML_EOS_OWORD, FCML_EOS_OWORD, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_128_W ( FCML_OP_MODRM_RM_128 | FCML_OA_W ) #define FCML_OP_MODRM_RM_128_RW ( FCML_OP_MODRM_RM_128 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_OP_8 FCML_OP_RM(FCML_REG_GPR, FCML_EOS_BYTE, FCML_EOS_BYTE | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_OP_8_W ( FCML_OP_MODRM_RM_OP_8 | FCML_OA_W ) #define FCML_OP_MODRM_RM_OP_8_RW ( FCML_OP_MODRM_RM_OP_8 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_OP_16 FCML_OP_RM(FCML_REG_GPR, FCML_EOS_WORD, FCML_EOS_WORD | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_OP_16_W ( FCML_OP_MODRM_RM_OP_16 | FCML_OA_W ) #define FCML_OP_MODRM_RM_OP_16_RW ( FCML_OP_MODRM_RM_OP_16 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_OP_32 FCML_OP_RM(FCML_REG_GPR, FCML_EOS_DWORD, FCML_EOS_DWORD | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_OP_32_W ( FCML_OP_MODRM_RM_OP_32 | FCML_OA_W ) #define FCML_OP_MODRM_RM_OP_32_RW ( FCML_OP_MODRM_RM_OP_32 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_OP_64 FCML_OP_RM(FCML_REG_GPR, FCML_EOS_QWORD, FCML_EOS_QWORD | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_OP_64_W ( FCML_OP_MODRM_RM_OP_64 | FCML_OA_W ) #define FCML_OP_MODRM_RM_OP_64_RW ( FCML_OP_MODRM_RM_OP_64 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_OP_128 FCML_OP_RM(FCML_REG_GPR, FCML_EOS_OWORD, FCML_EOS_OWORD | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_OP_128_W ( FCML_OP_MODRM_RM_OP_128 | FCML_OA_W ) #define FCML_OP_MODRM_RM_OP_128_RW ( FCML_OP_MODRM_RM_OP_128 | FCML_OA_RW ) #define FCML_OP_MODRM_RM FCML_OP_RM(FCML_REG_GPR, FCML_EOS_EOSA, FCML_EOS_EOSA, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_W ( FCML_OP_MODRM_RM | FCML_OA_W ) #define FCML_OP_MODRM_RM_RW ( FCML_OP_MODRM_RM | FCML_OA_RW ) #define FCML_OP_MODRM_RM_I FCML_OP_RM(FCML_REG_GPR, FCML_EOS_EOSA, FCML_EOS_EOSA, FCML_RMF_RM | FCML_RMF_I ) #define FCML_OP_MODRM_RM_I_W ( FCML_OP_MODRM_RM | FCML_OA_W ) #define FCML_OP_MODRM_RM_I_RW ( FCML_OP_MODRM_RM | FCML_OA_RW ) #define FCML_OP_MODRM_R_8 FCML_OP_R(FCML_REG_GPR, FCML_EOS_BYTE ) #define FCML_OP_MODRM_R_8_W ( FCML_OP_MODRM_R_8 | FCML_OA_W ) #define FCML_OP_MODRM_R_8_RW ( FCML_OP_MODRM_R_8 | FCML_OA_RW ) #define FCML_OP_MODRM_R_16 FCML_OP_R(FCML_REG_GPR, FCML_EOS_WORD ) #define FCML_OP_MODRM_R_16_W ( FCML_OP_MODRM_R_16 | FCML_OA_W ) #define FCML_OP_MODRM_R_16_RW ( FCML_OP_MODRM_R_16 | FCML_OA_RW ) #define FCML_OP_MODRM_R_32 FCML_OP_R(FCML_REG_GPR, FCML_EOS_DWORD ) #define FCML_OP_MODRM_R_32_W ( FCML_OP_MODRM_R_32 | FCML_OA_W ) #define FCML_OP_MODRM_R_32_RW ( FCML_OP_MODRM_R_32 | FCML_OA_RW ) #define FCML_OP_MODRM_R_64 FCML_OP_R(FCML_REG_GPR, FCML_EOS_QWORD ) #define FCML_OP_MODRM_R_64_W ( FCML_OP_MODRM_R_64 | FCML_OA_W ) #define FCML_OP_MODRM_R_64_RW ( FCML_OP_MODRM_R_64 | FCML_OA_RW ) #define FCML_OP_MODRM_R FCML_OP_R(FCML_REG_GPR, FCML_EOS_EOSA ) #define FCML_OP_MODRM_R_W ( FCML_OP_MODRM_R | FCML_OA_W ) #define FCML_OP_MODRM_R_RW ( FCML_OP_MODRM_R | FCML_OA_RW ) #define FCML_OP_MODRM_M FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_EOSA, FCML_RMF_M ) #define FCML_OP_MODRM_M_W (FCML_OP_MODRM_M | FCML_OA_W) #define FCML_OP_MODRM_M_RW (FCML_OP_MODRM_M | FCML_OA_RW) #define FCML_OP_MODRM_M_8 FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_BYTE, FCML_RMF_M ) #define FCML_OP_MODRM_M_8_W (FCML_OP_MODRM_M_8 | FCML_OA_W) #define FCML_OP_MODRM_M_8_RW (FCML_OP_MODRM_M_8 | FCML_OA_RW) #define FCML_OP_MODRM_M_16 FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_WORD, FCML_RMF_M ) #define FCML_OP_MODRM_M_16_W (FCML_OP_MODRM_M_16 | FCML_OA_W) #define FCML_OP_MODRM_M_16_RW (FCML_OP_MODRM_M_16 | FCML_OA_RW) #define FCML_OP_MODRM_M_32 FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_DWORD, FCML_RMF_M ) #define FCML_OP_MODRM_M_32_W (FCML_OP_MODRM_M_32 | FCML_OA_W) #define FCML_OP_MODRM_M_32_RW (FCML_OP_MODRM_M_32 | FCML_OA_RW) #define FCML_OP_MODRM_M_64 FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_QWORD, FCML_RMF_M ) #define FCML_OP_MODRM_M_64_W (FCML_OP_MODRM_M_64 | FCML_OA_W) #define FCML_OP_MODRM_M_64_RW (FCML_OP_MODRM_M_64 | FCML_OA_RW) #define FCML_OP_MODRM_M_80 FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_TBYTE, FCML_RMF_M ) #define FCML_OP_MODRM_M_80_W (FCML_OP_MODRM_M_80 | FCML_OA_W) #define FCML_OP_MODRM_M_80_RW (FCML_OP_MODRM_M_80 | FCML_OA_RW) #define FCML_OP_MODRM_M_128 FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_OWORD, FCML_RMF_M ) #define FCML_OP_MODRM_M_128_W (FCML_OP_MODRM_M_128 | FCML_OA_W) #define FCML_OP_MODRM_M_128_RW (FCML_OP_MODRM_M_128 | FCML_OA_RW) #define FCML_OP_MODRM_M_256 FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_YWORD, FCML_RMF_M ) #define FCML_OP_MODRM_M_256_W (FCML_OP_MODRM_M_256 | FCML_OA_W) #define FCML_OP_MODRM_M_256_RW (FCML_OP_MODRM_M_256 | FCML_OA_RW) #define FCML_OP_MODRM_M_XMM FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_UNDEFINED, FCML_EOS_OWORD, FCML_RMF_M ) #define FCML_OP_MODRM_M_XMM_W (FCML_OP_MODRM_M_XMM | FCML_OA_W) #define FCML_OP_MODRM_M_XMM_RW (FCML_OP_MODRM_M_XMM | FCML_OA_RW) #define FCML_OP_MODRM_M_YMM FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_UNDEFINED, FCML_EOS_YWORD, FCML_RMF_M ) #define FCML_OP_MODRM_M_YMM_W (FCML_OP_MODRM_M_YMM | FCML_OA_W) #define FCML_OP_MODRM_M_YMM_RW (FCML_OP_MODRM_M_YMM | FCML_OA_RW) #define FCML_OP_MODRM_M_14_28 FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_14_28, FCML_RMF_M ) #define FCML_OP_MODRM_M_14_28_W (FCML_OP_MODRM_M_14_28 | FCML_OA_W) #define FCML_OP_MODRM_M_14_28_RW (FCML_OP_MODRM_M_14_28 | FCML_OA_RW) #define FCML_OP_MODRM_M_94_108 FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_94_108, FCML_RMF_M ) #define FCML_OP_MODRM_M_94_108_W (FCML_OP_MODRM_M_94_108 | FCML_OA_W) #define FCML_OP_MODRM_M_94_108_RW (FCML_OP_MODRM_M_94_108 | FCML_OA_RW) #define FCML_OP_MODRM_M_FP FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_FP, FCML_RMF_M ) #define FCML_OP_MODRM_M_FP_W (FCML_OP_MODRM_M_FP | FCML_OA_W) #define FCML_OP_MODRM_M_FP_RW (FCML_OP_MODRM_M_FP | FCML_OA_RW) #define FCML_OP_MODRM_M_FPI FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_FPI, FCML_RMF_M ) #define FCML_OP_MODRM_M_FPI_W (FCML_OP_MODRM_M_FPI | FCML_OA_W) #define FCML_OP_MODRM_M_FPI_RW (FCML_OP_MODRM_M_FPI | FCML_OA_RW) #define FCML_OP_MODRM_M_512B FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_512B, FCML_RMF_M ) #define FCML_OP_MODRM_M_512B_W (FCML_OP_MODRM_M_512B | FCML_OA_W) #define FCML_OP_MODRM_M_512B_RW (FCML_OP_MODRM_M_512B | FCML_OA_RW) #define FCML_OP_MODRM_M_UNDEF FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_UNDEFINED, FCML_RMF_M ) #define FCML_OP_MODRM_M_UNDEF_W (FCML_OP_MODRM_M_UNDEF | FCML_OA_W) #define FCML_OP_MODRM_M_UNDEF_RW (FCML_OP_MODRM_M_UNDEF | FCML_OA_RW) #define FCML_OP_MODRM_M_FPI FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_FPI, FCML_RMF_M ) #define FCML_OP_MODRM_RM_OP FCML_OP_RM(FCML_REG_GPR, FCML_EOS_EOSA, FCML_EOS_EOSA | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_OP_W ( FCML_OP_MODRM_RM_OP | FCML_OA_W ) #define FCML_OP_MODRM_RM_OP_RW ( FCML_OP_MODRM_RM_OP | FCML_OA_RW ) #define FCML_OP_MODRM_M_OP FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_EOSA | FCML_EOS_OPT, FCML_RMF_M ) #define FCML_OP_MODRM_M_OP_W (FCML_OP_MODRM_M_OP | FCML_OA_W) #define FCML_OP_MODRM_M_OP_RW (FCML_OP_MODRM_M_OP | FCML_OA_RW) #define FCML_OP_MODRM_M_OP_8 FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_BYTE | FCML_EOS_OPT, FCML_RMF_M ) #define FCML_OP_MODRM_M_OP_8_W (FCML_OP_MODRM_M_OP_8 | FCML_OA_W) #define FCML_OP_MODRM_M_OP_8_RW (FCML_OP_MODRM_M_OP_8 | FCML_OA_RW) #define FCML_OP_MODRM_M_OP_16 FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_WORD | FCML_EOS_OPT, FCML_RMF_M ) #define FCML_OP_MODRM_M_OP_16_W (FCML_OP_MODRM_M_OP_16 | FCML_OA_W) #define FCML_OP_MODRM_M_OP_16_RW (FCML_OP_MODRM_M_OP_16 | FCML_OA_RW) #define FCML_OP_MODRM_M_OP_32 FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_DWORD | FCML_EOS_OPT, FCML_RMF_M ) #define FCML_OP_MODRM_M_OP_32_W (FCML_OP_MODRM_M_OP_32 | FCML_OA_W) #define FCML_OP_MODRM_M_OP_32_RW (FCML_OP_MODRM_M_OP_32 | FCML_OA_RW) #define FCML_OP_MODRM_M_OP_64 FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_QWORD | FCML_EOS_OPT, FCML_RMF_M ) #define FCML_OP_MODRM_M_OP_64_W (FCML_OP_MODRM_M_OP_64 | FCML_OA_W) #define FCML_OP_MODRM_M_OP_64_RW (FCML_OP_MODRM_M_OP_64 | FCML_OA_RW) #define FCML_OP_MODRM_M_OP_80 FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_TBYTE | FCML_EOS_OPT, FCML_RMF_M ) #define FCML_OP_MODRM_M_OP_80_W (FCML_OP_MODRM_M_OP_80 | FCML_OA_W) #define FCML_OP_MODRM_M_OP_80_RW (FCML_OP_MODRM_M_OP_80 | FCML_OA_RW) #define FCML_OP_MODRM_M_OP_128 FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_OWORD | FCML_EOS_OPT, FCML_RMF_M ) #define FCML_OP_MODRM_M_OP_128_W (FCML_OP_MODRM_M_OP_128 | FCML_OA_W) #define FCML_OP_MODRM_M_OP_128_RW (FCML_OP_MODRM_M_OP_128 | FCML_OA_RW) #define FCML_OP_MODRM_M_OP_XMM FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_UNDEFINED, FCML_EOS_XWORD | FCML_EOS_OPT, FCML_RMF_M ) #define FCML_OP_MODRM_M_OP_XMM_W (FCML_OP_MODRM_M_OP_XMM | FCML_OA_W) #define FCML_OP_MODRM_M_OP_XMM_RW (FCML_OP_MODRM_M_OP_XMM | FCML_OA_RW) #define FCML_OP_MODRM_M_OP_YMM FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_UNDEFINED, FCML_EOS_YWORD | FCML_EOS_OPT, FCML_RMF_M ) #define FCML_OP_MODRM_M_OP_YMM_W (FCML_OP_MODRM_M_OP_YMM | FCML_OA_W) #define FCML_OP_MODRM_M_OP_YMM_RW (FCML_OP_MODRM_M_OP_YMM | FCML_OA_RW) #define FCML_OP_MODRM_M_OP_14_28 FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_14_28 | FCML_EOS_OPT, FCML_RMF_M ) #define FCML_OP_MODRM_M_OP_14_28_W (FCML_OP_MODRM_M_OP_14_28 | FCML_OA_W) #define FCML_OP_MODRM_M_OP_14_28_RW (FCML_OP_MODRM_M_OP_14_28 | FCML_OA_RW) #define FCML_OP_MODRM_M_OP_FP FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_FP | FCML_EOS_OPT, FCML_RMF_M ) #define FCML_OP_MODRM_M_OP_FP_W (FCML_OP_MODRM_M_OP_FP | FCML_OA_W) #define FCML_OP_MODRM_M_OP_FP_RW (FCML_OP_MODRM_M_OP_FP | FCML_OA_RW) #define FCML_OP_MODRM_M_OP_512B FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_512B | FCML_EOS_OPT, FCML_RMF_M ) #define FCML_OP_MODRM_M_OP_512B_W (FCML_OP_MODRM_M_OP_512B | FCML_OA_W) #define FCML_OP_MODRM_M_OP_512B_RW (FCML_OP_MODRM_M_OP_512B | FCML_OA_RW) #define FCML_OP_MODRM_MM_OSA FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_32_64, FCML_RMF_M ) #define FCML_OP_MODRM_MM_OSA_W ( FCML_OP_MODRM_MM_OSA | FCML_OA_W ) #define FCML_OP_MODRM_MM_OSA_RW ( FCML_OP_MODRM_MM_OSA | FCML_OA_RW ) #define FCML_OP_MODRM_MM_OP_OSA FCML_OP_RM(FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_32_64 | FCML_EOS_OPT, FCML_RMF_M ) #define FCML_OP_MODRM_MM_OP_OSA_W ( FCML_OP_MODRM_MM_OP_OSA | FCML_OA_W ) #define FCML_OP_MODRM_MM_OP_OSA_RW ( FCML_OP_MODRM_MM_OP_OSA | FCML_OA_RW ) #define FCML_OP_MODRM_RM_MMX_OP FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_QWORD, FCML_EOS_QWORD | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_MMX_OP_W ( FCML_OP_MODRM_RM_MMX_OP | FCML_OA_W ) #define FCML_OP_MODRM_RM_MMX_OP_RW ( FCML_OP_MODRM_RM_MMX_OP | FCML_OA_RW ) #define FCML_OP_MODRM_RM_MMX FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_QWORD, FCML_EOS_QWORD, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_MMX_W ( FCML_OP_MODRM_RM_MMX | FCML_OA_W ) #define FCML_OP_MODRM_RM_MMX_RW ( FCML_OP_MODRM_RM_MMX | FCML_OA_RW ) #define FCML_OP_MODRM_RM_MMX_32 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_QWORD, FCML_EOS_DWORD, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_MMX_32_W ( FCML_OP_MODRM_RM_MMX_32 | FCML_OA_W ) #define FCML_OP_MODRM_RM_MMX_32_RW ( FCML_OP_MODRM_RM_MMX_32 | FCML_OA_RW ) #define FCML_OP_MODRM_R_MMX FCML_OP_R(FCML_REG_SIMD, FCML_EOS_QWORD ) #define FCML_OP_MODRM_R_MMX_W ( FCML_OP_MODRM_R_MMX | FCML_OA_W ) #define FCML_OP_MODRM_R_MMX_RW ( FCML_OP_MODRM_R_MMX | FCML_OA_RW ) #define FCML_OP_MODRM_RM_YMM_256 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_YWORD, FCML_EOS_YWORD, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_YMM_256_W ( FCML_OP_MODRM_RM_YMM_256 | FCML_OA_W ) #define FCML_OP_MODRM_RM_YMM_256_RW ( FCML_OP_MODRM_RM_YMM_256 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_XMM_128 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_OWORD, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_XMM_128_W ( FCML_OP_MODRM_RM_XMM_128 | FCML_OA_W ) #define FCML_OP_MODRM_RM_XMM_128_RW ( FCML_OP_MODRM_RM_XMM_128 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_XMM_64 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_QWORD, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_XMM_64_W ( FCML_OP_MODRM_RM_XMM_64 | FCML_OA_W ) #define FCML_OP_MODRM_RM_XMM_64_RW ( FCML_OP_MODRM_RM_XMM_64 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_XMM_32 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_DWORD, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_XMM_32_W ( FCML_OP_MODRM_RM_XMM_32 | FCML_OA_W ) #define FCML_OP_MODRM_RM_XMM_32_RW ( FCML_OP_MODRM_RM_XMM_32 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_XMM_8 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_BYTE, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_XMM_8_W ( FCML_OP_MODRM_RM_XMM_8 | FCML_OA_W ) #define FCML_OP_MODRM_RM_XMM_8_RW ( FCML_OP_MODRM_RM_XMM_8 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_XMM_16 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_WORD, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_XMM_16_W ( FCML_OP_MODRM_RM_XMM_16 | FCML_OA_W ) #define FCML_OP_MODRM_RM_XMM_16_RW ( FCML_OP_MODRM_RM_XMM_16 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_XMM_OP_64 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_QWORD | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_XMM_OP_64_W ( FCML_OP_MODRM_RM_XMM_OP_64 | FCML_OA_W ) #define FCML_OP_MODRM_RM_XMM_OP_64_RW ( FCML_OP_MODRM_RM_XMM_OP_64 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_XMM_OP_128 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_OWORD | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_XMM_OP_128_W ( FCML_OP_MODRM_RM_XMM_OP_128 | FCML_OA_W ) #define FCML_OP_MODRM_RM_XMM_OP_128_RW ( FCML_OP_MODRM_RM_XMM_OP_128 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_YMM_OP_256 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_YWORD, FCML_EOS_YWORD | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_YMM_OP_256_W ( FCML_OP_MODRM_RM_YMM_OP_256 | FCML_OA_W ) #define FCML_OP_MODRM_RM_YMM_OP_256_RW ( FCML_OP_MODRM_RM_YMM_OP_256 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_MMX_OP_32 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_QWORD, FCML_EOS_DWORD | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_MMX_OP_32_W ( FCML_OP_MODRM_RM_MMX_OP_32 | FCML_OA_W ) #define FCML_OP_MODRM_RM_MMX_OP_32_RW ( FCML_OP_MODRM_RM_MMX_OP_32 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_XMM_OP_32 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_DWORD | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_XMM_OP_32_W ( FCML_OP_MODRM_RM_XMM_OP_32 | FCML_OA_W ) #define FCML_OP_MODRM_RM_XMM_OP_32_RW ( FCML_OP_MODRM_RM_XMM_OP_32 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_XMM_OP_16 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_WORD | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_XMM_OP_16_W ( FCML_OP_MODRM_RM_XMM_OP_16 | FCML_OA_W ) #define FCML_OP_MODRM_RM_XMM_OP_16_RW ( FCML_OP_MODRM_RM_XMM_OP_16 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_XMM_OP_8 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_BYTE | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_XMM_OP_8_W ( FCML_OP_MODRM_RM_XMM_OP_8 | FCML_OA_W ) #define FCML_OP_MODRM_RM_XMM_OP_8_RW ( FCML_OP_MODRM_RM_XMM_OP_8 | FCML_OA_RW ) #define FCML_OP_MODRM_M_YMM_256 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_YWORD, FCML_EOS_YWORD, FCML_RMF_M ) #define FCML_OP_MODRM_M_YMM_256_W ( FCML_OP_MODRM_RM_YMM_256 | FCML_OA_W ) #define FCML_OP_MODRM_M_YMM_256_RW ( FCML_OP_MODRM_RM_YMM_256 | FCML_OA_RW ) #define FCML_OP_MODRM_M_XMM_128 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_OWORD, FCML_RMF_M ) #define FCML_OP_MODRM_M_XMM_128_W ( FCML_OP_MODRM_RM_XMM_128 | FCML_OA_W ) #define FCML_OP_MODRM_M_XMM_128_RW ( FCML_OP_MODRM_RM_XMM_128 | FCML_OA_RW ) #define FCML_OP_MODRM_M_XMM_64 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_QWORD, FCML_RMF_M ) #define FCML_OP_MODRM_M_XMM_64_W ( FCML_OP_MODRM_RM_XMM_64 | FCML_OA_W ) #define FCML_OP_MODRM_M_XMM_64_RW ( FCML_OP_MODRM_RM_XMM_64 | FCML_OA_RW ) #define FCML_OP_MODRM_M_XMM_32 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_DWORD, FCML_RMF_M ) #define FCML_OP_MODRM_M_XMM_32_W ( FCML_OP_MODRM_RM_XMM_32 | FCML_OA_W ) #define FCML_OP_MODRM_M_XMM_32_RW ( FCML_OP_MODRM_RM_XMM_32 | FCML_OA_RW ) #define FCML_OP_MODRM_M_XMM_16 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_WORD, FCML_RMF_M ) #define FCML_OP_MODRM_M_XMM_16_W ( FCML_OP_MODRM_RM_XMM_16 | FCML_OA_W ) #define FCML_OP_MODRM_M_XMM_16_RW ( FCML_OP_MODRM_RM_XMM_16 | FCML_OA_RW ) #define FCML_OP_MODRM_R_XMM FCML_OP_R(FCML_REG_SIMD, FCML_EOS_OWORD ) #define FCML_OP_MODRM_R_XMM_W ( FCML_OP_MODRM_R_XMM | FCML_OA_W ) #define FCML_OP_MODRM_R_XMM_RW ( FCML_OP_MODRM_R_XMM | FCML_OA_RW ) #define FCML_OP_MODRM_R_YMM FCML_OP_R(FCML_REG_SIMD, FCML_EOS_YWORD ) #define FCML_OP_MODRM_R_YMM_W ( FCML_OP_MODRM_R_YMM | FCML_OA_W ) #define FCML_OP_MODRM_R_YMM_RW ( FCML_OP_MODRM_R_YMM | FCML_OA_RW ) #define FCML_OP_MODRM_RM_SIMD_L FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_L, FCML_EOS_L, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_SIMD_L_W ( FCML_OP_MODRM_RM_SIMD_L | FCML_OA_W ) #define FCML_OP_MODRM_RM_SIMD_L_RW ( FCML_OP_MODRM_RM_SIMD_L | FCML_OA_RW ) #define FCML_OP_MODRM_RM_SIMD_L_128 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_L, FCML_EOS_OWORD, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_SIMD_L_128_W ( FCML_OP_MODRM_RM_SIMD_L_128 | FCML_OA_W ) #define FCML_OP_MODRM_RM_SIMD_L_128_RW ( FCML_OP_MODRM_RM_SIMD_L_128 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_SIMD_L_64 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_L, FCML_EOS_QWORD, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_SIMD_L_64_W ( FCML_OP_MODRM_RM_SIMD_L_64 | FCML_OA_W ) #define FCML_OP_MODRM_RM_SIMD_L_64_RW ( FCML_OP_MODRM_RM_SIMD_L_64 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_SIMD_L_32 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_L, FCML_EOS_DWORD, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_SIMD_L_32_W ( FCML_OP_MODRM_RM_SIMD_L_32 | FCML_OA_W ) #define FCML_OP_MODRM_RM_SIMD_L_32_RW ( FCML_OP_MODRM_RM_SIMD_L_32 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_SIMD_L_16 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_L, FCML_EOS_WORD, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_SIMD_L_16_W ( FCML_OP_MODRM_RM_SIMD_L_16 | FCML_OA_W ) #define FCML_OP_MODRM_RM_SIMD_L_16_RW ( FCML_OP_MODRM_RM_SIMD_L_16 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_SIMD_L_8 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_L, FCML_EOS_BYTE, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_SIMD_L_8_W ( FCML_OP_MODRM_RM_SIMD_L_8 | FCML_OA_W ) #define FCML_OP_MODRM_RM_SIMD_L_8_RW ( FCML_OP_MODRM_RM_SIMD_L_8 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_SIMD_L_OP FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_L, FCML_EOS_L | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_SIMD_L_OP_W ( FCML_OP_MODRM_RM_SIMD_L_OP | FCML_OA_W ) #define FCML_OP_MODRM_RM_SIMD_L_OP_RW ( FCML_OP_MODRM_RM_SIMD_L_OP | FCML_OA_RW ) #define FCML_OP_MODRM_RM_SIMD_L_OP_128 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_L, FCML_EOS_OWORD | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_SIMD_L_OP_128_W ( FCML_OP_MODRM_RM_SIMD_L_OP_128 | FCML_OA_W ) #define FCML_OP_MODRM_RM_SIMD_L_OP_128_RW ( FCML_OP_MODRM_RM_SIMD_L_OP_128 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_SIMD_L_OP_64 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_L, FCML_EOS_QWORD | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_SIMD_L_OP_64_W ( FCML_OP_MODRM_RM_SIMD_L_OP_64 | FCML_OA_W ) #define FCML_OP_MODRM_RM_SIMD_L_OP_64_RW ( FCML_OP_MODRM_RM_SIMD_L_OP_64 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_SIMD_L_OP_32 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_L, FCML_EOS_DWORD | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_SIMD_L_OP_32_W ( FCML_OP_MODRM_RM_SIMD_L_OP_32 | FCML_OA_W ) #define FCML_OP_MODRM_RM_SIMD_L_OP_32_RW ( FCML_OP_MODRM_RM_SIMD_L_OP_32 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_SIMD_L_OP_16 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_L, FCML_EOS_WORD | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_SIMD_L_OP_16_W ( FCML_OP_MODRM_RM_SIMD_L_OP_16 | FCML_OA_W ) #define FCML_OP_MODRM_RM_SIMD_L_OP_16_RW ( FCML_OP_MODRM_RM_SIMD_L_OP_16 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_SIMD_L_OP_8 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_L, FCML_EOS_BYTE | FCML_EOS_OPT, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_SIMD_L_OP_8_W ( FCML_OP_MODRM_RM_SIMD_L_OP_8 | FCML_OA_W ) #define FCML_OP_MODRM_RM_SIMD_L_OP_8_RW ( FCML_OP_MODRM_RM_SIMD_L_OP_8 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_SIMD_E FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_EOSA, FCML_EOS_EOSA, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_SIMD_E_W ( FCML_OP_MODRM_RM_SIMD_E | FCML_OA_W ) #define FCML_OP_MODRM_RM_SIMD_E_RW ( FCML_OP_MODRM_RM_SIMD_E | FCML_OA_RW ) #define FCML_OP_MODRM_RM_SIMD_E_128 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_EOSA, FCML_EOS_OWORD, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_SIMD_E_128_W ( FCML_OP_MODRM_RM_SIMD_E_128 | FCML_OA_W ) #define FCML_OP_MODRM_RM_SIMD_E_128_RW ( FCML_OP_MODRM_RM_SIMD_E_128 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_SIMD_E_64 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_EOSA, FCML_EOS_QWORD, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_SIMD_E_64_W ( FCML_OP_MODRM_RM_SIMD_E_64 | FCML_OA_W ) #define FCML_OP_MODRM_RM_SIMD_E_64_RW ( FCML_OP_MODRM_RM_SIMD_E_64 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_SIMD_E_32 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_EOSA, FCML_EOS_DWORD, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_SIMD_E_32_W ( FCML_OP_MODRM_RM_SIMD_E_32 | FCML_OA_W ) #define FCML_OP_MODRM_RM_SIMD_E_32_RW ( FCML_OP_MODRM_RM_SIMD_E_32 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_SIMD_E_16 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_EOSA, FCML_EOS_WORD, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_SIMD_E_16_W ( FCML_OP_MODRM_RM_SIMD_E_16 | FCML_OA_W ) #define FCML_OP_MODRM_RM_SIMD_E_16_RW ( FCML_OP_MODRM_RM_SIMD_E_16 | FCML_OA_RW ) #define FCML_OP_MODRM_RM_SIMD_E_8 FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_EOSA, FCML_EOS_BYTE, FCML_RMF_RM ) #define FCML_OP_MODRM_RM_SIMD_E_8_W ( FCML_OP_MODRM_RM_SIMD_E_8 | FCML_OA_W ) #define FCML_OP_MODRM_RM_SIMD_E_8_RW ( FCML_OP_MODRM_RM_SIMD_E_8 | FCML_OA_RW ) #define FCML_OP_MODRM_R_SIMD_L FCML_OP_R(FCML_REG_SIMD, FCML_EOS_L ) #define FCML_OP_MODRM_R_SIMD_L_W ( FCML_OP_MODRM_R_SIMD_L | FCML_OA_W ) #define FCML_OP_MODRM_R_SIMD_L_RW ( FCML_OP_MODRM_R_SIMD_L | FCML_OA_RW ) #define FCML_OP_MODRM_R_SIMD_E FCML_OP_R(FCML_REG_SIMD, FCML_EOS_EOSA ) #define FCML_OP_MODRM_R_SIMD_E_W ( FCML_OP_MODRM_R_SIMD_E | FCML_OA_W ) #define FCML_OP_MODRM_R_SIMD_E_RW ( FCML_OP_MODRM_R_SIMD_E | FCML_OA_RW ) #define FCML_OP_MODRM_M_SIMD_L FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_UNDEFINED, FCML_EOS_L, FCML_RMF_M ) #define FCML_OP_MODRM_M_SIMD_L_W ( FCML_OP_MODRM_M_SIMD_L | FCML_OA_W ) #define FCML_OP_MODRM_M_SIMD_L_RW ( FCML_OP_MODRM_M_SIMD_L | FCML_OA_RW ) #define FCML_OP_MODRM_M_SIMD_E FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_UNDEFINED, FCML_EOS_EOSA, FCML_RMF_M ) #define FCML_OP_MODRM_M_SIMD_E_W ( FCML_OP_MODRM_M_SIMD | FCML_OA_W ) #define FCML_OP_MODRM_M_SIMD_E_RW ( FCML_OP_MODRM_M_SIMD | FCML_OA_RW ) #define FCML_OP_MODRM_M_SIMD_OPL FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_UNDEFINED, FCML_EOS_L | FCML_EOS_OPT, FCML_RMF_M ) #define FCML_OP_MODRM_M_SIMD_OPL_W ( FCML_OP_MODRM_M_SIMD_OPL | FCML_OA_W ) #define FCML_OP_MODRM_M_SIMD_OPL_RW ( FCML_OP_MODRM_M_SIMD_OPL | FCML_OA_RW ) #define FCML_OP_MODRM_M_SIMD_OPE FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_UNDEFINED, FCML_EOS_EOSA | FCML_EOS_OPT, FCML_RMF_M ) #define FCML_OP_MODRM_M_SIMD_OPE_W ( FCML_OP_MODRM_M_SIMD_OPE | FCML_OA_W ) #define FCML_OP_MODRM_M_SIMD_OPE_RW ( FCML_OP_MODRM_M_SIMD_OPE | FCML_OA_RW ) /* Shorthands for relative addressing.*/ #define FCML_OP_IMMEDIATE_DIS_RELATIVE_EOSA FCML_OP_IMMEDIATE_DIS_RELATIVE( FCML_EOS_UNDEFINED ) #define FCML_OP_IMMEDIATE_DIS_RELATIVE_R_8 FCML_OP_IMMEDIATE_DIS_RELATIVE( FCML_EOS_BYTE ) /* Shorthands for VVVV addressing.*/ #define FCML_OP_VEX_VVVV_SIMD_REG FCML_OP_VEX_VVVV_REG( FCML_REG_SIMD, FCML_EOS_L ) #define FCML_OP_VEX_VVVV_XMM_REG FCML_OP_VEX_VVVV_REG( FCML_REG_SIMD, FCML_EOS_OWORD ) #define FCML_OP_VEX_VVVV_YMM_REG FCML_OP_VEX_VVVV_REG( FCML_REG_SIMD, FCML_EOS_YWORD ) /* Shorthands for IMM.*/ #define FCML_OP_IB FCML_OP_IMM( FCML_EOS_BYTE, FCML_EOS_UNDEFINED ) #define FCML_OP_IB_EX_EOSA FCML_OP_IMM( FCML_EOS_BYTE, FCML_EOS_EOSA ) #define FCML_OP_IW FCML_OP_IMM( FCML_EOS_WORD, FCML_EOS_UNDEFINED ) #define FCML_OP_IW_EX_EOSA FCML_OP_IMM( FCML_EOS_WORD, FCML_EOS_EOSA ) #define FCML_OP_ID FCML_OP_IMM( FCML_EOS_DWORD, FCML_EOS_UNDEFINED ) #define FCML_OP_ID_EX_EOSA FCML_OP_IMM( FCML_EOS_DWORD, FCML_EOS_EOSA ) #define FCML_OP_EX_EOSA FCML_OP_IMM( FCML_EOS_EOSA, FCML_EOS_EOSA ) #define FCML_OP_IMM_EOSA FCML_OP_IMM( FCML_EOS_EOSA, FCML_EOS_UNDEFINED ) /* Externals. */ extern struct fcml_st_def_instruction_desc fcml_ext_instructions_def[]; #define FCML_EMPTY_MNEMONIC FCML_TEXT("") /* Addressing modes arguments encoders. */ typedef struct fcml_st_def_decoded_addr_mode { /* Code of the addressing mode.*/ fcml_uint8_t addr_mode; fcml_en_access_mode access_mode; /* Decoded arguments.*/ fcml_ptr addr_mode_args; } fcml_st_def_decoded_addr_mode; fcml_st_def_decoded_addr_mode* fcml_fn_def_decode_addr_mode_args( fcml_uint32_t encoded_addr_mode, fcml_ceh_error *error ); void fcml_fnp_def_free_addr_mode( fcml_st_def_decoded_addr_mode *decoded_addr_mode ); /* Addressing modes arguments. */ #define FCML_GET_ADDR_MODE(x) ( ( x ) & 0x3F000000 ) >> 24 typedef struct fcml_sf_def_tma_imm { fcml_uint8_t encoded_size; fcml_uint8_t encoded_ex_size; fcml_bool is_64bit_imm_allowed; } fcml_sf_def_tma_imm; typedef struct fcml_sf_def_tma_explicit_reg { fcml_uint8_t reg_type; fcml_uint8_t reg_num; fcml_uint8_t encoded_reg_size; } fcml_sf_def_tma_explicit_reg; typedef struct fcml_sf_def_tma_opcode_reg { fcml_uint8_t reg_type; fcml_uint8_t encoded_reg_size; } fcml_sf_def_tma_opcode_reg; typedef struct fcml_sf_def_tma_immediate_dis_relative { fcml_uint8_t encoded_size; } fcml_sf_def_tma_immediate_dis_relative; typedef struct fcml_sf_def_tma_explicit_gps_reg_addressing { fcml_uint8_t reg_num; fcml_uint8_t encoded_operand_size; fcml_uint8_t encoded_segment_register; } fcml_sf_def_tma_explicit_gps_reg_addressing; typedef struct fcml_sf_def_tma_explicit_ib { fcml_uint8_t ib; } fcml_sf_def_tma_explicit_ib; typedef struct fcml_sf_def_tma_segment_relative_offset { fcml_uint8_t encoded_operand_size; fcml_uint8_t encoded_segment_register; } fcml_sf_def_tma_segment_relative_offset; typedef struct fcml_sf_def_tma_rm { fcml_uint8_t reg_type; fcml_uint8_t encoded_register_operand_size; fcml_uint8_t encoded_memory_operand_size; fcml_uint8_t flags; fcml_uint8_t vector_index_register; fcml_bool is_vsib; } fcml_sf_def_tma_rm; typedef struct fcml_sf_def_tma_r { fcml_en_register reg_type; fcml_uint8_t encoded_register_operand_size; } fcml_sf_def_tma_r; typedef struct fcml_sf_def_tma_vex_vvvv_reg { fcml_uint8_t reg_type; fcml_uint8_t encoded_register_size; } fcml_sf_def_tma_vex_vvvv_reg; typedef struct fcml_sf_def_tma_pseudo_op { fcml_uint8_t mask; } fcml_sf_def_tma_pseudo_op; typedef struct fcml_sf_def_tma_is { fcml_uint8_t flags; } fcml_sf_def_tma_is; #endif /* FCML_DEF_H_ */ fcml-1.1.1/src/fcml_encoding.h0000644000175000017500000000310012560745216013105 00000000000000/* * fcml_asm_encoding.h * * Created on: 31-03-2013 * Author: tAs */ #ifndef FCML_ASM_ENCODING_H_ #define FCML_ASM_ENCODING_H_ #include "fcml_assembler.h" #include "fcml_ceh.h" #include "fcml_coll.h" #include "fcml_common.h" #include "fcml_dialect_int.h" #include "fcml_types.h" typedef struct fcml_st_asm_encoder_result { fcml_st_ceh_error_container errors; fcml_st_assembled_instruction *instructions; fcml_st_assembled_instruction *chosen_instruction; fcml_usize number_of_instructions; } fcml_st_asm_encoder_result; struct fcml_st_asm_instruction_addr_modes; typedef fcml_ceh_error (*fcml_fnp_asm_instruction_encoder)( fcml_st_assembler_context *context, fcml_st_dialect_context_int *dialect_context, fcml_st_instruction *instruction, fcml_st_asm_encoder_result *result, struct fcml_st_asm_instruction_addr_modes *addr_modes ); typedef struct fcml_st_asm_instruction_addr_modes { /* All addressing modes for given mnemonic are available in this list.*/ fcml_st_coll_list *addr_modes; /* Mnemonic.*/ fcml_string mnemonic; /* Instruction encoder.*/ fcml_fnp_asm_instruction_encoder instruction_encoder; } fcml_st_asm_instruction_addr_modes; fcml_ceh_error fcml_fn_asm_init_instruction_encodings( fcml_st_dialect_context_int *context, fcml_coll_map *instructions_map ); fcml_ceh_error fcml_fn_asm_get_instruction_encodings( fcml_coll_map instructions_map, fcml_string mnemonic, fcml_st_asm_instruction_addr_modes ** ); void fcml_fn_asm_free_instruction_encodings( fcml_coll_map instructions_map ); #endif /* FCML_ASM_ENCODING_H_ */ fcml-1.1.1/src/fcml_gas_lexer.h0000644000175000017500000002040712560745216013301 00000000000000#ifndef gas_HEADER_H #define gas_HEADER_H 1 #define gas_IN_HEADER 1 #line 6 "fcml_gas_lexer.h" #line 8 "fcml_gas_lexer.h" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 39 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) are macros in the reentrant scanner. */ #define yyin yyg->yyin_r #define yyout yyg->yyout_r #define yyextra yyg->yyextra_r #define yyleng yyg->yyleng_r #define yytext yyg->yytext_r #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) #define yy_flex_debug yyg->yy_flex_debug_r /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #define YY_BUF_SIZE 16384 #endif #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #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 { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ 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 * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ void gas_restart (FILE *input_file ,yyscan_t yyscanner ); void gas__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); YY_BUFFER_STATE gas__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); void gas__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void gas__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void gas_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void gas_pop_buffer_state (yyscan_t yyscanner ); YY_BUFFER_STATE gas__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE gas__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); YY_BUFFER_STATE gas__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); void *gas_alloc (yy_size_t ,yyscan_t yyscanner ); void *gas_realloc (void *,yy_size_t ,yyscan_t yyscanner ); void gas_free (void * ,yyscan_t yyscanner ); /* Begin user sect3 */ #define gas_wrap(yyscanner) 1 #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r #ifdef YY_HEADER_EXPORT_START_CONDITIONS #define INITIAL 0 #endif #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #define YY_EXTRA_TYPE struct fcml_st_parser_data * int gas_lex_init (yyscan_t* scanner); int gas_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int gas_lex_destroy (yyscan_t yyscanner ); int gas_get_debug (yyscan_t yyscanner ); void gas_set_debug (int debug_flag ,yyscan_t yyscanner ); YY_EXTRA_TYPE gas_get_extra (yyscan_t yyscanner ); void gas_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *gas_get_in (yyscan_t yyscanner ); void gas_set_in (FILE * in_str ,yyscan_t yyscanner ); FILE *gas_get_out (yyscan_t yyscanner ); void gas_set_out (FILE * out_str ,yyscan_t yyscanner ); yy_size_t gas_get_leng (yyscan_t yyscanner ); char *gas_get_text (yyscan_t yyscanner ); int gas_get_lineno (yyscan_t yyscanner ); void gas_set_lineno (int line_number ,yyscan_t yyscanner ); int gas_get_column (yyscan_t yyscanner ); void gas_set_column (int column_no ,yyscan_t yyscanner ); YYSTYPE * gas_get_lval (yyscan_t yyscanner ); void gas_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int gas_wrap (yyscan_t yyscanner ); #else extern int gas_wrap (yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int gas_lex \ (YYSTYPE * yylval_param ,yyscan_t yyscanner); #define YY_DECL int gas_lex \ (YYSTYPE * yylval_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ #undef YY_NEW_FILE #undef YY_FLUSH_BUFFER #undef yy_set_bol #undef yy_new_buffer #undef yy_set_interactive #undef YY_DO_BEFORE_ACTION #ifdef YY_DECL_IS_OURS #undef YY_DECL_IS_OURS #undef YY_DECL #endif #line 293 "fcml_gas_lexer.l" #line 343 "fcml_gas_lexer.h" #undef gas_IN_HEADER #endif /* gas_HEADER_H */ fcml-1.1.1/src/fcml_gas_rend.c0000644000175000017500000003472112560745216013111 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /* There is a bit of code duplication between GAS and Intel instruction renderers. * It evaluated up to this point due to historical reasons and it will be probably fixed in * the near future by providing one generic customizable rendering template as a base for * instruction renderers. */ #include "fcml_gas_rend.h" #include #include #include #include #include #include "fcml_common_dialect.h" #include "fcml_ceh.h" #include "fcml_common_utils.h" #include "fcml_dialect_int.h" #include "fcml_env_int.h" #include "fcml_rend_utils.h" #include "fcml_stream.h" #include "fcml_utils.h" #define FCML_REND_LOCAL_BUFFER_SIZE 512 fcml_string fcml_iarr_rend_utils_integer_formats_gas[6][4] = { /* Signed integer values.*/ {FCML_PRI_INT8_DEC, FCML_PRI_INT16_DEC, FCML_PRI_INT32_DEC, FCML_PRI_INT64_DEC}, /* Unsigned integer values.*/ {FCML_PRI_UINT8_DEC, FCML_PRI_UINT16_DEC, FCML_PRI_UINT32_DEC, FCML_PRI_UINT64_DEC}, /* Signed hex values.*/ {FCML_TEXT("0x") FCML_PRI_INT8_HEX, FCML_TEXT("0x") FCML_PRI_INT16_HEX, FCML_TEXT("0x") FCML_PRI_INT32_HEX, FCML_TEXT("0x") FCML_PRI_INT64_HEX}, /* Unsigned hex values.*/ {FCML_TEXT("0x") FCML_PRI_INT8_HEX, FCML_TEXT("0x") FCML_PRI_INT16_HEX, FCML_TEXT("0x") FCML_PRI_INT32_HEX, FCML_TEXT("0x") FCML_PRI_INT64_HEX}, /* Signed hex values without leading zeros. */ {FCML_TEXT("0x") FCML_PRI_INT8_HEX_NO_ZEROS, FCML_TEXT("0x") FCML_PRI_INT16_HEX_NO_ZEROS, FCML_TEXT("0x") FCML_PRI_INT32_HEX_NO_ZEROS, FCML_TEXT("0x") FCML_PRI_INT64_HEX_NO_ZEROS}, /* Unsigned hex values without leading zeros. */ {FCML_TEXT("0x") FCML_PRI_INT8_HEX_NO_ZEROS, FCML_TEXT("0x") FCML_PRI_INT16_HEX_NO_ZEROS, FCML_TEXT("0x") FCML_PRI_INT32_HEX_NO_ZEROS, FCML_TEXT("0x") FCML_PRI_INT64_HEX_NO_ZEROS} }; fcml_ceh_error fcml_ifn_rend_operand_renderer_immediate_gas( const fcml_st_render_config *config, const fcml_st_dialect_context_int *dialect_context, fcml_st_memory_stream *output_stream, const fcml_st_disassembler_result *result, const fcml_st_operand *operand, const fcml_st_operand_details *operand_details, fcml_bool *do_not_render ) { const fcml_st_integer *immediate = &( operand->immediate ); fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "$" ) ); return fcml_fn_rend_utils_format_append_integer( fcml_iarr_rend_utils_integer_formats_gas, output_stream, immediate, config->render_flags & FCML_REND_FLAG_HEX_IMM, config->render_flags & FCML_REND_FLAG_REMOVE_LEADING_ZEROS ); } fcml_ceh_error fcml_ifn_rend_operand_renderer_reg_gas( const fcml_st_render_config *config, const fcml_st_dialect_context_int *dialect_context, fcml_st_memory_stream *output_stream, const fcml_st_disassembler_result *result, const fcml_st_operand *operand, const fcml_st_operand_details *operand_details, fcml_bool *do_not_render ) { fcml_fn_rend_utils_format_append_reg( dialect_context, output_stream, &( operand->reg ), result->instruction_details.prefixes_details.is_rex ); return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_ifn_rend_operand_renderer_address_gas( const fcml_st_render_config *config, const fcml_st_dialect_context_int *dialect_context, fcml_st_memory_stream *output_stream, const fcml_st_disassembler_result *result, const fcml_st_operand *operand, const fcml_st_operand_details *operand_details, fcml_bool *do_not_render ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; const fcml_st_address *address = &( operand->address ); const fcml_st_prefixes_details *prefixes = &( result->instruction_details.prefixes_details ); fcml_hints hints = operand->hints; if ( hints & FCML_OP_HINT_DISPLACEMENT_RELATIVE_ADDRESS ) { fcml_st_integer integer; fcml_ceh_error error = fcml_fn_utils_offset_to_integer( &( address->offset ), &integer ); if ( error ) { return error; } error = fcml_fn_rend_utils_format_append_integer( fcml_iarr_rend_utils_integer_formats_gas, output_stream, &integer, FCML_TRUE, config->render_flags & FCML_REND_FLAG_REMOVE_LEADING_ZEROS ); return error; } if ( !address->segment_selector.is_default_reg || ( config->render_flags & FCML_REND_FLAG_RENDER_DEFAULT_SEG ) ) { fcml_fn_rend_utils_format_append_reg( dialect_context, output_stream, &( address->segment_selector.segment_selector ), prefixes->is_rex ); fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( ":" ) ); } const fcml_st_effective_address *effective_address = &( address->effective_address ); if ( result->instruction.hints & FCML_HINT_INDIRECT_POINTER ) { fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "*" ) ); } if ( address->address_form == FCML_AF_COMBINED ) { /* Displacement.*/ if ( effective_address->displacement.size > 0 ) { error = fcml_fn_rend_utils_format_append_integer( fcml_iarr_rend_utils_integer_formats_gas, output_stream, &( effective_address->displacement ), config->render_flags & FCML_REND_FLAG_HEX_DISPLACEMENT, config->render_flags & FCML_REND_FLAG_REMOVE_LEADING_ZEROS ); if ( error ) { return error; } } fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "(" ) ); /* Append base register.*/ if ( !fcml_fn_utils_is_reg_undef( &( effective_address->base ) ) ) { fcml_fn_rend_utils_format_append_reg( dialect_context, output_stream, &( effective_address->base ), prefixes->is_rex ); } /* Append index register.*/ if ( !fcml_fn_utils_is_reg_undef( &( effective_address->index ) ) ) { fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "," ) ); fcml_fn_rend_utils_format_append_reg( dialect_context, output_stream, &( effective_address->index ), prefixes->is_rex ); } /* Append scale.*/ if ( effective_address->scale_factor > 0 ) { fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "," ) ); fcml_st_integer scale_value = { 0 }; scale_value.is_signed = FCML_FALSE; scale_value.size = 8; scale_value.int8 = (fcml_int8_t) effective_address->scale_factor; fcml_fn_rend_utils_format_append_integer( fcml_iarr_rend_utils_integer_formats_gas, output_stream, &scale_value, FCML_FALSE, FCML_FALSE ); } fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( ")" ) ); } else { /* Absolute offset or RIP.*/ if ( !error ) { /* For RIP base register is set to IP. */ fcml_st_integer integer; if ( address->effective_address.base.type == FCML_REG_IP ) { /* IP relative addressing.*/ error = fcml_fn_rend_utils_format_append_integer( fcml_iarr_rend_utils_integer_formats_gas, output_stream, &( address->effective_address.displacement ), FCML_TRUE, config->render_flags & FCML_REND_FLAG_REMOVE_LEADING_ZEROS ); if ( !error ) { fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "(" ) ); fcml_fn_rend_utils_format_append_reg( dialect_context, output_stream, &( fcml_reg_RIP ), FCML_FALSE ); fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( ")" ) ); } } else { /* Absolute offset.*/ fcml_ceh_error error = fcml_fn_utils_offset_to_integer( &( address->offset ), &integer ); if ( error ) { return error; } error = fcml_fn_rend_utils_format_append_integer( fcml_iarr_rend_utils_integer_formats_gas, output_stream, &integer, FCML_TRUE, config->render_flags & FCML_REND_FLAG_REMOVE_LEADING_ZEROS ); } } } return error; } fcml_ceh_error fcml_ifn_rend_operand_renderer_far_pointer_gas( const fcml_st_render_config *config, const fcml_st_dialect_context_int *dialect_context, fcml_st_memory_stream *output_stream, const fcml_st_disassembler_result *result, const fcml_st_operand *operand, const fcml_st_operand_details *operand_details, fcml_bool *do_not_render ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_integer integer = { 0 }; integer.is_signed = FCML_TRUE; integer.size = 16; integer.int16 = operand->far_pointer.segment; fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "$" ) ); fcml_fn_rend_utils_format_append_integer( fcml_iarr_rend_utils_integer_formats_gas, output_stream, &integer, FCML_TRUE, config->render_flags & FCML_REND_FLAG_REMOVE_LEADING_ZEROS ); fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "," ) ); integer.size = operand->far_pointer.offset_size; switch ( integer.size ) { case FCML_DS_16: integer.int16 = operand->far_pointer.offset16; break; case FCML_DS_32: integer.int32 = operand->far_pointer.offset32; break; } fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "$" ) ); fcml_fn_rend_utils_format_append_integer( fcml_iarr_rend_utils_integer_formats_gas, output_stream, &integer, FCML_TRUE, config->render_flags & FCML_REND_FLAG_REMOVE_LEADING_ZEROS ); return error; } fcml_ceh_error fcml_ifn_rend_print_operand_gas( const fcml_st_render_config *config, const fcml_st_dialect_context_int *dialect_context, fcml_st_memory_stream *output_stream, const fcml_st_disassembler_result *result, fcml_int operand_index, fcml_bool *do_not_render ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; const fcml_st_operand *operand = &( result->instruction.operands[operand_index] ); switch ( operand->type ) { case FCML_OT_IMMEDIATE: error = fcml_ifn_rend_operand_renderer_immediate_gas( config, dialect_context, output_stream, result, operand, &( result->instruction_details.operand_details[operand_index] ), do_not_render ); break; case FCML_OT_FAR_POINTER: error = fcml_ifn_rend_operand_renderer_far_pointer_gas( config, dialect_context, output_stream, result, operand, &( result->instruction_details.operand_details[operand_index] ), do_not_render ); break; case FCML_OT_ADDRESS: error = fcml_ifn_rend_operand_renderer_address_gas( config, dialect_context, output_stream, result, operand, &( result->instruction_details.operand_details[operand_index] ), do_not_render ); break; case FCML_OT_REGISTER: error = fcml_ifn_rend_operand_renderer_reg_gas( config, dialect_context, output_stream, result, operand, &( result->instruction_details.operand_details[operand_index] ), do_not_render ); break; case FCML_OT_NONE: break; default: error = FCML_CEH_GEC_INVALID_INPUT; } return error; } fcml_string fcml_ifn_rend_get_conditional_suffix_gas( fcml_int condition, fcml_uint32_t render_flags ) { if ( render_flags & FCML_REND_FLAG_COND_SHOW_CARRY ) { if ( condition == 2 ) { return FCML_TEXT( "c" ); } else if ( condition == 3 ) { return FCML_TEXT( "nc" ); } } fcml_int group = ( render_flags & FCML_REND_FLAG_COND_GROUP_2 ) ? 1 : 0; return fcml_ar_asm_conditional_suffixes_render[group][condition]; } fcml_ceh_error fcml_fn_rend_render_instruction_gas( const fcml_st_dialect *dialect_context, const fcml_st_render_config *config, fcml_st_memory_stream *output_stream, const fcml_st_disassembler_result *result ) { fcml_st_dialect_context_int *dialect_context_int = (fcml_st_dialect_context_int*) dialect_context; fcml_char local_buffer[FCML_REND_LOCAL_BUFFER_SIZE] = { 0 }; fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_uint32_t render_flags = config->render_flags; /* Local stream.*/ fcml_st_memory_stream local_stream; local_stream.base_address = local_buffer; local_stream.size = sizeof( local_buffer ); local_stream.offset = 0; /* Instruction code. */ if ( render_flags & FCML_REND_FLAG_RENDER_CODE ) { fcml_fn_rend_utils_format_append_code( config, output_stream, result->instruction_details.instruction_code, result->instruction_details.instruction_size ); } fcml_int len = 0; /* Instruction prefixes like LOCK. */ len += fcml_ifn_rend_utils_print_prefixes( output_stream, &( result->instruction_details.prefixes_details ), render_flags ); /* Mnemonic. */ len += fcml_fn_rend_utils_format_append_str( output_stream, result->instruction.mnemonic ); /* Short form, so operands should be ignored. */ if ( result->instruction_details.is_shortcut ) { return error; } /* Add all operands. */ fcml_bool first_render = FCML_TRUE; fcml_int i; for ( i = 0; i < FCML_OPERANDS_COUNT; i++ ) { if ( result->instruction.operands[i].type != FCML_OT_NONE ) { fcml_bool do_not_render = FCML_FALSE; error = fcml_ifn_rend_print_operand_gas( config, dialect_context_int, &local_stream, result, i, &do_not_render ); if ( !error ) { if ( !do_not_render ) { first_render = fcml_fn_rend_utils_render_operand_separator( config, output_stream, len, first_render ); fcml_fn_rend_utils_format_append_stream( output_stream, &local_stream ); fcml_fn_stream_clean( &local_stream ); } } else { break; } } else { break; } } fcml_fn_rend_utils_format_finish_str( output_stream ); return error; } fcml-1.1.1/src/fcml_parser.c0000644000175000017500000000542312560745216012620 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_parser.h" #include #include #include #include "fcml_dialect_int.h" #include "fcml_apc_ast.h" #include "fcml_env_int.h" #include "fcml_trace.h" #include "fcml_parser_int.h" #include "fcml_utils.h" fcml_ceh_error LIB_CALL fcml_fn_parse( fcml_st_parser_context *context, const fcml_string instruction, fcml_st_parser_result *result_out ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_dialect_context_int *dialect_context_int = (fcml_st_dialect_context_int*) context->dialect; if ( dialect_context_int->instruction_parser ) { /* Call parser instance associated with given dialect. */ error = fcml_fn_parse_to_cif( context, instruction, result_out ); } else { /* Dialect not initialized correctly.*/ FCML_TRACE_MSG("Parsing not supported by current dialect."); error = FCML_CEH_GEC_FEATURE_NOT_SUPPORTED; } if ( error ) { // Try to convert error code to error message if there is such need. fcml_fn_utils_convert_gec_to_error_info( context->configuration.enable_error_messages, &( result_out->errors ), error ); } return error; } void LIB_CALL fcml_fn_parser_result_free( fcml_st_parser_result *result ) { if ( result ) { /* Frees parsed instruction, potential errors and warnings and result structure itself.*/ if ( result->instruction ) { fcml_fn_ast_free_converted_cif( result->instruction ); result->instruction = NULL; } /* Symbol can not be free, because it is managed by symbols * table, but of course we have to zero it. */ result->symbol = NULL; fcml_fn_ceh_free_errors_only( &( result->errors ) ); } } void LIB_CALL fcml_fn_parser_result_prepare( fcml_st_parser_result *result ) { if ( result ) { result->errors.errors = NULL; result->errors.last_error = NULL; result->instruction = NULL; } } fcml-1.1.1/src/fcml_renderer.c0000644000175000017500000000350412560745216013130 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "fcml_stream.h" #include "fcml_dialect_int.h" #include "fcml_trace.h" #include "fcml_env_int.h" fcml_ceh_error LIB_CALL fcml_fn_render( const fcml_st_dialect *dialect, const fcml_st_render_config *config, fcml_char *buffer, fcml_usize buffer_len, const fcml_st_disassembler_result *result ) { fcml_st_memory_stream output_stream; output_stream.base_address = buffer; output_stream.offset = 0; output_stream.size = buffer_len; fcml_st_dialect_context_int *dialect_context_int = (fcml_st_dialect_context_int*) dialect; if ( dialect_context_int->instruction_renderer ) { fcml_fnp_render_instruction renderer = (fcml_fnp_render_instruction) dialect_context_int->instruction_renderer; return renderer( dialect, config, &output_stream, result ); } else { /* Dialect not initialized correctly.*/ FCML_TRACE_MSG("Rendering not supported by current dialect."); return FCML_CEH_GEC_FEATURE_NOT_SUPPORTED; } } fcml-1.1.1/src/fcml_apc_ast.h0000644000175000017500000001526312560745216012746 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_APC_AST_H_ #define FCML_APC_AST_H_ #include #include #include #include "fcml_common.h" #include "fcml_coll.h" #define FCML_AST_INT_FLAG_IMMEDIATE 0x0001 typedef enum fcml_en_ast_node_type { FCML_EN_TN_INSTRUCTION, FCML_EN_TN_OPERAND_LIST, FCML_EN_TN_EXP, FCML_EN_TN_UMINUS, FCML_EN_TN_VALUE, FCML_EN_TN_REG, FCML_EN_TN_FAR_POINTER, FCML_EN_TN_EFFECTIVE_ADDRESS, FCML_EN_TN_USE_SYMBOL } fcml_en_ast_node_type; typedef struct fcml_st_ast_size_operator { fcml_uint16_t size; fcml_bool multimedia; } fcml_st_size_operator; typedef struct fcml_st_ast_val_integer { fcml_uint64_t value; fcml_bool overflow; fcml_bool is_signed; } fcml_st_ast_val_integer; typedef struct fcml_st_ast_val_float { fcml_float value; fcml_bool overflow; } fcml_st_ast_val_float; typedef struct fcml_st_ast_node { fcml_en_ast_node_type type; fcml_ptr node; } fcml_st_ast_node; typedef enum fcml_st_ast_value_node_type { FCML_EN_ET_INTEGER, FCML_EN_ET_FLOAT } fcml_st_ast_value_node_type; typedef struct fcml_st_ast_node_value { fcml_st_ast_value_node_type type; fcml_st_ast_val_integer integer_value; fcml_st_ast_val_float float_value; } fcml_st_ast_node_value; typedef struct fcml_st_ast_node_register { fcml_st_register reg; } fcml_st_ast_node_register; typedef enum fcml_en_ast_exp_node_operator { FCML_EN_EXN_SUB, FCML_EN_EXN_ADD, FCML_EN_EXN_MUL, FCML_EN_EXN_DIV } fcml_en_ast_exp_node_operator; typedef struct fcml_st_ast_node_exp { fcml_st_ast_node *l; fcml_st_ast_node *r; fcml_en_ast_exp_node_operator op; } fcml_st_ast_node_exp; typedef struct fcml_st_ast_node_uminus { fcml_st_ast_node *exp; } fcml_st_ast_node_uminus; typedef struct fcml_st_ast_node_define_symbol { fcml_st_symbol *symbol; } fcml_st_ast_node_define_symbol; typedef struct fcml_st_ast_node_use_symbol { fcml_string symbol; } fcml_st_ast_node_use_symbol; typedef struct fcml_st_ast_node_far_pointer { fcml_st_ast_node *segment_selector; fcml_st_ast_node *offset; } fcml_st_ast_node_far_pointer; typedef struct fcml_st_ast_node_effective_address { fcml_hints instruction_hints; fcml_hints addressing_hints; fcml_uint16_t size_operator; fcml_st_register segment_selector; fcml_st_register base; fcml_st_register index; fcml_st_ast_val_integer scale_factor; fcml_st_ast_node *displacement; fcml_en_effective_address_form address_form; } fcml_st_ast_node_effective_address; typedef struct fcml_st_ast_node_operand_list { fcml_st_coll_list *operands; } fcml_st_ast_node_operand_list; typedef struct fcml_st_ast_node_instruction { fcml_uint16_t prefixes; fcml_hints hints; fcml_string mnemonic; fcml_st_ast_node *operands; } fcml_st_ast_node_instruction; typedef struct fcml_st_cif_converter_context { /* Set to true in order to ignore all undefined symbols. * In such case every unknown symbol is treated as 0. */ fcml_bool ignore_undefined_symbols; /* Container for errors. */ fcml_st_ceh_error_container *errors; /* Symbols table. */ fcml_st_symbol_table symbol_table; /* Number of evaluated symbols. */ fcml_int evaluated_symbols; /* Number of ignored undefined symbols. */ fcml_int ignored_symbols; } fcml_st_cif_converter_context; /* Function pointer for node visitor. */ typedef fcml_ceh_error (*fcml_fnp_ast_node_visitor)( fcml_st_ast_node *node, fcml_ptr visitor_args ); /* Operations */ fcml_st_ast_node *fcml_fn_ast_alloc_node_integer( fcml_st_ast_val_integer *integer_value ); fcml_st_ast_node *fcml_fn_ast_alloc_node_float( fcml_st_ast_val_float *float_value ); fcml_st_ast_node *fcml_fn_ast_alloc_node_operand_list( fcml_st_ast_node *operand_l, fcml_st_ast_node *operand_r ); fcml_st_ast_node *fcml_fn_ast_alloc_node_instruction( fcml_prefixes prefixes, fcml_string mnemonic, fcml_usize length, fcml_hints hints, fcml_st_ast_node *operand_list ); fcml_st_ast_node *fcml_fn_ast_alloc_node_pseudo_operation( fcml_string mnemonic, fcml_usize length, fcml_st_ast_node *exp ); fcml_st_ast_node *fcml_fn_ast_alloc_node_register( fcml_st_register *reg ); fcml_st_symbol *fcml_fn_ast_alloc_node_define_symbol( fcml_ip ip, fcml_string symbol, fcml_usize length ); fcml_st_ast_node *fcml_fn_ast_alloc_node_use_symbol( fcml_string symbol_name, fcml_usize length ); fcml_st_ast_node *fcml_fn_ast_alloc_node_exp( fcml_en_ast_exp_node_operator op, fcml_st_ast_node *exp_left, fcml_st_ast_node *exp_right ); fcml_st_ast_node *fcml_fn_ast_alloc_node_far_pointer( fcml_st_ast_node *segment_selector, fcml_st_ast_node *offset ); fcml_st_ast_node *fcml_fn_ast_set_effective_address_hins( fcml_st_ast_node *effective_address_node, fcml_hints hints ); fcml_st_ast_node *fcml_fn_ast_set_effective_address_details( fcml_st_register *segment_selector, fcml_st_size_operator *size_operator, fcml_st_ast_node *effective_address ); fcml_st_ast_node *fcml_fn_ast_set_displacemnt( fcml_st_ast_node *displacement, fcml_st_ast_node *effective_address ); fcml_st_ast_node *fcml_fn_ast_alloc_node_effective_address( fcml_st_register *base, fcml_st_register *index, fcml_st_ast_val_integer *scale_factor, fcml_st_ast_node *displacement, fcml_bool uminus_displacement, fcml_hints hints ); fcml_st_ast_node *fcml_fn_ast_alloc_node_uminus( fcml_st_ast_node *exp ); void fcml_fn_ast_free_node( fcml_st_ast_node *exp ); fcml_ceh_error fcml_fn_ast_visit_nodes( fcml_st_ast_node *ast_tree, fcml_fnp_ast_node_visitor visitor, fcml_ptr visitor_args ); fcml_ceh_error fcml_fn_ast_extract_used_symbols( fcml_st_ast_node *ast_tree, fcml_st_coll_list **extracted_symbols ); fcml_ceh_error fcml_fn_ast_to_cif_converter( fcml_st_cif_converter_context *context, fcml_st_ast_node *ast_tree, fcml_st_instruction **instruction ); void fcml_fn_ast_free_converted_cif( fcml_st_instruction *cif_instruction ); #endif /* FCML_APC_AST_H_ */ fcml-1.1.1/src/fcml_gas_parser_def.h0000644000175000017500000000701412560745216014273 00000000000000/* A Bison parser, made by GNU Bison 2.7.12-4996. */ /* Bison interface for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2013 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 . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this 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 YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int gas_debug; #endif /* Tokens. */ #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 }; #endif /* Tokens. */ #define FCML_TK_UNEXPECTED 258 #define FCML_TK_REG_GPR 259 #define FCML_TK_REG_SIMD 260 #define FCML_TK_REG_FPU 261 #define FCML_TK_REG_SEG 262 #define FCML_TK_REG_CR 263 #define FCML_TK_REG_DR 264 #define FCML_TK_REG_RIP 265 #define FCML_TK_INTEGER 266 #define FCML_TK_SYMBOL 267 #define FCML_TK_PREFIX 268 #define FCML_TK_PO_BYTE 269 #define FCML_OP_UMINUS 270 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 2053 of yacc.c */ #line 97 "fcml_gas_parser_def.y" /*Complex values.*/ fcml_st_ast_val_integer integer_value; fcml_st_register reg_value; fcml_st_ast_node *ast; struct { fcml_string text; int length; } symbol; fcml_hints hints; fcml_prefixes prefixes; /* Line 2053 of yacc.c */ #line 101 "fcml_gas_parser_def.h" } 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 */ fcml-1.1.1/src/fcml_intel_parser.h0000644000175000017500000000221412560745216014013 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_INTEL_PARSER_H_ #define FCML_INTEL_PARSER_H_ #include #include #include #include "fcml_parser_int.h" fcml_ceh_error fcml_fn_intel_parse_instruction_to_ast( fcml_ip ip, const fcml_string mnemonic, fcml_st_parser_ast *ast ); #endif /* FCML_INTEL_PARSER_H_ */ fcml-1.1.1/src/fcml_modrm_decoder.h0000644000175000017500000000473612560745216014142 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_MODRM_DECODER_H_ #define FCML_MODRM_DECODER_H_ #include #include #include "fcml_ceh.h" #include "fcml_modrm.h" #include "fcml_stream.h" /* Some macros that might be also useful outside decoder.*/ #define FCML_MODRM_DEC_MOD(x) ( x >> 6 ) #define FCML_MODRM_DEC_REG_OPCODE(x) ( ( x & 0x38 ) >> 3 ) #define FCML_MODRM_DEC_RM(x) ( x & 0x07 ) #define FCML_MODRM_SIB_SS(x) ( x >> 6 ) #define FCML_MODRM_SIB_INDEX(x) ( ( x & 0x38 ) >> 3 ) #define FCML_MODRM_SIB_BASE(x) ( x & 0x07 ) #define FCML_MODRM_DEC_FLAG_EXTEND_DISPLACEMENT_TO_ASA 0x01 typedef struct fcml_st_modrm_source { fcml_uint8_t ext_r; fcml_uint8_t ext_x; fcml_uint8_t ext_b; fcml_bool is_vsib; fcml_usize vsib_index_size; fcml_st_memory_stream *stream; } fcml_st_modrm_source; typedef struct fcml_st_modrm_details { fcml_uint8_t modrm; fcml_nuint8_t sib; } fcml_st_modrm_details; typedef struct fcml_st_modrm_decoder_context { /* Sets 32 or 64 bit addressing mode.*/ fcml_en_operating_mode op_mode; /* Effective address size using to decode/encode ModR/M. It's very important to set this value properly,*/ /* because 16 and 32/64 addressing forms*/ fcml_usize effective_address_size; } fcml_st_modrm_decoder_context; fcml_ceh_error fcml_fn_modrm_decode( fcml_st_modrm_decoder_context *context, fcml_st_modrm_source *modrm_source, fcml_st_modrm *decoded_modrm, fcml_st_modrm_details *modrm_details, fcml_uint8_t flags ); fcml_ceh_error fcml_fn_modrm_decode_rip( fcml_uint64_t rip, fcml_usize effective_address_size, fcml_st_offset *offset, fcml_st_offset *address ); #endif /* FCML_MODRM_DECODER_H_ */ fcml-1.1.1/src/fcml_modrm.h0000644000175000017500000000254612560745216012452 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_MODRM_H_ #define FCML_MODRM_H_ #include #include typedef struct fcml_st_modrm { /* Register number specified by reg_opcode.*/ fcml_uint8_t reg_opcode; /* True if register needs REX prefix to be encoded.*/ fcml_bool reg_opcode_needs_rex; /* Register number specified by r/m when mod == 3.*/ fcml_nuint8_t reg; /* Effective address.*/ fcml_st_address address; /* True if RIP encoding is used.*/ fcml_bool is_rip; } fcml_st_modrm; #endif /* FCML_MODRM_H_ */ fcml-1.1.1/src/fcml_modrm_encoder.c0000644000175000017500000005322312560745216014142 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_modrm_encoder.h" #include #include #include #include "fcml_stream.h" #include "fcml_utils.h" fcml_st_memory_stream fcml_ifn_modrm_map_displacement_to_stream( fcml_st_encoded_modrm *encoded_modrm ) { fcml_st_memory_stream stream; stream.base_address = &( encoded_modrm->displacement ); stream.offset = 0; stream.size = sizeof( encoded_modrm->displacement ); return stream; } fcml_ceh_error fcml_ifn_modrm_is_displacement( const fcml_st_address *address ) { return address->offset.size || address->effective_address.displacement.size; } fcml_ceh_error fcml_ifn_modrm_convert_absolute_address_to_integer( const fcml_st_address *address, fcml_st_integer *integer ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( address->address_form == FCML_AF_OFFSET ) { if ( address->offset.size ) { error = fcml_fn_utils_offset_to_integer( &( address->offset ), integer ); } else { *integer = address->effective_address.displacement; } } else { /* Combined effective address can not be treated as absolute offset.*/ return FCML_CEH_GEC_INVALID_INPUT; } return error; } /* Optionally extends and encodes displacement.*/ fcml_ceh_error fcml_ifn_modrm_encode_displacement( fcml_st_modrm_encoder_context *context, const fcml_st_integer *displacement, fcml_st_encoded_modrm *encoded_modrm, fcml_usize asa, fcml_usize *disp_size ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_integer dest; /* Displacement value is always signed, so change it to signed value if it has expected size.*/ fcml_st_integer src = *displacement; if ( src.size == asa ) { src.is_signed = FCML_TRUE; } if ( *disp_size == FCML_DS_UNDEF ) { /* Convert displacement to 8 bits value.*/ error = fcml_fn_utils_convert_integer_to_integer( &src, &dest, asa, FCML_DS_8 ); if ( error == FCML_CEH_GEC_VALUE_OUT_OF_RANGE ) { /* Convert displacement to 32 bits value.*/ error = fcml_fn_utils_convert_integer_to_integer( &src, &dest, asa, asa == FCML_DS_16 ? FCML_DS_16 : FCML_DS_32 ); } } else { error = fcml_fn_utils_convert_integer_to_integer( &src, &dest, asa, *disp_size ); } if ( error ) { return error; } /* Gets displacement as stream.*/ fcml_st_memory_stream stream = fcml_ifn_modrm_map_displacement_to_stream( encoded_modrm ); /* Extends and encodes displacement to given stream.*/ error = fcml_fn_utils_encode_integer( &stream, &dest ); if ( error ) { return error; } *disp_size = dest.size; encoded_modrm->displacement_size = stream.offset; return error; } fcml_ceh_error fcml_ifn_modrm_encode_16bit( fcml_st_modrm_encoder_context *context, const fcml_st_modrm *decoded_modrm, fcml_st_encoded_modrm *encoded_modrm ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; const fcml_st_address *address = &( decoded_modrm->address ); const fcml_st_effective_address *effective_address = &( address->effective_address ); /* ModR/M fields.*/ fcml_uint8_t f_reg = 0; fcml_uint8_t f_mod = 0; fcml_uint8_t f_rm = 0; fcml_usize disp_size = FCML_DS_UNDEF; if ( context->op_mode == FCML_OM_64_BIT ) { return FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } /* Check if there is disp16 addressing mode encoded.*/ if ( !effective_address->base.type && ( effective_address->displacement.size || address->offset.size ) ) { /* Sign extends displacement to 16 bits if there is such need, and encode it.*/ /* Remember that in 16 bit addressing mode address form doesn't matter.*/ fcml_st_integer absolute_address; error = fcml_ifn_modrm_convert_absolute_address_to_integer( address, &absolute_address ); if ( !error ) { disp_size = FCML_DS_16; error = fcml_ifn_modrm_encode_displacement( context, &absolute_address, encoded_modrm, FCML_DS_16, &disp_size ); } f_rm = 0x06; } else if ( effective_address->base.type ) { /* Registers are allowed only in COMBINED addressing form.*/ if ( address->address_form != FCML_AF_COMBINED ) { return FCML_CEH_GEC_INVALID_INPUT; } if ( effective_address->base.type && effective_address->base.size != FCML_DS_16 ) { error = FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } if ( effective_address->index.type && effective_address->index.size != FCML_DS_16 ) { error = FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } if ( !error ) { /* There is base register set.*/ switch ( effective_address->base.reg ) { case FCML_REG_BX: if ( effective_address->index.type ) { if ( effective_address->index.reg == FCML_REG_DI ) { f_rm = 0x01; } } else { f_rm = 0x07; } break; case FCML_REG_BP: if ( effective_address->index.type ) { switch ( effective_address->index.reg ) { case FCML_REG_SI: f_rm = 0x02; break; case FCML_REG_DI: f_rm = 0x03; break; } } else if ( !effective_address->displacement.size ) { /* BP is not allowed without displacement.*/ error = FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } else { f_rm = 0x06; } break; case FCML_REG_SI: f_rm = 0x04; break; case FCML_REG_DI: f_rm = 0x05; break; } if ( !error ) { /* Encode displacement if there is any.*/ if ( effective_address->displacement.size ) { error = fcml_ifn_modrm_encode_displacement( context, &( effective_address->displacement ), encoded_modrm, FCML_DS_16, &disp_size ); } if ( !error ) { /* Now encode displacement, is there is any.*/ switch ( disp_size ) { case FCML_DS_UNDEF: f_mod = 0x00; break; case FCML_DS_8: f_mod = 0x01; break; case FCML_DS_16: f_mod = 0x02; break; default: /* Only disp8 and disp16 is supported in 16 bit addressing mode.*/ error = FCML_CEH_GEC_INVALID_ADDRESSING_FORM; break; } } } } } else if ( decoded_modrm->reg.is_not_null ) { f_mod = 0x03; f_rm = decoded_modrm->reg.value; } else { /* There is no base register and displacement, so*/ error = FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } if ( !error ) { /* Encode reg/opcode.*/ f_reg = decoded_modrm->reg_opcode; /* Encode calculated ModR/M byte.*/ encoded_modrm->modrm = FCML_MODRM_ENC( f_mod, f_reg, f_rm ); } return error; } /* 32 and 64 bit addressing mode.s*/ fcml_ceh_error fcml_ifn_modrm_encode_3264bit( fcml_st_modrm_encoder_context *context, const fcml_st_modrm *decoded_modrm, fcml_st_encoded_modrm *encoded_modrm ) { fcml_uint8_t f_mod = 0; fcml_uint8_t f_rm = 0; fcml_uint8_t f_reg = 0; fcml_uint8_t f_ext_r = 0; fcml_uint8_t f_ext_x = 0; fcml_uint8_t f_ext_b = 0; fcml_usize disp_size = 0; fcml_bool choose_sib = FCML_FALSE; const fcml_st_address *address = &( decoded_modrm->address ); const fcml_st_effective_address *effective_address = &( address->effective_address ); /* Check if addressing mode and effective address size are compatible.*/ if ( ( context->chosen_effective_address_size == FCML_DS_64 && context->op_mode != FCML_OM_64_BIT ) || ( context->op_mode == FCML_OM_64_BIT && context->chosen_effective_address_size == FCML_DS_16 ) ) { return FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } fcml_bool is_displacement = fcml_ifn_modrm_is_displacement( address ); fcml_bool is_base = effective_address->base.type; fcml_bool is_index = effective_address->index.type; /* Should be treated like standard displacement when RIP addressing is not available.*/ fcml_bool is_rip_disp = effective_address->base.type == FCML_REG_IP; /* Sanity check.*/ if ( ( is_base || is_index ) && address->address_form != FCML_AF_COMBINED ) { return FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } fcml_bool is_rip = FCML_FALSE; /* Check if there is SIB alternative.*/ if ( !is_rip_disp ) { if ( is_index ) { choose_sib = FCML_TRUE; } else { if ( !is_base && is_displacement ) { /* disp32 or RIP*/ fcml_bool choose_rip = context->choose_rip_encoding && ( context->op_mode == FCML_OM_64_BIT ); if ( address->address_form != FCML_AF_OFFSET ) { choose_rip = FCML_FALSE; } if ( choose_rip ) { /* Relative.*/ is_rip = FCML_TRUE; context->is_sib_alternative = FCML_FALSE; } else { /* In case of 64 bit addressing SIB is needed to encode absolute address.*/ choose_sib = ( context->op_mode == FCML_OM_64_BIT ) ? FCML_TRUE : context->choose_sib_encoding; context->is_sib_alternative = FCML_TRUE; } } else if ( is_base ) { /* [esp],edx can be only encoded with using of SIB byte.*/ if ( effective_address->base.reg == FCML_REG_ESP ) { choose_sib = FCML_TRUE; } else { /* RIP relative addressing can not be encoded using SIB.*/ if ( effective_address->base.type != FCML_REG_IP ) { /* [base]+[disp8/disp32]*/ choose_sib = context->choose_sib_encoding; context->is_sib_alternative = FCML_TRUE; } } } } } if ( choose_sib ) { /* SIB needed.*/ fcml_uint8_t f_base = 0; fcml_uint8_t f_ss = 0; fcml_uint8_t f_index = 0; /* Base register.*/ if ( is_base ) { if ( context->chosen_effective_address_size != effective_address->base.size ) { /* Wrong size of base register, it has to be equal to EASA.*/ return FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } f_base = effective_address->base.reg; if ( f_base > 7 ) { f_ext_b = 0x01; f_base &= 0x07; } } else { /* SIB without base register, there is only one addressing mode with this combination*/ /* and it needs disp32.*/ if ( !is_displacement ) { return FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } disp_size = FCML_DS_32; f_base = 0x05; } /* Index register.*/ if ( is_index ) { /* Check if index register size is correct.*/ if ( effective_address->index.type != FCML_REG_SIMD && context->chosen_effective_address_size != effective_address->index.size ) { /* Wrong size of index register, it has to be equal to EASA.*/ return FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } /* ESP is not allowed as index register.*/ if ( effective_address->index.reg == FCML_REG_ESP ) { return FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } f_index = effective_address->index.reg; if ( f_index > 7 ) { f_ext_x = 0x01; f_index &= 0x07; } } else { f_index = 0x04; } /* Scale factor.*/ switch ( effective_address->scale_factor ) { case 2: f_ss = 1; break; case 4: f_ss = 2; break; case 8: f_ss = 3; break; } /* Encode SIB.*/ encoded_modrm->sib.is_not_null = FCML_TRUE; encoded_modrm->sib.value = FCML_MODRM_SIB_ENC( f_ss, f_index, f_base ); /* RM when SIB is used.*/ f_rm = 0x04; } else { /* SIB not needed.*/ if ( is_base && !is_rip_disp ) { if ( context->chosen_effective_address_size != effective_address->base.size ) { return FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } f_rm = effective_address->base.reg; } else if ( decoded_modrm->reg.is_not_null ) { f_mod = 0x03; f_rm = decoded_modrm->reg.value; if ( effective_address->displacement.size ) { return FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } } else if ( is_displacement ) { /* Absolute address or RIP.*/ disp_size = FCML_DS_32; f_rm = 0x05; } else { /* Only reg_opcode is encoded.*/ f_mod = 0x03; } if ( f_rm > 7 ) { f_ext_b = 0x01; f_rm &= 0x07; } } if ( is_rip ) { /* RIP given ad absolute address that has to be converted to relative displacement.*/ fcml_st_integer rip_address; /* Offset is not available, so displacement was used instead.*/ if ( !address->offset.size ) { return FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } fcml_ceh_error error = fcml_fn_utils_offset_to_integer( &( address->offset ), &rip_address ); if ( error ) { return error; } /* Extends RIP address to 64 bit value.*/ if ( rip_address.size != FCML_DS_64 ) { error = fcml_fn_utils_extend_integer( &rip_address, FCML_DS_64 ); if ( error ) { return error; } } /* Store RIP offset. It can be used then to calculate displacement*/ encoded_modrm->is_rip = FCML_TRUE; encoded_modrm->rip_address = rip_address.int64; /* Check if 32 bit ASA should be used, if so check if RIP address is not out of range.*/ fcml_usize asa = ( context->chosen_effective_address_size ) ? context->chosen_effective_address_size : context->effective_address_size; if ( asa == FCML_DS_32 ) { if ( rip_address.is_signed ) { if ( rip_address.int64 > FCML_INT32_MAX || rip_address.int64 < FCML_INT32_MIN ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } } else { if ( (fcml_uint64_t) rip_address.int64 > FCML_UINT32_MAX ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } } } f_mod = 0x00; } else if ( is_displacement || is_rip_disp ) { if ( is_base || is_index ) { fcml_ceh_error error = fcml_ifn_modrm_encode_displacement( context, &( effective_address->displacement ), encoded_modrm, context->chosen_effective_address_size, &disp_size ); if ( error ) { return error; } /* Encode displacement.*/ if ( disp_size == FCML_DS_8 ) { f_mod = 0x01; } else if ( disp_size == FCML_DS_32 && is_base && !is_rip_disp ) { f_mod = 0x02; } else { f_mod = 0x00; } /* Displacement has been already encoded, so postprocessing is not needed anymore.*/ if ( is_rip_disp ) { encoded_modrm->is_rip = FCML_TRUE; encoded_modrm->is_rip_encoded = FCML_TRUE; encoded_modrm->rip_address = 0LL; } } else { /* Absolute address or RIP relative displacement.*/ fcml_st_integer absolute_address; /* Convert absolute address to generic integer value in order to convert it to ASA size.*/ fcml_usize error = fcml_ifn_modrm_convert_absolute_address_to_integer( address, &absolute_address ); if ( error ) { return error; } error = fcml_ifn_modrm_encode_displacement( context, &absolute_address, encoded_modrm, context->chosen_effective_address_size, &disp_size ); if ( error ) { return error; } f_mod = 0x00; } } /* Encode reg/opcode.*/ f_reg = decoded_modrm->reg_opcode; if ( f_reg > 7 ) { f_ext_r = 0x01; f_reg &= 0x07; } if ( context->op_mode != FCML_OM_64_BIT && ( f_ext_r || f_ext_x || f_ext_b ) ) { return FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } encoded_modrm->modrm = FCML_MODRM_ENC( f_mod, f_reg, f_rm ); encoded_modrm->ext_r = f_ext_r; encoded_modrm->ext_x = f_ext_x; encoded_modrm->ext_b = f_ext_b; return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_fn_modrm_encode( fcml_st_modrm_encoder_context *context, const fcml_st_modrm *decoded_modrm, fcml_st_encoded_modrm *encoded_modrm ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_usize easa = context->effective_address_size; fcml_en_operating_mode op_mode = context->op_mode; const fcml_st_effective_address *effective_address = &( decoded_modrm->address.effective_address ); /* Check if there is ambiguity.*/ if ( effective_address->base.size == FCML_DS_16 || effective_address->index.size == FCML_DS_16 ) { if ( op_mode == FCML_OM_64_BIT ) { /* 16 bit addressing is not supported in 64 bit mode.*/ return FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } easa = FCML_DS_16; } else if ( effective_address->base.size == FCML_DS_64 || effective_address->index.size == FCML_DS_64 ) { if ( op_mode == FCML_OM_16_BIT ) { /* 64 bit addressing is not supported in 16 bit mode.*/ return FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } easa = FCML_DS_64; } context->chosen_effective_address_size = easa; if ( easa == FCML_DS_16 ) { error = fcml_ifn_modrm_encode_16bit( context, decoded_modrm, encoded_modrm ); } else if ( easa == FCML_DS_32 || easa == FCML_DS_64 ) { error = fcml_ifn_modrm_encode_3264bit( context, decoded_modrm, encoded_modrm ); } else { /* Unknown addressing mode.*/ error = FCML_CEH_GEC_INVALID_OPERATING_MODE; } return error; } fcml_ceh_error fcml_fn_modrm_encode_rip_offset( fcml_st_memory_stream *stream, fcml_int64_t rip, fcml_uint8_t instruction_size, const fcml_st_encoded_modrm *encoded_modrm ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( encoded_modrm->is_rip ) { fcml_int64_t rip_offset = ( encoded_modrm->rip_address - instruction_size ) - (fcml_int64_t) rip; if ( rip_offset < FCML_INT32_MIN || rip_offset > FCML_INT32_MAX ) { error = FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } else { fcml_st_integer integer; integer.int32 = (fcml_int32_t) rip_offset; integer.size = FCML_DS_32; /* Encodes and encodes displacement to given stream.*/ error = fcml_fn_utils_encode_integer( stream, &integer ); } } else { error = FCML_CEH_GEC_INVALID_INPUT; } return error; } fcml_ceh_error fcml_fn_modrm_calculate_effective_address_size( const fcml_st_modrm *decoded_modrm, fcml_flags *effective_address_size ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; /* Calculate EOSA.*/ const fcml_st_address *address = &( decoded_modrm->address ); const fcml_st_effective_address *effective_address = &( address->effective_address ); fcml_flags easa; fcml_st_register reg; if ( effective_address->base.type ) { reg = effective_address->base; } else { reg = effective_address->index; } if ( reg.type ) { switch ( reg.size ) { case FCML_DS_16: case FCML_DS_32: case FCML_DS_64: easa = reg.size >> 4; break; case FCML_DS_128: case FCML_DS_256: easa = FCML_EN_ASF_32 | FCML_EN_ASF_64; break; default: error = FCML_CEH_GEC_INVALID_OPERATING_MODE; break; } } else { /* Remember that -1 can be represented as int64 value, so displacement nor offset size cannot be taken into account here.*/ easa = FCML_EN_ASF_ALL; } if ( error ) { return error; } /* Calculate EASA.*/ *effective_address_size = easa; return error; } fcml-1.1.1/src/fcml_parser_utils.h0000644000175000017500000000402412560745216014041 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_PUTILS_H_ #define FCML_PUTILS_H_ #include #include "fcml_env_int.h" #include "fcml_apc_ast.h" #include "fcml_ceh.h" #include "fcml_coll.h" /** Override default memory allocation function used by bison parser */ #define YYMALLOC fcml_fn_env_memory_alloc /** Override default memory deallocation function used by bison parser */ #define YYFREE fcml_fn_env_memory_free typedef struct fcml_st_parser_data { /* Lexer context. */ void *scannerInfo; /* Instruction pointer used to declare symbols. */ fcml_ip ip; /* Defined symbol. */ fcml_st_symbol *symbol; /* Abstract syntax tree of parsed isntruction. */ fcml_st_ast_node *tree; /* All potential errors going here. */ fcml_st_ceh_error_container errors; } fcml_st_parser_data; void fcml_fn_pu_parse_integer( const fcml_char *str, fcml_st_ast_val_integer *integer_value, int base ); void fcml_fn_pu_parse_float( const fcml_char *str, fcml_st_ast_val_float *float_value ); void fcml_fn_pu_parse_register( fcml_en_register type, fcml_usize size, fcml_uint8_t num, fcml_bool x64_exp, fcml_st_register *reg_dest ); fcml_char *fcml_fn_pu_reg_type_to_string( fcml_en_register type ); #endif /* FCML_PUTILS_H_ */ fcml-1.1.1/src/Makefile.am0000644000175000017500000000454212560745216012214 00000000000000@SET_MAKE@ BUILT_SOURCES = fcml_intel_parser_def.h fcml_gas_parser_def.h fcml_intel_lexer.h fcml_gas_lexer.h AM_YFLAGS = -d lib_LTLIBRARIES = libfcml.la libfcml_la_SOURCES = fcml_intel_lexer.l \ fcml_intel_lexer.h \ fcml_gas_lexer.l \ fcml_gas_lexer.h \ fcml_intel_parser_def.y \ fcml_gas_parser_def.y \ fcml_apc_ast.c \ fcml_apc_ast.h \ fcml_assembler.c \ fcml_assembler_int.h \ fcml_ceh.c \ fcml_ceh.h \ fcml_choosers.c \ fcml_coll.c \ fcml_coll.h \ fcml_common_dialect.c \ fcml_common_dialect.h \ fcml_common_lex.h \ fcml_common_utils.c \ fcml_decoding_tree.c \ fcml_decoding_tree.h \ fcml_def.c \ fcml_def_enc.c \ fcml_def.h \ fcml_dialect.c \ fcml_dialect_int.c \ fcml_dialect_int.h \ fcml_disassembler.c \ fcml_encoding.c \ fcml_encoding.h \ fcml_env_int.c \ fcml_env_int.h \ fcml_gas_dialect.c \ fcml_gas_parser.c \ fcml_gas_parser.h \ fcml_gas_rend.c \ fcml_gas_rend.h \ fcml_hints.c \ fcml_hints.h \ fcml_intel_dialect.c \ fcml_intel_parser.c \ fcml_intel_parser.h \ fcml_intel_rend.c \ fcml_intel_rend.h \ fcml_messages.c \ fcml_messages.h \ fcml_mnemonic_parser.c \ fcml_mnemonic_parser.h \ fcml_modrm_decoder.c \ fcml_modrm_decoder.h \ fcml_modrm_encoder.c \ fcml_modrm_encoder.h \ fcml_modrm.h \ fcml_optimizers.c \ fcml_parser.c \ fcml_parser_int.c \ fcml_parser_int.h \ fcml_parser_utils.c \ fcml_parser_utils.h \ fcml_renderer.c \ fcml_rend_utils.c \ fcml_rend_utils.h \ fcml_stream.c \ fcml_trace.h \ fcml_utils.c \ fcml_utils.h \ fcml_stream.h \ fcml_lag_assembler.c \ fcml_symbols.c libfcml_la_CPPFLAGS = -I$(top_srcdir)/include libfcml_la_LDFLAGS = -no-undefined fcml_intel_lexer.h: fcml_intel_lexer.c @if test ! -f $@; then rm -f fcml_intel_lexer.c; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) fcml_gas_lexer.c; else :; fi fcml_gas_lexer.h: fcml_gas_lexer.c @if test ! -f $@; then rm -f fcml_gas_lexer.c; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) fcml_gas_lexer.c; else :; fi EXTRA_DIST = libfcml.pc.in pkgconfigdir = $(libdir)/pkgconfig nodist_pkgconfig_DATA = libfcml.pc libfcml.pc: libfcml.pc.in @sed -e 's![@]prefix[@]!$(prefix)!g' \ -e 's![@]exec_prefix[@]!$(exec_prefix)!g' \ -e 's![@]includedir[@]!$(includedir)!g' \ -e 's![@]libdir[@]!$(libdir)!g' \ -e 's![@]PACKAGE_VERSION[@]!$(PACKAGE_VERSION)!g' \ $(srcdir)/libfcml.pc.in > $@ CLEANFILES = *.pc fcml-1.1.1/src/fcml_intel_rend.c0000644000175000017500000004160512560745216013451 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /* There is a bit of code duplication between GAS and Intel instruction renderers. * It evaluated up to this point due to historical reasons and it will be probably fixed in * the near future by providing one generic customizable rendering template as a base for * instruction renderers. */ #include "fcml_intel_rend.h" #include #include #include #include #include #include #include "fcml_common_dialect.h" #include "fcml_mnemonic_parser.h" #include "fcml_ceh.h" #include "fcml_dialect_int.h" #include "fcml_env_int.h" #include "fcml_rend_utils.h" #include "fcml_stream.h" #include "fcml_utils.h" #define FCML_REND_LOCAL_BUFFER_SIZE 512 fcml_string fcml_iarr_rend_utils_integer_formats_intel[6][4] = { /* Signed integer values.*/ {FCML_PRI_INT8_DEC, FCML_PRI_INT16_DEC, FCML_PRI_INT32_DEC, FCML_PRI_INT64_DEC}, /* Unsigned integer values.*/ {FCML_PRI_UINT8_DEC, FCML_PRI_UINT16_DEC, FCML_PRI_UINT32_DEC, FCML_PRI_UINT64_DEC}, /* Signed hex values.*/ {FCML_PRI_INT8_HEX FCML_TEXT("h"), FCML_PRI_INT16_HEX FCML_TEXT("h"), FCML_PRI_INT32_HEX FCML_TEXT("h"), FCML_PRI_INT64_HEX FCML_TEXT("h")}, /* Unsigned hex values.*/ {FCML_PRI_INT8_HEX FCML_TEXT("h"), FCML_PRI_INT16_HEX FCML_TEXT("h"), FCML_PRI_INT32_HEX FCML_TEXT("h"), FCML_PRI_INT64_HEX FCML_TEXT("h")}, /* Signed hex values without leading zeros. */ {FCML_PRI_INT8_HEX_NO_ZEROS FCML_TEXT("h"), FCML_PRI_INT16_HEX_NO_ZEROS FCML_TEXT("h"), FCML_PRI_INT32_HEX_NO_ZEROS FCML_TEXT("h"), FCML_PRI_INT64_HEX_NO_ZEROS FCML_TEXT("h")}, /* Unsigned hex values without leading zeros. */ {FCML_PRI_INT8_HEX_NO_ZEROS FCML_TEXT("h"), FCML_PRI_INT16_HEX_NO_ZEROS FCML_TEXT("h"), FCML_PRI_INT32_HEX_NO_ZEROS FCML_TEXT("h"), FCML_PRI_INT64_HEX_NO_ZEROS FCML_TEXT("h")} }; fcml_ceh_error fcml_ifn_rend_operand_renderer_immediate_intel( const fcml_st_render_config *config, const fcml_st_dialect_context_int *dialect_context, fcml_st_memory_stream *output_stream, const fcml_st_disassembler_result *result, const fcml_st_operand *operand, const fcml_st_operand_details *operand_details, fcml_bool *do_not_render ) { const fcml_st_integer *immediate = &( operand->immediate ); return fcml_fn_rend_utils_format_append_integer( fcml_iarr_rend_utils_integer_formats_intel, output_stream, immediate, config->render_flags & FCML_REND_FLAG_HEX_IMM, config->render_flags & FCML_REND_FLAG_REMOVE_LEADING_ZEROS ); } fcml_ceh_error fcml_ifn_rend_operand_renderer_reg_intel( const fcml_st_render_config *config, const fcml_st_dialect_context_int *dialect_context, fcml_st_memory_stream *output_stream, const fcml_st_disassembler_result *result, const fcml_st_operand *operand, const fcml_st_operand_details *operand_details, fcml_bool *do_not_render ) { fcml_fn_rend_utils_format_append_reg( dialect_context, output_stream, &( operand->reg ), result->instruction_details.prefixes_details.is_rex ); return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_ifn_rend_size_operator_intel( fcml_usize size_operator, fcml_string buffer, fcml_usize buffer_len, fcml_bool is_media_instruction ) { fcml_string size_operator_printable = NULL; switch ( size_operator ) { case 0: break; case 8: size_operator_printable = FCML_TEXT( "byte ptr " ); break; case 16: size_operator_printable = FCML_TEXT( "word ptr " ); break; case 32: size_operator_printable = FCML_TEXT( "dword ptr " ); break; case 48: size_operator_printable = FCML_TEXT( "fword ptr " ); break; case 64: size_operator_printable = is_media_instruction ? FCML_TEXT( "mmword ptr " ) : FCML_TEXT( "qword ptr " ); break; case 80: size_operator_printable = FCML_TEXT( "tbyte ptr " ); break; case 128: size_operator_printable = is_media_instruction ? FCML_TEXT( "xmmword ptr " ) : FCML_TEXT( "oword ptr " ); break; case 256: size_operator_printable = is_media_instruction ? FCML_TEXT( "ymmword ptr " ) : FCML_TEXT( "qqword " ); break; default: fcml_fn_env_str_snprintf( buffer, buffer_len, FCML_TEXT( "%dbyte ptr " ), size_operator / 8 ); break; } if ( size_operator_printable ) { fcml_fn_env_str_strncpy( buffer, size_operator_printable, buffer_len ); } return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_ifn_rend_operand_renderer_address_intel( const fcml_st_render_config *config, const fcml_st_dialect_context_int *dialect_context, fcml_st_memory_stream *output_stream, const fcml_st_disassembler_result *result, const fcml_st_operand *operand, const fcml_st_operand_details *operand_details, fcml_bool *do_not_render ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; const fcml_st_address *address = &( operand->address ); const fcml_st_prefixes_details *prefixes = &( result->instruction_details.prefixes_details ); fcml_hints hints = operand->hints; fcml_uint32_t render_flags = config->render_flags; if ( hints & FCML_OP_HINT_DISPLACEMENT_RELATIVE_ADDRESS ) { fcml_st_integer integer; fcml_ceh_error error = fcml_fn_utils_offset_to_integer( &( address->offset ), &integer ); if ( error ) { return error; } error = fcml_fn_rend_utils_format_append_integer( fcml_iarr_rend_utils_integer_formats_intel, output_stream, &integer, FCML_TRUE, config->render_flags & FCML_REND_FLAG_REMOVE_LEADING_ZEROS ); return error; } if ( address->size_operator > 0 ) { fcml_char buffer[32] = { 0 }; fcml_ifn_rend_size_operator_intel( address->size_operator, buffer, sizeof( buffer ), operand->hints & FCML_OP_HINT_MULTIMEDIA_INSTRUCTION ); fcml_fn_rend_utils_format_append_str( output_stream, buffer ); } if ( !address->segment_selector.is_default_reg || ( render_flags & FCML_REND_FLAG_RENDER_DEFAULT_SEG ) ) { fcml_fn_rend_utils_format_append_reg( dialect_context, output_stream, &( address->segment_selector.segment_selector ), prefixes->is_rex ); fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( ":" ) ); } fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "[" ) ); const fcml_st_effective_address *effective_address = &( address->effective_address ); fcml_bool first = FCML_TRUE; /* Adds SIB hints to all instructions where SIB presents.*/ if ( ( render_flags & FCML_REND_FLAG_RENDER_SIB_HINT ) && ( result->instruction_details.modrm_details.sib.is_not_null ) ) { fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "sib " ) ); } if ( ( render_flags & FCML_REND_FLAG_RENDER_ABS_HINT ) && ( operand->hints & FCML_OP_HINT_ABSOLUTE_ADDRESSING ) ) { fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "abs " ) ); } if ( ( render_flags & FCML_REND_FLAG_RENDER_REL_HINT ) && ( operand->hints & FCML_OP_HINT_RELATIVE_ADDRESSING ) ) { fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "rel " ) ); } if ( address->address_form == FCML_AF_COMBINED ) { /* Append base register.*/ if ( !fcml_fn_utils_is_reg_undef( &( effective_address->base ) ) ) { fcml_fn_rend_utils_format_append_reg( dialect_context, output_stream, &( effective_address->base ), prefixes->is_rex ); first = FCML_FALSE; } /* Append index register.*/ if ( !fcml_fn_utils_is_reg_undef( &( effective_address->index ) ) ) { fcml_fn_rend_utils_format_append_str_if( output_stream, FCML_TEXT( "+" ), !first ); fcml_fn_rend_utils_format_append_reg( dialect_context, output_stream, &( effective_address->index ), prefixes->is_rex ); first = FCML_FALSE; } /* Append scale.*/ if ( effective_address->scale_factor > 0 ) { fcml_fn_rend_utils_format_append_str_if( output_stream, FCML_TEXT( "*" ), !first ); first = FCML_FALSE; fcml_st_integer scale_value = { 0 }; scale_value.is_signed = FCML_FALSE; scale_value.size = 8; scale_value.int8 = (fcml_int8_t) effective_address->scale_factor; fcml_fn_rend_utils_format_append_integer( fcml_iarr_rend_utils_integer_formats_intel, output_stream, &scale_value, FCML_FALSE, FCML_FALSE ); } /* Displacement.*/ if ( effective_address->displacement.size > 0 ) { if ( ( render_flags & FCML_REND_FLAG_HEX_DISPLACEMENT ) || !fcml_fn_utils_is_displacement_negative( &( effective_address->displacement ) ) ) { fcml_fn_rend_utils_format_append_str_if( output_stream, FCML_TEXT( "+" ), !first ); first = FCML_FALSE; } error = fcml_fn_rend_utils_format_append_integer( fcml_iarr_rend_utils_integer_formats_intel, output_stream, &( effective_address->displacement ), config->render_flags & FCML_REND_FLAG_HEX_DISPLACEMENT, config->render_flags & FCML_REND_FLAG_REMOVE_LEADING_ZEROS ); } } else if ( address->address_form == FCML_AF_OFFSET ) { /* Offset.*/ fcml_st_integer integer; fcml_ceh_error error = fcml_fn_utils_offset_to_integer( &( address->offset ), &integer ); if ( error ) { return error; } error = fcml_fn_rend_utils_format_append_integer( fcml_iarr_rend_utils_integer_formats_intel, output_stream, &integer, FCML_TRUE, config->render_flags & FCML_REND_FLAG_REMOVE_LEADING_ZEROS ); } else { /* Unknown address form. */ error = FCML_CEH_GEC_INVALID_INPUT; } fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( "]" ) ); return error; } fcml_ceh_error fcml_ifn_rend_operand_renderer_far_pointer_intel( const fcml_st_render_config *config, const fcml_st_dialect_context_int *dialect_context, fcml_st_memory_stream *output_stream, const fcml_st_disassembler_result *result, const fcml_st_operand *operand, const fcml_st_operand_details *operand_details, fcml_bool *do_not_render ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_integer integer = { 0 }; integer.is_signed = FCML_TRUE; integer.size = 16; integer.int16 = operand->far_pointer.segment; fcml_fn_rend_utils_format_append_integer( fcml_iarr_rend_utils_integer_formats_intel, output_stream, &integer, FCML_TRUE, config->render_flags & FCML_REND_FLAG_REMOVE_LEADING_ZEROS ); fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( ":" ) ); integer.size = operand->far_pointer.offset_size; switch ( integer.size ) { case FCML_DS_16: integer.int16 = operand->far_pointer.offset16; break; case FCML_DS_32: integer.int32 = operand->far_pointer.offset32; break; } fcml_fn_rend_utils_format_append_integer( fcml_iarr_rend_utils_integer_formats_intel, output_stream, &integer, FCML_TRUE, config->render_flags & FCML_REND_FLAG_REMOVE_LEADING_ZEROS ); return error; } fcml_ceh_error fcml_ifn_rend_print_operand_intel( const fcml_st_render_config *config, const fcml_st_dialect_context_int *dialect_context, fcml_st_memory_stream *output_stream, const fcml_st_disassembler_result *result, fcml_int operand_index, fcml_bool *do_not_render ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; const fcml_st_operand *operand = &( result->instruction.operands[operand_index] ); switch ( operand->type ) { case FCML_OT_IMMEDIATE: error = fcml_ifn_rend_operand_renderer_immediate_intel( config, dialect_context, output_stream, result, operand, &( result->instruction_details.operand_details[operand_index] ), do_not_render ); break; case FCML_OT_FAR_POINTER: error = fcml_ifn_rend_operand_renderer_far_pointer_intel( config, dialect_context, output_stream, result, operand, &( result->instruction_details.operand_details[operand_index] ), do_not_render ); break; case FCML_OT_ADDRESS: error = fcml_ifn_rend_operand_renderer_address_intel( config, dialect_context, output_stream, result, operand, &( result->instruction_details.operand_details[operand_index] ), do_not_render ); break; case FCML_OT_REGISTER: error = fcml_ifn_rend_operand_renderer_reg_intel( config, dialect_context, output_stream, result, operand, &( result->instruction_details.operand_details[operand_index] ), do_not_render ); break; case FCML_OT_NONE: break; default: error = FCML_CEH_GEC_INVALID_INPUT; } return error; } fcml_string fcml_ifn_rend_get_conditional_suffix_intel( fcml_int condition, fcml_uint32_t render_flags ) { if ( render_flags & FCML_REND_FLAG_COND_SHOW_CARRY ) { if ( condition == 2 ) { return FCML_TEXT( "c" ); } else if ( condition == 3 ) { return FCML_TEXT( "nc" ); } } fcml_int group = ( render_flags & FCML_REND_FLAG_COND_GROUP_2 ) ? 1 : 0; return fcml_ar_asm_conditional_suffixes[group][condition]; } fcml_string fcml_ifn_rend_resolve_mnemonic_intel( const fcml_st_disassembler_result *result ) { const fcml_st_instruction *instruction = &( result->instruction ); if ( instruction->mnemonic ) { // If there is mnemonic already available use it instead on resolving it again. return instruction->mnemonic; } else { return NULL; } } fcml_ceh_error fcml_fn_rend_render_instruction_intel( const fcml_st_dialect *dialect_context, const fcml_st_render_config *config, fcml_st_memory_stream *output_stream, const fcml_st_disassembler_result *result ) { fcml_st_dialect_context_int *dialect_context_int = (fcml_st_dialect_context_int*) dialect_context; fcml_char local_buffer[FCML_REND_LOCAL_BUFFER_SIZE] = { 0 }; fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_uint32_t render_flags = config->render_flags; /* Local stream. */ fcml_st_memory_stream local_stream; local_stream.base_address = local_buffer; local_stream.size = sizeof( local_buffer ); local_stream.offset = 0; /* Instruction code. */ if ( render_flags & FCML_REND_FLAG_RENDER_CODE ) { fcml_fn_rend_utils_format_append_code( config, output_stream, result->instruction_details.instruction_code, result->instruction_details.instruction_size ); } fcml_int len = 0; /* Instruction prefixes like LOCK. */ len += fcml_ifn_rend_utils_print_prefixes( output_stream, &( result->instruction_details.prefixes_details ), render_flags ); /* Mnemonic.*/ len += fcml_fn_rend_utils_format_append_str( output_stream, fcml_ifn_rend_resolve_mnemonic_intel( result ) ); /* Short form, so operands should be ignored. */ if ( result->instruction_details.is_shortcut ) { return error; } /* Add hints.*/ if ( result->instruction.hints & FCML_HINT_FAR_POINTER ) { len += fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( " far" ) ); } if ( ( render_flags & FCML_REND_FLAG_RENDER_INDIRECT_HINT ) && ( result->instruction.hints & FCML_HINT_INDIRECT_POINTER ) ) { len += fcml_fn_rend_utils_format_append_str( output_stream, FCML_TEXT( " indirect" ) ); } /* Add all operands.*/ fcml_bool first_render = FCML_TRUE; fcml_int i; for ( i = 0; i < FCML_OPERANDS_COUNT; i++ ) { if ( result->instruction.operands[i].type != FCML_OT_NONE ) { fcml_bool do_not_render = FCML_FALSE; error = fcml_ifn_rend_print_operand_intel( config, dialect_context_int, &local_stream, result, i, &do_not_render ); if ( !error ) { if ( !do_not_render ) { first_render = fcml_fn_rend_utils_render_operand_separator( config, output_stream, len, first_render ); fcml_fn_rend_utils_format_append_stream( output_stream, &local_stream ); fcml_fn_stream_clean( &local_stream ); } } else { break; } } else { break; } } fcml_fn_rend_utils_format_finish_str( output_stream ); return error; } fcml-1.1.1/src/fcml_hints.h0000644000175000017500000000355012560745216012455 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_HINTS_H_ #define FCML_HINTS_H_ #include #include "fcml_def.h" typedef struct fcml_st_hts_calculated_hints { fcml_hints instruction_hints; fcml_hints operand_hints; } fcml_st_hts_calculated_hints; typedef fcml_st_hts_calculated_hints (*fcml_fp_hts_instruction_hints_calculator)( fcml_st_def_addr_mode_desc *addr_mode, fcml_st_def_decoded_addr_mode *decoded_addr_mode ); fcml_st_hts_calculated_hints fcml_fn_hts_ihc_far_pointer( fcml_st_def_addr_mode_desc *addr_mode, fcml_st_def_decoded_addr_mode *decoded_addr_mode ); fcml_st_hts_calculated_hints fcml_fn_hts_ihc_modrm_hints( fcml_st_def_addr_mode_desc *addr_mode, fcml_st_def_decoded_addr_mode *decoded_addr_mode ); fcml_st_hts_calculated_hints fcml_fn_hts_ihc_immediate_dis_relative( fcml_st_def_addr_mode_desc *addr_mode, fcml_st_def_decoded_addr_mode *decoded_addr_mode ); fcml_st_hts_calculated_hints fcml_fn_hts_ihc_pseudo_opcode( fcml_st_def_addr_mode_desc *addr_mode, fcml_st_def_decoded_addr_mode *decoded_addr_mode ); #endif /* FCML_HINTS_H_ */ fcml-1.1.1/src/fcml_disassembler.c0000644000175000017500000030043212560761201013767 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_disassembler.h" #include #include #include "fcml_coll.h" #include "fcml_decoding_tree.h" #include "fcml_def.h" #include "fcml_env_int.h" #include "fcml_hints.h" #include "fcml_mnemonic_parser.h" #include "fcml_modrm.h" #include "fcml_modrm_decoder.h" #include "fcml_stream.h" #include "fcml_utils.h" #include "fcml_dialect_int.h" #include "fcml_trace.h" #include "fcml_messages.h" /* R,X and B are stored in 1's complement form.*/ #define FCML_VEX_W(x) FCML_TP_GET_BIT(x, 7) #define FCML_VEX_R(x) !FCML_TP_GET_BIT(x, 7) #define FCML_VEX_X(x) !FCML_TP_GET_BIT(x, 6) #define FCML_VEX_B(x) !FCML_TP_GET_BIT(x, 5) #define FCML_VEX_L(x) FCML_TP_GET_BIT(x, 2) #define FCML_VEX_MMMM(x) ( x & 0x1F ) #define FCML_VEX_VVVV(x) ( ~( ( x & 0x78 ) >> 3 ) & 0x00F ) #define FCML_VEX_PP(x) ( x & 0x03 ) /* REX prefix fields.*/ #define FCML_REX_W(x) FCML_TP_GET_BIT(x, 3) #define FCML_REX_R(x) FCML_TP_GET_BIT(x, 2) #define FCML_REX_X(x) FCML_TP_GET_BIT(x, 1) #define FCML_REX_B(x) FCML_TP_GET_BIT(x, 0) typedef struct fcml_ist_dasm_operand_wrapper { fcml_st_operand operand; fcml_en_access_mode access_mode; } fcml_ist_dasm_operand_wrapper; /* Definition is located below.*/ struct fcml_ist_dasm_instruction_decoding_def; typedef struct fcml_ist_dasm_decoding_context { fcml_st_disassembler_context *disassembler_context; fcml_st_ceh_error_container errors; fcml_st_memory_stream *stream; fcml_st_mp_mnemonic_set *mnemonics; fcml_en_pseudo_operations pseudo_op; fcml_uint64_t instruction_group; fcml_en_instruction instruction; fcml_uint16_t addr_mode; fcml_usize effective_address_size_attribute; fcml_usize effective_operand_size_attribute; fcml_int calculated_instruction_size; fcml_uint8_t opcodes[FCML_OPCODES_NUM]; fcml_uint8_t primary_opcode_byte; fcml_int opcodes_count; fcml_int virtual_opcodes_count; fcml_st_prefixes_details prefixes; fcml_ist_dasm_operand_wrapper operand_wrappers[FCML_OPERANDS_COUNT]; fcml_st_modrm decoded_modrm; fcml_st_modrm_details decoded_modrm_details; fcml_bool is_modrm; fcml_hints instruction_hints; fcml_nuint8_t pseudo_opcode; fcml_nuint8_t suffix; /* Opcode fields.*/ fcml_st_condition condition; fcml_bool is_conditional; fcml_bool opcode_field_w_bit; fcml_bool opcode_field_s_bit; /* is4/is5 byte.*/ fcml_nuint8_t isX_byte; /* Currently proceeded decoding definition.*/ struct fcml_ist_dasm_instruction_decoding_def *decoding_def; } fcml_ist_dasm_decoding_context; typedef struct fcml_ist_dasm_disassembler { fcml_st_dialect_context_int *dialect_context; fcml_st_dt_decoding_tree *decoding_tree; } fcml_ist_dasm_disassembler; /* Decoders responsible for operand disassembling. */ typedef fcml_ceh_error (*fcml_ifp_dasm_operand_decoder)( struct fcml_ist_dasm_decoding_context *context, fcml_ist_dasm_operand_wrapper *operand, fcml_ptr args ); /* Calculates the size of the encoded operand in bytes. */ typedef fcml_int (*fcml_ifp_dasm_operand_size_calculator)( struct fcml_ist_dasm_decoding_context *context, fcml_ptr args ); /* Decoders responsible for instruction disassembling. */ typedef fcml_ceh_error (*fcml_ifp_dasm_instruction_decoder)( fcml_ist_dasm_decoding_context *context, struct fcml_ist_dasm_instruction_decoding_def *instruction_decoding_def ); typedef fcml_bool (*fcml_ifp_dasm_instruction_acceptor)( fcml_ist_dasm_decoding_context *context, struct fcml_ist_dasm_instruction_decoding_def *instruction_decoding_def ); typedef struct fcml_ist_dasm_addr_mode_acceptor_chain { struct fcml_ist_dasm_addr_mode_acceptor_chain *next; fcml_ifp_dasm_instruction_acceptor acceptor; } fcml_ist_dasm_addr_mode_acceptor_chain; typedef struct fcml_ist_dasm_operand_decoding { /* Operand access mode.*/ fcml_st_def_decoded_addr_mode *decoded_addr_mode; /* Operand decoder.*/ fcml_ifp_dasm_operand_decoder decoder; /* Calculates size of the encoded operand in bytes.*/ fcml_ifp_dasm_operand_size_calculator size_calculator; /* Optional hints, if operand has any.*/ fcml_hints hints; } fcml_ist_dasm_operand_decoding; typedef struct fcml_ist_dasm_modrm_decoding_details { /* True if vector-index memory addressing is used.*/ fcml_bool is_vsib; /* Vector register size.*/ fcml_usize vsib_index_size; /* True if addressing mode is restricted only to register.*/ fcml_bool is_reg_restriction; /* True if addressing mode is restricted only to memory.*/ fcml_bool is_mem_restriction; } fcml_ist_dasm_modrm_decoding_details; typedef struct fcml_ist_dasm_instruction_decoding_def { /* Instruction code. */ fcml_en_instruction instruction; /* Addressing mode.*/ fcml_uint16_t addr_mode; /* Type of the instruction.*/ fcml_uint64_t instruction_group; /* Opcodes. */ fcml_uint8_t opcodes[FCML_OPCODES_NUM]; /* Instruction mnemonic */ fcml_st_mp_mnemonic_set *mnemonics; /* Flags that describe prefixes usage. */ fcml_uint16_t prefixes_flags; /* Flags that describe some details of opcodes. */ fcml_uint32_t opcode_flags; /* Instruction decoder. */ fcml_ifp_dasm_instruction_decoder instruction_decoder; /* Chain of address mode acceptors registered for given addressing mode. */ fcml_ist_dasm_addr_mode_acceptor_chain *instruction_acceptors_chain; /* Function used to decode instruction operands. */ fcml_ist_dasm_operand_decoding operand_decodings[FCML_OPERANDS_COUNT]; /* Instruction decoding order, for information purpose only. */ fcml_int order; /* Instruction level hints.*/ fcml_hints hints; /* ModRM details.*/ fcml_ist_dasm_modrm_decoding_details modrm_details; } fcml_ist_dasm_instruction_decoding_def; /* Instruction decoder for IA instruction set, currently it is the only one supported decoder.*/ fcml_ceh_error fcml_ifn_dasm_instruction_decoder_IA( fcml_ist_dasm_decoding_context *decoding_context, fcml_ist_dasm_instruction_decoding_def *instruction_decoding_def ); /********************* * Utility functions. *********************/ void fcml_ifn_dasm_utils_set_x64_exp( fcml_st_register *reg, fcml_bool is_rex ) { if ( is_rex ) { reg->x64_exp = ( reg->type == FCML_REG_GPR && reg->size == FCML_DS_8 && reg->reg >= 4 && reg->reg <= 7 ); } else { reg->x64_exp = FCML_FALSE; } } void fcml_ifn_dasm_utils_set_segment_selector( fcml_st_segment_selector *seg_sel, fcml_uint8_t seg_reg, fcml_bool is_default ) { seg_sel->is_default_reg = is_default; fcml_st_register *reg_seg = &( seg_sel->segment_selector ); reg_seg->reg = seg_reg; reg_seg->size = FCML_DS_16; reg_seg->type = FCML_REG_SEG; reg_seg->x64_exp = FCML_FALSE; } fcml_uint8_t fcml_ifn_dasm_utils_override_segment_reg( fcml_ist_dasm_decoding_context *context, fcml_uint8_t reg ) { fcml_int i; for ( i = 0; i < context->prefixes.prefixes_count; i++ ) { fcml_st_instruction_prefix *prefix = &( context->prefixes.prefixes[i] ); if ( prefix->prefix_type == FCML_PT_GROUP_2 && !prefix->mandatory_prefix ) { switch ( prefix->prefix ) { case 0x2E: reg = FCML_REG_CS; break; case 0x36: reg = FCML_REG_SS; break; case 0x3E: reg = FCML_REG_DS; break; case 0x26: reg = FCML_REG_ES; break; case 0x64: reg = FCML_REG_FS; break; case 0x65: reg = FCML_REG_GS; break; } } } return reg; } fcml_ceh_error fcml_ifn_dasm_utils_decode_segment_selector( fcml_ist_dasm_decoding_context *context, fcml_st_segment_selector *selector, fcml_uint8_t encoded_segment_reg ) { fcml_uint8_t seg_reg = ~FCML_SEG_ALLOW_OVERRIDE & encoded_segment_reg; if ( encoded_segment_reg & FCML_SEG_ALLOW_OVERRIDE ) { fcml_uint8_t tmp = seg_reg; seg_reg = fcml_ifn_dasm_utils_override_segment_reg( context, seg_reg ); selector->is_default_reg = ( seg_reg == tmp ); } else { selector->is_default_reg = FCML_TRUE; } selector->segment_selector.reg = seg_reg; selector->segment_selector.size = FCML_DS_16; selector->segment_selector.type = FCML_REG_SEG; selector->segment_selector.x64_exp = FCML_FALSE; return FCML_CEH_GEC_NO_ERROR; } fcml_usize fcml_ifn_dasm_utils_decode_encoded_size_value( fcml_ist_dasm_decoding_context *context, fcml_uint8_t encoded_size ) { fcml_usize result = 0; fcml_uint8_t size = ( encoded_size & ~FCML_EOS_OPT ); if ( size >= FCML_EOS_DYNAMIC_BASE ) { switch ( size ) { case FCML_EOS_EOSA: result = context->effective_operand_size_attribute; break; case FCML_EOS_EASA: result = context->effective_address_size_attribute; break; case FCML_EOS_L: result = ( context->prefixes.l ) ? FCML_DS_256 : FCML_DS_128; break; case FCML_EOS_14_28: result = ( context->effective_operand_size_attribute == FCML_DS_16 ) ? ( 14 * 8 ) : ( 28 * 8 ); break; case FCML_EOS_94_108: result = ( context->effective_operand_size_attribute == FCML_DS_16 ) ? ( 94 * 8 ) : ( 108 * 8 ); break; case FCML_EOS_32_64: result = ( context->effective_operand_size_attribute == FCML_DS_16 ) ? ( 16 * 2 ) : ( 32 * 2 ); break; case FCML_EOS_FP: case FCML_EOS_FPI: result = context->effective_operand_size_attribute + 16; break; } } else { result = size * 8; } return result; } /*********************************** * Decoding tree related functions. ***********************************/ int fcml_ifn_dasm_dts_calculate_decoding_order( fcml_ist_dasm_instruction_decoding_def *decoding ) { fcml_uint16_t prefixes = decoding->prefixes_flags; fcml_uint32_t opcodes = decoding->opcode_flags; int order = 0; /* Mandatory prefix. */ if ( FCML_DEF_PREFIX_MANDATORY_66( prefixes ) | FCML_DEF_PREFIX_MANDATORY_F2( prefixes ) | FCML_DEF_PREFIX_MANDATORY_F3( prefixes ) ) { order += 3; } /* Opcode extension. */ if ( FCML_DEF_OPCODE_FLAGS_OPCODE_IS_EXT( opcodes ) ) { order++; } /* VEX and XOP prefixes. */ if ( FCML_DEF_PREFIX_VEX_REQ( prefixes ) || FCML_DEF_PREFIX_XOP_REQ( prefixes ) ) { order++; } /* REX prefix. */ if ( FCML_DEF_PREFIX_W_1( prefixes ) || FCML_DEF_PREFIX_W_0( prefixes ) || FCML_DEF_PREFIX_L_1( prefixes ) || FCML_DEF_PREFIX_L_0( prefixes ) ) { order += 2; } return order; } fcml_ifp_dasm_instruction_decoder fcml_ifn_dasm_dts_choose_instruction_decoder( fcml_uint8_t instruction_type ) { switch ( instruction_type ) { case FCML_EN_IT_IA: /* Currently only IA decoder is supported. */ return &fcml_ifn_dasm_instruction_decoder_IA; } return NULL; } /***********************/ /** Operand decoders. **/ /***********************/ /********************/ /* Immediate value. */ /********************/ fcml_ceh_error fcml_ifn_dasm_operand_decoder_imm( fcml_ist_dasm_decoding_context *context, fcml_ist_dasm_operand_wrapper *operand_wrapper, fcml_ptr args ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_sf_def_tma_imm *imm_args = (fcml_sf_def_tma_imm *) args; fcml_st_operand *operand = &( operand_wrapper->operand ); fcml_st_integer *immediate = &( operand->immediate ); fcml_st_memory_stream *stream = context->stream; operand->type = FCML_OT_IMMEDIATE; fcml_usize size = fcml_ifn_dasm_utils_decode_encoded_size_value( context, imm_args->encoded_size ); /* Correct calculated IMM size if 64 bit IMM is not supported by addressing mode.*/ if ( size == FCML_DS_64 && !imm_args->is_64bit_imm_allowed ) { size = FCML_DS_32; } fcml_usize size_ex = fcml_ifn_dasm_utils_decode_encoded_size_value( context, imm_args->encoded_ex_size ); if ( size_ex == FCML_DS_UNDEF ) { /* check if S opcode field is set.*/ if ( size == FCML_DS_8 && context->opcode_field_s_bit ) { size_ex = context->effective_operand_size_attribute; } else { size_ex = size; } } /* All immediate integers are signed.*/ immediate->is_signed = FCML_TRUE; error = fcml_fn_utils_decode_integer( stream, immediate, size ); if ( error ) { return error; } if ( size_ex != size ) { error = fcml_fn_utils_convert_integer_to_integer( immediate, immediate, size, size_ex ); if ( error ) { return error; } } return error; } fcml_int fcml_ifn_dasm_operand_size_calculator_imm( fcml_ist_dasm_decoding_context *context, fcml_ptr args ) { fcml_sf_def_tma_imm *imm_args = (fcml_sf_def_tma_imm *) args; fcml_int size = fcml_ifn_dasm_utils_decode_encoded_size_value( context, imm_args->encoded_size ) / 8; /* 8 bytes IMM size is only supported for instructions with following flag set.*/ if ( size == 8 && !imm_args->is_64bit_imm_allowed ) { size = 4; } return size; } /**********************/ /* Explicit register. */ /**********************/ fcml_ceh_error fcml_ifn_dasm_operand_decoder_explicit_reg( fcml_ist_dasm_decoding_context *context, fcml_ist_dasm_operand_wrapper *operand_wrapper, fcml_ptr args ) { fcml_st_operand *operand = &( operand_wrapper->operand ); fcml_sf_def_tma_explicit_reg *reg_args = (fcml_sf_def_tma_explicit_reg*) args; operand->type = FCML_OT_REGISTER; operand->reg.reg = reg_args->reg_num; operand->reg.type = (fcml_en_register) reg_args->reg_type; operand->reg.size = fcml_ifn_dasm_utils_decode_encoded_size_value( context, reg_args->encoded_reg_size ); return FCML_CEH_GEC_NO_ERROR; } /**************************************/ /* Explicit register base addressing. */ /**************************************/ fcml_ceh_error fcml_ifn_dasm_operand_decoder_explicit_gps_reg_addressing( fcml_ist_dasm_decoding_context *context, fcml_ist_dasm_operand_wrapper *operand_wrapper, fcml_ptr args ) { fcml_st_operand *operand = &( operand_wrapper->operand ); fcml_st_address *address = &( operand->address ); fcml_st_effective_address *effective_address = &( address->effective_address ); operand->type = FCML_OT_ADDRESS; address->address_form = FCML_AF_COMBINED; fcml_sf_def_tma_explicit_gps_reg_addressing *reg_addr_args = (fcml_sf_def_tma_explicit_gps_reg_addressing*) args; /* Size operator.*/ address->size_operator = fcml_ifn_dasm_utils_decode_encoded_size_value( context, reg_addr_args->encoded_operand_size ); /* Base register.*/ effective_address->base.size = context->effective_address_size_attribute; effective_address->base.reg = reg_addr_args->reg_num; effective_address->base.type = FCML_REG_GPR; /* Segment register.*/ return fcml_ifn_dasm_utils_decode_segment_selector( context, &( address->segment_selector ), reg_addr_args->encoded_segment_register ); } /********************/ /* Opcode register. */ /********************/ fcml_ceh_error fcml_ifn_dasm_operand_decoder_opcode_reg( fcml_ist_dasm_decoding_context *context, fcml_ist_dasm_operand_wrapper *operand_wrapper, fcml_ptr args ) { fcml_sf_def_tma_opcode_reg *reg_args = (fcml_sf_def_tma_opcode_reg*) args; fcml_uint8_t reg_num = context->primary_opcode_byte & 0x07; if ( context->prefixes.b ) { reg_num |= 0x08; } /* Size operator.*/ operand_wrapper->operand.type = FCML_OT_REGISTER; fcml_st_register *reg = &( operand_wrapper->operand.reg ); /* Base register.*/ reg->size = fcml_ifn_dasm_utils_decode_encoded_size_value( context, reg_args->encoded_reg_size ); reg->type = (fcml_en_register) reg_args->reg_type; reg->reg = reg_num; return FCML_CEH_GEC_NO_ERROR; } /************************************/ /* Immediate displacement relative. */ /************************************/ fcml_ceh_error fcml_ifn_dasm_operand_decoder_immediate_dis_relative( fcml_ist_dasm_decoding_context *context, fcml_ist_dasm_operand_wrapper *operand_wrapper, fcml_ptr args ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_sf_def_tma_immediate_dis_relative *rel_args = (fcml_sf_def_tma_immediate_dis_relative*) args; fcml_usize int_size = 0; fcml_int32_t offset32; fcml_int16_t offset16; // Just in case. if ( FCML_IS_EOS_DYNAMIC( rel_args->encoded_size ) ) { FCML_TRACE_MSG("Currently dynamically calculated IMM size is not supported here."); return FCML_CEH_GEC_INTERNAL_ERROR; } fcml_st_entry_point *entry_point = &( context->disassembler_context->entry_point ); if ( rel_args->encoded_size != FCML_EOS_UNDEFINED ) { int_size = rel_args->encoded_size * 8; } else { if ( context->effective_operand_size_attribute == FCML_DS_16 && entry_point->op_mode == FCML_OM_64_BIT ) { fcml_fn_ceh_add_error( &( context->errors ), fcml_fn_msg_get_message( FCML_MC_CEH_GEC_INVALID_ADDRESSING_MODE ), FCML_CEH_MEW_WARN_INVALID_ADDRESSING_MODE, FCML_EN_CEH_EL_WARN ); } int_size = FCML_DS_32; /* For 32 and 64 bit addressing, 32 bit immediate value should be used.*/ /* Only for 16 bit addressing value differs and is equal to 16.*/ if ( context->effective_operand_size_attribute == FCML_DS_16 ) { int_size = FCML_DS_16; } } fcml_st_integer integer; integer.is_signed = FCML_TRUE; /* Read displacement value from stream.*/ error = fcml_fn_utils_decode_integer( context->stream, &integer, int_size ); if ( error ) { return error; } operand_wrapper->operand.type = FCML_OT_ADDRESS; operand_wrapper->operand.address.address_form = FCML_AF_OFFSET; fcml_st_offset *offset = &( operand_wrapper->operand.address.offset ); offset->is_signed = FCML_TRUE; /* Calculate offset relative to IP.*/ fcml_ip ip = entry_point->ip; switch ( context->effective_operand_size_attribute ) { case FCML_DS_16: error = fcml_fn_utils_convert_integer_to_int16( &integer, &offset16 ); if ( !error ) { offset->off16 = ( (fcml_int32_t) ip + context->calculated_instruction_size + offset16 ) & 0x0000FFFF; offset->size = FCML_DS_16; } break; case FCML_DS_32: error = fcml_fn_utils_convert_integer_to_int32( &integer, &offset32 ); if ( !error ) { offset->off32 = ( (fcml_int32_t) ip + context->calculated_instruction_size + offset32 ); offset->size = FCML_DS_32; } break; case FCML_DS_64: error = fcml_fn_utils_convert_integer_to_int32( &integer, &offset32 ); if ( !error ) { offset->off64 = ( (fcml_int64_t) ip + context->calculated_instruction_size + offset32 ); offset->size = FCML_DS_64; } break; } /* Sets CS segment register.*/ fcml_ifn_dasm_utils_set_segment_selector( &( operand_wrapper->operand.address.segment_selector ), FCML_REG_CS, FCML_TRUE ); return error; } fcml_int fcml_ifn_dasm_operand_size_calculator_immediate_dis_relative( fcml_ist_dasm_decoding_context *context, fcml_ptr args ) { fcml_sf_def_tma_immediate_dis_relative *rel_args = (fcml_sf_def_tma_immediate_dis_relative*) args; fcml_int size; if ( rel_args->encoded_size != FCML_EOS_UNDEFINED ) { size = rel_args->encoded_size; } else { size = ( context->effective_operand_size_attribute == FCML_DS_16 ) ? FCML_DS_16 / 8 : FCML_DS_32 / 8; } return size; } /***************/ /* Far pointer */ /***************/ fcml_ceh_error fcml_ifn_dasm_operand_decoder_far_pointer( fcml_ist_dasm_decoding_context *context, fcml_ist_dasm_operand_wrapper *operand_wrapper, fcml_ptr args ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_operand *operand = &( operand_wrapper->operand ); fcml_st_far_pointer *far_pointer = &( operand->far_pointer ); fcml_bool result; operand->type = FCML_OT_FAR_POINTER; switch ( context->effective_operand_size_attribute ) { case FCML_DS_16: far_pointer->offset16 = (fcml_int16_t) fcml_fn_stream_read_word( context->stream, &result ); break; case FCML_DS_32: far_pointer->offset32 = (fcml_int32_t) fcml_fn_stream_read_dword( context->stream, &result ); break; default: error = FCML_CEH_GEC_INVALID_OPERATING_MODE; break; } far_pointer->offset_size = context->effective_operand_size_attribute; far_pointer->segment = fcml_fn_stream_read_word( context->stream, &result ); if ( !result ) { return FCML_CEH_GEC_EOF; } if ( !result ) { error = FCML_CEH_GEC_EOF; } return error; } fcml_int fcml_ifn_dasm_operand_size_calculator_far_pointer( fcml_ist_dasm_decoding_context *context, fcml_ptr args ) { return context->effective_operand_size_attribute / 8 + 2; } /****************************/ /* Explicit 8-bits integer. */ /****************************/ fcml_ceh_error fcml_ifn_dasm_operand_decoder_explicit_ib( fcml_ist_dasm_decoding_context *context, fcml_ist_dasm_operand_wrapper *operand_wrapper, fcml_ptr args ) { fcml_sf_def_tma_explicit_ib *imm_args = (fcml_sf_def_tma_explicit_ib*) args; fcml_st_operand *operand = &( operand_wrapper->operand ); fcml_st_integer *immediate = &( operand->immediate ); operand->type = FCML_OT_IMMEDIATE; immediate->is_signed = FCML_TRUE; immediate->size = FCML_DS_8; immediate->int8 = imm_args->ib; return FCML_CEH_GEC_NO_ERROR; } /***************************/ /* Segment relative offset */ /***************************/ fcml_ceh_error fcml_ifn_dasm_operand_decoder_segment_relative_offset( fcml_ist_dasm_decoding_context *context, fcml_ist_dasm_operand_wrapper *operand_wrapper, fcml_ptr args ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_sf_def_tma_segment_relative_offset *seg_args = (fcml_sf_def_tma_segment_relative_offset*) args; fcml_st_operand *operand = &( operand_wrapper->operand ); fcml_st_address *address = &( operand->address ); fcml_st_offset *offset = &( address->offset ); fcml_bool result; error = fcml_ifn_dasm_utils_decode_segment_selector( context, &( address->segment_selector ), seg_args->encoded_segment_register ); if ( error ) { return error; } address->size_operator = fcml_ifn_dasm_utils_decode_encoded_size_value( context, seg_args->encoded_operand_size ); address->address_form = FCML_AF_OFFSET; operand->type = FCML_OT_ADDRESS; switch ( context->effective_address_size_attribute ) { case FCML_DS_16: offset->off16 = fcml_fn_stream_read_word( context->stream, &result ); break; case FCML_DS_32: offset->off32 = fcml_fn_stream_read_dword( context->stream, &result ); break; case FCML_DS_64: offset->off64 = fcml_fn_stream_read_qword( context->stream, &result ); break; default: error = FCML_CEH_GEC_INVALID_OPERATING_MODE; break; } offset->size = context->effective_address_size_attribute; if ( !result ) { error = FCML_CEH_GEC_EOF; } return error; } fcml_int fcml_ifn_dasm_operand_size_calculator_segment_relative_offset( fcml_ist_dasm_decoding_context *context, fcml_ptr args ) { return context->effective_address_size_attribute / 8; } /**************/ /* ModRM - RM */ /**************/ fcml_ceh_error fcml_ifn_dasm_operand_decoder_rm( fcml_ist_dasm_decoding_context *context, fcml_ist_dasm_operand_wrapper *operand_wrapper, fcml_ptr args ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_modrm *decoded_modrm = &( context->decoded_modrm ); fcml_st_operand *operand = &( operand_wrapper->operand ); fcml_sf_def_tma_rm *rm_args = (fcml_sf_def_tma_rm*) args; if ( ( rm_args->flags & FCML_RMF_R ) && decoded_modrm->reg.is_not_null ) { operand->type = FCML_OT_REGISTER; operand->reg.reg = decoded_modrm->reg.value; operand->reg.type = (fcml_en_register) rm_args->reg_type; operand->reg.size = fcml_ifn_dasm_utils_decode_encoded_size_value( context, rm_args->encoded_register_operand_size ); fcml_ifn_dasm_utils_set_x64_exp( &( operand->reg ), context->prefixes.is_rex ); } else if ( rm_args->flags & FCML_RMF_M ) { operand->type = FCML_OT_ADDRESS; fcml_st_address *address = &( operand->address ); *address = decoded_modrm->address; address->size_operator = fcml_ifn_dasm_utils_decode_encoded_size_value( context, rm_args->encoded_memory_operand_size ); if ( decoded_modrm->is_rip ) { /* We known the instruction size, so post processing is not needed and RIP can be calculated now.*/ error = fcml_fn_modrm_decode_rip( (fcml_uint64_t) context->disassembler_context->entry_point.ip + context->calculated_instruction_size, context->effective_address_size_attribute, &( address->offset ), &( address->offset ) ); } /* Segment registers.*/ fcml_st_effective_address *effective_address = &( address->effective_address ); fcml_st_segment_selector *segment_selector = &( address->segment_selector ); segment_selector->segment_selector.type = FCML_REG_SEG; segment_selector->segment_selector.size = FCML_DS_16; if ( context->decoding_def->instruction_group & FCML_AMT_BRANCH ) { /* For all branches only CS segment register is used. Segment override prefixes are ignored in this case.*/ segment_selector->segment_selector.reg = FCML_REG_CS; segment_selector->is_default_reg = FCML_TRUE; } else { if ( effective_address->base.type == FCML_REG_GPR && ( effective_address->base.reg == FCML_REG_BP || effective_address->base.reg == FCML_REG_SP ) ) { segment_selector->segment_selector.reg = FCML_REG_SS; segment_selector->is_default_reg = FCML_TRUE; } else { segment_selector->segment_selector.reg = fcml_ifn_dasm_utils_override_segment_reg( context, FCML_REG_DS ); segment_selector->is_default_reg = ( segment_selector->segment_selector.reg == FCML_REG_DS ) ? FCML_TRUE : FCML_FALSE; } } /* These hints aren't used in 32 bit addressing mode.*/ if ( ( context->disassembler_context->entry_point.op_mode == FCML_OM_64_BIT ) && ( address->address_form == FCML_AF_OFFSET ) ) { operand->hints |= context->decoded_modrm.is_rip ? FCML_OP_HINT_RELATIVE_ADDRESSING : FCML_OP_HINT_ABSOLUTE_ADDRESSING; } } else { error = FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } return error; } /************************/ /* Far pointer indirect */ /************************/ fcml_sf_def_tma_rm fcml_isst_dasm_far_pointer_indirect_args = { FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_FPI, FCML_RMF_M, 0, FCML_FALSE }; fcml_ceh_error fcml_ifn_dasm_operand_decoder_far_pointer_indirect( fcml_ist_dasm_decoding_context *context, fcml_ist_dasm_operand_wrapper *operand_wrapper, fcml_ptr args ) { fcml_sf_def_tma_rm rm_args = fcml_isst_dasm_far_pointer_indirect_args; return fcml_ifn_dasm_operand_decoder_rm( context, operand_wrapper, &rm_args ); } /*************/ /* ModRM - R */ /*************/ fcml_ceh_error fcml_ifn_dasm_operand_decoder_r( fcml_ist_dasm_decoding_context *context, fcml_ist_dasm_operand_wrapper *operand_wrapper, fcml_ptr args ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_sf_def_tma_r *r_args = (fcml_sf_def_tma_r*) args; operand_wrapper->operand.type = FCML_OT_REGISTER; fcml_st_register *reg = &( operand_wrapper->operand.reg ); reg->reg = context->decoded_modrm.reg_opcode; reg->type = r_args->reg_type; reg->size = fcml_ifn_dasm_utils_decode_encoded_size_value( context, r_args->encoded_register_operand_size ); fcml_ifn_dasm_utils_set_x64_exp( reg, context->prefixes.is_rex ); return error; } /********/ /* VVVV */ /********/ fcml_ceh_error fcml_ifn_dasm_operand_decoder_vex_vvvv( fcml_ist_dasm_decoding_context *context, fcml_ist_dasm_operand_wrapper *operand_wrapper, fcml_ptr args ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_sf_def_tma_vex_vvvv_reg *v_args = (fcml_sf_def_tma_vex_vvvv_reg*) args; operand_wrapper->operand.type = FCML_OT_REGISTER; fcml_st_register *reg = &( operand_wrapper->operand.reg ); reg->reg = context->prefixes.vvvv; reg->type = (fcml_en_register) v_args->reg_type; reg->size = fcml_ifn_dasm_utils_decode_encoded_size_value( context, v_args->encoded_register_size ); return error; } fcml_ceh_error fcml_ifn_dasm_operand_decoder_isX( fcml_ist_dasm_decoding_context *context, fcml_ist_dasm_operand_wrapper *operand_wrapper, fcml_ptr args ) { /* IS4/IS5 byte is located just after ModR/M field, so it doesn't have to be read in any post processors.*/ fcml_sf_def_tma_is *is_args = (fcml_sf_def_tma_is *) args; /* Read isX byte from stream, or get cached value from context.*/ fcml_uint8_t isX; if ( context->isX_byte.is_not_null ) { isX = context->isX_byte.value; } else { fcml_bool result; isX = fcml_fn_stream_read( context->stream, &result ); if ( !result ) { return FCML_CEH_GEC_EOF; } context->isX_byte.is_not_null = FCML_TRUE; context->isX_byte.value = isX; } /* IS4.*/ if ( ( is_args->flags & FCML_ISF_IS4 ) || ( is_args->flags & FCML_ISF_IS5_SRC ) ) { operand_wrapper->operand.type = FCML_OT_REGISTER; fcml_st_register *reg = &( operand_wrapper->operand.reg ); reg->reg = ( ( context->disassembler_context->entry_point.op_mode == FCML_OM_32_BIT ) ? ( 0x70 & isX ) : ( 0xF0 & isX ) ) >> 4; reg->type = FCML_REG_SIMD; reg->size = context->prefixes.l ? FCML_OS_YWORD : FCML_OS_XWORD; reg->x64_exp = FCML_FALSE; } else { /* IS5 - M2Z*/ operand_wrapper->operand.type = FCML_OT_IMMEDIATE; fcml_st_integer *imm = &( operand_wrapper->operand.immediate ); imm->is_signed = FCML_FALSE; imm->int8 = isX & 0x03; imm->size = FCML_DS_8; } return FCML_CEH_GEC_NO_ERROR; } fcml_int fcml_ifn_dasm_operand_size_calculator_isX( fcml_ist_dasm_decoding_context *context, fcml_ptr args ) { return 1; } fcml_ceh_error fcml_ifn_dasm_operand_decoder_pseudo_op( fcml_ist_dasm_decoding_context *context, fcml_ist_dasm_operand_wrapper *operand_wrapper, fcml_ptr args ) { fcml_bool result; fcml_uint8_t pseudo_op = fcml_fn_stream_read( context->stream, &result ); if ( !result ) { return FCML_CEH_GEC_EOF; } fcml_st_operand *operand = &( operand_wrapper->operand ); fcml_st_integer *immediate = &( operand->immediate ); operand->type = FCML_OT_IMMEDIATE; immediate->is_signed = FCML_TRUE; immediate->size = FCML_DS_8; immediate->int8 = pseudo_op; context->pseudo_opcode.is_not_null = FCML_TRUE; context->pseudo_opcode.value = pseudo_op; return FCML_CEH_GEC_NO_ERROR; } fcml_int fcml_ifn_dasm_operand_size_calculator_pseudo_op( fcml_ist_dasm_decoding_context *context, fcml_ptr args ) { return 1; } /****************************/ /* Operand decoders table. */ /****************************/ typedef struct fcml_ist_dasm_operand_decoder_def { fcml_ifp_dasm_operand_decoder decoder; fcml_ifp_dasm_operand_size_calculator size_calculator; fcml_fp_hts_instruction_hints_calculator hints_calculator; } fcml_ist_dasm_operand_decoder_def; fcml_ist_dasm_operand_decoder_def fcml_iarr_def_operand_decoders[] = { { NULL, NULL }, { fcml_ifn_dasm_operand_decoder_imm, fcml_ifn_dasm_operand_size_calculator_imm, NULL }, { fcml_ifn_dasm_operand_decoder_explicit_reg, NULL, NULL }, { fcml_ifn_dasm_operand_decoder_opcode_reg, NULL, NULL }, { fcml_ifn_dasm_operand_decoder_immediate_dis_relative, fcml_ifn_dasm_operand_size_calculator_immediate_dis_relative, fcml_fn_hts_ihc_immediate_dis_relative }, { fcml_ifn_dasm_operand_decoder_far_pointer, fcml_ifn_dasm_operand_size_calculator_far_pointer, fcml_fn_hts_ihc_far_pointer }, { fcml_ifn_dasm_operand_decoder_explicit_gps_reg_addressing, NULL, NULL }, { fcml_ifn_dasm_operand_decoder_explicit_ib, NULL, NULL }, { fcml_ifn_dasm_operand_decoder_segment_relative_offset, fcml_ifn_dasm_operand_size_calculator_segment_relative_offset, NULL }, { fcml_ifn_dasm_operand_decoder_rm, NULL, fcml_fn_hts_ihc_modrm_hints }, { fcml_ifn_dasm_operand_decoder_r, NULL, NULL }, { fcml_ifn_dasm_operand_decoder_vex_vvvv, NULL, NULL }, { fcml_ifn_dasm_operand_decoder_isX, fcml_ifn_dasm_operand_size_calculator_isX, NULL }, { fcml_ifn_dasm_operand_decoder_rm, NULL, NULL }, { fcml_ifn_dasm_operand_decoder_pseudo_op, fcml_ifn_dasm_operand_size_calculator_pseudo_op, fcml_fn_hts_ihc_pseudo_opcode } }; void fcml_ifn_dasm_dts_free_operand_decoding( fcml_ist_dasm_operand_decoding *operand_decoding ) { if ( operand_decoding->decoded_addr_mode ) { fcml_fnp_def_free_addr_mode( operand_decoding->decoded_addr_mode ); } } void fcml_ifn_dasm_dts_free_acceptors_chain( fcml_ist_dasm_addr_mode_acceptor_chain *chain ) { if ( !chain ) { return; } if ( chain->next ) { fcml_ifn_dasm_dts_free_acceptors_chain( chain->next ); } fcml_fn_env_memory_free( chain ); } void fcml_ifn_dasm_dts_free_decoding_def( fcml_ist_dasm_instruction_decoding_def *decoding ) { if ( decoding->mnemonics ) { fcml_fn_mp_free_mnemonics( decoding->mnemonics ); } int i; for ( i = 0; i < FCML_OPERANDS_COUNT; i++ ) { fcml_ifn_dasm_dts_free_operand_decoding( &( decoding->operand_decodings[i] ) ); } fcml_ifn_dasm_dts_free_acceptors_chain( decoding->instruction_acceptors_chain ); fcml_fn_env_memory_free( decoding ); } fcml_ceh_error fcml_ifn_dasm_dts_prepare_operand_decoding( fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_ist_dasm_operand_decoding *operand_decoding, fcml_uint32_t operand_def, fcml_hints *instruction_hints ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( operand_def == FCML_NA ) { return error; } operand_decoding->hints = 0; fcml_st_def_decoded_addr_mode *decoded_addr_mode = fcml_fn_def_decode_addr_mode_args( operand_def, &error ); if ( error ) { return error; } operand_decoding->decoded_addr_mode = decoded_addr_mode; fcml_ist_dasm_operand_decoder_def *operand_decoder_def = &( fcml_iarr_def_operand_decoders[decoded_addr_mode->addr_mode] ); operand_decoding->decoder = operand_decoder_def->decoder; operand_decoding->size_calculator = operand_decoder_def->size_calculator; if ( operand_decoder_def->hints_calculator ) { fcml_st_hts_calculated_hints hints = operand_decoder_def->hints_calculator( addr_mode_desc, decoded_addr_mode ); operand_decoding->hints |= hints.operand_hints; *instruction_hints |= hints.instruction_hints; } return error; } /********************* * Prefixes. *********************/ fcml_st_instruction_prefix* fcml_ifn_dasm_get_prefix_if_available( fcml_ist_dasm_decoding_context *context, fcml_uint8_t prefix_value ) { fcml_st_instruction_prefix* prefix = NULL; fcml_st_prefixes_details *prefixes = &( context->prefixes ); fcml_int prefix_count = prefixes->prefixes_count; fcml_int i; for ( i = 0; i < prefix_count; i++ ) { if ( prefixes->prefixes[i].prefix == prefix_value ) { prefix = &( prefixes->prefixes[i] ); break; } } return prefix; } fcml_bool fcml_ifn_dasm_is_prefix_available( fcml_ist_dasm_decoding_context *context, fcml_uint8_t prefix, fcml_bool mandatory ) { fcml_st_prefixes_details *prefixes = &( context->prefixes ); /* Handle VEX mandatory prefixes.*/ if ( mandatory && prefixes->is_vex && prefixes->pp ) { if ( prefixes->pp == 0x01 && prefix == 0x66 ) { return FCML_TRUE; } if ( prefixes->pp == 0x02 && prefix == 0xF3 ) { return FCML_TRUE; } if ( prefixes->pp == 0x03 && prefix == 0xF2 ) { return FCML_TRUE; } } fcml_st_instruction_prefix *found_prefix = fcml_ifn_dasm_get_prefix_if_available( context, prefix ); return mandatory ? ( found_prefix != NULL && found_prefix->mandatory_prefix ) : ( found_prefix != NULL ); } void fcml_ifn_dasm_clear_mandatory_flag( fcml_ist_dasm_decoding_context *context, fcml_uint8_t prefix_code ) { fcml_st_instruction_prefix *prefix = fcml_ifn_dasm_get_prefix_if_available( context, prefix_code ); if ( prefix ) { prefix->mandatory_prefix = FCML_FALSE; } } /******************************* * Effective attributes sizes. * *******************************/ fcml_usize fcml_ifn_dasm_calculate_effective_asa( fcml_ist_dasm_decoding_context *context ) { fcml_st_entry_point *entry_point = &( context->disassembler_context->entry_point ); fcml_usize effective_asa = entry_point->address_size_attribute; /* Checks if address size attribute is overridden.*/ if ( fcml_ifn_dasm_is_prefix_available( context, 0x67, FCML_FALSE ) ) { switch ( entry_point->op_mode ) { case FCML_OM_16_BIT: case FCML_OM_32_BIT: effective_asa = ( effective_asa == FCML_DS_32 ) ? FCML_DS_16 : FCML_DS_32; break; case FCML_OM_64_BIT: effective_asa = ( effective_asa == FCML_DS_32 ) ? FCML_DS_64 : FCML_DS_32; break; } } return effective_asa; } fcml_usize fcml_ifn_dasm_calculate_effective_osa( fcml_ist_dasm_decoding_context *context, fcml_uint32_t opcode_flags ) { fcml_st_instruction_prefix *prefix; fcml_st_entry_point *entry_point = &( context->disassembler_context->entry_point ); fcml_st_prefixes_details *prefixes = &( context->prefixes ); fcml_usize osa = entry_point->operand_size_attribute; /* Gets effective address-size attribute for used mode.*/ switch ( entry_point->op_mode ) { case FCML_OM_16_BIT: case FCML_OM_32_BIT: /* In 16 and 32 bit mode only prefixes can change address-size attribute.*/ prefix = fcml_ifn_dasm_get_prefix_if_available( context, 0x66 ); if ( prefix != NULL && !prefix->mandatory_prefix ) { osa = ( osa == FCML_DS_16 ) ? FCML_DS_32 : FCML_DS_16; } break; case FCML_OM_64_BIT: /* For some instructions EOSA can be forced to 64 bits.*/ if ( FCML_DEF_OPCODE_FLAGS_FORCE_64BITS_EOSA( opcode_flags ) ) { osa = FCML_DS_64; } else { if ( prefixes->w ) { /* Prefixes can not override REX.W.*/ osa = FCML_DS_64; } else { prefix = fcml_ifn_dasm_get_prefix_if_available( context, 0x66 ); if ( prefix != NULL && !prefix->mandatory_prefix ) { osa = ( osa == FCML_DS_16 ) ? FCML_DS_32 : FCML_DS_16; } else { /* By default EOSA 32 bits is a default value in 64 bit mode,*/ /* but some instruction do not use this rule.*/ if ( FCML_DEF_OPCODE_FLAGS_64BITS_EOSA_BY_DEFAULT( opcode_flags ) && ( osa == FCML_DS_32 ) ) { osa = FCML_DS_64; } } } } break; } return osa; } /************** * Acceptors. * **************/ typedef fcml_ifp_dasm_instruction_acceptor (*fcml_ifp_dasm_instruction_acceptor_factory)( fcml_st_def_addr_mode_desc *addr_mode_desc ); /**************/ /* Prefixes. */ /**************/ fcml_bool fcml_ifn_dasm_instruction_acceptor_prefixes( fcml_ist_dasm_decoding_context *context, fcml_ist_dasm_instruction_decoding_def *instruction_decoding_def ) { /* Prefixes.*/ fcml_st_prefixes_details *prefixes = &( context->prefixes ); /* LOCK prefix.*/ if ( prefixes->is_lock && !FCML_DEF_PREFIX_LOCK_ALLOWED( instruction_decoding_def->prefixes_flags ) ) { /* Lock prefix is not allowed.*/ return FCML_FALSE; } /* VEX required.*/ if ( ( FCML_DEF_PREFIX_VEX_REQ( instruction_decoding_def->prefixes_flags ) && !prefixes->is_vex ) || ( !FCML_DEF_PREFIX_VEX_REQ( instruction_decoding_def->prefixes_flags ) && prefixes->is_vex ) ) { /* VEX prefix is required.*/ return FCML_FALSE; } /* XOP required.*/ if ( ( FCML_DEF_PREFIX_XOP_REQ( instruction_decoding_def->prefixes_flags ) && !prefixes->is_xop ) || ( !FCML_DEF_PREFIX_XOP_REQ( instruction_decoding_def->prefixes_flags ) && prefixes->is_xop ) ) { /* VEX prefix is required.*/ return FCML_FALSE; } /* W field.*/ if ( ( FCML_DEF_PREFIX_W_0( instruction_decoding_def->prefixes_flags ) && prefixes->w ) || ( FCML_DEF_PREFIX_W_1( instruction_decoding_def->prefixes_flags ) && !prefixes->w ) ) { return FCML_FALSE; } /* L field.*/ if ( ( FCML_DEF_PREFIX_L_1( instruction_decoding_def->prefixes_flags ) && ( !( prefixes->is_vex || prefixes->is_xop ) || !prefixes->l ) ) || ( FCML_DEF_PREFIX_L_0( instruction_decoding_def->prefixes_flags ) && ( !( prefixes->is_vex || prefixes->is_xop ) || prefixes->l ) ) ) { return FCML_FALSE; } /* Mandatory prefixes.*/ fcml_bool found = FCML_FALSE; if ( FCML_DEF_PREFIX_MANDATORY_66( instruction_decoding_def->prefixes_flags ) ) { found = fcml_ifn_dasm_is_prefix_available( context, 0x66, FCML_TRUE ); } else if ( FCML_DEF_PREFIX_MANDATORY_F2( instruction_decoding_def->prefixes_flags ) ) { found = fcml_ifn_dasm_is_prefix_available( context, 0xF2, FCML_TRUE ); } else if ( FCML_DEF_PREFIX_MANDATORY_F3( instruction_decoding_def->prefixes_flags ) ) { found = fcml_ifn_dasm_is_prefix_available( context, 0xF3, FCML_TRUE ); } else { /* Mandatory prefixes not used.*/ found = FCML_TRUE; } if ( !found ) { /* Mandatory prefixes not found.*/ return FCML_FALSE; } return FCML_TRUE; } fcml_ifp_dasm_instruction_acceptor fcml_ifn_dasm_instruction_acceptor_factory_prefixes( fcml_st_def_addr_mode_desc *addr_mode_desc ) { return fcml_ifn_dasm_instruction_acceptor_prefixes; } /**********/ /* ModRM. */ /**********/ fcml_bool fcml_ifn_dasm_instruction_acceptor_modrm( fcml_ist_dasm_decoding_context *context, fcml_ist_dasm_instruction_decoding_def *instruction_decoding_def ) { fcml_uint32_t opcode_flags = instruction_decoding_def->opcode_flags; fcml_st_memory_stream *code = context->stream; fcml_st_prefixes_details *prefixes = &( context->prefixes ); fcml_ist_dasm_modrm_decoding_details *modrm_details = &( instruction_decoding_def->modrm_details ); /* Check addressing mode for ModRM opcodes.*/ if ( modrm_details->is_mem_restriction ) { fcml_bool modrm_found = FCML_FALSE; fcml_uint8_t modrm = fcml_fn_stream_peek( code, &modrm_found ); if ( !modrm_found || FCML_MODRM_DEC_MOD( modrm ) == 3 ) { return FCML_FALSE; } } if ( modrm_details->is_reg_restriction ) { fcml_bool modrm_found = FCML_FALSE; fcml_uint8_t modrm = fcml_fn_stream_peek( code, &modrm_found ); if ( !modrm_found || FCML_MODRM_DEC_MOD( modrm ) != 3 ) { return FCML_FALSE; } } /* Check opcode extension. We have to access ModRM byte directly here.*/ fcml_bool opcodes_valid = FCML_FALSE; if ( FCML_DEF_OPCODE_FLAGS_OPCODE_IS_EXT( opcode_flags ) ) { fcml_bool modrm_found = FCML_FALSE; fcml_uint8_t modrm = fcml_fn_stream_peek( code, &modrm_found ); if ( modrm_found ) { fcml_uint8_t ext_reg_opcode = ( ( prefixes->r << 4 ) | ( FCML_MODRM_DEC_REG_OPCODE( modrm ) ) ); fcml_uint8_t expected_ext_reg_opcode = FCML_DEF_OPCODE_FLAGS_OPCODE_EXT( opcode_flags ); opcodes_valid = ( ext_reg_opcode == expected_ext_reg_opcode ); } } else { opcodes_valid = FCML_TRUE; } if ( !opcodes_valid ) { return FCML_FALSE; } return FCML_TRUE; } fcml_ifp_dasm_instruction_acceptor fcml_ifn_dasm_instruction_acceptor_factory_modrm( fcml_st_def_addr_mode_desc *addr_mode_desc ) { return FCML_DEF_OPCODE_FLAGS_OPCODE_IS_MODRM( addr_mode_desc->opcode_flags ) ? fcml_ifn_dasm_instruction_acceptor_modrm : NULL; } /********************/ /* Size attributes. */ /********************/ fcml_bool fcml_ifn_dasm_instruction_acceptor_size_attributes_restrictions( fcml_ist_dasm_decoding_context *context, fcml_ist_dasm_instruction_decoding_def *instruction_decoding_def ) { /* Check EOSA. These fields allow us to restrict instruction decoding only * to specific effective operand sizes. For instance we can define instruction * that can be chosen only if EOSA is equal to 16. */ if ( FCML_DEF_OPCODE_FLAGS_IS_EOSA_RESTRICTION( instruction_decoding_def->opcode_flags ) ) { fcml_bool mandatory_prefix = FCML_FALSE; /* Ignore 0x66 prefix if this instruction uses it as mandatory prefix. This correction is also /* done in the next phase for already chosen instruction. */ fcml_st_instruction_prefix *prefix = fcml_ifn_dasm_get_prefix_if_available( context, 0x66 ); /* Set this prefix as a mandatory one if this instruction defines 66 as mandatory. /* This is set temporarily only to calculate correct EOSA for instruction. */ if ( prefix != NULL ) { mandatory_prefix = prefix->mandatory_prefix; prefix->mandatory_prefix = FCML_DEF_PREFIX_MANDATORY_66( instruction_decoding_def->prefixes_flags ); } fcml_usize eosa = fcml_ifn_dasm_calculate_effective_osa( context, instruction_decoding_def->opcode_flags ); if ( prefix != NULL ) { prefix->mandatory_prefix = mandatory_prefix; } if ( !( ( FCML_DEF_OPCODE_FLAGS_EOSA_16( instruction_decoding_def->opcode_flags ) && eosa == FCML_DS_16 ) || ( FCML_DEF_OPCODE_FLAGS_EOSA_32( instruction_decoding_def->opcode_flags ) && eosa == FCML_DS_32 ) || ( FCML_DEF_OPCODE_FLAGS_EOSA_64( instruction_decoding_def->opcode_flags ) && eosa == FCML_DS_64 ) ) ) { /* Wrong EOSA, ignore instruction. */ return FCML_FALSE; } } /* Check EASA. These fields allow us to restrict instruction only /* to specific effective address sizes. For instance we can define * instruction that can be chosen only if EASA is equal to 16. */ if ( FCML_DEF_OPCODE_FLAGS_IS_EASA_RESTRICTION( instruction_decoding_def->opcode_flags ) ) { fcml_usize easa = fcml_ifn_dasm_calculate_effective_asa( context ); if ( !( ( FCML_DEF_OPCODE_FLAGS_EASA_16( instruction_decoding_def->opcode_flags ) && easa == FCML_DS_16 ) || ( FCML_DEF_OPCODE_FLAGS_EASA_32( instruction_decoding_def->opcode_flags ) && easa == FCML_DS_32 ) || ( FCML_DEF_OPCODE_FLAGS_EASA_64( instruction_decoding_def->opcode_flags ) && easa == FCML_DS_64 ) ) ) { /* Wrong EASA, ignore instruction.*/ return FCML_FALSE; } } return FCML_TRUE; } fcml_ifp_dasm_instruction_acceptor fcml_ifn_dasm_instruction_acceptor_factory_size_attributes_restrictions( fcml_st_def_addr_mode_desc *addr_mode_desc ) { return ( FCML_DEF_OPCODE_FLAGS_IS_EOSA_RESTRICTION( addr_mode_desc->opcode_flags ) || FCML_DEF_OPCODE_FLAGS_IS_EASA_RESTRICTION( addr_mode_desc->opcode_flags ) ) ? fcml_ifn_dasm_instruction_acceptor_size_attributes_restrictions : NULL; } /********************/ /* Addressing mode. */ /********************/ fcml_bool fcml_ifn_dasm_instruction_acceptor_addr_mode( fcml_ist_dasm_decoding_context *context, fcml_ist_dasm_instruction_decoding_def *instruction_decoding_def ) { fcml_st_disassembler_context *disassembler_context = context->disassembler_context; fcml_en_operating_mode op_mode = disassembler_context->entry_point.op_mode; return ( ( op_mode == FCML_OM_16_BIT || op_mode == FCML_OM_32_BIT ) && FCML_DEF_OPCODE_FLAGS_16_32_BIT_MODE_SUPPORTED( instruction_decoding_def->opcode_flags ) ) || ( op_mode == FCML_OM_64_BIT && FCML_DEF_OPCODE_FLAGS_64_BIT_MODE_SUPPORTED( instruction_decoding_def->opcode_flags ) ); } fcml_ifp_dasm_instruction_acceptor fcml_ifn_dasm_instruction_acceptor_factory_addr_mode( fcml_st_def_addr_mode_desc *addr_mode_desc ) { return fcml_ifn_dasm_instruction_acceptor_addr_mode; } fcml_ifp_dasm_instruction_acceptor_factory fcml_iarr_dasm_dts_acceptor_factories[] = { fcml_ifn_dasm_instruction_acceptor_factory_prefixes, fcml_ifn_dasm_instruction_acceptor_factory_addr_mode, fcml_ifn_dasm_instruction_acceptor_factory_modrm, fcml_ifn_dasm_instruction_acceptor_factory_size_attributes_restrictions, NULL }; fcml_ceh_error fcml_ifn_dasm_dts_allocate_acceptors_chain( fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_ist_dasm_addr_mode_acceptor_chain **chain ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_ist_dasm_addr_mode_acceptor_chain *current = NULL, *chain_root = NULL; fcml_ifp_dasm_instruction_acceptor_factory *factory = &( fcml_iarr_dasm_dts_acceptor_factories[0] ); while ( *factory ) { /* Asks every factory for acceptor dedicated to the provided addressing mode description. */ fcml_ifp_dasm_instruction_acceptor acceptor = ( *factory )( addr_mode_desc ); if ( acceptor ) { fcml_ist_dasm_addr_mode_acceptor_chain *chain_element = (fcml_ist_dasm_addr_mode_acceptor_chain*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_ist_dasm_addr_mode_acceptor_chain) ); if ( !chain_element ) { /* Free already allocated chain.*/ if ( chain_root ) { fcml_ifn_dasm_dts_free_acceptors_chain( chain_root ); } return FCML_CEH_GEC_OUT_OF_MEMORY; } chain_element->acceptor = acceptor; if ( !chain_root ) { chain_root = chain_element; } if ( current ) { current->next = chain_element; } current = chain_element; } factory++; } *chain = chain_root; return error; } /********************** * Decoding callback. * **********************/ void fcml_ifn_dasm_dts_dispose_instruction_decoding_callback_default( fcml_st_dialect_context_int *dialect, fcml_ptr decoding_ptr ) { fcml_ifn_dasm_dts_free_decoding_def( (fcml_ist_dasm_instruction_decoding_def *) decoding_ptr ); } void fcml_ifn_dasm_dts_prepare_modrm_decoding_details( fcml_st_def_decoded_addr_mode *decoded_addr_mode, fcml_ist_dasm_modrm_decoding_details *modrm_details ) { if ( decoded_addr_mode ) { if ( FCMP_DEF_IS_ADDR_MODE( decoded_addr_mode->addr_mode, FCML_OP_VSIB_BASE ) ) { fcml_sf_def_tma_rm *rm_args = (fcml_sf_def_tma_rm *) decoded_addr_mode->addr_mode_args; modrm_details->is_vsib = FCML_TRUE; modrm_details->vsib_index_size = ( rm_args->vector_index_register ) == FCML_VSIB_XMM ? FCML_DS_128 : FCML_DS_256; } if ( FCMP_DEF_IS_ADDR_MODE( decoded_addr_mode->addr_mode, FCML_OP_RM_BASE ) ) { fcml_sf_def_tma_rm *rm_args = (fcml_sf_def_tma_rm*) decoded_addr_mode->addr_mode_args; modrm_details->is_reg_restriction = ( rm_args->flags == FCML_RMF_R ); modrm_details->is_mem_restriction = ( rm_args->flags == FCML_RMF_M ); } } } fcml_ceh_error fcml_ifn_dasm_dts_prepare_instruction_decoding_callback_default( fcml_st_dialect_context_int *dialect, fcml_st_dt_diss_tree_element *element, fcml_st_def_instruction_desc *instruction_desc, fcml_st_def_addr_mode_desc *addr_mode_desc ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; /* Prepare instruction decoding structure.*/ fcml_ist_dasm_instruction_decoding_def *decoding = (fcml_ist_dasm_instruction_decoding_def*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_ist_dasm_instruction_decoding_def) ); if ( !decoding ) { return FCML_CEH_GEC_OUT_OF_MEMORY; } /* Copy opcodes.*/ int i; for ( i = 0; i < sizeof( addr_mode_desc->opcode ); i++ ) { decoding->opcodes[i] = addr_mode_desc->opcode[i]; } error = dialect->get_parsed_mnemonics( (fcml_st_dialect*) dialect, instruction_desc, addr_mode_desc, &( decoding->mnemonics ) ); if ( error ) { fcml_ifn_dasm_dts_free_decoding_def( decoding ); return FCML_CEH_GEC_INVALID_INPUT; } /* Copy flags.*/ decoding->prefixes_flags = addr_mode_desc->allowed_prefixes; decoding->opcode_flags = addr_mode_desc->opcode_flags; decoding->instruction_group = addr_mode_desc->instruction_group; decoding->instruction = instruction_desc->instruction; decoding->addr_mode = addr_mode_desc->addr_mode; error = fcml_ifn_dasm_dts_allocate_acceptors_chain( addr_mode_desc, &( decoding->instruction_acceptors_chain ) ); if ( error ) { fcml_ifn_dasm_dts_free_decoding_def( decoding ); return error; } /* Choose function used to disassemble instruction.*/ decoding->instruction_decoder = fcml_ifn_dasm_dts_choose_instruction_decoder( instruction_desc->instruction_type ); /* Copy instruction hints from instruction definition.*/ decoding->hints = addr_mode_desc->instruction_hints; /* Prepare operand decoders.*/ for ( i = 0; i < FCML_OPERANDS_COUNT; i++ ) { error = fcml_ifn_dasm_dts_prepare_operand_decoding( addr_mode_desc, &( decoding->operand_decodings[i] ), addr_mode_desc->opperands[i], &( decoding->hints ) ); if ( !error ) { fcml_ifn_dasm_dts_prepare_modrm_decoding_details( decoding->operand_decodings[i].decoded_addr_mode, &( decoding->modrm_details ) ); } else { fcml_ifn_dasm_dts_free_decoding_def( decoding ); return error; } } /* Insert it in appropriate order.*/ int order = fcml_ifn_dasm_dts_calculate_decoding_order( decoding ); decoding->order = order; fcml_st_coll_list *instruction_decoding_defs = element->instruction_decoding_defs; fcml_st_coll_list_element *current = instruction_decoding_defs->head; /* Insert prepared instruction decoding in appropriate order.*/ fcml_st_coll_list_element *prev = NULL; while ( current ) { fcml_ist_dasm_instruction_decoding_def *decoding_def = (fcml_ist_dasm_instruction_decoding_def*) current->item; if ( decoding_def && decoding_def->order < order ) { break; } prev = current; current = current->next; } if ( !fcml_fn_coll_list_insert( instruction_decoding_defs, prev, decoding ) ) { fcml_ifn_dasm_dts_free_decoding_def( decoding ); error = FCML_CEH_GEC_OUT_OF_MEMORY; } return error; } /******************** * Opcode iterator. * ********************/ fcml_uint8_t fcml_iarr_dasm_escape_0f[] = { 0x0F }; fcml_uint8_t fcml_iarr_dasm_escape_0f38[] = { 0x0F, 0x38 }; fcml_uint8_t fcml_iarr_dasm_escape_0f3A[] = { 0x0F, 0x3A }; fcml_uint8_t *fcml_iarr_dasm_escape_opcode_table[3] = { fcml_iarr_dasm_escape_0f, fcml_iarr_dasm_escape_0f38, fcml_iarr_dasm_escape_0f3A }; fcml_uint8_t fcml_iarr_dasm_escape_size_tablee_table[] = { 1, 2, 2 }; struct fcml_ist_dasm_opcode_iterator; typedef struct fcml_ist_dasm_opcode_iterator_impl { fcml_st_memory_stream stream; fcml_uint8_t is_virtual_opcode; fcml_uint8_t *virtual_opcode; fcml_int virtual_opcode_count; fcml_int virtual_opcode_offset; } fcml_ist_dasm_opcode_iterator_impl; fcml_int fcml_ifn_dasm_decode_escape_opcode_bytes( fcml_ist_dasm_decoding_context *decoding_context, fcml_uint8_t **virtual_opcode ) { fcml_st_prefixes_details *prefixes_fields = &( decoding_context->prefixes ); fcml_int8_t size = 0; if ( prefixes_fields->is_vex || prefixes_fields->is_xop ) { if ( prefixes_fields->vex_xop_first_byte == 0xC4 ) { int index = prefixes_fields->mmmm - 1; *virtual_opcode = fcml_iarr_dasm_escape_opcode_table[index]; size = fcml_iarr_dasm_escape_size_tablee_table[index]; } else if ( prefixes_fields->vex_xop_first_byte == 0x8F ) { *virtual_opcode = &( prefixes_fields->mmmm ); size = 1; } else { *virtual_opcode = fcml_iarr_dasm_escape_0f; size = 1; } } return size; } fcml_ceh_error fcml_ifn_dasm_prepare_opcode_iterator( fcml_ist_dasm_decoding_context *decoding_context, struct fcml_ist_dasm_opcode_iterator **iterator_ptr ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_ist_dasm_opcode_iterator_impl *iterator = (fcml_ist_dasm_opcode_iterator_impl*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_ist_dasm_opcode_iterator_impl) ); if ( iterator ) { /* Prepare virtual opcodes.*/ iterator->virtual_opcode_count = fcml_ifn_dasm_decode_escape_opcode_bytes( decoding_context, &( iterator->virtual_opcode ) ); iterator->virtual_opcode_offset = 0; iterator->stream = *decoding_context->stream; iterator->is_virtual_opcode = FCML_FALSE; /* Prepare virtual opcodes.*/ *iterator_ptr = (struct fcml_ist_dasm_opcode_iterator *) iterator; } else { error = FCML_CEH_GEC_OUT_OF_MEMORY; } return error; } fcml_bool fcml_ifn_dasm_opcode_iterator_has_next( struct fcml_ist_dasm_opcode_iterator *iterator_ptr ) { fcml_ist_dasm_opcode_iterator_impl *iterator = (fcml_ist_dasm_opcode_iterator_impl *) iterator_ptr; if ( iterator->virtual_opcode_count > 0 && iterator->virtual_opcode_offset < iterator->virtual_opcode_count ) { /* Virtual byte is available.*/ return FCML_TRUE; } else if ( fcml_fn_stream_size( &( iterator->stream ) ) > 0 ) { return FCML_TRUE; } return FCML_FALSE; } fcml_bool fcml_ifn_dasm_opcode_iterator_is_virtual_opcode( struct fcml_ist_dasm_opcode_iterator *iterator_ptr ) { fcml_ist_dasm_opcode_iterator_impl *iterator = (fcml_ist_dasm_opcode_iterator_impl *) iterator_ptr; return iterator->is_virtual_opcode; } fcml_uint8_t fcml_ifn_dasm_opcode_iterator_next( struct fcml_ist_dasm_opcode_iterator *iterator_ptr ) { fcml_ist_dasm_opcode_iterator_impl *iterator = (fcml_ist_dasm_opcode_iterator_impl *) iterator_ptr; if ( iterator->virtual_opcode_count > 0 && iterator->virtual_opcode_offset < iterator->virtual_opcode_count ) { iterator->is_virtual_opcode = FCML_TRUE; return iterator->virtual_opcode[iterator->virtual_opcode_offset++]; } else { fcml_bool result; fcml_uint8_t opcode_byte = fcml_fn_stream_read( &( iterator->stream ), &result ); if ( result ) { iterator->is_virtual_opcode = FCML_FALSE; } return opcode_byte; } return FCML_FALSE; } void fcml_ifn_dasm_opcode_iterator_free( struct fcml_ist_dasm_opcode_iterator *iterator_ptr ) { if ( iterator_ptr ) { fcml_fn_env_memory_free( iterator_ptr ); } } /************************** * Instructions decoding. * **************************/ void fcml_ifn_dasm_decode_opcode_fields( fcml_ist_dasm_decoding_context *decoding_context, fcml_ist_dasm_instruction_decoding_def *instruction_decoding_def, fcml_uint8_t primary_opcode_byte ) { /* TTTN.*/ if ( FCML_DEF_OPCODE_FLAGS_OPCODE_FIELD_TTTN( instruction_decoding_def->opcode_flags ) ) { fcml_uint8_t condition = primary_opcode_byte & 0x0F; decoding_context->is_conditional = FCML_TRUE; decoding_context->condition.condition_type = (fcml_en_condition_type) ( condition >> 1 ); decoding_context->condition.is_negation = primary_opcode_byte & 0x01; } else { decoding_context->is_conditional = FCML_FALSE; } /* W.*/ if ( FCML_DEF_OPCODE_FLAGS_OPCODE_FIELD_W( instruction_decoding_def->opcode_flags ) ) { decoding_context->opcode_field_w_bit = primary_opcode_byte & 0x01; } /* S.*/ if ( FCML_DEF_OPCODE_FLAGS_OPCODE_FIELD_S( instruction_decoding_def->opcode_flags ) ) { decoding_context->opcode_field_s_bit = primary_opcode_byte & 0x02; } } fcml_ceh_error fcml_ifn_dasm_instruction_decoder_IA( fcml_ist_dasm_decoding_context *decoding_context, fcml_ist_dasm_instruction_decoding_def *instruction_decoding_def ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; /* Instruction hints.*/ decoding_context->instruction_hints = instruction_decoding_def->hints; /* Change prefixes to mandatory one if needed.*/ if ( !FCML_DEF_PREFIX_MANDATORY_66( instruction_decoding_def->prefixes_flags ) ) { fcml_ifn_dasm_clear_mandatory_flag( decoding_context, 0x66 ); } if ( !FCML_DEF_PREFIX_MANDATORY_F2( instruction_decoding_def->prefixes_flags ) ) { fcml_ifn_dasm_clear_mandatory_flag( decoding_context, 0xF2 ); } else { decoding_context->prefixes.is_repne = FCML_FALSE; } if ( !FCML_DEF_PREFIX_MANDATORY_F3( instruction_decoding_def->prefixes_flags ) ) { fcml_ifn_dasm_clear_mandatory_flag( decoding_context, 0xF3 ); } else { decoding_context->prefixes.is_rep = FCML_FALSE; } /* Branches, take into account that this condition do not collide with multi-instructions.*/ if ( instruction_decoding_def->instruction != F_JCC ) { decoding_context->prefixes.is_branch = FCML_FALSE; decoding_context->prefixes.is_nobranch = FCML_FALSE; } /* Change REP/REPNE prefixes to XACQUIRE/XRELEASE if instruction support them. */ if ( FCML_DEF_PREFIX_HLE_ENABLED( instruction_decoding_def->prefixes_flags ) ) { if ( decoding_context->prefixes.is_rep ) { decoding_context->prefixes.is_xrelease = FCML_TRUE; decoding_context->prefixes.is_rep = FCML_FALSE; } if ( decoding_context->prefixes.is_repne ) { decoding_context->prefixes.is_xacquire = FCML_TRUE; decoding_context->prefixes.is_repne = FCML_FALSE; } } decoding_context->calculated_instruction_size = decoding_context->prefixes.prefixes_bytes_count + decoding_context->opcodes_count; /* Calculates effective operand sizes. It's not important if they will be used or not.*/ decoding_context->effective_address_size_attribute = fcml_ifn_dasm_calculate_effective_asa( decoding_context ); decoding_context->effective_operand_size_attribute = fcml_ifn_dasm_calculate_effective_osa( decoding_context, instruction_decoding_def->opcode_flags ); fcml_ist_dasm_operand_wrapper *operand_wrappers = &( decoding_context->operand_wrappers[0] ); fcml_ist_dasm_modrm_decoding_details *modrm_details = &( instruction_decoding_def->modrm_details ); fcml_st_prefixes_details *prefixes = &( decoding_context->prefixes ); /* Decode ModRM field if there is any. */ if ( FCML_DEF_OPCODE_FLAGS_OPCODE_IS_MODRM( instruction_decoding_def->opcode_flags ) ) { decoding_context->is_modrm = FCML_TRUE; fcml_st_memory_stream *stream = decoding_context->stream; fcml_uint32_t offset = stream->offset; fcml_st_modrm_decoder_context modrm_context; modrm_context.op_mode = decoding_context->disassembler_context->entry_point.op_mode; modrm_context.effective_address_size = decoding_context->effective_address_size_attribute; fcml_st_modrm_source modrm_source; modrm_source.is_vsib = modrm_details->is_vsib; modrm_source.vsib_index_size = modrm_details->vsib_index_size; modrm_source.ext_b = prefixes->b; modrm_source.ext_r = prefixes->r; modrm_source.ext_x = prefixes->x; modrm_source.stream = decoding_context->stream; fcml_uint8_t flags = 0; if ( decoding_context->disassembler_context->configuration.extend_disp_to_asa ) { flags |= FCML_MODRM_DEC_FLAG_EXTEND_DISPLACEMENT_TO_ASA; } error = fcml_fn_modrm_decode( &modrm_context, &modrm_source, &( decoding_context->decoded_modrm ), &( decoding_context->decoded_modrm_details ), flags ); if ( error ) { return error; } decoding_context->calculated_instruction_size += stream->offset - offset; } /* Calculate operands size. */ fcml_int i, operands_size = 0; for ( i = 0; i < FCML_OPERANDS_COUNT; i++ ) { fcml_ist_dasm_operand_decoding *operand_decoding = &( instruction_decoding_def->operand_decodings[i] ); fcml_st_def_decoded_addr_mode *decoded_addr_mode = operand_decoding->decoded_addr_mode; if ( operand_decoding->size_calculator ) { operands_size += operand_decoding->size_calculator( decoding_context, decoded_addr_mode->addr_mode_args ); } } decoding_context->calculated_instruction_size += operands_size; decoding_context->mnemonics = instruction_decoding_def->mnemonics; decoding_context->instruction = instruction_decoding_def->instruction; decoding_context->instruction_group = instruction_decoding_def->instruction_group; decoding_context->addr_mode = instruction_decoding_def->addr_mode; /* Store primary opcode byte.*/ fcml_int opcode_num = FCML_DEF_OPCODE_FLAGS_PRIMARY_OPCODE( instruction_decoding_def->opcode_flags ); decoding_context->primary_opcode_byte = decoding_context->opcodes[opcode_num - decoding_context->virtual_opcodes_count]; /* Decode opcode fields.*/ fcml_ifn_dasm_decode_opcode_fields( decoding_context, instruction_decoding_def, decoding_context->primary_opcode_byte ); /* Decode operands.*/ for ( i = 0; i < FCML_OPERANDS_COUNT; i++ ) { fcml_ist_dasm_operand_decoding *operand_decoding = &( instruction_decoding_def->operand_decodings[i] ); fcml_st_def_decoded_addr_mode *decoded_addr_mode = operand_decoding->decoded_addr_mode; if ( operand_decoding->decoder ) { error = operand_decoding->decoder( decoding_context, operand_wrappers, decoded_addr_mode->addr_mode_args ); if ( error ) { break; } operand_wrappers->operand.hints |= operand_decoding->hints; operand_wrappers->access_mode = decoded_addr_mode->access_mode; operand_wrappers++; } else { /* First operand without decoder is the last one.*/ break; } } /* Decode suffix.*/ if ( FCML_DEF_PREFIX_SUFFIX( instruction_decoding_def->prefixes_flags ) ) { fcml_bool result; decoding_context->suffix.value = fcml_fn_stream_read( decoding_context->stream, &result ); if ( result ) { decoding_context->suffix.is_not_null = FCML_TRUE; } else { error = FCML_CEH_GEC_EOF; } } return error; } fcml_ceh_error fcml_ifn_prepare_pseudo_operation( fcml_ist_dasm_decoding_context *context ) { /* Seek to the beginning of the stream. */ fcml_fn_stream_seek( context->stream, 0, FCML_EN_ST_START ); /* Clean whole decoding context, because there might be * remains of the previous processing. */ fcml_fn_env_memory_clear( &( context->prefixes ), sizeof(fcml_st_prefixes_details) ); /* Get first instruction byte. */ fcml_bool result; fcml_uint8_t po_byte = fcml_fn_stream_read( context->stream, &result ); if ( !result ) { return FCML_CEH_GEC_EOF; } context->pseudo_op = FP_DB; /* Prepare operand with immediate value. */ fcml_st_operand *operand = &( context->operand_wrappers[0].operand ); operand->type = FCML_OT_IMMEDIATE; operand->immediate.int8 = po_byte; operand->immediate.size = FCML_DS_8; context->opcodes_count = 1; context->calculated_instruction_size = 1; return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_ifn_dasm_decode_instruction( fcml_ist_dasm_decoding_context *context ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_ist_dasm_disassembler *disassembler = (fcml_ist_dasm_disassembler *) context->disassembler_context->disassembler; fcml_st_dt_decoding_tree *decoding_tree = disassembler->decoding_tree; /* Prepare opcode iterator.*/ struct fcml_ist_dasm_opcode_iterator *iterator; error = fcml_ifn_dasm_prepare_opcode_iterator( context, &iterator ); if ( error ) { return error; } struct fcml_st_dt_diss_tree_element **opcodes = &( decoding_tree->opcode[0] ); /* Found instruction addressing modes going here.*/ fcml_st_dt_diss_tree_element* tree_element = NULL; while ( fcml_ifn_dasm_opcode_iterator_has_next( iterator ) ) { /* Get next instructions opcode. */ fcml_uint8_t opcode_byte = fcml_ifn_dasm_opcode_iterator_next( iterator ); /* Get instruction for given opcode. */ fcml_st_dt_diss_tree_element *current = opcodes[opcode_byte]; if ( current ) { /* There is something for given opcode byte, so save it.*/ tree_element = current; /* Store all non virtual opcode bytes inside context.*/ if ( !fcml_ifn_dasm_opcode_iterator_is_virtual_opcode( iterator ) ) { context->opcodes[context->opcodes_count++] = opcode_byte; } else { context->virtual_opcodes_count++; } opcodes = &( tree_element->opcodes[0] ); } else { break; } } /* Free opcode iterator.*/ fcml_ifn_dasm_opcode_iterator_free( iterator ); /* Skip opcode bytes.*/ fcml_fn_stream_seek( context->stream, context->opcodes_count, FCML_EN_ST_CURRENT ); fcml_bool found = FCML_FALSE; /* Disassemble instruction using most appropriate addressing mode from disassembling tree. */ if ( tree_element && tree_element->instruction_decoding_defs ) { fcml_st_coll_list_element *current = tree_element->instruction_decoding_defs->head; while ( current ) { fcml_ist_dasm_instruction_decoding_def *decoding_def = (fcml_ist_dasm_instruction_decoding_def*) current->item; if ( decoding_def ) { /* Set current decoding definition.*/ context->decoding_def = decoding_def; /* Try to accept this addressing mode.*/ fcml_bool accept = FCML_TRUE; fcml_ist_dasm_addr_mode_acceptor_chain *chain = decoding_def->instruction_acceptors_chain; while ( chain ) { if ( chain->acceptor && !chain->acceptor( context, decoding_def ) ) { accept = FCML_FALSE; break; } chain = chain->next; } if ( accept ) { error = decoding_def->instruction_decoder( context, decoding_def ); if ( !error ) { found = FCML_TRUE; break; } } } current = current->next; } } else { if ( !context->disassembler_context->configuration.fail_if_unknown_instruction ) { error = fcml_ifn_prepare_pseudo_operation( context ); if ( !error ) { found = FCML_TRUE; } } else { /* Unknown instruction.*/ error = FCML_CEH_GEC_UNKNOWN_INSTRUCTION; } } if ( !found && !error ) { error = FCML_CEH_GEC_UNKNOWN_INSTRUCTION; } return error; } /**************************** * Prefixes decoding. ****************************/ #define FCML_IDFPF_IS_MANDATORY_CANDIDATE 0x0001 #define FCML_IDFPF_IS_LOCK 0x0002 #define FCML_IDFPF_IS_REP_XRELEASE 0x0004 #define FCML_IDFPF_IS_REPNE_XACQUIRE 0x0008 #define FCML_IDFPF_IS_VEX 0x0010 #define FCML_IDFPF_IS_XOP 0x0020 #define FCML_IDFPF_IS_BRANCH 0x0040 #define FCML_IDFPF_IS_XOP_ALLOWED 0x0080 #define FCML_IDFPF_IS_NOBRANCH 0x0100 fcml_ceh_error fcml_ifn_dasm_decode_prefixes( fcml_ist_dasm_decoding_context *decoding_context ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_prefixes_details *prefixes = &( decoding_context->prefixes ); fcml_st_memory_stream *stream = decoding_context->stream; fcml_en_operating_mode op_mode = decoding_context->disassembler_context->entry_point.op_mode; fcml_st_prefixes_details *prefixes_details = &( decoding_context->prefixes ); fcml_uint16_t p_flags = 0; fcml_en_prefix_types prefix_type = FCML_PT_GROUP_UNKNOWN; fcml_int prefix_index = 0; fcml_int prefix_size = 0; fcml_int xop_vex_prefix_size = 0; fcml_bool result = FCML_FALSE; fcml_bool is_xop_vex_allowed = FCML_TRUE; fcml_bool is_last_prefix = FCML_FALSE; /* VEX like prefixes are not allowed in 16 bit mode.*/ if ( op_mode == FCML_OM_16_BIT ) { is_xop_vex_allowed = FCML_FALSE; } do { prefix_type = FCML_PT_GROUP_UNKNOWN; p_flags = 0; /* Almost all prefixes are one byte length, so it's a reasonable default here.*/ prefix_size = 1; fcml_uint8_t prefix = fcml_fn_stream_peek( stream, &result ); if ( result ) { fcml_st_instruction_prefix *prefix_details = &( prefixes->prefixes[prefix_index] ); switch ( prefix ) { case 0xF0: prefix_type = FCML_PT_GROUP_1; is_xop_vex_allowed = FCML_FALSE; p_flags |= FCML_IDFPF_IS_LOCK; break; case 0xF2: p_flags |= ( FCML_IDFPF_IS_MANDATORY_CANDIDATE | FCML_IDFPF_IS_REPNE_XACQUIRE ); prefix_type = FCML_PT_GROUP_1; is_xop_vex_allowed = FCML_FALSE; break; case 0xF3: p_flags |= ( FCML_IDFPF_IS_MANDATORY_CANDIDATE | FCML_IDFPF_IS_REP_XRELEASE ); prefix_type = FCML_PT_GROUP_1; is_xop_vex_allowed = FCML_FALSE; break; case 0x2E: p_flags |= FCML_IDFPF_IS_NOBRANCH; prefix_type = FCML_PT_GROUP_2; break; case 0x3E: p_flags |= FCML_IDFPF_IS_BRANCH; prefix_type = FCML_PT_GROUP_2; break; case 0x26: case 0x36: case 0x64: case 0x65: prefix_type = FCML_PT_GROUP_2; break; break; case 0x66: p_flags |= FCML_IDFPF_IS_MANDATORY_CANDIDATE; prefix_type = FCML_PT_GROUP_3; is_xop_vex_allowed = FCML_FALSE; break; case 0x67: prefix_type = FCML_PT_GROUP_4; break; case 0xC5: xop_vex_prefix_size = 1; prefix_type = FCML_PT_VEX; p_flags |= FCML_IDFPF_IS_VEX; is_last_prefix = FCML_TRUE; break; case 0x8F: xop_vex_prefix_size = 2; prefix_type = FCML_PT_XOP; p_flags |= FCML_IDFPF_IS_XOP; is_last_prefix = FCML_TRUE; break; case 0xC4: xop_vex_prefix_size = 2; prefix_type = FCML_PT_VEX; p_flags |= FCML_IDFPF_IS_VEX; is_last_prefix = FCML_TRUE; break; default: /* REX prefix is the last one, so we have to break this loop after finding one.*/ if ( op_mode == FCML_OM_64_BIT && prefix >= 0x40 && prefix <= 0x4F ) { /* REX prefix found.*/ prefix_type = FCML_PT_REX; /* Decode fields.*/ prefixes_details->is_rex = FCML_TRUE; prefixes_details->w = FCML_REX_W( prefix ); prefixes_details->r = FCML_REX_R( prefix ); prefixes_details->x = FCML_REX_X( prefix ); prefixes_details->b = FCML_REX_B( prefix ); /* REX can not be used together with the VEX at the moment.*/ is_xop_vex_allowed = FCML_FALSE; is_last_prefix = FCML_TRUE; } break; } /* Handle VEX/XOP prefixes.*/ if ( prefix_type == FCML_PT_VEX || prefix_type == FCML_PT_XOP ) { if ( is_xop_vex_allowed ) { fcml_stream_pointer sp = fcml_fn_stream_save_point( stream ); /* Skip to the second byte of VEX prefix.*/ fcml_fn_stream_seek( stream, 1, FCML_EN_ST_CURRENT ); if ( op_mode == FCML_OM_32_BIT ) { /* Check if it is really a VEX/XOP prefix.*/ fcml_uint8_t second_byte = fcml_fn_stream_peek( stream, &result ); /* VEX.R/XOP.R and VEX.X/XOP.X has to be set to 11 in 32bit mode.*/ if ( !result || ( second_byte & 0xC0 ) != 0xC0 ) { fcml_fn_stream_restore_point( stream, sp ); prefix_type = FCML_PT_GROUP_UNKNOWN; } /* In case of XOP prefix, if the MMMMM field is less than 8 then these two bytes are a form of the POP instruction rather than an XOP prefix.*/ if ( prefix_type == FCML_PT_XOP && FCML_VEX_MMMM( second_byte ) < 0x08 ) { fcml_fn_stream_restore_point( stream, sp ); prefix_type = FCML_PT_GROUP_UNKNOWN; } } /* Copy rest of the VEX prefixes.*/ if ( prefix_type != FCML_PT_GROUP_UNKNOWN ) { fcml_int nbytes = fcml_fn_stream_read_bytes( stream, &( prefix_details->vex_xop_bytes ), xop_vex_prefix_size ); if ( nbytes != xop_vex_prefix_size ) { /* Stream is incomplete, so we can not treat it as a VEX/XOP.*/ prefix_type = FCML_PT_GROUP_UNKNOWN; } else { /* Decodes VEX/XOP fields.*/ switch ( prefix ) { case 0x8F: /* XOP is encoded like 3 bytes VEX prefix.*/ case 0xC4: if ( prefix_type == FCML_PT_XOP && FCML_VEX_MMMM( prefix_details->vex_xop_bytes[0] ) < 0x08 ) { prefix_type = FCML_PT_GROUP_UNKNOWN; break; } prefixes_details->r = FCML_VEX_R( prefix_details->vex_xop_bytes[0] ); prefixes_details->x = FCML_VEX_X( prefix_details->vex_xop_bytes[0] ); if ( op_mode == FCML_OM_64_BIT ) { prefixes_details->b = FCML_VEX_B( prefix_details->vex_xop_bytes[0] ); prefixes_details->w = FCML_VEX_W( prefix_details->vex_xop_bytes[1] ); } else { /* These bits should be silently ignored in 32-bit mode.*/ prefixes_details->b = 0; prefixes_details->w = 0; } prefixes_details->l = FCML_VEX_L( prefix_details->vex_xop_bytes[1] ); prefixes_details->pp = FCML_VEX_PP( prefix_details->vex_xop_bytes[1] ); prefixes_details->mmmm = FCML_VEX_MMMM( prefix_details->vex_xop_bytes[0] ); prefixes_details->vvvv = FCML_VEX_VVVV( prefix_details->vex_xop_bytes[1] ); break; case 0xC5: prefixes_details->r = FCML_VEX_R( prefix_details->vex_xop_bytes[0] ); prefixes_details->l = FCML_VEX_L( prefix_details->vex_xop_bytes[0] ); prefixes_details->vvvv = FCML_VEX_VVVV( prefix_details->vex_xop_bytes[0] ); prefixes_details->pp = FCML_VEX_PP( prefix_details->vex_xop_bytes[0] ); break; } if ( op_mode == FCML_OM_32_BIT && prefixes_details->vvvv > 7 ) { prefix_type = FCML_PT_GROUP_UNKNOWN; } prefixes_details->vex_xop_first_byte = prefix; prefix_size += xop_vex_prefix_size; } fcml_fn_stream_restore_point( stream, sp ); } } else { /* If 0xC5 and 0xC4 can not be treated as a VEX prefix, it*/ /* should be treated just as instruction opcode.*/ prefix_type = FCML_PT_GROUP_UNKNOWN; } } if ( prefix_type != FCML_PT_GROUP_UNKNOWN ) { prefix_details->prefix = prefix; prefix_details->prefix_type = prefix_type; prefix_details->mandatory_prefix = ( p_flags & FCML_IDFPF_IS_MANDATORY_CANDIDATE ) ? FCML_TRUE : FCML_FALSE; if ( p_flags & FCML_IDFPF_IS_VEX ) { prefixes_details->is_vex = FCML_TRUE; } if ( p_flags & FCML_IDFPF_IS_XOP ) { prefixes_details->is_xop = FCML_TRUE; } if ( p_flags & FCML_IDFPF_IS_LOCK ) { prefixes_details->is_lock = ( p_flags & FCML_IDFPF_IS_LOCK ) ? FCML_TRUE : FCML_FALSE; } if ( p_flags & FCML_IDFPF_IS_REP_XRELEASE ) { prefixes_details->is_rep = ( p_flags & FCML_IDFPF_IS_REP_XRELEASE ) ? FCML_TRUE : FCML_FALSE; } if ( p_flags & FCML_IDFPF_IS_REPNE_XACQUIRE ) { prefixes_details->is_repne = ( p_flags & FCML_IDFPF_IS_REPNE_XACQUIRE ) ? FCML_TRUE : FCML_FALSE; } if ( p_flags & FCML_IDFPF_IS_BRANCH ) { prefixes_details->is_branch = ( p_flags & FCML_IDFPF_IS_BRANCH ) ? FCML_TRUE : FCML_FALSE; } if ( p_flags & FCML_IDFPF_IS_NOBRANCH ) { prefixes_details->is_nobranch = ( p_flags & FCML_IDFPF_IS_NOBRANCH ) ? FCML_TRUE : FCML_FALSE; } prefixes_details->prefixes_bytes_count += prefix_size; fcml_fn_stream_seek( stream, prefix_size, FCML_EN_ST_CURRENT ); prefix_index++; } else { is_last_prefix = FCML_FALSE; } } /* Break loop if REX or VEX prefix is already found.*/ } while ( prefix_type != FCML_PT_GROUP_UNKNOWN && !is_last_prefix ); prefixes_details->prefixes_count = prefix_index; /* Check if prefixes marked as mandatory are really a mandatory ones.*/ /* VEX and XOP prefixes don't allow any mandatory prefixes, so following*/ /* code has nothing to do if there is VEX or XOP.*/ if ( prefix_index > 0 && prefix_type != FCML_PT_VEX && prefix_type != FCML_PT_XOP ) { fcml_bool found_plain_prefix = FCML_FALSE; fcml_int i; for ( i = prefix_index; i > 0; i-- ) { if ( found_plain_prefix ) { prefixes->prefixes[i - 1].mandatory_prefix = FCML_FALSE; } else { /* REX prefixes have to be preceded by mandatory and optional prefixes if there are any.*/ fcml_st_instruction_prefix *prefix = &( prefixes->prefixes[i - 1] ); if ( !prefix->mandatory_prefix && prefix->prefix_type != FCML_PT_REX ) { found_plain_prefix = FCML_TRUE; } } } } return error; } fcml_prefixes fcml_ifn_dasm_convert_prefixes_to_generic_prefixes( fcml_st_prefixes_details *prefixes ) { fcml_prefixes gen_prefixes = 0; if ( prefixes ) { if ( prefixes->is_rep ) { gen_prefixes |= FCML_PREFIX_REP; } if ( prefixes->is_repne ) { gen_prefixes |= FCML_PREFIX_REPNE; } if ( prefixes->is_lock ) { gen_prefixes |= FCML_PREFIX_LOCK; } if ( prefixes->is_xacquire ) { gen_prefixes |= FCML_PREFIX_XACQUIRE; } if ( prefixes->is_xrelease ) { gen_prefixes |= FCML_PREFIX_XRELEASE; } if ( prefixes->is_branch ) { gen_prefixes |= FCML_PREFIX_BRANCH_HINT; } if ( prefixes->is_nobranch ) { gen_prefixes |= FCML_PREFIX_NOBRANCH_HINT; } } return gen_prefixes; } /**************************** * API. ****************************/ fcml_ceh_error LIB_CALL fcml_fn_disassembler_init( const fcml_st_dialect *dialect, fcml_st_disassembler **disassembler ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_ist_dasm_disassembler *int_disasm = (fcml_ist_dasm_disassembler*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_ist_dasm_disassembler) ); if ( int_disasm ) { int_disasm->dialect_context = (fcml_st_dialect_context_int*) dialect; error = fcml_fn_dt_dts_tree_init( (fcml_st_dialect_context_int*) dialect, &( int_disasm->decoding_tree ), &fcml_ifn_dasm_dts_prepare_instruction_decoding_callback_default, &fcml_ifn_dasm_dts_dispose_instruction_decoding_callback_default ); if ( !error ) { *disassembler = (fcml_st_disassembler*) int_disasm; } } else { error = FCML_CEH_GEC_OUT_OF_MEMORY; } return error; } void fcml_ifn_dasm_clean_operands_for_short_forms( fcml_st_instruction *instruction, fcml_st_instruction_details *instruction_details ) { if ( instruction_details->is_shortcut ) { /* Clean all operands, short forms do not have them.*/ instruction->operands_count = 0; fcml_fn_env_memory_clear( &( instruction->operands[0] ), sizeof(fcml_st_operand[FCML_OPERANDS_COUNT]) ); fcml_fn_env_memory_clear( &( instruction_details->operand_details[0] ), sizeof(fcml_st_operand_details[FCML_OPERANDS_COUNT]) ); } else if ( instruction_details->is_pseudo_op ) { int i; for ( i = 0; i < FCML_OPERANDS_COUNT; i++ ) { /* Clean IMM pseudo opcode operand.*/ if ( instruction->operands[i].hints & FCML_OP_HINT_PSEUDO_OPCODE ) { fcml_fn_env_memory_clear( &( instruction->operands[i] ), sizeof(fcml_st_operand) ); fcml_fn_env_memory_clear( &( instruction_details->operand_details[i] ), sizeof(fcml_st_operand_details) ); instruction->operands_count--; /* It is always the last one.*/ break; } } } } void LIB_CALL fcml_fn_disassembler_result_prepare( fcml_st_disassembler_result *result ) { if ( result ) { /* Clean result container. */ fcml_fn_env_memory_clear( result, sizeof(fcml_st_disassembler_result) ); } } fcml_ceh_error fcml_ifn_disassemble_core( fcml_st_disassembler_context *context, fcml_st_disassembler_result *result ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_ist_dasm_disassembler *int_disasm = (fcml_ist_dasm_disassembler *) context->disassembler; error = fcml_fn_prepare_entry_point( &( context->entry_point ) ); if ( error ) { return error; } /* Prepare stream.*/ fcml_st_memory_stream stream; stream.base_address = context->code; stream.size = context->code_length; stream.offset = 0; /* Prepare disassemble context.*/ fcml_ist_dasm_decoding_context decoding_context = { 0 }; decoding_context.disassembler_context = context; decoding_context.effective_address_size_attribute = context->entry_point.address_size_attribute; decoding_context.effective_operand_size_attribute = context->entry_point.operand_size_attribute; decoding_context.stream = &stream; error = fcml_ifn_dasm_decode_prefixes( &decoding_context ); if ( error ) { return error; } error = fcml_ifn_dasm_decode_instruction( &decoding_context ); if ( !error ) { /* Copy potential errors.*/ result->errors = decoding_context.errors; fcml_st_instruction *instruction = &( result->instruction ); fcml_st_instruction_details *instruction_details = &( result->instruction_details ); fcml_usize memory_data_size = 0; /* Prepare operands.*/ fcml_int i; for ( i = 0; i < FCML_OPERANDS_COUNT; i++ ) { fcml_ist_dasm_operand_wrapper *operand_wrapper = &( decoding_context.operand_wrappers[i] ); if ( operand_wrapper->operand.type != FCML_OT_NONE ) { if ( operand_wrapper->operand.type == FCML_OT_ADDRESS ) { memory_data_size = operand_wrapper->operand.address.size_operator; } instruction->operands[i] = operand_wrapper->operand; instruction_details->operand_details[i].access_mode = operand_wrapper->access_mode; } else { break; } } instruction->operands_count = i; /* ModR/M details.*/ fcml_st_decoded_modrm_details *modrm_details = &( instruction_details->modrm_details ); modrm_details->modrm = decoding_context.decoded_modrm_details.modrm; modrm_details->sib = decoding_context.decoded_modrm_details.sib; modrm_details->is_rip = decoding_context.decoded_modrm.is_rip; modrm_details->is_modrm = decoding_context.is_modrm; /* Prefixes.*/ instruction_details->prefixes_details = decoding_context.prefixes; instruction->prefixes = fcml_ifn_dasm_convert_prefixes_to_generic_prefixes( &( decoding_context.prefixes ) ); /* Copy instruction hints.*/ instruction->hints = decoding_context.instruction_hints; /* Instruction code.*/ instruction_details->instruction_size = decoding_context.calculated_instruction_size; fcml_fn_env_memory_copy( &instruction_details->instruction_code, context->code, instruction_details->instruction_size > FCML_INSTRUCTION_SIZE ? FCML_INSTRUCTION_SIZE : instruction_details->instruction_size ); /* Conditions.*/ if ( decoding_context.is_conditional ) { instruction->is_conditional = FCML_TRUE; instruction->condition = decoding_context.condition; } else { instruction->is_conditional = FCML_FALSE; } /* Opcode fields.*/ instruction_details->opcode_field_s_bit = decoding_context.opcode_field_s_bit; instruction_details->opcode_field_w_bit = decoding_context.opcode_field_w_bit; /* Instruction code. */ instruction_details->instruction = decoding_context.instruction; instruction_details->addr_mode = decoding_context.addr_mode; instruction_details->instruction_group = decoding_context.instruction_group; /* L flag for mnemonic chooser.*/ fcml_nuint8_t l; l.is_not_null = FCML_FALSE; if ( instruction_details->prefixes_details.is_vex || instruction_details->prefixes_details.is_xop ) { l.is_not_null = FCML_TRUE; l.value = instruction_details->prefixes_details.l; } fcml_st_mp_mnemonic *mnemonic = NULL; if ( decoding_context.pseudo_op ) { /* Gets mnemonic for pseudo operation. */ instruction->mnemonic = int_disasm->dialect_context->get_pseudo_operation_mnemonic( decoding_context.pseudo_op ); instruction_details->pseudo_op = decoding_context.pseudo_op; } else { /* Mnemonic for real assembler instruction. */ fcml_bool shortform = decoding_context.disassembler_context->configuration.short_forms; fcml_st_mp_config mp_config; mp_config.effective_asa = decoding_context.effective_address_size_attribute; mp_config.effective_osa = decoding_context.effective_operand_size_attribute; mp_config.is_memory = ( decoding_context.decoded_modrm.address.address_form != FCML_AF_UNDEFINED && !decoding_context.decoded_modrm.reg.is_not_null ); mp_config.memory_data_size = memory_data_size; mp_config.use_shortcut = shortform; mp_config.pseudo_opcode = decoding_context.pseudo_opcode; mp_config.suffix = decoding_context.suffix; mp_config.l = l; mnemonic = fcml_fn_mp_choose_mnemonic( decoding_context.mnemonics, &mp_config ); if ( mnemonic ) { instruction_details->is_pseudo_op = mnemonic->pseudo_op.is_not_null; instruction_details->is_shortcut = mnemonic->is_shortcut && shortform; /* Render mnemonic using provided dialect.*/ instruction->mnemonic = int_disasm->dialect_context->render_mnemonic( mnemonic->mnemonic, decoding_context.is_conditional ? &( decoding_context.condition ) : NULL, context->configuration.conditional_group, context->configuration.carry_flag_conditional_suffix ); } else { /* Mnemonic not found.*/ FCML_TRACE_MSG( "Can not choose mnemonic for disassembled instruction." ); return FCML_CEH_GEC_INTERNAL_ERROR; } } /* Clean operands for short forms.*/ fcml_ifn_dasm_clean_operands_for_short_forms( instruction, instruction_details ); /* Increment IP */ if ( context->configuration.increment_ip ) { fcml_usize size = result->instruction_details.instruction_size; context->entry_point.ip += size; // Skip to the next instruction. fcml_uint8_t *instruction_code = (fcml_uint8_t *)context->code; instruction_code += size; context->code = instruction_code; context->code_length -= ( context->code_length >= size ) ? size : context->code_length; } /* Execute disassembler post processor if needed.*/ fcml_fnp_asm_dialect_prepare_disassembler_postprocessor post_processor = int_disasm->dialect_context->disassembler_postprocessor; if ( post_processor ) { post_processor( &(context->configuration), mnemonic, result ); } } else if ( decoding_context.errors.errors ) { /* If there are any errors, return them back to the user.*/ result->errors = decoding_context.errors; } return error; } fcml_ceh_error LIB_CALL fcml_fn_disassemble( fcml_st_disassembler_context *context, fcml_st_disassembler_result *result ) { // Sanity check. if ( !context || !result ) { return FCML_CEH_GEC_INVALID_INPUT; } if( !context->code_length ) { return FCML_CEH_GEC_EOF; } // Check if there is something already available in result, and free it in such cache. fcml_fn_disassembler_result_free( result ); fcml_ceh_error error = fcml_ifn_disassemble_core( context, result ); if ( error ) { // Try to convert error code to error message if there is such need. fcml_fn_utils_convert_gec_to_error_info( context->configuration.enable_error_messages, &( result->errors ), error ); } return error; } void LIB_CALL fcml_fn_disassembler_result_free( fcml_st_disassembler_result *result ) { if ( result ) { /* Free all error messages. */ fcml_fn_ceh_free_errors_only( &( result->errors ) ); /* Mnemonic is allocated by dialect and has to be also free'd. */ if ( result->instruction.mnemonic ) { fcml_fn_env_str_strfree( result->instruction.mnemonic ); } /* Clean all information inside result. */ fcml_fn_disassembler_result_prepare( result ); } } void LIB_CALL fcml_fn_disassembler_free( fcml_st_disassembler *disassembler ) { fcml_ist_dasm_disassembler *dec_disasm = (fcml_ist_dasm_disassembler*) disassembler; if ( dec_disasm ) { if ( dec_disasm->decoding_tree ) { fcml_fn_dt_dts_tree_free( dec_disasm->dialect_context, dec_disasm->decoding_tree ); } fcml_fn_env_memory_free( dec_disasm ); } } fcml-1.1.1/src/fcml_assembler.c0000644000175000017500000003303112560745216013275 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include #include #include "fcml_dialect_int.h" #include "fcml_encoding.h" #include "fcml_env_int.h" #include "fcml_utils.h" #include "fcml_trace.h" #include "fcml_coll.h" /** Initialized assembler instance. */ typedef struct fcml_ist_asm_enc_assembler { /** Map of supported instructions, with mnemonic as key and instructions addressing modes as values. */ fcml_coll_map instructions_map; /** Map of supported pseudo operations */ fcml_coll_map pseudo_operations_map; /** Dialect used to initialize assembler. */ fcml_st_dialect_context_int *dialect_context; } fcml_ist_asm_enc_assembler; typedef fcml_ceh_error (*fcml_ifnp_encode_pseudo_operation)( const fcml_st_instruction *instruction, fcml_st_assembler_result *result ); typedef struct fcml_ist_enc_pseudo_operation_desc { fcml_en_pseudo_operations pseudo_operation; fcml_ifnp_encode_pseudo_operation pseudo_operation_encoder; } fcml_ist_enc_pseudo_operation_desc; /********************** * Pseudo operations. * **********************/ fcml_st_assembled_instruction *fcml_ifn_asm_alloc_assembled_instruction( fcml_usize size ) { fcml_st_assembled_instruction *instruction = (fcml_st_assembled_instruction*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_assembled_instruction) ); if (!instruction) { return NULL; } instruction->code = (fcml_uint8_t*) fcml_fn_env_memory_alloc_clear( size ); if (!instruction->code) { fcml_fn_env_memory_free( instruction ); return NULL; } instruction->code_length = size; return instruction; } fcml_ceh_error fcml_ifp_encode_pseudo_operation_db_encoder( const fcml_st_instruction *instruction, fcml_st_assembler_result *result ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if (instruction->operands_count == 1 && instruction->operands[0].type == FCML_OT_IMMEDIATE) { fcml_uint8_t value; error = fcml_fn_utils_convert_integer_to_uint8( &( instruction->operands[0].immediate ), &value ); if (error) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } result->instructions = fcml_ifn_asm_alloc_assembled_instruction( 1 ); if (!result->instructions) { return FCML_CEH_GEC_OUT_OF_MEMORY; } result->instructions->code[0] = value; } else { error = FCML_CEH_GEC_INVALID_OPPERAND; } return error; } fcml_ist_enc_pseudo_operation_desc fcml_iarr_supported_pseudo_operations[] = { { FP_DB, &fcml_ifp_encode_pseudo_operation_db_encoder }, { FP_NO_PSEUDO_OP, NULL } }; fcml_ist_enc_pseudo_operation_desc *fcml_ifn_asm_prepare_pseudo_operation_encoding( fcml_en_pseudo_operations pseudo_operation ) { fcml_ist_enc_pseudo_operation_desc *desc = fcml_iarr_supported_pseudo_operations; while ( desc->pseudo_operation != FP_NO_PSEUDO_OP ) { if (desc->pseudo_operation == pseudo_operation) { return desc; } } return NULL; } fcml_ceh_error fcml_fn_asm_init_pseudo_operation_encodings( fcml_st_dialect_context_int *dialect, fcml_coll_map *pseudo_operations_map ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_int map_error; fcml_coll_map po_map = fcml_fn_coll_map_alloc( &fcml_coll_map_descriptor_string, 10, &map_error ); if (map_error) { return fcml_fn_utils_convert_map_error( map_error ); } fcml_st_dialect_pseudpo_operation_mnemonic *mnemonics_map = dialect->get_pseudo_operation_mnemonics(); if (mnemonics_map) { while ( mnemonics_map->mnemonic ) { fcml_ist_enc_pseudo_operation_desc *desc = fcml_ifn_asm_prepare_pseudo_operation_encoding( mnemonics_map->pseudo_operation ); if (desc) { fcml_fn_coll_map_put( po_map, mnemonics_map->mnemonic, desc, &map_error ); if (map_error) { fcml_fn_coll_map_free( po_map ); return fcml_fn_utils_convert_map_error( map_error ); } } else { FCML_TRACE( "Unsupported pseudo operation code: %d.", mnemonics_map->pseudo_operation ); } mnemonics_map++; } } *pseudo_operations_map = po_map; return error; } fcml_ceh_error fcml_fn_asm_handle_pseudo_operations( fcml_st_assembler_context *asm_context, fcml_coll_map pseudo_operations_map, const fcml_st_instruction *instruction, fcml_st_assembler_result *result ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_ist_enc_pseudo_operation_desc *desc = (fcml_ist_enc_pseudo_operation_desc*) fcml_fn_coll_map_get( pseudo_operations_map, instruction->mnemonic ); if (desc) { error = desc->pseudo_operation_encoder( instruction, result ); if (!error) { result->chosen_instruction = result->instructions; result->number_of_instructions = 1; } } else { error = FCML_CEH_GEC_UNKNOWN_MNEMONIC; } return error; } /***************************** * Assembler initialization. * *****************************/ fcml_ceh_error LIB_CALL fcml_fn_assembler_init( const fcml_st_dialect *dialect, fcml_st_assembler **assembler ) { /* Allocate assembler instance.*/ fcml_ist_asm_enc_assembler *enc_asm = (fcml_ist_asm_enc_assembler*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_ist_asm_enc_assembler) ); if (!enc_asm) { return FCML_CEH_GEC_OUT_OF_MEMORY; } /* Initializes classic processor instructions encoding. */ fcml_ceh_error error = fcml_fn_asm_init_instruction_encodings( (fcml_st_dialect_context_int*) dialect, &( enc_asm->instructions_map ) ); if (error) { fcml_fn_env_memory_free( enc_asm ); return error; } /* Initialize pseudo operations encoding. */ error = fcml_fn_asm_init_pseudo_operation_encodings( (fcml_st_dialect_context_int*) dialect, &( enc_asm->pseudo_operations_map ) ); if (error) { fcml_fn_asm_free_instruction_encodings( enc_asm->instructions_map ); fcml_fn_env_memory_free( enc_asm ); return error; } enc_asm->dialect_context = (fcml_st_dialect_context_int*) dialect; *assembler = (fcml_st_assembler *) enc_asm; return FCML_CEH_GEC_NO_ERROR; } void fcml_ifn_asm_free_instruction_chain( fcml_st_assembled_instruction *chain ) { /* Free every instruction in the chain. */ while ( chain ) { fcml_st_assembled_instruction *instruction = chain; chain = chain->next; fcml_fn_env_memory_free( instruction->code ); fcml_fn_env_memory_free( instruction ); } } void LIB_CALL fcml_fn_assembler_instruction_detach( fcml_st_assembled_instruction **chain, fcml_st_assembled_instruction *instruction ) { if (!chain || !instruction) { return; } fcml_st_assembled_instruction **current = chain; fcml_bool found = FCML_FALSE; do { if (*current == instruction) { *current = instruction->next; found = FCML_TRUE; } current = &( ( *current )->next ); } while ( !found && *current ); } void LIB_CALL fcml_fn_assembler_instruction_free( fcml_st_assembled_instruction *instruction ) { if (instruction) { if (instruction->code) { fcml_fn_env_memory_free( instruction->code ); } fcml_fn_ceh_free_errors_only( &( instruction->warnings ) ); fcml_fn_env_memory_free( instruction ); } } void LIB_CALL fcml_fn_assembler_result_free( fcml_st_assembler_result *result ) { if (result) { // Free errors but leave container as is. fcml_fn_ceh_free_errors_only( &( result->errors ) ); // Free all available instructions in the chain. fcml_ifn_asm_free_instruction_chain( result->instructions ); // Prepare for next usage. fcml_fn_assembler_result_prepare( result ); } } void LIB_CALL fcml_fn_assembler_result_prepare( fcml_st_assembler_result *result ) { // Clean assembler result container before it is first used. if (result) { fcml_fn_env_memory_clear( result, sizeof(fcml_st_assembler_result) ); } } fcml_ceh_error fcml_ifn_assemble_core( fcml_st_assembler_context *asm_context, const fcml_st_instruction *instruction, fcml_st_assembler_result *result ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; // Sanity check. if (!result || !instruction || !instruction->mnemonic || !asm_context) { return FCML_CEH_GEC_INVALID_INPUT; } /* Validate and prepare entry point. */ error = fcml_fn_prepare_entry_point( &( asm_context->entry_point ) ); if (error) { return error; } /* Take into account that dialect can modify source instruction by * preparing it for the assembler, so we have to use the local copy here. */ fcml_st_instruction tmp_instruction = *instruction; fcml_ist_asm_enc_assembler *enc_asm = (fcml_ist_asm_enc_assembler*) asm_context->assembler; /* The first place where the dialect can interfere with the instruction definition. */ fcml_fnp_asm_dialect_prepare_assembler_preprocessor assembler_preprocessor = enc_asm->dialect_context->assembler_preprocessor; if (assembler_preprocessor) { assembler_preprocessor( &(asm_context->configuration), (fcml_st_dialect*) enc_asm->dialect_context, &tmp_instruction, NULL, F_UNKNOWN, NULL, NULL ); } /* Find instruction addressing modes/forms. */ fcml_st_asm_instruction_addr_modes *addr_modes = NULL; error = fcml_fn_asm_get_instruction_encodings( enc_asm->instructions_map, tmp_instruction.mnemonic, &addr_modes ); if (error) { if (error == FCML_CEH_GEC_UNKNOWN_MNEMONIC) { return fcml_fn_asm_handle_pseudo_operations( asm_context, enc_asm->pseudo_operations_map, instruction, result ); } else { return error; } } /* Execute instruction encoder. */ if (addr_modes) { if (addr_modes->instruction_encoder) { fcml_st_asm_encoder_result enc_result = { { 0 } }; error = addr_modes->instruction_encoder( asm_context, enc_asm->dialect_context, &tmp_instruction, &enc_result, addr_modes ); if (!error) { result->instructions = enc_result.instructions; result->number_of_instructions = enc_result.number_of_instructions; result->chosen_instruction = enc_result.chosen_instruction; /* Increment IP by chosen instruction length. */ if (result->chosen_instruction && asm_context->configuration.increment_ip) { asm_context->entry_point.ip += result->chosen_instruction->code_length; } } /* Convert encoding result to assembler result. */ result->errors = enc_result.errors; } else { FCML_TRACE_MSG( "Unavailable instruction encoder." ); error = FCML_CEH_GEC_INTERNAL_ERROR; } } else { error = FCML_CEH_GEC_UNKNOWN_MNEMONIC; } /* Free results but only if assembling failed. */ if (error) { /* Free only instructions, error messages should be returned to user. */ fcml_ifn_asm_free_instruction_chain( result->instructions ); result->instructions = NULL; result->chosen_instruction = NULL; result->number_of_instructions = 0; } return error; } fcml_ceh_error LIB_CALL fcml_fn_assemble( fcml_st_assembler_context *context, const fcml_st_instruction *instruction, fcml_st_assembler_result *result ) { // Check if there is something already available in the result and free it in such a cache. fcml_fn_assembler_result_free( result ); fcml_ceh_error error = fcml_ifn_assemble_core( context, instruction, result ); if (error) { // Try to convert error code to error message if there is such need. fcml_fn_utils_convert_gec_to_error_info( context->configuration.enable_error_messages, &( result->errors ), error ); } return error; } void LIB_CALL fcml_fn_assembler_free( fcml_st_assembler *assembler ) { if (assembler) { fcml_ist_asm_enc_assembler *enc_asm = (fcml_ist_asm_enc_assembler *) assembler; if (enc_asm->instructions_map) { fcml_fn_asm_free_instruction_encodings( enc_asm->instructions_map ); } /* Frees pseudo operations encoding. */ if (enc_asm->pseudo_operations_map) { fcml_fn_coll_map_free( enc_asm->pseudo_operations_map ); } /* Assembler is not the owner of the dialect context. */ fcml_fn_env_memory_free( enc_asm ); } } fcml_st_dialect *fcml_fn_assembler_extract_dialect( fcml_st_assembler *assembler ) { fcml_st_dialect *dialect = NULL; if (assembler) { fcml_ist_asm_enc_assembler *enc_asm = (fcml_ist_asm_enc_assembler*) assembler; dialect = (fcml_st_dialect*) enc_asm->dialect_context; } return dialect; } fcml-1.1.1/src/fcml_decoding_tree.h0000644000175000017500000000451612560745216014126 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_ASM_DECODING_TREE_H_ #define FCML_ASM_DECODING_TREE_H_ #include "fcml_coll.h" #include "fcml_def.h" #include "fcml_dialect_int.h" #define FCML_DT_TREE_OPCODE_ARRAY_SIZE 256 typedef struct fcml_st_dt_diss_tree_element { struct fcml_st_dt_diss_tree_element* opcodes[FCML_DT_TREE_OPCODE_ARRAY_SIZE]; fcml_st_coll_list *instruction_decoding_defs; } fcml_st_dt_diss_tree_element; typedef fcml_ceh_error (*fcml_fp_dt_prepare_instruction_decoding_callback)( fcml_st_dialect_context_int *dialect, fcml_st_dt_diss_tree_element *element, fcml_st_def_instruction_desc *instruction_desc, fcml_st_def_addr_mode_desc *opcode_desc ); typedef void (*fcml_fp_dt_dispose_instruction_decoding_callback)( fcml_st_dialect_context_int *dialect, fcml_ptr instruction_decoding ); typedef struct fcml_st_dt_decoding_tree { fcml_st_dt_diss_tree_element *opcode[FCML_DT_TREE_OPCODE_ARRAY_SIZE]; fcml_st_dialect_context_int *dialect_context; fcml_fp_dt_prepare_instruction_decoding_callback prepare_callback; fcml_fp_dt_dispose_instruction_decoding_callback dispose_callback; } fcml_st_dt_decoding_tree; fcml_ceh_error fcml_fn_dt_dts_tree_init( fcml_st_dialect_context_int *dialect_context, fcml_st_dt_decoding_tree **tree, fcml_fp_dt_prepare_instruction_decoding_callback prepare_callback, fcml_fp_dt_dispose_instruction_decoding_callback dispose_callback ); void fcml_fn_dt_dts_tree_free( fcml_st_dialect_context_int *dialect_context, fcml_st_dt_decoding_tree *tree ); #endif /* FCML_ASM_DECODING_TREE_H_ */ fcml-1.1.1/src/fcml_gas_parser.h0000644000175000017500000000220112560745216013446 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_GAS_PARSER_H_ #define FCML_GAS_PARSER_H_ #include #include #include #include "fcml_parser_int.h" fcml_ceh_error fcml_fn_gas_parse_instruction_to_ast( fcml_ip ip, const fcml_string mnemonic, fcml_st_parser_ast *ast ); #endif /* FCML_GAS_PARSER_H_ */ fcml-1.1.1/src/fcml_modrm_decoder.c0000644000175000017500000003142712560745216014132 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_modrm_decoder.h" #include #include "fcml_env_int.h" #include "fcml_utils.h" /* Register configurations used for 16 bit addressing form decoding */ struct fcml_st_register fcml_iarr_modrm_addressing_form_reg_16[8][2] = { { { FCML_REG_GPR, FCML_DS_16, FCML_REG_BX, FCML_FALSE }, { FCML_REG_GPR, FCML_DS_16, FCML_REG_SI, FCML_FALSE } }, { { FCML_REG_GPR, FCML_DS_16, FCML_REG_BX, FCML_FALSE }, { FCML_REG_GPR, FCML_DS_16, FCML_REG_DI, FCML_FALSE } }, { { FCML_REG_GPR, FCML_DS_16, FCML_REG_BP, FCML_FALSE }, { FCML_REG_GPR, FCML_DS_16, FCML_REG_SI, FCML_FALSE } }, { { FCML_REG_GPR, FCML_DS_16, FCML_REG_BP, FCML_FALSE }, { FCML_REG_GPR, FCML_DS_16, FCML_REG_DI, FCML_FALSE } }, { { FCML_REG_GPR, FCML_DS_16, FCML_REG_SI, FCML_FALSE }, { FCML_REG_UNDEFINED, 0, 0, FCML_FALSE } }, { { FCML_REG_GPR, FCML_DS_16, FCML_REG_DI, FCML_FALSE }, { FCML_REG_UNDEFINED, 0, 0, FCML_FALSE } }, { { FCML_REG_GPR, FCML_DS_16, FCML_REG_BP, FCML_FALSE }, { FCML_REG_UNDEFINED, 0, 0, FCML_FALSE } }, { { FCML_REG_GPR, FCML_DS_16, FCML_REG_BX, FCML_FALSE }, { FCML_REG_UNDEFINED, 0, 0, FCML_FALSE } } }; fcml_ceh_error fcml_ifn_modrm_decode_displacement( fcml_st_memory_stream *stream, fcml_st_integer *displacement, fcml_st_offset *offset, fcml_usize size, fcml_usize offset_extension_size, fcml_usize displacement_extension_size ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_integer integer; error = fcml_fn_utils_decode_integer( stream, &integer, size ); if ( error ) { return error; } /* Offsets and displacement are signed integers.*/ integer.is_signed = FCML_TRUE; if ( displacement_extension_size ) { fcml_fn_utils_extend_integer( &integer, displacement_extension_size ); } if ( displacement ) { *displacement = integer; } if ( offset ) { if ( offset_extension_size ) { fcml_fn_utils_extend_integer( &integer, offset_extension_size ); } error = fcml_fn_utils_integer_to_offset( &integer, offset ); if ( error ) { return FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } } return error; } fcml_usize fcml_ifn_modrm_get_displacement_extension( fcml_st_modrm_decoder_context *context, fcml_uint8_t flags ) { return flags & FCML_MODRM_DEC_FLAG_EXTEND_DISPLACEMENT_TO_ASA ? context->effective_address_size : 0; } fcml_ceh_error fcml_ifn_modrm_decode_16bit( fcml_st_modrm_decoder_context *context, fcml_st_modrm_source *modrm_source, fcml_st_modrm *decoded_modrm, fcml_st_modrm_details *modrm_details, fcml_uint8_t flags ) { fcml_bool result; fcml_st_memory_stream *stream = modrm_source->stream; /* Just in case.*/ if ( context->op_mode == FCML_OM_64_BIT ) { return FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } fcml_st_address *address = &( decoded_modrm->address ); fcml_st_effective_address *effective_address = &( address->effective_address ); /* Gets ModR/M byte from stream.*/ fcml_uint8_t mod_rm = fcml_fn_stream_read( stream, &result ); if ( !result ) { return FCML_CEH_GEC_EOF; } modrm_details->modrm = mod_rm; /* Decode ModRM.*/ fcml_uint8_t f_mod = FCML_MODRM_DEC_MOD( mod_rm ); fcml_uint8_t f_rm = FCML_MODRM_DEC_RM( mod_rm ); fcml_uint8_t f_reg_opcode = FCML_MODRM_DEC_REG_OPCODE( mod_rm ); if ( modrm_source->is_vsib ) { return FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } address->address_form = FCML_AF_COMBINED; if ( f_mod == 0 && f_rm == 6 ) { /* disp16.*/ fcml_ceh_error error = fcml_ifn_modrm_decode_displacement( stream, &( effective_address->displacement ), &( address->offset ), FCML_DS_16, context->effective_address_size, fcml_ifn_modrm_get_displacement_extension( context, flags ) ); if ( error ) { return error; } address->address_form = FCML_AF_OFFSET; } else if ( f_mod < 3 ) { effective_address->base = fcml_iarr_modrm_addressing_form_reg_16[f_rm][0]; effective_address->index = fcml_iarr_modrm_addressing_form_reg_16[f_rm][1]; if ( f_mod > 0 ) { fcml_ceh_error error = fcml_ifn_modrm_decode_displacement( stream, &( effective_address->displacement ), NULL, ( f_mod == 1 ) ? FCML_DS_8 : FCML_DS_16, 0, fcml_ifn_modrm_get_displacement_extension( context, flags ) ); if ( error ) { return error; } } } else { /* Straight copy of registers.*/ decoded_modrm->reg.is_not_null = FCML_TRUE; decoded_modrm->reg.value = f_rm; } decoded_modrm->reg_opcode = f_reg_opcode; return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_ifn_modrm_decode_sib( fcml_st_modrm_decoder_context *context, fcml_uint8_t mod_rm, fcml_st_modrm_source *modrm_source, fcml_st_modrm *decoded_modrm, fcml_st_modrm_details *modrm_details, fcml_uint8_t flags ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_memory_stream *stream = modrm_source->stream; fcml_st_address *address = &( decoded_modrm->address ); fcml_st_effective_address *effective_address = &( address->effective_address ); /* Effective address size affects index register.*/ fcml_usize effective_address_size = context->effective_address_size; /* ModR/M fields.*/ fcml_uint8_t f_base; fcml_uint8_t f_index; fcml_uint8_t f_scale; fcml_uint8_t f_mod; /* Get SIB.*/ fcml_bool sib_found = FCML_FALSE; fcml_uint8_t sib = fcml_fn_stream_read( stream, &sib_found ); if ( !sib_found ) { return FCML_CEH_GEC_EOF; } modrm_details->sib.is_not_null = FCML_TRUE; modrm_details->sib.value = sib; f_mod = FCML_MODRM_DEC_MOD( mod_rm ); f_base = FCML_MODRM_SIB_BASE(sib) | ( modrm_source->ext_b << 3 ); f_index = FCML_MODRM_SIB_INDEX(sib) | ( modrm_source->ext_x << 3 ); f_scale = FCML_MODRM_SIB_SS( sib ); /* Index register and scale.*/ if ( FCML_MODRM_SIB_INDEX(sib) != 4 ) { if ( modrm_source->is_vsib ) { effective_address->index.type = FCML_REG_SIMD; effective_address->index.size = modrm_source->vsib_index_size; } else { effective_address->index.type = FCML_REG_GPR; effective_address->index.size = ( effective_address_size == FCML_DS_64 ) ? FCML_DS_64 : FCML_DS_32; } effective_address->index.reg = f_index; /* Scale.*/ effective_address->scale_factor = f_scale ? ( 1 << f_scale ) : 0; /* f_scale * 2*/ } address->address_form = FCML_AF_COMBINED; /* Base register and displacement.*/ if ( f_mod == 0 && FCML_MODRM_SIB_BASE( sib ) == 5 ) { address->address_form = FCML_AF_OFFSET; /* In this case base register doesn't exist.*/ error = fcml_ifn_modrm_decode_displacement( stream, &( effective_address->displacement ), &( address->offset ), FCML_DS_32, effective_address_size, 0 ); } else { /* Effective address size affects base register.*/ effective_address->base.type = FCML_REG_GPR; effective_address->base.size = ( effective_address_size == FCML_DS_64 ) ? FCML_DS_64 : FCML_DS_32; effective_address->base.reg = f_base; /* There is no displacement for mod == 0.*/ if ( f_mod > 0 ) { error = fcml_ifn_modrm_decode_displacement( stream, &( effective_address->displacement ), NULL, ( f_mod == 1 ) ? FCML_DS_8 : FCML_DS_32, 0, fcml_ifn_modrm_get_displacement_extension( context, flags ) ); } } return error; } fcml_ceh_error fcml_ifn_modrm_decode_3264bit( fcml_st_modrm_decoder_context *context, fcml_st_modrm_source *modrm_source, fcml_st_modrm *decoded_modrm, fcml_st_modrm_details *modrm_details, fcml_uint8_t flags ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_memory_stream *stream = modrm_source->stream; fcml_st_address *address = &( decoded_modrm->address ); fcml_st_effective_address *effective_address = &( address->effective_address ); fcml_uint8_t f_mod; fcml_uint8_t f_rm; fcml_usize effective_address_size = context->effective_address_size; /* Gets ModR/M byte from stream.*/ fcml_bool result; fcml_uint8_t mod_rm = fcml_fn_stream_read( stream, &result ); if ( !result ) { return FCML_CEH_GEC_EOF; } modrm_details->modrm = mod_rm; /* Decode ModRM.*/ f_mod = FCML_MODRM_DEC_MOD( mod_rm ); f_rm = FCML_MODRM_DEC_RM(mod_rm) | ( modrm_source->ext_b << 3 ); if ( modrm_source->is_vsib && FCML_MODRM_DEC_RM( mod_rm ) != 4 ) { return FCML_CEH_GEC_INVALID_ADDRESSING_FORM; } address->address_form = FCML_AF_COMBINED; if ( f_mod == 3 ) { /* Registers.*/ decoded_modrm->reg.is_not_null = FCML_TRUE; decoded_modrm->reg.value = f_rm; } else if ( FCML_MODRM_DEC_RM( mod_rm ) == 4 ) { /* Decode SIB addressing format.*/ result = fcml_ifn_modrm_decode_sib( context, mod_rm, modrm_source, decoded_modrm, modrm_details, flags ); } else if ( f_mod == 0 && FCML_MODRM_DEC_RM( mod_rm ) == 5 ) { address->address_form = FCML_AF_OFFSET; /* disp32.*/ if ( context->op_mode == FCML_OM_64_BIT ) { decoded_modrm->is_rip = FCML_TRUE; /* In case of RIP we also set base register to IP.*/ decoded_modrm->address.effective_address.base.type = FCML_REG_IP; decoded_modrm->address.effective_address.base.size = FCML_DS_64; } /* Only displacement value is decoded here. RIP offset is calculated in post processors.*/ error = fcml_ifn_modrm_decode_displacement( stream, &( effective_address->displacement ), &( address->offset ), FCML_DS_32, decoded_modrm->is_rip ? 0 : effective_address_size, 0 ); if ( error ) { return error; } } else { /* Base register.*/ effective_address->base.type = FCML_REG_GPR; effective_address->base.size = ( effective_address_size == FCML_DS_64 ) ? FCML_DS_64 : FCML_DS_32; effective_address->base.reg = f_rm; /* Displacement.*/ if ( f_mod != 0 ) { error = fcml_ifn_modrm_decode_displacement( stream, &( effective_address->displacement ), NULL, ( f_mod == 1 ) ? FCML_DS_8 : FCML_DS_32, 0, fcml_ifn_modrm_get_displacement_extension( context, flags ) ); if ( error ) { return error; } } } /* Decodes register if something needs it.*/ decoded_modrm->reg_opcode = FCML_MODRM_DEC_REG_OPCODE( mod_rm ) | ( modrm_source->ext_r << 3 ); return error; } fcml_ceh_error fcml_fn_modrm_decode_rip( fcml_uint64_t rip, fcml_usize effective_address_size, fcml_st_offset *offset, fcml_st_offset *address ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_int64_t effective_address = (fcml_int64_t) rip + offset->off32; if ( effective_address_size == FCML_DS_32 ) { effective_address &= 0x00000000FFFFFFFFUL; } else if ( effective_address_size == FCML_DS_16 ) { error = FCML_CEH_GEC_INVALID_ADDRESS_SIZE; } if ( !error ) { address->off64 = effective_address; address->size = FCML_DS_64; } return error; } fcml_ceh_error fcml_fn_modrm_decode( fcml_st_modrm_decoder_context *context, fcml_st_modrm_source *modrm_source, fcml_st_modrm *decoded_modrm, fcml_st_modrm_details *modrm_details, fcml_uint8_t flags ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_fn_env_memory_clear( decoded_modrm, sizeof(fcml_st_modrm) ); if ( context->effective_address_size == FCML_DS_16 ) { error = fcml_ifn_modrm_decode_16bit( context, modrm_source, decoded_modrm, modrm_details, flags ); } else if ( context->effective_address_size == FCML_DS_32 || context->effective_address_size == FCML_DS_64 ) { error = fcml_ifn_modrm_decode_3264bit( context, modrm_source, decoded_modrm, modrm_details, flags ); } else { /* Unknown addressing mode.*/ error = FCML_CEH_GEC_INVALID_OPERATING_MODE; } return error; } fcml-1.1.1/src/fcml_intel_lexer.c0000644000175000017500000027251612560745216013647 00000000000000#line 2 "fcml_intel_lexer.c" #line 4 "fcml_intel_lexer.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 39 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) are macros in the reentrant scanner. */ #define yyin yyg->yyin_r #define yyout yyg->yyout_r #define yyextra yyg->yyextra_r #define yyleng yyg->yyleng_r #define yytext yyg->yytext_r #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) #define yy_flex_debug yyg->yy_flex_debug_r /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN yyg->yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yyg->yy_start - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE intel_restart(yyin ,yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #define YY_BUF_SIZE 16384 #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = yyg->yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ 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 * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via intel_restart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] void intel_restart (FILE *input_file ,yyscan_t yyscanner ); void intel__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); YY_BUFFER_STATE intel__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); void intel__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void intel__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void intel_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void intel_pop_buffer_state (yyscan_t yyscanner ); static void intel_ensure_buffer_stack (yyscan_t yyscanner ); static void intel__load_buffer_state (yyscan_t yyscanner ); static void intel__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); #define YY_FLUSH_BUFFER intel__flush_buffer(YY_CURRENT_BUFFER ,yyscanner) YY_BUFFER_STATE intel__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE intel__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); YY_BUFFER_STATE intel__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); void *intel_alloc (yy_size_t ,yyscan_t yyscanner ); void *intel_realloc (void *,yy_size_t ,yyscan_t yyscanner ); void intel_free (void * ,yyscan_t yyscanner ); #define yy_new_buffer intel__create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ intel_ensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ intel__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ intel_ensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ intel__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define intel_wrap(yyscanner) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; typedef int yy_state_type; #define yytext_ptr yytext_r static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); static int yy_get_next_buffer (yyscan_t yyscanner ); static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ yyleng = (size_t) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; #define YY_NUM_RULES 185 #define YY_END_OF_BUFFER 186 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[446] = { 0, 182, 182, 186, 183, 182, 184, 179, 180, 175, 173, 172, 174, 176, 1, 1, 1, 1, 1, 181, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 177, 178, 182, 1, 0, 1, 4, 0, 1, 1, 0, 1, 1, 1, 171, 171, 9, 5, 25, 12, 8, 30, 171, 28, 171, 10, 6, 171, 135, 26, 11, 32, 7, 171, 171, 137, 171, 27, 171, 171, 171, 171, 134, 171, 138, 171, 139, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 65, 66, 171, 171, 171, 171, 171, 171, 171, 31, 29, 136, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 0, 2, 1, 0, 0, 0, 169, 22, 171, 171, 121, 122, 123, 124, 125, 24, 171, 171, 126, 127, 128, 129, 130, 131, 132, 133, 171, 41, 46, 44, 42, 48, 43, 47, 45, 163, 171, 171, 171, 171, 73, 74, 75, 76, 77, 78, 79, 80, 171, 171, 171, 171, 171, 171, 171, 67, 68, 69, 70, 71, 72, 49, 13, 33, 50, 14, 34, 57, 62, 60, 58, 64, 59, 168, 158, 140, 63, 61, 170, 23, 21, 0, 0, 113, 114, 115, 116, 117, 118, 119, 120, 171, 171, 171, 171, 171, 171, 171, 171, 171, 3, 0, 0, 0, 0, 171, 141, 171, 171, 171, 171, 171, 156, 171, 171, 164, 171, 171, 171, 171, 171, 51, 15, 35, 52, 16, 36, 53, 17, 37, 54, 18, 38, 55, 19, 39, 56, 20, 40, 158, 171, 158, 113, 114, 115, 116, 117, 118, 119, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 171, 171, 142, 171, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 171, 171, 171, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 171, 171, 0, 0, 0, 0, 171, 0, 171, 171, 143, 144, 171, 171, 171, 171, 147, 144, 171, 145, 157, 157, 0, 0, 0, 0, 0, 0, 0, 0, 146, 146, 0, 171, 91, 92, 93, 94, 95, 96, 171, 171, 150, 107, 108, 109, 110, 111, 112, 171, 151, 0, 152, 153, 154, 161, 0, 167, 147, 0, 0, 171, 171, 149, 171, 0, 148, 0, 0, 0, 171, 171, 171, 0, 171, 0, 155, 0, 0, 0, 0, 0, 0, 171, 171, 0, 171, 0, 0, 0, 0, 0, 171, 150, 171, 0, 151, 0, 0, 0, 0, 0, 141, 0, 0, 166, 171, 0, 162, 0, 0, 0, 0, 142, 159, 160, 0, 0, 0, 0, 0, 0, 143, 144, 165, 0, 147, 0, 145, 146, 150, 151, 0, 152, 153, 154, 149, 148, 155, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 5, 6, 7, 8, 9, 10, 1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 1, 1, 1, 1, 1, 1, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 32, 44, 45, 46, 47, 48, 1, 49, 1, 50, 1, 51, 52, 53, 54, 55, 56, 57, 58, 59, 32, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 32, 71, 72, 73, 74, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[75] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 3, 2, 2, 2, 2, 2, 2, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 } ; static yyconst flex_int16_t yy_base[449] = { 0, 0, 0, 352, 955, 73, 955, 955, 955, 955, 955, 955, 955, 955, 66, 127, 83, 85, 86, 955, 132, 175, 130, 219, 203, 65, 59, 0, 68, 68, 72, 131, 64, 66, 128, 279, 276, 172, 112, 302, 130, 955, 955, 110, 113, 129, 131, 955, 0, 191, 194, 362, 0, 249, 260, 0, 132, 0, 0, 0, 0, 0, 174, 194, 0, 170, 0, 0, 254, 0, 0, 0, 248, 0, 170, 342, 0, 188, 0, 217, 278, 222, 252, 332, 241, 0, 258, 0, 197, 359, 386, 270, 274, 276, 302, 318, 328, 394, 387, 389, 322, 379, 342, 387, 391, 355, 388, 403, 400, 0, 461, 389, 403, 402, 343, 410, 427, 431, 435, 434, 451, 0, 472, 437, 439, 440, 0, 0, 451, 462, 0, 0, 0, 0, 0, 0, 463, 455, 0, 0, 0, 0, 0, 0, 0, 0, 453, 0, 0, 0, 0, 0, 0, 0, 0, 0, 454, 468, 468, 473, 0, 0, 0, 0, 0, 0, 0, 0, 467, 465, 466, 467, 468, 474, 475, 503, 514, 515, 517, 518, 519, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 555, 0, 0, 0, 0, 0, 0, 607, 626, 0, 0, 0, 0, 0, 0, 0, 0, 481, 499, 500, 517, 634, 526, 525, 694, 527, 955, 524, 535, 539, 558, 578, 347, 580, 567, 606, 609, 597, 0, 299, 616, 0, 634, 632, 633, 621, 636, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 642, 0, 955, 955, 955, 955, 955, 955, 955, 955, 715, 124, 228, 611, 664, 669, 670, 675, 678, 638, 641, 344, 648, 0, 686, 0, 0, 0, 0, 0, 0, 0, 0, 657, 665, 670, 0, 727, 0, 0, 0, 0, 0, 0, 0, 0, 685, 697, 683, 699, 708, 709, 715, 709, 706, 724, 332, 325, 726, 727, 730, 722, 324, 323, 733, 315, 0, 0, 764, 765, 784, 787, 790, 793, 796, 799, 292, 275, 739, 748, 0, 0, 0, 0, 0, 0, 742, 757, 271, 0, 0, 0, 0, 0, 0, 766, 234, 783, 233, 227, 218, 0, 770, 0, 215, 775, 776, 790, 780, 165, 793, 782, 159, 783, 784, 781, 784, 799, 786, 790, 803, 793, 119, 794, 796, 797, 796, 795, 800, 803, 812, 818, 830, 823, 828, 825, 826, 830, 844, 111, 846, 833, 109, 834, 839, 836, 838, 839, 955, 842, 844, 0, 850, 844, 0, 847, 847, 850, 851, 955, 0, 0, 856, 858, 858, 866, 870, 875, 955, 955, 0, 879, 955, 880, 955, 955, 955, 955, 881, 955, 955, 955, 955, 955, 955, 955, 947, 950, 74 } ; static yyconst flex_int16_t yy_def[449] = { 0, 445, 1, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 15, 15, 15, 445, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 445, 445, 445, 15, 447, 447, 445, 448, 15, 15, 15, 51, 15, 15, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 447, 448, 15, 51, 51, 51, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 445, 445, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 445, 51, 445, 445, 445, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 445, 445, 445, 445, 446, 445, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 445, 445, 445, 445, 445, 445, 445, 445, 446, 446, 445, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 445, 445, 445, 445, 446, 445, 446, 446, 445, 445, 446, 446, 446, 446, 445, 446, 445, 445, 445, 446, 446, 446, 445, 446, 445, 445, 445, 445, 445, 445, 445, 445, 446, 446, 445, 446, 445, 445, 445, 445, 445, 446, 446, 446, 445, 446, 445, 445, 445, 445, 445, 445, 445, 445, 446, 446, 445, 446, 445, 445, 445, 445, 445, 446, 446, 445, 445, 445, 445, 445, 445, 445, 445, 446, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 0, 445, 445, 445 } ; static yyconst flex_int16_t yy_nxt[1030] = { 0, 4, 5, 6, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 27, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 27, 38, 39, 40, 27, 41, 42, 27, 20, 21, 22, 23, 24, 25, 26, 27, 28, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 27, 38, 39, 40, 27, 43, 121, 43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 84, 45, 45, 45, 46, 45, 45, 44, 47, 44, 44, 44, 87, 44, 54, 53, 88, 89, 85, 90, 93, 86, 94, 48, 43, 381, 43, 379, 84, 45, 45, 45, 46, 45, 45, 404, 47, 44, 328, 87, 328, 44, 262, 88, 89, 85, 90, 93, 86, 94, 48, 49, 44, 44, 44, 50, 44, 44, 44, 44, 44, 113, 51, 51, 51, 52, 51, 51, 56, 47, 91, 47, 66, 47, 57, 394, 67, 118, 58, 95, 92, 391, 68, 69, 96, 126, 119, 70, 113, 59, 51, 51, 51, 52, 51, 51, 56, 47, 91, 47, 66, 47, 57, 67, 118, 58, 95, 92, 111, 68, 69, 96, 126, 119, 70, 44, 59, 60, 44, 44, 127, 61, 44, 122, 129, 62, 137, 63, 112, 128, 123, 371, 64, 65, 385, 157, 111, 146, 79, 80, 81, 82, 329, 384, 329, 60, 263, 127, 61, 383, 381, 129, 62, 137, 63, 112, 83, 128, 123, 64, 65, 71, 72, 157, 146, 73, 79, 80, 81, 82, 74, 75, 76, 44, 147, 77, 78, 44, 130, 150, 131, 132, 133, 83, 44, 124, 134, 379, 44, 71, 72, 374, 73, 155, 135, 151, 125, 74, 75, 76, 136, 147, 77, 78, 97, 169, 150, 156, 374, 152, 170, 98, 99, 124, 100, 101, 102, 103, 104, 107, 155, 135, 105, 151, 125, 171, 108, 136, 148, 109, 110, 373, 106, 169, 156, 149, 152, 114, 170, 366, 371, 366, 100, 101, 102, 103, 104, 107, 365, 115, 105, 172, 171, 108, 116, 148, 109, 110, 117, 106, 338, 319, 149, 313, 445, 114, 138, 139, 140, 141, 142, 143, 144, 145, 173, 153, 115, 174, 172, 187, 214, 116, 154, 445, 445, 117, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 158, 445, 445, 190, 51, 173, 445, 153, 174, 195, 187, 159, 214, 154, 160, 161, 162, 163, 164, 165, 166, 167, 175, 176, 177, 178, 179, 180, 158, 181, 190, 184, 51, 188, 191, 196, 195, 182, 159, 185, 189, 193, 197, 198, 445, 194, 168, 183, 192, 186, 200, 211, 445, 199, 445, 445, 212, 181, 213, 184, 188, 215, 191, 196, 182, 445, 185, 189, 193, 197, 216, 198, 194, 168, 183, 192, 186, 200, 211, 201, 199, 201, 202, 212, 217, 213, 218, 219, 215, 203, 204, 205, 206, 207, 208, 209, 210, 220, 216, 222, 44, 223, 224, 225, 44, 226, 227, 445, 228, 229, 230, 217, 221, 218, 219, 231, 445, 232, 233, 445, 234, 235, 236, 237, 238, 220, 222, 239, 223, 224, 225, 240, 445, 226, 227, 228, 229, 230, 445, 279, 221, 445, 281, 231, 232, 241, 233, 234, 235, 236, 237, 238, 445, 242, 239, 280, 244, 247, 240, 250, 253, 256, 445, 243, 245, 248, 279, 251, 254, 257, 281, 445, 282, 241, 246, 249, 294, 252, 255, 258, 242, 295, 280, 307, 244, 247, 308, 250, 253, 256, 243, 245, 248, 309, 251, 254, 257, 310, 259, 282, 445, 246, 249, 294, 252, 255, 258, 260, 295, 445, 307, 445, 445, 308, 445, 445, 311, 445, 261, 312, 309, 314, 445, 315, 310, 201, 259, 201, 202, 330, 445, 330, 445, 264, 260, 262, 263, 264, 265, 266, 267, 268, 269, 311, 270, 261, 270, 312, 316, 314, 315, 317, 445, 318, 271, 272, 273, 274, 275, 276, 277, 278, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 320, 321, 322, 323, 316, 324, 325, 317, 318, 336, 331, 337, 331, 326, 265, 332, 333, 332, 333, 266, 267, 334, 293, 334, 335, 268, 335, 320, 269, 321, 322, 323, 324, 327, 325, 339, 347, 336, 346, 337, 348, 326, 340, 341, 342, 343, 344, 345, 445, 293, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 327, 270, 339, 270, 347, 346, 355, 356, 348, 357, 358, 271, 272, 273, 274, 275, 276, 277, 278, 359, 360, 445, 306, 349, 350, 351, 352, 353, 354, 361, 445, 362, 363, 355, 364, 356, 357, 367, 358, 368, 369, 445, 370, 372, 445, 445, 445, 359, 360, 306, 328, 329, 328, 329, 262, 263, 445, 361, 362, 363, 445, 375, 364, 376, 378, 367, 377, 368, 369, 370, 330, 372, 330, 331, 264, 331, 332, 265, 332, 333, 266, 333, 334, 267, 334, 335, 268, 335, 375, 269, 380, 376, 378, 377, 382, 445, 386, 387, 388, 389, 445, 390, 392, 445, 393, 395, 396, 397, 398, 399, 445, 400, 401, 402, 445, 403, 405, 380, 406, 407, 408, 409, 382, 386, 387, 388, 410, 389, 390, 411, 392, 393, 395, 396, 397, 398, 412, 399, 400, 401, 413, 402, 403, 405, 414, 406, 407, 408, 409, 415, 416, 417, 418, 410, 419, 420, 411, 421, 445, 422, 423, 424, 425, 412, 426, 427, 428, 413, 429, 430, 431, 432, 414, 433, 434, 435, 415, 416, 417, 418, 436, 419, 437, 420, 438, 421, 422, 423, 424, 425, 439, 426, 427, 428, 440, 429, 430, 431, 432, 441, 433, 434, 435, 442, 443, 444, 445, 436, 445, 437, 445, 438, 445, 445, 445, 445, 445, 439, 445, 445, 445, 440, 445, 445, 445, 445, 441, 445, 445, 445, 442, 443, 444, 55, 55, 55, 120, 445, 120, 3, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445 } ; static yyconst flex_int16_t yy_chk[1030] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 448, 5, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 25, 14, 14, 14, 14, 14, 14, 16, 14, 17, 18, 16, 26, 17, 18, 16, 28, 29, 25, 30, 32, 25, 33, 14, 43, 402, 43, 399, 25, 14, 14, 14, 14, 14, 14, 382, 14, 44, 271, 26, 271, 44, 271, 28, 29, 25, 30, 32, 25, 33, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 38, 15, 15, 15, 15, 15, 15, 20, 15, 31, 45, 22, 46, 20, 372, 22, 40, 20, 34, 31, 369, 22, 22, 34, 56, 40, 22, 38, 20, 15, 15, 15, 15, 15, 15, 20, 15, 31, 45, 22, 46, 20, 22, 40, 20, 34, 31, 37, 22, 22, 34, 56, 40, 22, 49, 20, 21, 50, 49, 62, 21, 50, 49, 65, 21, 74, 21, 37, 63, 50, 364, 21, 21, 360, 88, 37, 77, 24, 24, 24, 24, 272, 359, 272, 21, 272, 62, 21, 358, 356, 65, 21, 74, 21, 37, 24, 63, 50, 21, 21, 23, 23, 88, 77, 23, 24, 24, 24, 24, 23, 23, 23, 53, 79, 23, 23, 53, 68, 81, 68, 68, 68, 24, 54, 53, 68, 348, 54, 23, 23, 337, 23, 84, 72, 82, 54, 23, 23, 23, 72, 79, 23, 23, 35, 91, 81, 86, 336, 82, 92, 35, 35, 53, 35, 35, 35, 35, 35, 36, 84, 72, 35, 82, 54, 93, 36, 72, 80, 36, 36, 325, 35, 91, 86, 80, 82, 39, 92, 323, 322, 317, 35, 35, 35, 35, 35, 36, 316, 39, 35, 94, 93, 36, 39, 80, 36, 36, 39, 35, 281, 233, 80, 226, 3, 39, 75, 75, 75, 75, 75, 75, 75, 75, 95, 83, 39, 96, 94, 100, 114, 39, 83, 0, 0, 39, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 89, 0, 0, 102, 51, 95, 0, 83, 96, 105, 100, 89, 114, 83, 90, 90, 90, 90, 90, 90, 90, 90, 97, 97, 97, 97, 97, 97, 89, 98, 102, 99, 51, 101, 103, 106, 105, 98, 89, 99, 101, 104, 106, 107, 0, 104, 90, 98, 103, 99, 108, 111, 0, 107, 0, 0, 112, 98, 113, 99, 101, 115, 103, 106, 98, 0, 99, 101, 104, 106, 116, 107, 104, 90, 98, 103, 99, 108, 111, 110, 107, 110, 110, 112, 117, 113, 118, 119, 115, 110, 110, 110, 110, 110, 110, 110, 110, 120, 116, 123, 122, 124, 125, 128, 122, 129, 136, 0, 137, 146, 156, 117, 122, 118, 119, 157, 0, 158, 159, 0, 168, 169, 170, 171, 172, 120, 123, 173, 124, 125, 128, 174, 0, 129, 136, 137, 146, 156, 0, 211, 122, 0, 213, 157, 158, 175, 159, 168, 169, 170, 171, 172, 0, 175, 173, 212, 176, 177, 174, 178, 179, 180, 0, 175, 176, 177, 211, 178, 179, 180, 213, 0, 214, 175, 176, 177, 216, 178, 179, 180, 175, 217, 212, 219, 176, 177, 221, 178, 179, 180, 175, 176, 177, 222, 178, 179, 180, 223, 194, 214, 0, 176, 177, 216, 178, 179, 180, 194, 217, 0, 219, 0, 0, 221, 0, 0, 224, 0, 194, 225, 222, 227, 0, 228, 223, 201, 194, 201, 201, 273, 0, 273, 0, 273, 194, 201, 201, 201, 201, 201, 201, 201, 201, 224, 202, 194, 202, 225, 229, 227, 228, 230, 0, 231, 202, 202, 202, 202, 202, 202, 202, 202, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 234, 236, 237, 238, 229, 239, 240, 230, 231, 279, 274, 280, 274, 260, 274, 275, 276, 275, 276, 275, 276, 277, 215, 277, 278, 277, 278, 234, 278, 236, 237, 238, 239, 260, 240, 282, 294, 279, 293, 280, 295, 260, 284, 284, 284, 284, 284, 284, 0, 215, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 260, 270, 282, 270, 294, 293, 306, 307, 295, 308, 309, 270, 270, 270, 270, 270, 270, 270, 270, 310, 311, 0, 218, 297, 297, 297, 297, 297, 297, 312, 0, 313, 314, 306, 315, 307, 308, 318, 309, 319, 320, 0, 321, 324, 0, 0, 0, 310, 311, 218, 328, 329, 328, 329, 328, 329, 0, 312, 313, 314, 0, 338, 315, 339, 347, 318, 346, 319, 320, 321, 330, 324, 330, 331, 330, 331, 332, 331, 332, 333, 332, 333, 334, 333, 334, 335, 334, 335, 338, 335, 355, 339, 347, 346, 357, 0, 362, 365, 366, 367, 0, 368, 370, 0, 371, 373, 374, 375, 376, 377, 0, 378, 379, 380, 0, 381, 383, 355, 384, 385, 386, 387, 357, 362, 365, 366, 388, 367, 368, 389, 370, 371, 373, 374, 375, 376, 390, 377, 378, 379, 391, 380, 381, 383, 392, 384, 385, 386, 387, 393, 394, 395, 396, 388, 397, 398, 389, 400, 0, 401, 403, 404, 405, 390, 406, 407, 409, 391, 410, 412, 413, 415, 392, 416, 417, 418, 393, 394, 395, 396, 422, 397, 423, 398, 424, 400, 401, 403, 404, 405, 425, 406, 407, 409, 426, 410, 412, 413, 415, 427, 416, 417, 418, 431, 433, 438, 0, 422, 0, 423, 0, 424, 0, 0, 0, 0, 0, 425, 0, 0, 0, 426, 0, 0, 0, 0, 427, 0, 0, 0, 431, 433, 438, 446, 446, 446, 447, 0, 447, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445 } ; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET #line 1 "fcml_intel_lexer.l" /* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ #line 21 "fcml_intel_lexer.l" #include #include #include "fcml_common_lex.h" #include "fcml_intel_parser_def.h" #define YY_NO_INPUT 1 #define YY_NO_UNISTD_H 1 #line 49 "fcml_intel_lexer.l" #define FCML_FM_SIZE_OPERAND(x) { yylval->size_operator.size = x; yylval->size_operator.multimedia = FCML_FALSE; return FCML_TK_SIZE_OPERATOR; } #define FCML_FM_MULTIMEDIA_SIZE_OPERAND(x) { yylval->size_operator.size = x; yylval->size_operator.multimedia = FCML_TRUE; return FCML_TK_SIZE_OPERATOR; } /*White spaces.*/ #line 839 "fcml_intel_lexer.c" #define INITIAL 0 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #define YY_EXTRA_TYPE struct fcml_st_parser_data * /* Holds the entire state of the reentrant scanner. */ struct yyguts_t { /* User-defined. Not touched by flex. */ YY_EXTRA_TYPE yyextra_r; /* The rest are the same as the globals declared in the non-reentrant scanner. */ FILE *yyin_r, *yyout_r; size_t yy_buffer_stack_top; /**< index of top of stack. */ size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; yy_size_t yy_n_chars; yy_size_t yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; int yy_did_buffer_switch_on_eof; int yy_start_stack_ptr; int yy_start_stack_depth; int *yy_start_stack; yy_state_type yy_last_accepting_state; char* yy_last_accepting_cpos; int yylineno_r; int yy_flex_debug_r; char *yytext_r; int yy_more_flag; int yy_more_len; YYSTYPE * yylval_r; }; /* end struct yyguts_t */ static int yy_init_globals (yyscan_t yyscanner ); /* This must go here because YYSTYPE and YYLTYPE are included * from bison output in section 1.*/ # define yylval yyg->yylval_r int intel_lex_init (yyscan_t* scanner); int intel_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int intel_lex_destroy (yyscan_t yyscanner ); int intel_get_debug (yyscan_t yyscanner ); void intel_set_debug (int debug_flag ,yyscan_t yyscanner ); YY_EXTRA_TYPE intel_get_extra (yyscan_t yyscanner ); void intel_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *intel_get_in (yyscan_t yyscanner ); void intel_set_in (FILE * in_str ,yyscan_t yyscanner ); FILE *intel_get_out (yyscan_t yyscanner ); void intel_set_out (FILE * out_str ,yyscan_t yyscanner ); yy_size_t intel_get_leng (yyscan_t yyscanner ); char *intel_get_text (yyscan_t yyscanner ); int intel_get_lineno (yyscan_t yyscanner ); void intel_set_lineno (int line_number ,yyscan_t yyscanner ); int intel_get_column (yyscan_t yyscanner ); void intel_set_column (int column_no ,yyscan_t yyscanner ); YYSTYPE * intel_get_lval (yyscan_t yyscanner ); void intel_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int intel_wrap (yyscan_t yyscanner ); #else extern int intel_wrap (yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner ); #else static int input (yyscan_t yyscanner ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int intel_lex \ (YYSTYPE * yylval_param ,yyscan_t yyscanner); #define YY_DECL int intel_lex \ (YYSTYPE * yylval_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yylval = yylval_param; if ( !yyg->yy_init ) { yyg->yy_init = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! yyg->yy_start ) yyg->yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { intel_ensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = intel__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); } intel__load_buffer_state(yyscanner ); } { #line 57 "fcml_intel_lexer.l" /* Decimal integers. */ #line 1105 "fcml_intel_lexer.c" while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yyg->yy_c_buf_p; /* Support of yytext. */ *yy_cp = yyg->yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = yyg->yy_start; yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 446 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_current_state != 445 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; yy_find_action: yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yyg->yy_hold_char; yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; goto yy_find_action; case 1: YY_RULE_SETUP #line 60 "fcml_intel_lexer.l" { fcml_fn_pu_parse_integer( yytext, &(yylval->integer_value), 10 ); return FCML_TK_INTEGER; } YY_BREAK /* HEX integers. */ case 2: #line 64 "fcml_intel_lexer.l" case 3: #line 65 "fcml_intel_lexer.l" case 4: YY_RULE_SETUP #line 65 "fcml_intel_lexer.l" { fcml_fn_pu_parse_integer( yytext, &(yylval->integer_value), 16 ); return FCML_TK_INTEGER; } YY_BREAK /* Floating-points in IEEE 754. Floats are not supported yet. ([0-9]*\.[0-9]+|[0-9]+\.)(e[-+]?[0-9]+)?f? | [0-9]+(e[-+]?[0-9]+)f? { fcml_fn_pu_parse_float( yytext, &(yylval->float_value) ); return FCML_TK_FLOAT; } */ /* GPR. */ case 5: YY_RULE_SETUP #line 74 "fcml_intel_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_AL) YY_BREAK case 6: YY_RULE_SETUP #line 75 "fcml_intel_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_CL) YY_BREAK case 7: YY_RULE_SETUP #line 76 "fcml_intel_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_DL) YY_BREAK case 8: YY_RULE_SETUP #line 77 "fcml_intel_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_BL) YY_BREAK case 9: YY_RULE_SETUP #line 78 "fcml_intel_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_AH) YY_BREAK case 10: YY_RULE_SETUP #line 79 "fcml_intel_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_CH) YY_BREAK case 11: YY_RULE_SETUP #line 80 "fcml_intel_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_DH) YY_BREAK case 12: YY_RULE_SETUP #line 81 "fcml_intel_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_BH) YY_BREAK case 13: YY_RULE_SETUP #line 82 "fcml_intel_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_R8L) YY_BREAK case 14: YY_RULE_SETUP #line 83 "fcml_intel_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_R9L) YY_BREAK case 15: YY_RULE_SETUP #line 84 "fcml_intel_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_R10L) YY_BREAK case 16: YY_RULE_SETUP #line 85 "fcml_intel_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_R11L) YY_BREAK case 17: YY_RULE_SETUP #line 86 "fcml_intel_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_R12L) YY_BREAK case 18: YY_RULE_SETUP #line 87 "fcml_intel_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_R13L) YY_BREAK case 19: YY_RULE_SETUP #line 88 "fcml_intel_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_R14L) YY_BREAK case 20: YY_RULE_SETUP #line 89 "fcml_intel_lexer.l" FCML_FM_GPRS_8_REG(FCML_REG_R15L) YY_BREAK case 21: YY_RULE_SETUP #line 91 "fcml_intel_lexer.l" FCML_FM_GPRS_8_X_REG(FCML_REG_SPL) YY_BREAK case 22: YY_RULE_SETUP #line 92 "fcml_intel_lexer.l" FCML_FM_GPRS_8_X_REG(FCML_REG_BPL) YY_BREAK case 23: YY_RULE_SETUP #line 93 "fcml_intel_lexer.l" FCML_FM_GPRS_8_X_REG(FCML_REG_SIL) YY_BREAK case 24: YY_RULE_SETUP #line 94 "fcml_intel_lexer.l" FCML_FM_GPRS_8_X_REG(FCML_REG_DIL) YY_BREAK case 25: YY_RULE_SETUP #line 96 "fcml_intel_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_AX) YY_BREAK case 26: YY_RULE_SETUP #line 97 "fcml_intel_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_CX) YY_BREAK case 27: YY_RULE_SETUP #line 98 "fcml_intel_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_DX) YY_BREAK case 28: YY_RULE_SETUP #line 99 "fcml_intel_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_BX) YY_BREAK case 29: YY_RULE_SETUP #line 100 "fcml_intel_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_SP) YY_BREAK case 30: YY_RULE_SETUP #line 101 "fcml_intel_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_BP) YY_BREAK case 31: YY_RULE_SETUP #line 102 "fcml_intel_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_SI) YY_BREAK case 32: YY_RULE_SETUP #line 103 "fcml_intel_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_DI) YY_BREAK case 33: YY_RULE_SETUP #line 104 "fcml_intel_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_R8W) YY_BREAK case 34: YY_RULE_SETUP #line 105 "fcml_intel_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_R9W) YY_BREAK case 35: YY_RULE_SETUP #line 106 "fcml_intel_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_R10W) YY_BREAK case 36: YY_RULE_SETUP #line 107 "fcml_intel_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_R11W) YY_BREAK case 37: YY_RULE_SETUP #line 108 "fcml_intel_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_R12W) YY_BREAK case 38: YY_RULE_SETUP #line 109 "fcml_intel_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_R13W) YY_BREAK case 39: YY_RULE_SETUP #line 110 "fcml_intel_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_R14W) YY_BREAK case 40: YY_RULE_SETUP #line 111 "fcml_intel_lexer.l" FCML_FM_GPRS_16_REG(FCML_REG_R15W) YY_BREAK case 41: YY_RULE_SETUP #line 113 "fcml_intel_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_EAX) YY_BREAK case 42: YY_RULE_SETUP #line 114 "fcml_intel_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_ECX) YY_BREAK case 43: YY_RULE_SETUP #line 115 "fcml_intel_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_EDX) YY_BREAK case 44: YY_RULE_SETUP #line 116 "fcml_intel_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_EBX) YY_BREAK case 45: YY_RULE_SETUP #line 117 "fcml_intel_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_ESP) YY_BREAK case 46: YY_RULE_SETUP #line 118 "fcml_intel_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_EBP) YY_BREAK case 47: YY_RULE_SETUP #line 119 "fcml_intel_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_ESI) YY_BREAK case 48: YY_RULE_SETUP #line 120 "fcml_intel_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_EDI) YY_BREAK case 49: YY_RULE_SETUP #line 121 "fcml_intel_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_R8D) YY_BREAK case 50: YY_RULE_SETUP #line 122 "fcml_intel_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_R9D) YY_BREAK case 51: YY_RULE_SETUP #line 123 "fcml_intel_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_R10D) YY_BREAK case 52: YY_RULE_SETUP #line 124 "fcml_intel_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_R11D) YY_BREAK case 53: YY_RULE_SETUP #line 125 "fcml_intel_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_R12D) YY_BREAK case 54: YY_RULE_SETUP #line 126 "fcml_intel_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_R13D) YY_BREAK case 55: YY_RULE_SETUP #line 127 "fcml_intel_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_R14D) YY_BREAK case 56: YY_RULE_SETUP #line 128 "fcml_intel_lexer.l" FCML_FM_GPRS_32_REG(FCML_REG_R15D) YY_BREAK case 57: YY_RULE_SETUP #line 130 "fcml_intel_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_RAX) YY_BREAK case 58: YY_RULE_SETUP #line 131 "fcml_intel_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_RCX) YY_BREAK case 59: YY_RULE_SETUP #line 132 "fcml_intel_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_RDX) YY_BREAK case 60: YY_RULE_SETUP #line 133 "fcml_intel_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_RBX) YY_BREAK case 61: YY_RULE_SETUP #line 134 "fcml_intel_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_RSP) YY_BREAK case 62: YY_RULE_SETUP #line 135 "fcml_intel_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_RBP) YY_BREAK case 63: YY_RULE_SETUP #line 136 "fcml_intel_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_RSI) YY_BREAK case 64: YY_RULE_SETUP #line 137 "fcml_intel_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_RDI) YY_BREAK case 65: YY_RULE_SETUP #line 138 "fcml_intel_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_R8) YY_BREAK case 66: YY_RULE_SETUP #line 139 "fcml_intel_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_R9) YY_BREAK case 67: YY_RULE_SETUP #line 140 "fcml_intel_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_R10) YY_BREAK case 68: YY_RULE_SETUP #line 141 "fcml_intel_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_R11) YY_BREAK case 69: YY_RULE_SETUP #line 142 "fcml_intel_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_R12) YY_BREAK case 70: YY_RULE_SETUP #line 143 "fcml_intel_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_R13) YY_BREAK case 71: YY_RULE_SETUP #line 144 "fcml_intel_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_R14) YY_BREAK case 72: YY_RULE_SETUP #line 145 "fcml_intel_lexer.l" FCML_FM_GPRS_64_REG(FCML_REG_R15) YY_BREAK /* SIMD-MMX */ case 73: YY_RULE_SETUP #line 148 "fcml_intel_lexer.l" FCML_FM_SIMD_64_REG(FCML_REG_MM0) YY_BREAK case 74: YY_RULE_SETUP #line 149 "fcml_intel_lexer.l" FCML_FM_SIMD_64_REG(FCML_REG_MM1) YY_BREAK case 75: YY_RULE_SETUP #line 150 "fcml_intel_lexer.l" FCML_FM_SIMD_64_REG(FCML_REG_MM2) YY_BREAK case 76: YY_RULE_SETUP #line 151 "fcml_intel_lexer.l" FCML_FM_SIMD_64_REG(FCML_REG_MM3) YY_BREAK case 77: YY_RULE_SETUP #line 152 "fcml_intel_lexer.l" FCML_FM_SIMD_64_REG(FCML_REG_MM4) YY_BREAK case 78: YY_RULE_SETUP #line 153 "fcml_intel_lexer.l" FCML_FM_SIMD_64_REG(FCML_REG_MM5) YY_BREAK case 79: YY_RULE_SETUP #line 154 "fcml_intel_lexer.l" FCML_FM_SIMD_64_REG(FCML_REG_MM6) YY_BREAK case 80: YY_RULE_SETUP #line 155 "fcml_intel_lexer.l" FCML_FM_SIMD_64_REG(FCML_REG_MM7) YY_BREAK /* SIMD-XMM */ case 81: YY_RULE_SETUP #line 158 "fcml_intel_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM0) YY_BREAK case 82: YY_RULE_SETUP #line 159 "fcml_intel_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM1) YY_BREAK case 83: YY_RULE_SETUP #line 160 "fcml_intel_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM2) YY_BREAK case 84: YY_RULE_SETUP #line 161 "fcml_intel_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM3) YY_BREAK case 85: YY_RULE_SETUP #line 162 "fcml_intel_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM4) YY_BREAK case 86: YY_RULE_SETUP #line 163 "fcml_intel_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM5) YY_BREAK case 87: YY_RULE_SETUP #line 164 "fcml_intel_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM6) YY_BREAK case 88: YY_RULE_SETUP #line 165 "fcml_intel_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM7) YY_BREAK case 89: YY_RULE_SETUP #line 166 "fcml_intel_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM8) YY_BREAK case 90: YY_RULE_SETUP #line 167 "fcml_intel_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM9) YY_BREAK case 91: YY_RULE_SETUP #line 168 "fcml_intel_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM10) YY_BREAK case 92: YY_RULE_SETUP #line 169 "fcml_intel_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM11) YY_BREAK case 93: YY_RULE_SETUP #line 170 "fcml_intel_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM12) YY_BREAK case 94: YY_RULE_SETUP #line 171 "fcml_intel_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM13) YY_BREAK case 95: YY_RULE_SETUP #line 172 "fcml_intel_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM14) YY_BREAK case 96: YY_RULE_SETUP #line 173 "fcml_intel_lexer.l" FCML_FM_SIMD_128_REG(FCML_REG_XMM15) YY_BREAK /* SIMD-YMM */ case 97: YY_RULE_SETUP #line 176 "fcml_intel_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM0) YY_BREAK case 98: YY_RULE_SETUP #line 177 "fcml_intel_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM1) YY_BREAK case 99: YY_RULE_SETUP #line 178 "fcml_intel_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM2) YY_BREAK case 100: YY_RULE_SETUP #line 179 "fcml_intel_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM3) YY_BREAK case 101: YY_RULE_SETUP #line 180 "fcml_intel_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM4) YY_BREAK case 102: YY_RULE_SETUP #line 181 "fcml_intel_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM5) YY_BREAK case 103: YY_RULE_SETUP #line 182 "fcml_intel_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM6) YY_BREAK case 104: YY_RULE_SETUP #line 183 "fcml_intel_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM7) YY_BREAK case 105: YY_RULE_SETUP #line 184 "fcml_intel_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM8) YY_BREAK case 106: YY_RULE_SETUP #line 185 "fcml_intel_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM9) YY_BREAK case 107: YY_RULE_SETUP #line 186 "fcml_intel_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM10) YY_BREAK case 108: YY_RULE_SETUP #line 187 "fcml_intel_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM11) YY_BREAK case 109: YY_RULE_SETUP #line 188 "fcml_intel_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM12) YY_BREAK case 110: YY_RULE_SETUP #line 189 "fcml_intel_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM13) YY_BREAK case 111: YY_RULE_SETUP #line 190 "fcml_intel_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM14) YY_BREAK case 112: YY_RULE_SETUP #line 191 "fcml_intel_lexer.l" FCML_FM_SIMD_256_REG(FCML_REG_YMM15) YY_BREAK /* FPU */ case 113: YY_RULE_SETUP #line 194 "fcml_intel_lexer.l" FCML_FM_FPU_REG(FCML_REG_ST0) YY_BREAK case 114: YY_RULE_SETUP #line 195 "fcml_intel_lexer.l" FCML_FM_FPU_REG(FCML_REG_ST1) YY_BREAK case 115: YY_RULE_SETUP #line 196 "fcml_intel_lexer.l" FCML_FM_FPU_REG(FCML_REG_ST2) YY_BREAK case 116: YY_RULE_SETUP #line 197 "fcml_intel_lexer.l" FCML_FM_FPU_REG(FCML_REG_ST3) YY_BREAK case 117: YY_RULE_SETUP #line 198 "fcml_intel_lexer.l" FCML_FM_FPU_REG(FCML_REG_ST4) YY_BREAK case 118: YY_RULE_SETUP #line 199 "fcml_intel_lexer.l" FCML_FM_FPU_REG(FCML_REG_ST5) YY_BREAK case 119: YY_RULE_SETUP #line 200 "fcml_intel_lexer.l" FCML_FM_FPU_REG(FCML_REG_ST6) YY_BREAK case 120: YY_RULE_SETUP #line 201 "fcml_intel_lexer.l" FCML_FM_FPU_REG(FCML_REG_ST7) YY_BREAK /* Control registers. */ case 121: YY_RULE_SETUP #line 204 "fcml_intel_lexer.l" FCML_FM_CR_REG(FCML_REG_CR0) YY_BREAK case 122: YY_RULE_SETUP #line 205 "fcml_intel_lexer.l" FCML_FM_CR_REG(FCML_REG_CR2) YY_BREAK case 123: YY_RULE_SETUP #line 206 "fcml_intel_lexer.l" FCML_FM_CR_REG(FCML_REG_CR3) YY_BREAK case 124: YY_RULE_SETUP #line 207 "fcml_intel_lexer.l" FCML_FM_CR_REG(FCML_REG_CR4) YY_BREAK case 125: YY_RULE_SETUP #line 208 "fcml_intel_lexer.l" FCML_FM_CR_REG(FCML_REG_CR8) YY_BREAK /* Debug registers. */ case 126: YY_RULE_SETUP #line 211 "fcml_intel_lexer.l" FCML_FM_DR_REG(FCML_REG_DR0) YY_BREAK case 127: YY_RULE_SETUP #line 212 "fcml_intel_lexer.l" FCML_FM_DR_REG(FCML_REG_DR1) YY_BREAK case 128: YY_RULE_SETUP #line 213 "fcml_intel_lexer.l" FCML_FM_DR_REG(FCML_REG_DR2) YY_BREAK case 129: YY_RULE_SETUP #line 214 "fcml_intel_lexer.l" FCML_FM_DR_REG(FCML_REG_DR3) YY_BREAK case 130: YY_RULE_SETUP #line 215 "fcml_intel_lexer.l" FCML_FM_DR_REG(FCML_REG_DR4) YY_BREAK case 131: YY_RULE_SETUP #line 216 "fcml_intel_lexer.l" FCML_FM_DR_REG(FCML_REG_DR5) YY_BREAK case 132: YY_RULE_SETUP #line 217 "fcml_intel_lexer.l" FCML_FM_DR_REG(FCML_REG_DR6) YY_BREAK case 133: YY_RULE_SETUP #line 218 "fcml_intel_lexer.l" FCML_FM_DR_REG(FCML_REG_DR7) YY_BREAK /* Segment registers. */ case 134: YY_RULE_SETUP #line 221 "fcml_intel_lexer.l" FCML_FM_SEG_REG(FCML_REG_ES) YY_BREAK case 135: YY_RULE_SETUP #line 222 "fcml_intel_lexer.l" FCML_FM_SEG_REG(FCML_REG_CS) YY_BREAK case 136: YY_RULE_SETUP #line 223 "fcml_intel_lexer.l" FCML_FM_SEG_REG(FCML_REG_SS) YY_BREAK case 137: YY_RULE_SETUP #line 224 "fcml_intel_lexer.l" FCML_FM_SEG_REG(FCML_REG_DS) YY_BREAK case 138: YY_RULE_SETUP #line 225 "fcml_intel_lexer.l" FCML_FM_SEG_REG(FCML_REG_FS) YY_BREAK case 139: YY_RULE_SETUP #line 226 "fcml_intel_lexer.l" FCML_FM_SEG_REG(FCML_REG_GS) YY_BREAK /* RIP */ case 140: YY_RULE_SETUP #line 229 "fcml_intel_lexer.l" FCML_FM_RIP YY_BREAK /* Size operators. */ case 141: YY_RULE_SETUP #line 232 "fcml_intel_lexer.l" FCML_FM_SIZE_OPERAND( 8 ) YY_BREAK case 142: YY_RULE_SETUP #line 233 "fcml_intel_lexer.l" FCML_FM_SIZE_OPERAND( 16 ) YY_BREAK case 143: YY_RULE_SETUP #line 234 "fcml_intel_lexer.l" FCML_FM_SIZE_OPERAND( 32 ) YY_BREAK case 144: YY_RULE_SETUP #line 235 "fcml_intel_lexer.l" FCML_FM_SIZE_OPERAND( 48 ) YY_BREAK case 145: YY_RULE_SETUP #line 236 "fcml_intel_lexer.l" FCML_FM_SIZE_OPERAND( 64 ) YY_BREAK case 146: YY_RULE_SETUP #line 237 "fcml_intel_lexer.l" FCML_FM_SIZE_OPERAND( 80 ) YY_BREAK case 147: YY_RULE_SETUP #line 238 "fcml_intel_lexer.l" FCML_FM_SIZE_OPERAND( 128 ) YY_BREAK case 148: YY_RULE_SETUP #line 239 "fcml_intel_lexer.l" FCML_FM_SIZE_OPERAND( 256 ) YY_BREAK case 149: YY_RULE_SETUP #line 240 "fcml_intel_lexer.l" FCML_FM_MULTIMEDIA_SIZE_OPERAND( 64 ) YY_BREAK case 150: YY_RULE_SETUP #line 241 "fcml_intel_lexer.l" FCML_FM_MULTIMEDIA_SIZE_OPERAND( 128 ) YY_BREAK case 151: YY_RULE_SETUP #line 242 "fcml_intel_lexer.l" FCML_FM_MULTIMEDIA_SIZE_OPERAND( 256 ) YY_BREAK case 152: YY_RULE_SETUP #line 243 "fcml_intel_lexer.l" FCML_FM_SIZE_OPERAND( 14 * 8 ) YY_BREAK case 153: YY_RULE_SETUP #line 244 "fcml_intel_lexer.l" FCML_FM_SIZE_OPERAND( 28 * 8 ) YY_BREAK case 154: YY_RULE_SETUP #line 245 "fcml_intel_lexer.l" FCML_FM_SIZE_OPERAND( 94 * 8 ) YY_BREAK case 155: YY_RULE_SETUP #line 246 "fcml_intel_lexer.l" FCML_FM_SIZE_OPERAND( 108 * 8 ) YY_BREAK /* Prefixes */ case 156: YY_RULE_SETUP #line 250 "fcml_intel_lexer.l" { yylval->prefixes = FCML_PREFIX_LOCK; return FCML_TK_PREFIX; } YY_BREAK case 157: YY_RULE_SETUP #line 255 "fcml_intel_lexer.l" { yylval->prefixes = FCML_PREFIX_REPNE; return FCML_TK_PREFIX; } YY_BREAK case 158: YY_RULE_SETUP #line 260 "fcml_intel_lexer.l" { yylval->prefixes = FCML_PREFIX_REPE; return FCML_TK_PREFIX; } YY_BREAK case 159: YY_RULE_SETUP #line 265 "fcml_intel_lexer.l" { yylval->prefixes = FCML_PREFIX_XACQUIRE; return FCML_TK_PREFIX; } YY_BREAK case 160: YY_RULE_SETUP #line 270 "fcml_intel_lexer.l" { yylval->prefixes = FCML_PREFIX_XRELEASE; return FCML_TK_PREFIX; } YY_BREAK case 161: YY_RULE_SETUP #line 275 "fcml_intel_lexer.l" { yylval->hints = FCML_PREFIX_BRANCH_HINT; return FCML_TK_PREFIX; } YY_BREAK case 162: YY_RULE_SETUP #line 280 "fcml_intel_lexer.l" { yylval->hints = FCML_PREFIX_NOBRANCH_HINT; return FCML_TK_PREFIX; } YY_BREAK /* Hints */ case 163: YY_RULE_SETUP #line 287 "fcml_intel_lexer.l" { yylval->hints = FCML_HINT_FAR_POINTER; return FCML_TK_HINTS; } YY_BREAK case 164: YY_RULE_SETUP #line 292 "fcml_intel_lexer.l" { yylval->hints = FCML_HINT_NEAR_POINTER; return FCML_TK_HINTS; } YY_BREAK case 165: YY_RULE_SETUP #line 297 "fcml_intel_lexer.l" { yylval->hints = FCML_HINT_LONG_FORM_POINTER; return FCML_TK_HINTS; } YY_BREAK case 166: YY_RULE_SETUP #line 302 "fcml_intel_lexer.l" { yylval->hints = FCML_HINT_INDIRECT_POINTER; return FCML_TK_HINTS; } YY_BREAK case 167: YY_RULE_SETUP #line 307 "fcml_intel_lexer.l" { yylval->hints = FCML_HINT_DIRECT_POINTER; return FCML_TK_HINTS; } YY_BREAK case 168: YY_RULE_SETUP #line 312 "fcml_intel_lexer.l" { yylval->hints = FCML_OP_HINT_RELATIVE_ADDRESSING; return FCML_TK_EAO_HINTS; } YY_BREAK case 169: YY_RULE_SETUP #line 317 "fcml_intel_lexer.l" { yylval->hints = FCML_OP_HINT_ABSOLUTE_ADDRESSING; return FCML_TK_EAO_HINTS; } YY_BREAK case 170: YY_RULE_SETUP #line 322 "fcml_intel_lexer.l" { yylval->hints = FCML_OP_HINT_SIB_ENCODING; return FCML_TK_SIB_HINT; } YY_BREAK /* Identifiers. */ case 171: YY_RULE_SETUP #line 328 "fcml_intel_lexer.l" { yylval->symbol.text = (fcml_string)yytext; yylval->symbol.length = (fcml_usize)yyleng; return FCML_TK_SYMBOL; } YY_BREAK /* Operators and parentheses. */ case 172: YY_RULE_SETUP #line 335 "fcml_intel_lexer.l" { return ','; } YY_BREAK case 173: YY_RULE_SETUP #line 336 "fcml_intel_lexer.l" { return '+'; } YY_BREAK case 174: YY_RULE_SETUP #line 337 "fcml_intel_lexer.l" { return '-'; } YY_BREAK case 175: YY_RULE_SETUP #line 338 "fcml_intel_lexer.l" { return '*'; } YY_BREAK case 176: YY_RULE_SETUP #line 339 "fcml_intel_lexer.l" { return '/'; } YY_BREAK case 177: YY_RULE_SETUP #line 340 "fcml_intel_lexer.l" { return '['; } YY_BREAK case 178: YY_RULE_SETUP #line 341 "fcml_intel_lexer.l" { return ']'; } YY_BREAK case 179: YY_RULE_SETUP #line 342 "fcml_intel_lexer.l" { return '('; } YY_BREAK case 180: YY_RULE_SETUP #line 343 "fcml_intel_lexer.l" { return ')'; } YY_BREAK case 181: YY_RULE_SETUP #line 344 "fcml_intel_lexer.l" { return ':'; } YY_BREAK /* Ignore white spaces. */ case 182: YY_RULE_SETUP #line 347 "fcml_intel_lexer.l" YY_BREAK /* Anything else is not expected. */ case 183: YY_RULE_SETUP #line 350 "fcml_intel_lexer.l" { return FCML_TK_UNEXPECTED; } YY_BREAK /* Ignore like white spaces. */ case 184: /* rule 184 can match eol */ YY_RULE_SETUP #line 353 "fcml_intel_lexer.l" YY_BREAK case 185: YY_RULE_SETUP #line 355 "fcml_intel_lexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK #line 2150 "fcml_intel_lexer.c" case YY_STATE_EOF(INITIAL): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yyg->yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * intel_lex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( yyscanner ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yyg->yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; goto yy_find_action; } } else switch ( yy_get_next_buffer( yyscanner ) ) { case EOB_ACT_END_OF_FILE: { yyg->yy_did_buffer_switch_on_eof = 0; if ( intel_wrap(yyscanner ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( yyscanner ); yy_cp = yyg->yy_c_buf_p; yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yyg->yy_c_buf_p = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; yy_current_state = yy_get_previous_state( yyscanner ); yy_cp = yyg->yy_c_buf_p; yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of user's declarations */ } /* end of intel_lex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = yyg->yytext_ptr; register int number_to_move, i; int ret_val; if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; else { 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_LVALUE; int yy_c_buf_p_offset = (int) (yyg->yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ intel_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), yyg->yy_n_chars, num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } if ( yyg->yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; intel_restart(yyin ,yyscanner); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) intel_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } yyg->yy_n_chars += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { register yy_state_type yy_current_state; register char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_current_state = yyg->yy_start; for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 446 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { register int yy_is_jam; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ register char *yy_cp = yyg->yy_c_buf_p; register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; yyg->yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 446 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 445); (void)yyg; return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner) #else static int input (yyscan_t yyscanner) #endif { int c; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; *yyg->yy_c_buf_p = yyg->yy_hold_char; if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) /* This was really a NUL. */ *yyg->yy_c_buf_p = '\0'; else { /* need more input */ yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ intel_restart(yyin ,yyscanner); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( intel_wrap(yyscanner ) ) return EOF; if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(yyscanner); #else return input(yyscanner); #endif } case EOB_ACT_CONTINUE_SCAN: yyg->yy_c_buf_p = yyg->yytext_ptr + offset; break; } } } c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ yyg->yy_hold_char = *++yyg->yy_c_buf_p; return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ void intel_restart (FILE * input_file , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! YY_CURRENT_BUFFER ){ intel_ensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = intel__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); } intel__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); intel__load_buffer_state(yyscanner ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ void intel__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* TODO. We should be able to replace this entire function body * with * intel_pop_buffer_state(); * intel_push_buffer_state(new_buffer); */ intel_ensure_buffer_stack (yyscanner); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *yyg->yy_c_buf_p = yyg->yy_hold_char; YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } YY_CURRENT_BUFFER_LVALUE = new_buffer; intel__load_buffer_state(yyscanner ); /* We don't actually know whether we did this switch during * EOF (intel_wrap()) processing, but the only time this flag * is looked at is after intel_wrap() is called, so it's safe * to go ahead and always set it. */ yyg->yy_did_buffer_switch_on_eof = 1; } static void intel__load_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; yyg->yy_hold_char = *yyg->yy_c_buf_p; } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * @param yyscanner The scanner object. * @return the allocated buffer state. */ YY_BUFFER_STATE intel__create_buffer (FILE * file, int size , yyscan_t yyscanner) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) intel_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in intel__create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) intel_alloc(b->yy_buf_size + 2 ,yyscanner ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in intel__create_buffer()" ); b->yy_is_our_buffer = 1; intel__init_buffer(b,file ,yyscanner); return b; } /** Destroy the buffer. * @param b a buffer created with intel__create_buffer() * @param yyscanner The scanner object. */ void intel__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) intel_free((void *) b->yy_ch_buf ,yyscanner ); intel_free((void *) b ,yyscanner ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a intel_restart() or at EOF. */ static void intel__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) { int oerrno = errno; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; intel__flush_buffer(b ,yyscanner); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then intel__init_buffer was _probably_ * called from intel_restart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ void intel__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) intel__load_buffer_state(yyscanner ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * @param yyscanner The scanner object. */ void intel_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (new_buffer == NULL) return; intel_ensure_buffer_stack(yyscanner); /* This block is copied from intel__switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *yyg->yy_c_buf_p = yyg->yy_hold_char; YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) yyg->yy_buffer_stack_top++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from intel__switch_to_buffer. */ intel__load_buffer_state(yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * @param yyscanner The scanner object. */ void intel_pop_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!YY_CURRENT_BUFFER) return; intel__delete_buffer(YY_CURRENT_BUFFER ,yyscanner); YY_CURRENT_BUFFER_LVALUE = NULL; if (yyg->yy_buffer_stack_top > 0) --yyg->yy_buffer_stack_top; if (YY_CURRENT_BUFFER) { intel__load_buffer_state(yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void intel_ensure_buffer_stack (yyscan_t yyscanner) { yy_size_t num_to_alloc; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!yyg->yy_buffer_stack) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; yyg->yy_buffer_stack = (struct yy_buffer_state**)intel_alloc (num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in intel_ensure_buffer_stack()" ); memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; } if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = yyg->yy_buffer_stack_max + grow_size; yyg->yy_buffer_stack = (struct yy_buffer_state**)intel_realloc (yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in intel_ensure_buffer_stack()" ); /* zero only the new slots.*/ memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); yyg->yy_buffer_stack_max = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ YY_BUFFER_STATE intel__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) intel_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in intel__scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; intel__switch_to_buffer(b ,yyscanner ); return b; } /** Setup the input buffer state to scan a string. The next call to intel_lex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * @param yyscanner The scanner object. * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * intel__scan_bytes() instead. */ YY_BUFFER_STATE intel__scan_string (yyconst char * yystr , yyscan_t yyscanner) { return intel__scan_bytes(yystr,strlen(yystr) ,yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to intel_lex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ YY_BUFFER_STATE intel__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; yy_size_t n; yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) intel_alloc(n ,yyscanner ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in intel__scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = intel__scan_buffer(buf,n ,yyscanner); if ( ! b ) YY_FATAL_ERROR( "bad buffer in intel__scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = yyg->yy_hold_char; \ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ yyg->yy_hold_char = *yyg->yy_c_buf_p; \ *yyg->yy_c_buf_p = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ YY_EXTRA_TYPE intel_get_extra (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyextra; } /** Get the current line number. * @param yyscanner The scanner object. */ int intel_get_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (! YY_CURRENT_BUFFER) return 0; return yylineno; } /** Get the current column number. * @param yyscanner The scanner object. */ int intel_get_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (! YY_CURRENT_BUFFER) return 0; return yycolumn; } /** Get the input stream. * @param yyscanner The scanner object. */ FILE *intel_get_in (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyin; } /** Get the output stream. * @param yyscanner The scanner object. */ FILE *intel_get_out (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyout; } /** Get the length of the current token. * @param yyscanner The scanner object. */ yy_size_t intel_get_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; } /** Get the current token. * @param yyscanner The scanner object. */ char *intel_get_text (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yytext; } /** Set the user-defined data. This data is never touched by the scanner. * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ void intel_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyextra = user_defined ; } /** Set the current line number. * @param line_number * @param yyscanner The scanner object. */ void intel_set_lineno (int line_number , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "intel_set_lineno called with no buffer" ); yylineno = line_number; } /** Set the current column. * @param line_number * @param yyscanner The scanner object. */ void intel_set_column (int column_no , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "intel_set_column called with no buffer" ); yycolumn = column_no; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * @param yyscanner The scanner object. * @see intel__switch_to_buffer */ void intel_set_in (FILE * in_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyin = in_str ; } void intel_set_out (FILE * out_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyout = out_str ; } int intel_get_debug (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yy_flex_debug; } void intel_set_debug (int bdebug , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_flex_debug = bdebug ; } /* Accessor methods for yylval and yylloc */ YYSTYPE * intel_get_lval (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yylval; } void intel_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yylval = yylval_param; } /* User-visible API */ /* intel_lex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ int intel_lex_init(yyscan_t* ptr_yy_globals) { if (ptr_yy_globals == NULL){ errno = EINVAL; return 1; } *ptr_yy_globals = (yyscan_t) intel_alloc ( sizeof( struct yyguts_t ), NULL ); if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); return yy_init_globals ( *ptr_yy_globals ); } /* intel_lex_init_extra has the same functionality as intel_lex_init, but follows the * convention of taking the scanner as the last argument. Note however, that * this is a *pointer* to a scanner, as it will be allocated by this call (and * is the reason, too, why this function also must handle its own declaration). * The user defined value in the first argument will be available to intel_alloc in * the yyextra field. */ int intel_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) { struct yyguts_t dummy_yyguts; intel_set_extra (yy_user_defined, &dummy_yyguts); if (ptr_yy_globals == NULL){ errno = EINVAL; return 1; } *ptr_yy_globals = (yyscan_t) intel_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); intel_set_extra (yy_user_defined, *ptr_yy_globals); return yy_init_globals ( *ptr_yy_globals ); } static int yy_init_globals (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* Initialization is the same as for the non-reentrant scanner. * This function is called from intel_lex_destroy(), so don't allocate here. */ yyg->yy_buffer_stack = 0; yyg->yy_buffer_stack_top = 0; yyg->yy_buffer_stack_max = 0; yyg->yy_c_buf_p = (char *) 0; yyg->yy_init = 0; yyg->yy_start = 0; yyg->yy_start_stack_ptr = 0; yyg->yy_start_stack_depth = 0; yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = (FILE *) 0; yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * intel_lex_init() */ return 0; } /* intel_lex_destroy is for both reentrant and non-reentrant scanners. */ int intel_lex_destroy (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ intel__delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); YY_CURRENT_BUFFER_LVALUE = NULL; intel_pop_buffer_state(yyscanner); } /* Destroy the stack itself. */ intel_free(yyg->yy_buffer_stack ,yyscanner); yyg->yy_buffer_stack = NULL; /* Destroy the start condition stack. */ intel_free(yyg->yy_start_stack ,yyscanner ); yyg->yy_start_stack = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * intel_lex() is called, initialization will occur. */ yy_init_globals( yyscanner); /* Destroy the main struct (reentrant only). */ intel_free ( yyscanner , yyscanner ); yyscanner = NULL; return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif #define YYTABLES_NAME "yytables" #line 355 "fcml_intel_lexer.l" fcml-1.1.1/src/fcml_def_enc.c0000644000175000017500000002456012560745216012712 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_def.h" #include "fcml_env_int.h" typedef fcml_ptr (*fcml_fnp_def_addr_mode_args_decoder)( fcml_uint32_t encoded_addr_mode ); fcml_ptr fcml_fnp_def_addr_mode_args_decoder_is( fcml_uint32_t encoded_addr_mode ) { fcml_sf_def_tma_is *is_args = (fcml_sf_def_tma_is*) fcml_fn_env_memory_alloc( sizeof(fcml_sf_def_tma_is) ); if (is_args) { is_args->flags = ( encoded_addr_mode & 0x000000FF ); } return is_args; } fcml_ptr fcml_fnp_def_addr_mode_args_decoder_imm( fcml_uint32_t encoded_addr_mode ) { fcml_sf_def_tma_imm *imm_args = (fcml_sf_def_tma_imm*) fcml_fn_env_memory_alloc( sizeof(fcml_sf_def_tma_imm) ); if (imm_args) { imm_args->encoded_size = ( encoded_addr_mode & 0x0000FF00 ) >> 8; imm_args->encoded_ex_size = encoded_addr_mode & 0x000000FF; imm_args->is_64bit_imm_allowed = ( encoded_addr_mode & 0x00FF0000 ) >> 16; } return imm_args; } fcml_ptr fcml_fnp_def_addr_mode_args_decoder_explicit_reg( fcml_uint32_t encoded_addr_mode ) { fcml_sf_def_tma_explicit_reg *explicit_reg_args = (fcml_sf_def_tma_explicit_reg*) fcml_fn_env_memory_alloc( sizeof(fcml_sf_def_tma_explicit_reg) ); if (explicit_reg_args) { explicit_reg_args->reg_type = ( encoded_addr_mode & 0x0000F000 ) >> 12; explicit_reg_args->reg_num = ( encoded_addr_mode & 0x00000F00 ) >> 8; explicit_reg_args->encoded_reg_size = encoded_addr_mode & 0x000000FF; } return explicit_reg_args; } fcml_ptr fcml_fnp_def_addr_mode_args_decoder_opcode_reg( fcml_uint32_t encoded_addr_mode ) { fcml_sf_def_tma_opcode_reg *opcode_reg_args = (fcml_sf_def_tma_opcode_reg*) fcml_fn_env_memory_alloc( sizeof(fcml_sf_def_tma_opcode_reg) ); if (opcode_reg_args) { opcode_reg_args->reg_type = ( encoded_addr_mode & 0x0000FF00 ) >> 8; opcode_reg_args->encoded_reg_size = encoded_addr_mode & 0x000000FF; } return opcode_reg_args; } fcml_ptr fcml_fnp_def_addr_mode_args_decoder_immediate_dis_relative( fcml_uint32_t encoded_addr_mode ) { fcml_sf_def_tma_immediate_dis_relative *immediate_dis_relative_args = (fcml_sf_def_tma_immediate_dis_relative*) fcml_fn_env_memory_alloc( sizeof(fcml_sf_def_tma_immediate_dis_relative) ); if (immediate_dis_relative_args) { immediate_dis_relative_args->encoded_size = encoded_addr_mode & 0x000000FF; } return immediate_dis_relative_args; } fcml_ptr fcml_fnp_def_addr_mode_args_decoder_explicit_gps_reg_addressing( fcml_uint32_t encoded_addr_mode ) { fcml_sf_def_tma_explicit_gps_reg_addressing *explicit_gps_reg_addressing_args = (fcml_sf_def_tma_explicit_gps_reg_addressing*) fcml_fn_env_memory_alloc( sizeof(fcml_sf_def_tma_explicit_gps_reg_addressing) ); if (explicit_gps_reg_addressing_args) { explicit_gps_reg_addressing_args->reg_num = ( encoded_addr_mode & 0x00FF0000 ) >> 16; explicit_gps_reg_addressing_args->encoded_operand_size = ( encoded_addr_mode & 0x0000FF00 ) >> 8; explicit_gps_reg_addressing_args->encoded_segment_register = encoded_addr_mode & 0x000000FF; } return explicit_gps_reg_addressing_args; } fcml_ptr fcml_fnp_def_addr_mode_args_decoder_explicit_ib( fcml_uint32_t encoded_addr_mode ) { fcml_sf_def_tma_explicit_ib *explicit_ib_args = (fcml_sf_def_tma_explicit_ib*) fcml_fn_env_memory_alloc( sizeof(fcml_sf_def_tma_explicit_ib) ); if (explicit_ib_args) { explicit_ib_args->ib = encoded_addr_mode & 0x000000FF; } return explicit_ib_args; } fcml_ptr fcml_fnp_def_addr_mode_args_decoder_segment_relative_offset( fcml_uint32_t encoded_addr_mode ) { fcml_sf_def_tma_segment_relative_offset *segment_relative_offset_args = (fcml_sf_def_tma_segment_relative_offset*) fcml_fn_env_memory_alloc( sizeof(fcml_sf_def_tma_segment_relative_offset) ); if (segment_relative_offset_args) { segment_relative_offset_args->encoded_operand_size = ( encoded_addr_mode & 0x0000FF00 ) >> 8; segment_relative_offset_args->encoded_segment_register = encoded_addr_mode & 0x000000FF; } return segment_relative_offset_args; } fcml_ptr fcml_fnp_def_addr_mode_args_decoder_rm( fcml_uint32_t encoded_addr_mode ) { fcml_sf_def_tma_rm *rm_args = (fcml_sf_def_tma_rm*) fcml_fn_env_memory_alloc( sizeof(fcml_sf_def_tma_rm) ); if (rm_args) { rm_args->reg_type = ( encoded_addr_mode & 0x000000F0 ) >> 4; rm_args->encoded_register_operand_size = ( encoded_addr_mode & 0x0000FF00 ) >> 8; rm_args->encoded_memory_operand_size = ( encoded_addr_mode & 0x00FF0000 ) >> 16; rm_args->flags = encoded_addr_mode & 0x0000000F; rm_args->is_vsib = FCML_FALSE; rm_args->vector_index_register = 0; } return rm_args; } fcml_ptr fcml_fnp_def_addr_mode_args_decoder_r( fcml_uint32_t encoded_addr_mode ) { fcml_sf_def_tma_r *r_args = (fcml_sf_def_tma_r*) fcml_fn_env_memory_alloc( sizeof(fcml_sf_def_tma_r) ); if (r_args) { r_args->reg_type = (fcml_en_register) ( encoded_addr_mode & 0x0000000F ); r_args->encoded_register_operand_size = ( encoded_addr_mode & 0x00000FF0 ) >> 4; } return r_args; } fcml_ptr fcml_fnp_def_addr_mode_args_decoder_vex_vvvv( fcml_uint32_t encoded_addr_mode ) { fcml_sf_def_tma_vex_vvvv_reg *vex_vvvv_args = (fcml_sf_def_tma_vex_vvvv_reg*) fcml_fn_env_memory_alloc( sizeof(fcml_sf_def_tma_vex_vvvv_reg) ); if (vex_vvvv_args) { vex_vvvv_args->reg_type = encoded_addr_mode & 0x0000000F; vex_vvvv_args->encoded_register_size = ( encoded_addr_mode & 0x00000FF0 ) >> 4; } return vex_vvvv_args; } fcml_ptr fcml_fnp_def_addr_mode_args_decoder_vsib( fcml_uint32_t encoded_addr_mode ) { fcml_sf_def_tma_rm *vsib_args = (fcml_sf_def_tma_rm*) fcml_fn_env_memory_alloc( sizeof(fcml_sf_def_tma_rm) ); if (vsib_args) { vsib_args->vector_index_register = encoded_addr_mode >> 8; vsib_args->encoded_memory_operand_size = encoded_addr_mode & 0x000000FF; vsib_args->encoded_register_operand_size = 0; vsib_args->flags = FCML_RMF_M; vsib_args->reg_type = FCML_REG_UNDEFINED; vsib_args->is_vsib = FCML_TRUE; } return vsib_args; } fcml_ptr fcml_fnp_def_addr_mode_args_decoder_pseudo_op( fcml_uint32_t encoded_addr_mode ) { fcml_sf_def_tma_pseudo_op *pseudo_op_args = (fcml_sf_def_tma_pseudo_op*) fcml_fn_env_memory_alloc( sizeof(fcml_sf_def_tma_pseudo_op) ); if (pseudo_op_args) { pseudo_op_args->mask = (fcml_uint8_t) ( encoded_addr_mode & 0x000000FF ); } return pseudo_op_args; } #define FCML_DEF_DECODERS_COUNT ( sizeof( fcml_def_addr_mode_args_decoders ) / sizeof( fcml_fnp_def_addr_mode_args_decoder ) ) fcml_fnp_def_addr_mode_args_decoder fcml_def_addr_mode_args_decoders[] = { NULL, fcml_fnp_def_addr_mode_args_decoder_imm, fcml_fnp_def_addr_mode_args_decoder_explicit_reg, fcml_fnp_def_addr_mode_args_decoder_opcode_reg, fcml_fnp_def_addr_mode_args_decoder_immediate_dis_relative, NULL, fcml_fnp_def_addr_mode_args_decoder_explicit_gps_reg_addressing, fcml_fnp_def_addr_mode_args_decoder_explicit_ib, fcml_fnp_def_addr_mode_args_decoder_segment_relative_offset, fcml_fnp_def_addr_mode_args_decoder_rm, fcml_fnp_def_addr_mode_args_decoder_r, fcml_fnp_def_addr_mode_args_decoder_vex_vvvv, fcml_fnp_def_addr_mode_args_decoder_is, fcml_fnp_def_addr_mode_args_decoder_vsib, fcml_fnp_def_addr_mode_args_decoder_pseudo_op }; fcml_st_def_decoded_addr_mode* fcml_fn_def_decode_addr_mode_args( fcml_uint32_t encoded_addr_mode, fcml_ceh_error *error ) { *error = FCML_CEH_GEC_NO_ERROR; fcml_st_def_decoded_addr_mode *addr_mode = (fcml_st_def_decoded_addr_mode*) fcml_fn_env_memory_alloc( sizeof(fcml_st_def_decoded_addr_mode) ); if (addr_mode) { addr_mode->addr_mode = FCML_GET_ADDR_MODE( encoded_addr_mode ); /* Store access mode for this operand decoding.*/ fcml_int access_mode = FCML_AM_ACCESS_MODE_UNDEFINED; if (encoded_addr_mode & FCML_OA_W) { /* Destination operands for some instructions can be also a source operands. * In such a case "READ" flag has to be set for such operands. */ access_mode |= (fcml_int) FCML_AM_WRITE; if (encoded_addr_mode & FCML_OA_R) { access_mode |= (fcml_int) FCML_AM_READ; } } else { /* All operands but destination ones have the access mode automatically set to "READ". */ access_mode |= (fcml_int) FCML_AM_READ; } addr_mode->access_mode = (fcml_en_access_mode) access_mode; if (addr_mode->addr_mode > FCML_DEF_DECODERS_COUNT) { /* Corrupted instruction model. */ *error = FCML_CEH_GEC_INTERNAL_ERROR; fcml_fn_env_memory_free( addr_mode ); return NULL; } addr_mode->addr_mode_args = NULL; fcml_fnp_def_addr_mode_args_decoder args_decoder = fcml_def_addr_mode_args_decoders[addr_mode->addr_mode]; if (args_decoder) { addr_mode->addr_mode_args = args_decoder( encoded_addr_mode & 0x00FFFFFF ); if (!addr_mode->addr_mode_args) { fcml_fn_env_memory_free( addr_mode ); addr_mode = NULL; *error = FCML_CEH_GEC_OUT_OF_MEMORY; } } } else { *error = FCML_CEH_GEC_OUT_OF_MEMORY; } return addr_mode; } void fcml_fnp_def_free_addr_mode( fcml_st_def_decoded_addr_mode *decoded_addr_mode ) { if (decoded_addr_mode) { if (decoded_addr_mode->addr_mode_args) { fcml_fn_env_memory_free( decoded_addr_mode->addr_mode_args ); } fcml_fn_env_memory_free( decoded_addr_mode ); } } fcml-1.1.1/src/fcml_gas_dialect.c0000644000175000017500000036177712560745216013604 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_gas_dialect.h" #include #include #include #include #include #include #include "fcml_ceh.h" #include "fcml_coll.h" #include "fcml_common_dialect.h" #include "fcml_def.h" #include "fcml_dialect_int.h" #include "fcml_env_int.h" #include "fcml_mnemonic_parser.h" #include "fcml_utils.h" #include "fcml_gas_rend.h" #include "fcml_gas_parser.h" /* Dialect flags.*/ /* Dialect incompatible with srange encoding of SVR3.2 assembler.*/ #define FCML_GAS_DF_SYSV_SVR32_COMPATIBLE 0x00020000 /* Do not invert operands.*/ #define FCML_GAS_DF_DO_NOT_REVERT_OPERANDS 0x00040000 /* **************/ /* * MNEMONICS **/ /* **************/ fcml_st_dialect_mnemonic fcml_arr_dialect_gas_mnemonics[] = { { FCML_TEXT("aaa"), FCML_ASM_DIALECT_INSTRUCTION( F_AAA, FCML_AM_ALL ), 0 }, { FCML_TEXT("aad"), FCML_ASM_DIALECT_INSTRUCTION( F_AAD, FCML_AM_ALL ), 0 }, { FCML_TEXT("aam"), FCML_ASM_DIALECT_INSTRUCTION( F_AAM, FCML_AM_ALL ), 0 }, { FCML_TEXT("aas"), FCML_ASM_DIALECT_INSTRUCTION( F_AAS, FCML_AM_ALL ), 0 }, { FCML_TEXT("adc"), FCML_ASM_DIALECT_INSTRUCTION( F_ADC, FCML_AM_ALL ), 0 }, { FCML_TEXT("adc;adcb[sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_ADC, FCML_AM_RM8_IMM8 ), 0 }, { FCML_TEXT("adc;adcw[sf,ow,mm];adcl[sf,od,mm];adcq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_ADC, FCML_AM_RMO_IMMO ), 0 }, { FCML_TEXT("adc;adcw[sf,ow,mm];adcl[sf,od,mm];adcq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_ADC, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("add"), FCML_ASM_DIALECT_INSTRUCTION( F_ADD, FCML_AM_ALL ), 0 }, { FCML_TEXT("add;addb[sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_ADD, FCML_AM_RM8_IMM8 ), 0 }, { FCML_TEXT("add;addw[sf,ow,mm];addl[sf,od,mm];addq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_ADD, FCML_AM_RMO_IMMO ), 0 }, { FCML_TEXT("add;addw[sf,ow,mm];addl[sf,od,mm];addq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_ADD, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("addpd"), FCML_ASM_DIALECT_INSTRUCTION( F_ADDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaddpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VADDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("addps"), FCML_ASM_DIALECT_INSTRUCTION( F_ADDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaddps"), FCML_ASM_DIALECT_INSTRUCTION( F_VADDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("addsd"), FCML_ASM_DIALECT_INSTRUCTION( F_ADDSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaddsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VADDSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("addss"), FCML_ASM_DIALECT_INSTRUCTION( F_ADDSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaddss"), FCML_ASM_DIALECT_INSTRUCTION( F_VADDSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("addsubpd"), FCML_ASM_DIALECT_INSTRUCTION( F_ADDSUBPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaddsubpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VADDSUBPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("addsubps"), FCML_ASM_DIALECT_INSTRUCTION( F_ADDSUBPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaddsubps"), FCML_ASM_DIALECT_INSTRUCTION( F_VADDSUBPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("aesdec"), FCML_ASM_DIALECT_INSTRUCTION( F_AESDEC, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaesdec"), FCML_ASM_DIALECT_INSTRUCTION( F_VAESDEC, FCML_AM_ALL ), 0 }, { FCML_TEXT("aesdeclast"), FCML_ASM_DIALECT_INSTRUCTION( F_AESDECLAST, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaesdeclast"), FCML_ASM_DIALECT_INSTRUCTION( F_VAESDECLAST, FCML_AM_ALL ), 0 }, { FCML_TEXT("aesenc"), FCML_ASM_DIALECT_INSTRUCTION( F_AESENC, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaesenc"), FCML_ASM_DIALECT_INSTRUCTION( F_VAESENC, FCML_AM_ALL ), 0 }, { FCML_TEXT("aesenclast"), FCML_ASM_DIALECT_INSTRUCTION( F_AESENCLAST, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaesenclast"), FCML_ASM_DIALECT_INSTRUCTION( F_VAESENCLAST, FCML_AM_ALL ), 0 }, { FCML_TEXT("aesimc"), FCML_ASM_DIALECT_INSTRUCTION( F_AESIMC, FCML_AM_ALL ), 0 }, { FCML_TEXT("vaesimc"), FCML_ASM_DIALECT_INSTRUCTION( F_VAESIMC, FCML_AM_ALL ), 0 }, { FCML_TEXT("aeskeygenassist"), FCML_ASM_DIALECT_INSTRUCTION( F_AESKEYGENASSIST, 0 ), 0 }, { FCML_TEXT("vaeskeygenassist"), FCML_ASM_DIALECT_INSTRUCTION( F_VAESKEYGENASSIST, FCML_AM_ALL ), 0 }, { FCML_TEXT("and"), FCML_ASM_DIALECT_INSTRUCTION( F_AND, FCML_AM_ALL ), 0 }, { FCML_TEXT("and;andb[sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_AND, FCML_AM_RM8_IMM8 ), 0 }, { FCML_TEXT("and;andw[sf,ow,mm];andl[sf,od,mm];andq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_AND, FCML_AM_RMO_IMMO ), 0 }, { FCML_TEXT("and;andw[sf,ow,mm];andl[sf,od,mm];andq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_AND, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("andpd"), FCML_ASM_DIALECT_INSTRUCTION( F_ANDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vandpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VANDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("andps"), FCML_ASM_DIALECT_INSTRUCTION( F_ANDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vandps"), FCML_ASM_DIALECT_INSTRUCTION( F_VANDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("andnpd"), FCML_ASM_DIALECT_INSTRUCTION( F_ANDNPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vandnpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VANDNPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("andnps"), FCML_ASM_DIALECT_INSTRUCTION( F_ANDNPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vandnps"), FCML_ASM_DIALECT_INSTRUCTION( F_VANDNPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("arpl"), FCML_ASM_DIALECT_INSTRUCTION( F_ARPL, FCML_AM_ALL ), 0 }, { FCML_TEXT("andn"), FCML_ASM_DIALECT_INSTRUCTION( F_ANDN, FCML_AM_ALL ), 0 }, { FCML_TEXT("adcx"), FCML_ASM_DIALECT_INSTRUCTION( F_ADCX, FCML_AM_ALL ), 0 }, { FCML_TEXT("adox"), FCML_ASM_DIALECT_INSTRUCTION( F_ADOX, FCML_AM_ALL ), 0 }, { FCML_TEXT("blendpd"), FCML_ASM_DIALECT_INSTRUCTION( F_BLENDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vblendpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VBLENDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("blendps"), FCML_ASM_DIALECT_INSTRUCTION( F_BLENDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vblendps"), FCML_ASM_DIALECT_INSTRUCTION( F_VBLENDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("blendvpd"), FCML_ASM_DIALECT_INSTRUCTION( F_BLENDVPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vblendvpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VBLENDVPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("blendvps"), FCML_ASM_DIALECT_INSTRUCTION( F_BLENDVPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vblendvps"), FCML_ASM_DIALECT_INSTRUCTION( F_VBLENDVPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("bound"), FCML_ASM_DIALECT_INSTRUCTION( F_BOUND, FCML_AM_ALL ), FCML_GAS_DF_DO_NOT_REVERT_OPERANDS }, { FCML_TEXT("bsf"), FCML_ASM_DIALECT_INSTRUCTION( F_BSF, FCML_AM_ALL ), 0 }, { FCML_TEXT("bsr"), FCML_ASM_DIALECT_INSTRUCTION( F_BSR, FCML_AM_ALL ), 0 }, { FCML_TEXT("bswap"), FCML_ASM_DIALECT_INSTRUCTION( F_BSWAP, FCML_AM_ALL ), 0 }, { FCML_TEXT("bt;btw[sf,ow,mm];btl[sf,od,mm];btq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_BT, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("bt"), FCML_ASM_DIALECT_INSTRUCTION( F_BT, FCML_AM_RMO_RO ), 0 }, { FCML_TEXT("btc;btcw[sf,ow,mm];btcl[sf,od,mm];btcq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_BTC, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("btc"), FCML_ASM_DIALECT_INSTRUCTION( F_BTC, FCML_AM_RMO_RO ), 0 }, { FCML_TEXT("btr;btrw[sf,ow,mm];btrl[sf,od,mm];btrq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_BTR, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("btr"), FCML_ASM_DIALECT_INSTRUCTION( F_BTR, FCML_AM_RMO_RO ), 0 }, { FCML_TEXT("bts;btsw[sf,ow,mm];btsl[sf,od,mm];btsq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_BTS, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("bts"), FCML_ASM_DIALECT_INSTRUCTION( F_BTS, FCML_AM_RMO_RO ), 0 }, { FCML_TEXT("bexr;bextr"), FCML_ASM_DIALECT_INSTRUCTION( F_BEXR, FCML_AM_ALL ), 0 }, { FCML_TEXT("blcfill"), FCML_ASM_DIALECT_INSTRUCTION( F_BLCFILL, FCML_AM_ALL ), 0 }, { FCML_TEXT("blci"), FCML_ASM_DIALECT_INSTRUCTION( F_BLCI, FCML_AM_ALL ), 0 }, { FCML_TEXT("blcic"), FCML_ASM_DIALECT_INSTRUCTION( F_BLCIC, FCML_AM_ALL ), 0 }, { FCML_TEXT("blcmsk"), FCML_ASM_DIALECT_INSTRUCTION( F_BLCMSK, FCML_AM_ALL ), 0 }, { FCML_TEXT("blcs"), FCML_ASM_DIALECT_INSTRUCTION( F_BLCS, FCML_AM_ALL ), 0 }, { FCML_TEXT("blsfill"), FCML_ASM_DIALECT_INSTRUCTION( F_BLSFILL, FCML_AM_ALL ), 0 }, { FCML_TEXT("blsi"), FCML_ASM_DIALECT_INSTRUCTION( F_BLSI, FCML_AM_ALL ), 0 }, { FCML_TEXT("blsic"), FCML_ASM_DIALECT_INSTRUCTION( F_BLSIC, FCML_AM_ALL ), 0 }, { FCML_TEXT("blsmsk"), FCML_ASM_DIALECT_INSTRUCTION( F_BLSMSK, FCML_AM_ALL ), 0 }, { FCML_TEXT("blsr"), FCML_ASM_DIALECT_INSTRUCTION( F_BLSR, FCML_AM_ALL ), 0 }, { FCML_TEXT("bzhi"), FCML_ASM_DIALECT_INSTRUCTION( F_BZHI, FCML_AM_ALL ), 0 }, { FCML_TEXT("call"), FCML_ASM_DIALECT_INSTRUCTION( F_CALL, FCML_AM_ALL ), 0 }, { FCML_TEXT("call[sf,od];callw[sf,ow];callq[sf,oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_CALL, FCML_AM_REL0 ), 0 }, { FCML_TEXT("call[sf,od];callw[sf,ow];callq[sf,oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_CALL, FCML_AM_RMO ), 0 }, { FCML_TEXT("lcall[sf,od];lcallw[sf,ow];lcall[sf,od]"), FCML_ASM_DIALECT_INSTRUCTION( F_CALL, FCML_AM_PTR16_O ), 0 }, { FCML_TEXT("lcall[sf,od,d06];lcallw[sf,ow,d04];lcallq[sf,oq,d0a]"), FCML_ASM_DIALECT_INSTRUCTION( F_CALL, FCML_AM_M16_O ), 0 }, { FCML_TEXT("cbtw[ow];cwtl[od];cltq[oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_CBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("clc"), FCML_ASM_DIALECT_INSTRUCTION( F_CLC, FCML_AM_ALL ), 0 }, { FCML_TEXT("cld"), FCML_ASM_DIALECT_INSTRUCTION( F_CLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("clflush[sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_CLFLUSH, FCML_AM_ALL ), 0 }, { FCML_TEXT("cli"), FCML_ASM_DIALECT_INSTRUCTION( F_CLI, FCML_AM_ALL ), 0 }, { FCML_TEXT("clgi"), FCML_ASM_DIALECT_INSTRUCTION( F_CLGI, FCML_AM_ALL ), 0 }, { FCML_TEXT("clts"), FCML_ASM_DIALECT_INSTRUCTION( F_CLTS, FCML_AM_ALL ), 0 }, { FCML_TEXT("cmc"), FCML_ASM_DIALECT_INSTRUCTION( F_CMC, FCML_AM_ALL ), 0 }, { FCML_TEXT("cmov"), FCML_ASM_DIALECT_INSTRUCTION( F_CMOV, FCML_AM_ALL ), 0 }, { FCML_TEXT("cmp"), FCML_ASM_DIALECT_INSTRUCTION( F_CMP, FCML_AM_ALL ), 0 }, { FCML_TEXT("cmp"), FCML_ASM_DIALECT_INSTRUCTION( F_CMP, FCML_AM_ALL ), 0 }, { FCML_TEXT("cmpb[sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_CMP, FCML_AM_RM8_IMM8 ), 0 }, { FCML_TEXT("cmp;cmpw[sf,ow,mm];cmpl[sf,od,mm];cmpq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_CMP, FCML_AM_RMO_IMMO ), 0 }, { FCML_TEXT("cmp;cmpw[sf,ow,mm];cmpl[sf,od,mm];cmpq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_CMP, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("cmppd"), FCML_ASM_DIALECT_INSTRUCTION( F_CMPPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcmppd"), FCML_ASM_DIALECT_INSTRUCTION( F_VCMPPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("cmpps"), FCML_ASM_DIALECT_INSTRUCTION( F_CMPPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcmpps"), FCML_ASM_DIALECT_INSTRUCTION( F_VCMPPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("cmpsb[tb,sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_CMPS, FCML_AM_M8_M8 ), 0 }, { FCML_TEXT("cmpsw[tb,ow,sf];cmpsl[tb,od,sf];cmpsq[tb,oq,sf]"), FCML_ASM_DIALECT_INSTRUCTION( F_CMPS, FCML_AM_MO_MO ), 0 }, { FCML_TEXT("cmpsd;cmpeqsd[p00];cmpltsd[p01];cmplesd[p02];cmpunordsd[p03];cmpneqsd[p04];cmpnltsd[p05];cmpnlesd[p06];cmpordsd[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_CMPSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcmpsd;vcmpeqsd[p00];vcmpltsd[p01];vcmplesd[p02];vcmpunordsd[p03];vcmpneqsd[p04];vcmpnltsd[p05];vcmpnlesd[p06];vcmpordsd[p07];vcmpeq_uqsd[p08];vcmpngesd[p09];vcmpngtsd[p0a];vcmpfalsesd[p0b];vcmpneq_oqsd[p0c];vcmpgesd[p0d];vcmpgtsd[p0e];vcmptruesd[p0f];vcmpeq_ossd[p10];vcmplt_oqsd[p11];vcmple_oqsd[p12];vcmpunord_ssd[p13];vcmpneq_ussd[p14];vcmpnlt_uqsd[p15];vcmpnle_uqsd[p16];vcmpord_ssd[p17];vcmpeq_ussd[p18];vcmpnge_uqsd[p19];vcmpngt_uqsd[p1a];vcmpfalse_ossd[p1b];vcmpneq_ossd[p1c];vcmpge_oqsd[p1d];vcmpgt_oqsd[p1e];vcmptrue_ussd[p1f]"), FCML_ASM_DIALECT_INSTRUCTION( F_VCMPSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("cmpss;cmpeqss[p00];cmpltss[p01];cmpless[p02];cmpunordss[p03];cmpneqss[p04];cmpnltss[p05];cmpnless[p06];cmpordss[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_CMPSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcmpss;vcmpeqss[p00];vcmpltss[p01];vcmpless[p02];vcmpunordss[p03];vcmpneqss[p04];vcmpnltss[p05];vcmpnless[p06];vcmpordss[p07];vcmpeq_uqss[p08];vcmpngess[p09];vcmpngtss[p0a];vcmpfalsess[p0b];vcmpneq_oqss[p0c];vcmpgess[p0d];vcmpgtss[p0e];vcmptruess[p0f];vcmpeq_osss[p10];vcmplt_oqss[p11];vcmple_oqss[p12];vcmpunord_sss[p13];vcmpneq_usss[p14];vcmpnlt_uqss[p15];vcmpnle_uqss[p16];vcmpord_sss[p17];vcmpeq_usss[p18];vcmpnge_uqss[p19];vcmpngt_uqss[p1a];vcmpfalse_osss[p1b];vcmpneq_osss[p1c];vcmpge_oqss[p1d];vcmpgt_oqss[p1e];vcmptrue_usss[p1f]"), FCML_ASM_DIALECT_INSTRUCTION( F_VCMPSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("cmpxchg"), FCML_ASM_DIALECT_INSTRUCTION( F_CMPXCHG, FCML_AM_ALL ), 0 }, { FCML_TEXT("cmpxchg8b"), FCML_ASM_DIALECT_INSTRUCTION( F_CMPXCHGxB, FCML_AM_M64 ), 0 }, { FCML_TEXT("cmpxchg16b"), FCML_ASM_DIALECT_INSTRUCTION( F_CMPXCHGxB, FCML_AM_M128 ), 0 }, { FCML_TEXT("cpuid"), FCML_ASM_DIALECT_INSTRUCTION( F_CPUID, FCML_AM_ALL ), 0 }, { FCML_TEXT("crc32b[sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_CRC32, FCML_AM_RO_RM8 ), 0 }, { FCML_TEXT("crc32w[ow,sf];crc32l[od,sf];crc32q[oq,sf]"), FCML_ASM_DIALECT_INSTRUCTION( F_CRC32, FCML_AM_RO_RMO ), 0 }, { FCML_TEXT("cvtdq2pd"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTDQ2PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtdq2pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTDQ2PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtdq2ps"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTDQ2PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtdq2ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTDQ2PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtpd2dq"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTPD2DQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtpd2dq"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTPD2DQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtpd2pi"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTPD2PI, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtpd2ps"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTPD2PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtpd2psx[l0];vcvtpd2psy[l1]"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTPD2PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtpi2pd"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTPI2PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtpi2ps"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTPI2PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtps2dq"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTPS2DQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtps2dq"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTPS2DQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtps2pd"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTPS2PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtps2pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTPS2PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtps2pi"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTPS2PI, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtsd2si"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTSD2SI, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtsd2si"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTSD2SI, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtsd2ss"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTSD2SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtsd2ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTSD2SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtsi2sdl[sf,od]"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTSI2SD, FCML_AM_RX_RM32 ), 0 }, { FCML_TEXT("cvtsi2sdq[sf,oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTSI2SD, FCML_AM_RX_RM64 ), 0 }, { FCML_TEXT("vcvtsi2sdl[sf,od]"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTSI2SD, FCML_AM_RX_RX_RM32 ), 0 }, { FCML_TEXT("vcvtsi2sdq[sf,oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTSI2SD, FCML_AM_RX_RX_RM64 ), 0 }, { FCML_TEXT("cvtsi2ssl[sf,od]"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTSI2SS, FCML_AM_RX_RM32 ), 0 }, { FCML_TEXT("cvtsi2ssq[sf,oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTSI2SS, FCML_AM_RX_RM64 ), 0 }, { FCML_TEXT("vcvtsi2ssl[sf,od]"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTSI2SS, FCML_AM_RX_RX_RM32 ), 0 }, { FCML_TEXT("vcvtsi2ssq[sf,oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTSI2SS, FCML_AM_RX_RX_RM64 ), 0 }, { FCML_TEXT("cvtss2sd"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTSS2SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtss2sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTSS2SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvtss2si"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTSS2SI, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtss2si"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTSS2SI, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvttpd2dq"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTTPD2DQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvttpd2dqx[l0];vcvttpd2dqy[l1]"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTTPD2DQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvttpd2pi"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTTPD2PI, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvttps2dq"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTTPS2DQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvttps2dq"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTTPS2DQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvttps2pi"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTTPS2PI, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvttsd2si"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTTSD2SI, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvttsd2si"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTTSD2SI, FCML_AM_ALL ), 0 }, { FCML_TEXT("cvttss2si"), FCML_ASM_DIALECT_INSTRUCTION( F_CVTTSS2SI, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvttss2si"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTTSS2SI, FCML_AM_ALL ), 0 }, { FCML_TEXT("cwtd[ow];cltd[od];cqto[oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_CWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("comisd"), FCML_ASM_DIALECT_INSTRUCTION( F_COMISD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcomisd"), FCML_ASM_DIALECT_INSTRUCTION( F_VCOMISD, FCML_AM_ALL ), 0 }, { FCML_TEXT("comiss"), FCML_ASM_DIALECT_INSTRUCTION( F_COMISS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcomiss"), FCML_ASM_DIALECT_INSTRUCTION( F_VCOMISS, FCML_AM_ALL ), 0 }, { FCML_TEXT("daa"), FCML_ASM_DIALECT_INSTRUCTION( F_DAA, FCML_AM_ALL ), 0 }, { FCML_TEXT("das"), FCML_ASM_DIALECT_INSTRUCTION( F_DAS, FCML_AM_ALL ), 0 }, { FCML_TEXT("dec;decb[sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_DEC, FCML_AM_RM8 ), 0 }, { FCML_TEXT("dec;decw[ow,sf];decl[od,sf];decq[oq,sf]"), FCML_ASM_DIALECT_INSTRUCTION( F_DEC, FCML_AM_RMO ), 0 }, { FCML_TEXT("dec"), FCML_ASM_DIALECT_INSTRUCTION( F_DEC, FCML_AM_RO ), 0 }, { FCML_TEXT("div;divb[sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_DIV, FCML_AM_R16_RM8 ), 0 }, { FCML_TEXT("div;divw[sf,ow];divl[sf,od];divq[sf,oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_DIV, FCML_AM_RO_RMO ), 0 }, { FCML_TEXT("divpd"), FCML_ASM_DIALECT_INSTRUCTION( F_DIVPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vdivpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VDIVPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("divps"), FCML_ASM_DIALECT_INSTRUCTION( F_DIVPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vdivps"), FCML_ASM_DIALECT_INSTRUCTION( F_VDIVPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("divsd"), FCML_ASM_DIALECT_INSTRUCTION( F_DIVSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vdivsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VDIVSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("divss"), FCML_ASM_DIALECT_INSTRUCTION( F_DIVSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vdivss"), FCML_ASM_DIALECT_INSTRUCTION( F_VDIVSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("dppd"), FCML_ASM_DIALECT_INSTRUCTION( F_DPPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vdppd"), FCML_ASM_DIALECT_INSTRUCTION( F_VDPPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("dpps"), FCML_ASM_DIALECT_INSTRUCTION( F_DPPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vdpps"), FCML_ASM_DIALECT_INSTRUCTION( F_VDPPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("emms"), FCML_ASM_DIALECT_INSTRUCTION( F_EMMS, FCML_AM_ALL ), 0 }, { FCML_TEXT("enter;enterq"), FCML_ASM_DIALECT_INSTRUCTION( F_ENTER, FCML_AM_ALL ), FCML_GAS_DF_DO_NOT_REVERT_OPERANDS }, { FCML_TEXT("extractps"), FCML_ASM_DIALECT_INSTRUCTION( F_EXTRACTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vextractps"), FCML_ASM_DIALECT_INSTRUCTION( F_VEXTRACTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("extrq"), FCML_ASM_DIALECT_INSTRUCTION( F_EXTRQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("f2xm1"), FCML_ASM_DIALECT_INSTRUCTION( F_F2XM1, FCML_AM_ALL ), 0 }, { FCML_TEXT("fabs"), FCML_ASM_DIALECT_INSTRUCTION( F_FABS, FCML_AM_ALL ), 0 }, { FCML_TEXT("fadds[d04]"), FCML_ASM_DIALECT_INSTRUCTION( F_FADD, FCML_AM_M32 ), 0 }, { FCML_TEXT("faddl[d08]"), FCML_ASM_DIALECT_INSTRUCTION( F_FADD, FCML_AM_M64 ), 0 }, { FCML_TEXT("fadd"), FCML_ASM_DIALECT_INSTRUCTION( F_FADD, FCML_AM_ALL ), 0 }, { FCML_TEXT("fiadd[d02];fiaddl[d04]"), FCML_ASM_DIALECT_INSTRUCTION( F_FIADD, FCML_AM_ALL ), 0 }, { FCML_TEXT("faddp"), FCML_ASM_DIALECT_INSTRUCTION( F_FADDP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fbld"), FCML_ASM_DIALECT_INSTRUCTION( F_FBLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("fbstp"), FCML_ASM_DIALECT_INSTRUCTION( F_FBSTP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fchs"), FCML_ASM_DIALECT_INSTRUCTION( F_FCHS, FCML_AM_ALL ), 0 }, { FCML_TEXT("fclex"), FCML_ASM_DIALECT_INSTRUCTION( F_FCLEX, FCML_AM_ALL ), 0 }, { FCML_TEXT("fnclex"), FCML_ASM_DIALECT_INSTRUCTION( F_FNCLEX, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcmovb"), FCML_ASM_DIALECT_INSTRUCTION( F_FCMOVB, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcmove"), FCML_ASM_DIALECT_INSTRUCTION( F_FCMOVE, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcmovbe"), FCML_ASM_DIALECT_INSTRUCTION( F_FCMOVBE, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcmovu"), FCML_ASM_DIALECT_INSTRUCTION( F_FCMOVU, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcmovnb"), FCML_ASM_DIALECT_INSTRUCTION( F_FCMOVNB, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcmovne"), FCML_ASM_DIALECT_INSTRUCTION( F_FCMOVNE, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcmovnbe"), FCML_ASM_DIALECT_INSTRUCTION( F_FCMOVNBE, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcmovnu"), FCML_ASM_DIALECT_INSTRUCTION( F_FCMOVNU, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcos"), FCML_ASM_DIALECT_INSTRUCTION( F_FCOS, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcom;fcoms[d04];fcoml[d08]"), FCML_ASM_DIALECT_INSTRUCTION( F_FCOM, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcomp;fcomps[d04];fcompl[d08]"), FCML_ASM_DIALECT_INSTRUCTION( F_FCOMP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcompp"), FCML_ASM_DIALECT_INSTRUCTION( F_FCOMPP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcomi"), FCML_ASM_DIALECT_INSTRUCTION( F_FCOMI, FCML_AM_ALL ), 0 }, { FCML_TEXT("fcomip"), FCML_ASM_DIALECT_INSTRUCTION( F_FCOMIP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fucomi"), FCML_ASM_DIALECT_INSTRUCTION( F_FUCOMI, FCML_AM_ALL ), 0 }, { FCML_TEXT("fucomip"), FCML_ASM_DIALECT_INSTRUCTION( F_FUCOMIP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fdecstp"), FCML_ASM_DIALECT_INSTRUCTION( F_FDECSTP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fdiv;fdivs[d04];fdivl[d08]"), FCML_ASM_DIALECT_INSTRUCTION( F_FDIV, FCML_AM_ALL ), 0 }, { FCML_TEXT("fdivr"), FCML_ASM_DIALECT_INSTRUCTION( F_FDIV, FCML_AM_ST_ST0 ), FCML_GAS_DF_SYSV_SVR32_COMPATIBLE }, /* In this case order of the following two definitions really matters, so do not change it. */ { FCML_TEXT("fdivp"), FCML_ASM_DIALECT_INSTRUCTION( F_FDIVP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fdivrp"), FCML_ASM_DIALECT_INSTRUCTION( F_FDIVP, FCML_AM_ALL ), FCML_GAS_DF_SYSV_SVR32_COMPATIBLE }, { FCML_TEXT("fidiv[d02];fidivl[d04]"), FCML_ASM_DIALECT_INSTRUCTION( F_FIDIV, FCML_AM_ALL ), 0 }, { FCML_TEXT("fdivr;fdivrs[d04];fdivrl[d08]"), FCML_ASM_DIALECT_INSTRUCTION( F_FDIVR, FCML_AM_ALL ), 0 }, { FCML_TEXT("fdiv"), FCML_ASM_DIALECT_INSTRUCTION( F_FDIVR, FCML_AM_ST_ST0 ), FCML_GAS_DF_SYSV_SVR32_COMPATIBLE }, { FCML_TEXT("fdivrp"), FCML_ASM_DIALECT_INSTRUCTION( F_FDIVRP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fdivp"), FCML_ASM_DIALECT_INSTRUCTION( F_FDIVRP, FCML_AM_ALL ), FCML_GAS_DF_SYSV_SVR32_COMPATIBLE }, { FCML_TEXT("fidivr[d02];fidivrl[d04]"), FCML_ASM_DIALECT_INSTRUCTION( F_FIDIVR, FCML_AM_ALL ), 0 }, { FCML_TEXT("ffree"), FCML_ASM_DIALECT_INSTRUCTION( F_FFREE, FCML_AM_ALL ), 0 }, { FCML_TEXT("ficom[d02];ficoml[d04]"), FCML_ASM_DIALECT_INSTRUCTION( F_FICOM, FCML_AM_ALL ), 0 }, { FCML_TEXT("ficomp[d02];ficompl[d04]"), FCML_ASM_DIALECT_INSTRUCTION( F_FICOMP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fild[d02];fildl[d04];fildll[d08]"), FCML_ASM_DIALECT_INSTRUCTION( F_FILD, FCML_AM_ALL ), 0 }, { FCML_TEXT("fincstp"), FCML_ASM_DIALECT_INSTRUCTION( F_FINCSTP, FCML_AM_ALL ), 0 }, { FCML_TEXT("finit"), FCML_ASM_DIALECT_INSTRUCTION( F_FINIT, FCML_AM_ALL ), 0 }, { FCML_TEXT("fninit"), FCML_ASM_DIALECT_INSTRUCTION( F_FNINIT, FCML_AM_ALL ), 0 }, { FCML_TEXT("fist[d02];fistl[d04]"), FCML_ASM_DIALECT_INSTRUCTION( F_FIST, FCML_AM_ALL ), 0 }, { FCML_TEXT("fistp[d02];fistpl[d04];fistpll[d08]"), FCML_ASM_DIALECT_INSTRUCTION( F_FISTP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fld;flds[d04];fldl[d08];fldt[d0A]"), FCML_ASM_DIALECT_INSTRUCTION( F_FLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("fld1"), FCML_ASM_DIALECT_INSTRUCTION( F_FLD1, FCML_AM_ALL ), 0 }, { FCML_TEXT("fldl2t"), FCML_ASM_DIALECT_INSTRUCTION( F_FLDL2T, FCML_AM_ALL ), 0 }, { FCML_TEXT("fldl2e"), FCML_ASM_DIALECT_INSTRUCTION( F_FLDL2E, FCML_AM_ALL ), 0 }, { FCML_TEXT("fldpi"), FCML_ASM_DIALECT_INSTRUCTION( F_FLDPI, FCML_AM_ALL ), 0 }, { FCML_TEXT("fldlg2"), FCML_ASM_DIALECT_INSTRUCTION( F_FLDLG2, FCML_AM_ALL ), 0 }, { FCML_TEXT("fldln2"), FCML_ASM_DIALECT_INSTRUCTION( F_FLDLN2, FCML_AM_ALL ), 0 }, { FCML_TEXT("fldz"), FCML_ASM_DIALECT_INSTRUCTION( F_FLDZ, FCML_AM_ALL ), 0 }, { FCML_TEXT("fldcw"), FCML_ASM_DIALECT_INSTRUCTION( F_FLDCW, FCML_AM_ALL ), 0 }, { FCML_TEXT("fldenvs[d0e];fldenv[d1c]"), FCML_ASM_DIALECT_INSTRUCTION( F_FLDENV, FCML_AM_ALL ), 0 }, { FCML_TEXT("fmul;fmuls[d04];fmull[d08]"), FCML_ASM_DIALECT_INSTRUCTION( F_FMUL, FCML_AM_ALL ), 0 }, { FCML_TEXT("fmulp"), FCML_ASM_DIALECT_INSTRUCTION( F_FMULP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fimul[d02];fimull[d04]"), FCML_ASM_DIALECT_INSTRUCTION( F_FIMUL, FCML_AM_ALL ), 0 }, { FCML_TEXT("fnop"), FCML_ASM_DIALECT_INSTRUCTION( F_FNOP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fpatan"), FCML_ASM_DIALECT_INSTRUCTION( F_FPATAN, FCML_AM_ALL ), 0 }, { FCML_TEXT("fprem"), FCML_ASM_DIALECT_INSTRUCTION( F_FPREM, FCML_AM_ALL ), 0 }, { FCML_TEXT("fprem1"), FCML_ASM_DIALECT_INSTRUCTION( F_FPREM1, FCML_AM_ALL ), 0 }, { FCML_TEXT("fptan"), FCML_ASM_DIALECT_INSTRUCTION( F_FPTAN, FCML_AM_ALL ), 0 }, { FCML_TEXT("frndint"), FCML_ASM_DIALECT_INSTRUCTION( F_FRNDINT, FCML_AM_ALL ), 0 }, { FCML_TEXT("frstor[d6c];frstors[d5e]"), FCML_ASM_DIALECT_INSTRUCTION( F_FRSTOR, FCML_AM_ALL ), 0 }, { FCML_TEXT("fsave[d6c];fsaves[d5e]"), FCML_ASM_DIALECT_INSTRUCTION( F_FSAVE, FCML_AM_ALL ), 0 }, { FCML_TEXT("fnsave[d6c];fnsaves[d5e]"), FCML_ASM_DIALECT_INSTRUCTION( F_FNSAVE, FCML_AM_ALL ), 0 }, { FCML_TEXT("fscale"), FCML_ASM_DIALECT_INSTRUCTION( F_FSCALE, FCML_AM_ALL ), 0 }, { FCML_TEXT("fsin"), FCML_ASM_DIALECT_INSTRUCTION( F_FSIN, FCML_AM_ALL ), 0 }, { FCML_TEXT("fsincos"), FCML_ASM_DIALECT_INSTRUCTION( F_FSINCOS, FCML_AM_ALL ), 0 }, { FCML_TEXT("fsqrt"), FCML_ASM_DIALECT_INSTRUCTION( F_FSQRT, FCML_AM_ALL ), 0 }, { FCML_TEXT("fst;fsts[d04];fstl[d08]"), FCML_ASM_DIALECT_INSTRUCTION( F_FST, FCML_AM_ALL ), 0 }, { FCML_TEXT("fstp;fstps[d04];fstpl[d08];fstpt[d0a]"), FCML_ASM_DIALECT_INSTRUCTION( F_FSTP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fstcw"), FCML_ASM_DIALECT_INSTRUCTION( F_FSTCW, FCML_AM_ALL ), 0 }, { FCML_TEXT("fnstcw"), FCML_ASM_DIALECT_INSTRUCTION( F_FNSTCW, FCML_AM_ALL ), 0 }, { FCML_TEXT("fstenv[d1c];fstenvs[d0e]"), FCML_ASM_DIALECT_INSTRUCTION( F_FSTENV, FCML_AM_ALL ), 0 }, { FCML_TEXT("fnstenv[d1c];fnstenvs[d0e]"), FCML_ASM_DIALECT_INSTRUCTION( F_FNSTENV, FCML_AM_ALL ), 0 }, { FCML_TEXT("fstsw"), FCML_ASM_DIALECT_INSTRUCTION( F_FSTSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("fnstsw"), FCML_ASM_DIALECT_INSTRUCTION( F_FNSTSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("fsub;fsubs[d04];fsubl[d08]"), FCML_ASM_DIALECT_INSTRUCTION( F_FSUB, FCML_AM_ALL ), 0 }, { FCML_TEXT("fsubr"), FCML_ASM_DIALECT_INSTRUCTION( F_FSUB, FCML_AM_ST_ST0 ), FCML_GAS_DF_SYSV_SVR32_COMPATIBLE }, { FCML_TEXT("fsubp"), FCML_ASM_DIALECT_INSTRUCTION( F_FSUBP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fsubrp"), FCML_ASM_DIALECT_INSTRUCTION( F_FSUBP, FCML_AM_ALL ), FCML_GAS_DF_SYSV_SVR32_COMPATIBLE }, { FCML_TEXT("fisub[d02];fisubl[d04]"), FCML_ASM_DIALECT_INSTRUCTION( F_FISUB, FCML_AM_ALL ), 0 }, { FCML_TEXT("fsubr;fsubrs[d04];fsubrl[d08]"), FCML_ASM_DIALECT_INSTRUCTION( F_FSUBR, FCML_AM_ALL ), 0 }, { FCML_TEXT("fsub"), FCML_ASM_DIALECT_INSTRUCTION( F_FSUBR, FCML_AM_ST_ST0 ), FCML_GAS_DF_SYSV_SVR32_COMPATIBLE }, { FCML_TEXT("fsubrp"), FCML_ASM_DIALECT_INSTRUCTION( F_FSUBRP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fsubp"), FCML_ASM_DIALECT_INSTRUCTION( F_FSUBRP, FCML_AM_ALL ), FCML_GAS_DF_SYSV_SVR32_COMPATIBLE }, { FCML_TEXT("fisubr[d02];fisubrl[d04]"), FCML_ASM_DIALECT_INSTRUCTION( F_FISUBR, FCML_AM_ALL ), 0 }, { FCML_TEXT("ftst"), FCML_ASM_DIALECT_INSTRUCTION( F_FTST, FCML_AM_ALL ), 0 }, { FCML_TEXT("fucom"), FCML_ASM_DIALECT_INSTRUCTION( F_FUCOM, FCML_AM_ALL ), 0 }, { FCML_TEXT("fucomp"), FCML_ASM_DIALECT_INSTRUCTION( F_FUCOMP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fucompp"), FCML_ASM_DIALECT_INSTRUCTION( F_FUCOMPP, FCML_AM_ALL ), 0 }, { FCML_TEXT("fxam"), FCML_ASM_DIALECT_INSTRUCTION( F_FXAM, FCML_AM_ALL ), 0 }, { FCML_TEXT("fxch"), FCML_ASM_DIALECT_INSTRUCTION( F_FXCH, FCML_AM_ALL ), 0 }, { FCML_TEXT("fxrstor"), FCML_ASM_DIALECT_INSTRUCTION( F_FXRSTOR, FCML_AM_ALL ), 0 }, { FCML_TEXT("fxrstor64"), FCML_ASM_DIALECT_INSTRUCTION( F_FXRSTOR64, FCML_AM_ALL ), 0 }, { FCML_TEXT("fxsave"), FCML_ASM_DIALECT_INSTRUCTION( F_FXSAVE, FCML_AM_ALL ), 0 }, { FCML_TEXT("fxsave64"), FCML_ASM_DIALECT_INSTRUCTION( F_FXSAVE64, FCML_AM_ALL ), 0 }, { FCML_TEXT("fxtract"), FCML_ASM_DIALECT_INSTRUCTION( F_FXTRACT, FCML_AM_ALL ), 0 }, { FCML_TEXT("fyl2x"), FCML_ASM_DIALECT_INSTRUCTION( F_FYL2X, FCML_AM_ALL ), 0 }, { FCML_TEXT("fyl2xp1"), FCML_ASM_DIALECT_INSTRUCTION( F_FYL2XP1, FCML_AM_ALL ), 0 }, { FCML_TEXT("femms"), FCML_ASM_DIALECT_INSTRUCTION( F_FEMMS, FCML_AM_ALL ), 0 }, { FCML_TEXT("fisttp[d02];fisttpl[d04];fisttpll[d08]"), FCML_ASM_DIALECT_INSTRUCTION( F_FISTTP, FCML_AM_ALL ), 0 }, { FCML_TEXT("getsec"), FCML_ASM_DIALECT_INSTRUCTION( F_GETSEC, FCML_AM_ALL ), 0 }, { FCML_TEXT("haddpd"), FCML_ASM_DIALECT_INSTRUCTION( F_HADDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vhaddpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VHADDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("haddps"), FCML_ASM_DIALECT_INSTRUCTION( F_HADDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vhaddps"), FCML_ASM_DIALECT_INSTRUCTION( F_VHADDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("hlt"), FCML_ASM_DIALECT_INSTRUCTION( F_HLT, FCML_AM_ALL ), 0 }, { FCML_TEXT("hsubpd"), FCML_ASM_DIALECT_INSTRUCTION( F_HSUBPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vhsubpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VHSUBPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("hsubps"), FCML_ASM_DIALECT_INSTRUCTION( F_HSUBPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vhsubps"), FCML_ASM_DIALECT_INSTRUCTION( F_VHSUBPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("invept"), FCML_ASM_DIALECT_INSTRUCTION( F_INVEPT, FCML_AM_ALL ), 0 }, { FCML_TEXT("invvpid"), FCML_ASM_DIALECT_INSTRUCTION( F_INVVPID, FCML_AM_ALL ), 0 }, { FCML_TEXT("idiv;idivb[sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_IDIV, FCML_AM_RM8 ), 0 }, { FCML_TEXT("idiv;idivw[sf,ow];idivl[sf,od];idivq[sf,oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_IDIV, FCML_AM_RMO ), 0 }, { FCML_TEXT("imul;imulb[sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_IMUL, FCML_AM_RM8 ), 0 }, { FCML_TEXT("imul;imulw[sf,ow];imull[sf,od];imulq[sf,oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_IMUL, FCML_AM_ALL ), 0 }, { FCML_TEXT("in"), FCML_ASM_DIALECT_INSTRUCTION( F_IN, FCML_AM_ALL ), 0 }, { FCML_TEXT("inc;incb[sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_INC, FCML_AM_RM8 ), 0 }, { FCML_TEXT("inc;incw[sf,ow];incl[sf,od];incq[sf,oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_INC, FCML_AM_RMO ), 0 }, { FCML_TEXT("inc"), FCML_ASM_DIALECT_INSTRUCTION( F_INC, FCML_AM_ALL ), 0 }, { FCML_TEXT("insb[tb,sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_INS, FCML_AM_M8 ), 0 }, { FCML_TEXT("insw[tb,sf,ow]"), FCML_ASM_DIALECT_INSTRUCTION( F_INS, FCML_AM_M16 ), 0 }, { FCML_TEXT("insl[tb,sf,od]"), FCML_ASM_DIALECT_INSTRUCTION( F_INS, FCML_AM_M32 ), 0 }, { FCML_TEXT("insertps"), FCML_ASM_DIALECT_INSTRUCTION( F_INSERTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vinsertps"), FCML_ASM_DIALECT_INSTRUCTION( F_VINSERTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vextractf128"), FCML_ASM_DIALECT_INSTRUCTION( F_VEXTRACTF128, FCML_AM_ALL ), 0 }, { FCML_TEXT("vinsertf128"), FCML_ASM_DIALECT_INSTRUCTION( F_VINSERTF128, FCML_AM_ALL ), 0 }, { FCML_TEXT("insertq"), FCML_ASM_DIALECT_INSTRUCTION( F_INSERTQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("int3"), FCML_ASM_DIALECT_INSTRUCTION( F_INT3, FCML_AM_ALL ), 0 }, { FCML_TEXT("int"), FCML_ASM_DIALECT_INSTRUCTION( F_INT, FCML_AM_ALL ), 0 }, { FCML_TEXT("into"), FCML_ASM_DIALECT_INSTRUCTION( F_INTO, FCML_AM_ALL ), 0 }, { FCML_TEXT("invd"), FCML_ASM_DIALECT_INSTRUCTION( F_INVD, FCML_AM_ALL ), 0 }, { FCML_TEXT("invlpg"), FCML_ASM_DIALECT_INSTRUCTION( F_INVLPG, FCML_AM_ALL ), 0 }, { FCML_TEXT("invlpga[tb]"), FCML_ASM_DIALECT_INSTRUCTION( F_INVLPGA, FCML_AM_ALL ), 0 }, { FCML_TEXT("invpcid"), FCML_ASM_DIALECT_INSTRUCTION( F_INVPCID, FCML_AM_ALL ), 0 }, { FCML_TEXT("iretw[sf,ow];iret[sf,od];iretq[sf,oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_IRET, FCML_AM_ALL ), 0 }, { FCML_TEXT("jcxz[aw];jecxz[ad];jrcxz[aq]"), FCML_ASM_DIALECT_INSTRUCTION( F_JCXZ, FCML_AM_ALL ), 0 }, { FCML_TEXT("j"), FCML_ASM_DIALECT_INSTRUCTION( F_JCC, FCML_AM_ALL ), 0 }, { FCML_TEXT("jmp"), FCML_ASM_DIALECT_INSTRUCTION( F_JMP, FCML_AM_ALL ), 0 }, { FCML_TEXT("jmp[sf,od];jmpw[sf,ow];jmpq[sf,oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_JMP, FCML_AM_REL0 ), 0 }, { FCML_TEXT("jmp[sf,od];jmpw[sf,ow];jmpq[sf,oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_JMP, FCML_AM_RMO ), 0 }, { FCML_TEXT("ljmpl[sf,od];ljmpw[sf,ow];ljmp[sf,od]"), FCML_ASM_DIALECT_INSTRUCTION( F_JMP, FCML_AM_PTR16_O ), 0 }, { FCML_TEXT("ljmpl[sf,od,d06];ljmpw[sf,ow,d04];ljmpq[sf,oq,d0a]"), FCML_ASM_DIALECT_INSTRUCTION( F_JMP, FCML_AM_M16_O ), 0 }, { FCML_TEXT("lar"), FCML_ASM_DIALECT_INSTRUCTION( F_LAR, FCML_AM_ALL ), 0 }, { FCML_TEXT("lahf"), FCML_ASM_DIALECT_INSTRUCTION( F_LAHF, FCML_AM_ALL ), 0 }, { FCML_TEXT("lddqu"), FCML_ASM_DIALECT_INSTRUCTION( F_LDDQU, FCML_AM_ALL ), 0 }, { FCML_TEXT("vlddqu"), FCML_ASM_DIALECT_INSTRUCTION( F_VLDDQU, FCML_AM_ALL ), 0 }, { FCML_TEXT("ldmxcsr"), FCML_ASM_DIALECT_INSTRUCTION( F_LDMXCSR, FCML_AM_ALL ), 0 }, { FCML_TEXT("vldmxcsr"), FCML_ASM_DIALECT_INSTRUCTION( F_VLDMXCSR, FCML_AM_ALL ), 0 }, { FCML_TEXT("lds"), FCML_ASM_DIALECT_INSTRUCTION( F_LDS, FCML_AM_ALL ), 0 }, { FCML_TEXT("lss"), FCML_ASM_DIALECT_INSTRUCTION( F_LSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("les"), FCML_ASM_DIALECT_INSTRUCTION( F_LES, FCML_AM_ALL ), 0 }, { FCML_TEXT("lfs"), FCML_ASM_DIALECT_INSTRUCTION( F_LFS, FCML_AM_ALL ), 0 }, { FCML_TEXT("lgs"), FCML_ASM_DIALECT_INSTRUCTION( F_LGS, FCML_AM_ALL ), 0 }, { FCML_TEXT("lea"), FCML_ASM_DIALECT_INSTRUCTION( F_LEA, FCML_AM_ALL ), 0 }, { FCML_TEXT("leave"), FCML_ASM_DIALECT_INSTRUCTION( F_LEAVE, FCML_AM_ALL ), 0 }, { FCML_TEXT("lfence"), FCML_ASM_DIALECT_INSTRUCTION( F_LFENCE, FCML_AM_ALL ), 0 }, { FCML_TEXT("llwpcb"), FCML_ASM_DIALECT_INSTRUCTION( F_LLWPCB, FCML_AM_ALL ), 0 }, { FCML_TEXT("lgdt"), FCML_ASM_DIALECT_INSTRUCTION( F_LGDT, FCML_AM_ALL ), 0 }, { FCML_TEXT("lidt"), FCML_ASM_DIALECT_INSTRUCTION( F_LIDT, FCML_AM_ALL ), 0 }, { FCML_TEXT("lldt"), FCML_ASM_DIALECT_INSTRUCTION( F_LLDT, FCML_AM_ALL ), 0 }, { FCML_TEXT("lmsw"), FCML_ASM_DIALECT_INSTRUCTION( F_LMSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("lods;lodsb[tb,sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_LODS, FCML_AM_RM8 ), 0 }, { FCML_TEXT("lods;lodsw[tb,sf,ow];lodsl[tb,sf,od];lodsq[tb,sf,oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_LODS, FCML_AM_RMO ), 0 }, { FCML_TEXT("loop"), FCML_ASM_DIALECT_INSTRUCTION( F_LOOP, FCML_AM_ALL ), 0 }, { FCML_TEXT("loope;loopz"), FCML_ASM_DIALECT_INSTRUCTION( F_LOOPE, FCML_AM_ALL ), 0 }, { FCML_TEXT("loopne;loopnz"), FCML_ASM_DIALECT_INSTRUCTION( F_LOOPNE, FCML_AM_ALL ), 0 }, { FCML_TEXT("lwpins"), FCML_ASM_DIALECT_INSTRUCTION( F_LWPINS, FCML_AM_ALL ), 0 }, { FCML_TEXT("lwpval"), FCML_ASM_DIALECT_INSTRUCTION( F_LWPVAL, FCML_AM_ALL ), 0 }, { FCML_TEXT("lsl"), FCML_ASM_DIALECT_INSTRUCTION( F_LSL, FCML_AM_ALL ), 0 }, { FCML_TEXT("ltr"), FCML_ASM_DIALECT_INSTRUCTION( F_LTR, FCML_AM_ALL ), 0 }, { FCML_TEXT("lzcnt"), FCML_ASM_DIALECT_INSTRUCTION( F_LZCNT, FCML_AM_ALL ), 0 }, { FCML_TEXT("maskmovdqu"), FCML_ASM_DIALECT_INSTRUCTION( F_MASKMOVDQU, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmaskmovdqu"), FCML_ASM_DIALECT_INSTRUCTION( F_VMASKMOVDQU, FCML_AM_ALL ), 0 }, { FCML_TEXT("maskmovq"), FCML_ASM_DIALECT_INSTRUCTION( F_MASKMOVQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmaskmovps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMASKMOVPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmaskmovpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMASKMOVPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaskmovd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMASKMOVD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaskmov"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMASKMOV, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaskmovq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMASKMOVQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("maxpd"), FCML_ASM_DIALECT_INSTRUCTION( F_MAXPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmaxpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMAXPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("maxps"), FCML_ASM_DIALECT_INSTRUCTION( F_MAXPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmaxps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMAXPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("maxsd"), FCML_ASM_DIALECT_INSTRUCTION( F_MAXSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmaxsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMAXSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("maxss"), FCML_ASM_DIALECT_INSTRUCTION( F_MAXSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmaxss"), FCML_ASM_DIALECT_INSTRUCTION( F_VMAXSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("mfence"), FCML_ASM_DIALECT_INSTRUCTION( F_MFENCE, FCML_AM_ALL ), 0 }, { FCML_TEXT("minpd"), FCML_ASM_DIALECT_INSTRUCTION( F_MINPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vminpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMINPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("minps"), FCML_ASM_DIALECT_INSTRUCTION( F_MINPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vminps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMINPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("minsd"), FCML_ASM_DIALECT_INSTRUCTION( F_MINSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vminsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMINSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("minss"), FCML_ASM_DIALECT_INSTRUCTION( F_MINSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vminss"), FCML_ASM_DIALECT_INSTRUCTION( F_VMINSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("monitor[tb]"), FCML_ASM_DIALECT_INSTRUCTION( F_MONITOR, FCML_AM_ALL ), FCML_GAS_DF_DO_NOT_REVERT_OPERANDS }, { FCML_TEXT("movapd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVAPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovapd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVAPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movaps"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVAPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovaps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVAPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movbe"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVBE, FCML_AM_ALL ), 0 }, { FCML_TEXT("mov"), FCML_ASM_DIALECT_INSTRUCTION( F_MOV, FCML_AM_ALL ), 0 }, { FCML_TEXT("movabs[aq];mov[aw];mov[ad]"), FCML_ASM_DIALECT_INSTRUCTION( F_MOV, FCML_AM_MOFF8_R8 ), 0 }, { FCML_TEXT("movabs[aq];mov[aw];mov[ad]"), FCML_ASM_DIALECT_INSTRUCTION( F_MOV, FCML_AM_R8_MOFF8 ), 0 }, { FCML_TEXT("movabs[aq];mov[aw];mov[ad]"), FCML_ASM_DIALECT_INSTRUCTION( F_MOV, FCML_AM_RO_MOFFO ), 0 }, { FCML_TEXT("movabs[aq];mov[aw];mov[ad]"), FCML_ASM_DIALECT_INSTRUCTION( F_MOV, FCML_AM_MOFFO_RO ), 0 }, { FCML_TEXT("movabs[sf,oq];mov[sf,od];mov[sf,ow]"), FCML_ASM_DIALECT_INSTRUCTION( F_MOV, FCML_AM_R0_IMM0 ), 0 }, { FCML_TEXT("movb[tb,sb];mov"), FCML_ASM_DIALECT_INSTRUCTION( F_MOV, FCML_AM_RM8_IMM8 ), 0 }, { FCML_TEXT("mov;movw[sf,ow];movl[sf,od];movq[sf,oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_MOV, FCML_AM_RMO_IMMO ), 0 }, { FCML_TEXT("movd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movq"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovq"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("movddup"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVDDUP, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovddup"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVDDUP, FCML_AM_ALL ), 0 }, { FCML_TEXT("movdqa"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVDQA, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovdqa"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVDQA, FCML_AM_ALL ), 0 }, { FCML_TEXT("movdqu"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVDQU, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovdqu"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVDQU, FCML_AM_ALL ), 0 }, { FCML_TEXT("movdq2q"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVDQ2Q, FCML_AM_ALL ), 0 }, { FCML_TEXT("movhlps"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVHLPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovhlps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVHLPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movhpd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVHPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovhpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVHPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movhps"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVHPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovhps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVHPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movlhps"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVLHPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovlhps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVLHPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movlpd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVLPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovlpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVLPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movlps"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVLPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovlps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVLPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movmskpd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVMSKPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovmskpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVMSKPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movmskps"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVMSKPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovmskps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVMSKPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movntdqa"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVNTDQA, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovntdqa"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVNTDQA, FCML_AM_ALL ), 0 }, { FCML_TEXT("movntdq"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVNTDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovntdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVNTDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("movsb[tb,sb];movs"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVS, FCML_AM_M8_M8 ), 0 }, { FCML_TEXT("movs;movsw[tb,sf,ow];movsl[tb,sf,od];movsq[tb,sf,oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVS, FCML_AM_MO_MO ), 0 }, { FCML_TEXT("movnti"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVNTI, FCML_AM_ALL ), 0 }, { FCML_TEXT("movntpd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVNTPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovntpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVNTPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movntps"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVNTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovntps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVNTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movntsd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVNTSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movntss"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVNTSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movntq"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVNTQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("movq"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("movq2dq"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVQ2DQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("movsd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movshdup"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVSHDUP, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovshdup"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVSHDUP, FCML_AM_ALL ), 0 }, { FCML_TEXT("movsldup"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVSLDUP, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovsldup"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVSLDUP, FCML_AM_ALL ), 0 }, { FCML_TEXT("movss"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovss"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movsbw[sf,ow,d01,mm];movsbl[sf,od,d01,mm];movsbq[sf,oq,d01,mm];movsbw[sf,ow,mr];movsbl[sf,od,mr];movsbq[sf,oq,mr]"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVSX, FCML_AM_RO_RM8 ), 0 }, { FCML_TEXT("movsww[sf,ow,d02,mm];movswl[sf,od,d02,mm];movswq[sf,oq,d02,mm];movsww[sf,ow,mr];movswl[sf,od,mr];movswq[sf,oq,mr]"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVSX, FCML_AM_RO_RM16 ), 0 }, { FCML_TEXT("movsxd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVSXD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movupd"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVUPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovupd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVUPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("movups"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVUPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmovups"), FCML_ASM_DIALECT_INSTRUCTION( F_VMOVUPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("movzbw[sf,ow,d01,mm];movzbl[sf,od,d01,mm];movzbq[sf,oq,d01,mm];movzbw[sf,ow,mr];movzbl[sf,od,mr];movzbq[sf,oq,mr]"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVZX, FCML_AM_RO_RM8 ), 0 }, { FCML_TEXT("movzww[sf,ow,d02,mm];movzwl[sf,od,d02,mm];movzwq[sf,oq,d02,mm];movzww[sf,ow,mr];movzwl[sf,od,mr];movzwq[sf,oq,mr]"), FCML_ASM_DIALECT_INSTRUCTION( F_MOVZX, FCML_AM_RO_RM16 ), 0 }, { FCML_TEXT("mpsadbw"), FCML_ASM_DIALECT_INSTRUCTION( F_MPSADBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmpsadbw"), FCML_ASM_DIALECT_INSTRUCTION( F_VMPSADBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("mulb[sb];mul"), FCML_ASM_DIALECT_INSTRUCTION( F_MUL, FCML_AM_RM8 ), 0 }, { FCML_TEXT("mulw[sf,ow,mm];mull[sf,od,mm];mulq[sf,oq,mm];mul"), FCML_ASM_DIALECT_INSTRUCTION( F_MUL, FCML_AM_RMO ), 0 }, { FCML_TEXT("mulpd"), FCML_ASM_DIALECT_INSTRUCTION( F_MULPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmulpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMULPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("mulps"), FCML_ASM_DIALECT_INSTRUCTION( F_MULPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmulps"), FCML_ASM_DIALECT_INSTRUCTION( F_VMULPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("mulsd"), FCML_ASM_DIALECT_INSTRUCTION( F_MULSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmulsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VMULSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("mulss"), FCML_ASM_DIALECT_INSTRUCTION( F_MULSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmulss"), FCML_ASM_DIALECT_INSTRUCTION( F_VMULSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("mwait"), FCML_ASM_DIALECT_INSTRUCTION( F_MWAIT, FCML_AM_ALL ), 0 }, { FCML_TEXT("neg;negb[sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_NEG, FCML_AM_RM8 ), 0 }, { FCML_TEXT("neg;negw[sf,ow,mm];negl[sf,od,mm];negq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_NEG, FCML_AM_RMO ), 0 }, { FCML_TEXT("nop"), FCML_ASM_DIALECT_INSTRUCTION( F_NOP, FCML_AM_ALL ), 0 }, { FCML_TEXT("nop;nopw[sf,ow,mm];nopl[sf,od,mm];nopq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_NOP, FCML_AM_RMO ), 0 }, { FCML_TEXT("not;notb[sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_NOT, FCML_AM_RM8 ), 0 }, { FCML_TEXT("not;notw[sf,ow,mm];notl[sf,od,mm];notq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_NOT, FCML_AM_RMO ), 0 }, { FCML_TEXT("or"), FCML_ASM_DIALECT_INSTRUCTION( F_OR, FCML_AM_ALL ), 0 }, { FCML_TEXT("or;orb[sb,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_OR, FCML_AM_RM8_IMM8 ), 0 }, { FCML_TEXT("or;orw[sf,ow,mm];orl[sf,od,mm];orq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_OR, FCML_AM_RMO_IMMO ), 0 }, { FCML_TEXT("or;orw[sf,ow,mm];orl[sf,od,mm];orq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_OR, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("orpd"), FCML_ASM_DIALECT_INSTRUCTION( F_ORPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vorpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VORPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("orps"), FCML_ASM_DIALECT_INSTRUCTION( F_ORPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vorps"), FCML_ASM_DIALECT_INSTRUCTION( F_VORPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("out"), FCML_ASM_DIALECT_INSTRUCTION( F_OUT, FCML_AM_ALL ), 0 }, { FCML_TEXT("outsb[tb,sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_OUTS, FCML_AM_M8 ), 0 }, { FCML_TEXT("outsw[tb,sf,ow]"), FCML_ASM_DIALECT_INSTRUCTION( F_OUTS, FCML_AM_M16 ), 0 }, { FCML_TEXT("outsl[tb,sf,od]"), FCML_ASM_DIALECT_INSTRUCTION( F_OUTS, FCML_AM_M32 ), 0 }, { FCML_TEXT("pabsw"), FCML_ASM_DIALECT_INSTRUCTION( F_PABSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pabsb"), FCML_ASM_DIALECT_INSTRUCTION( F_PABSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pabsd"), FCML_ASM_DIALECT_INSTRUCTION( F_PABSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpabsb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPABSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpabsw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPABSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpabsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPABSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpacksswb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPACKSSWB, FCML_AM_ALL ), 0 }, { FCML_TEXT("packsswb"), FCML_ASM_DIALECT_INSTRUCTION( F_PACKSSWB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpackssdw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPACKSSDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("packssdw"), FCML_ASM_DIALECT_INSTRUCTION( F_PACKSSDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("packusdw"), FCML_ASM_DIALECT_INSTRUCTION( F_PACKUSDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpackusdw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPACKUSDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("packuswb"), FCML_ASM_DIALECT_INSTRUCTION( F_PACKUSWB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpackuswb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPACKUSWB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpaddw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPADDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("paddw"), FCML_ASM_DIALECT_INSTRUCTION( F_PADDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpaddb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPADDB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpaddd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPADDD, FCML_AM_ALL ), 0 }, { FCML_TEXT("paddb"), FCML_ASM_DIALECT_INSTRUCTION( F_PADDB, FCML_AM_ALL ), 0 }, { FCML_TEXT("paddd"), FCML_ASM_DIALECT_INSTRUCTION( F_PADDD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpaddsw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPADDSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("paddsb"), FCML_ASM_DIALECT_INSTRUCTION( F_PADDSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("paddsw"), FCML_ASM_DIALECT_INSTRUCTION( F_PADDSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpaddsb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPADDSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("paddusw"), FCML_ASM_DIALECT_INSTRUCTION( F_PADDUSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("paddusb"), FCML_ASM_DIALECT_INSTRUCTION( F_PADDUSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpaddusw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPADDUSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpaddusb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPADDUSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("paddq"), FCML_ASM_DIALECT_INSTRUCTION( F_PADDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpaddq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPADDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pop;popw[sf,ow,mm];popl[sf,od,mm];popq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_POP, FCML_AM_RMO ), 0 }, { FCML_TEXT("popw[ow];popl[od];popq[oq];pop"), FCML_ASM_DIALECT_INSTRUCTION( F_POP, FCML_AM_SR_FSGSO ), 0 }, { FCML_TEXT("pop"), FCML_ASM_DIALECT_INSTRUCTION( F_POP, FCML_AM_ALL ), 0 }, { FCML_TEXT("push;pushw[sf,ow,mm];pushl[sf,od,mm];pushq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_PUSH, FCML_AM_RMO ), 0 }, { FCML_TEXT("pushb"), FCML_ASM_DIALECT_INSTRUCTION( F_PUSH, FCML_AM_IMM8 ), 0 }, { FCML_TEXT("pushw[ow];pushl[od];pushq[oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_PUSH, FCML_AM_IMMO ), 0 }, { FCML_TEXT("pushw[ow];pushl[od];pushq[oq];push"), FCML_ASM_DIALECT_INSTRUCTION( F_PUSH, FCML_AM_SR_FSGSO ), 0 }, { FCML_TEXT("push"), FCML_ASM_DIALECT_INSTRUCTION( F_PUSH, FCML_AM_ALL ), 0 }, { FCML_TEXT("popaw"), FCML_ASM_DIALECT_INSTRUCTION( F_POPA, FCML_AM_ALL ), 0 }, { FCML_TEXT("popa"), FCML_ASM_DIALECT_INSTRUCTION( F_POPAD, FCML_AM_ALL ), 0 }, { FCML_TEXT("popfw"), FCML_ASM_DIALECT_INSTRUCTION( F_POPF, FCML_AM_ALL ), 0 }, { FCML_TEXT("popfq"), FCML_ASM_DIALECT_INSTRUCTION( F_POPFQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("popf"), FCML_ASM_DIALECT_INSTRUCTION( F_POPFD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pushaw"), FCML_ASM_DIALECT_INSTRUCTION( F_PUSHA, FCML_AM_ALL ), 0 }, { FCML_TEXT("pusha"), FCML_ASM_DIALECT_INSTRUCTION( F_PUSHAD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pushfw"), FCML_ASM_DIALECT_INSTRUCTION( F_PUSHF, FCML_AM_ALL ), 0 }, { FCML_TEXT("pushfq"), FCML_ASM_DIALECT_INSTRUCTION( F_PUSHFQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pushf"), FCML_ASM_DIALECT_INSTRUCTION( F_PUSHFD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pavgusb[Sbf];pf2id[S1d];pfacc[Sae];pfadd[S9e];pfcmpeq[Sb0];pfcmpge[S90];pfcmpgt[Sa0];pfmax[Sa4];pfmin[S94];pfmul[Sb4];pfrcp[S96];pfrcpit1[Sa6];pfrcpit2[Sb6];pfrsqit1[Sa7];pfrsqrt[S97];pfsub[S9a];pfsubr[Saa];pi2fd[S0d];pmulhrw[Sb7];pf2iw[S1c];pfnacc[S8a];pfpnacc[S8e];pi2fw[S0c];pswapd[Sbb]"), FCML_ASM_DIALECT_INSTRUCTION( FCML_MULTI_INSTRUCTION( FCML_MI_AMD3DNOW ), FCML_AM_ALL ), 0 }, { FCML_TEXT("palignr"), FCML_ASM_DIALECT_INSTRUCTION( F_PALIGNR, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpalignr"), FCML_ASM_DIALECT_INSTRUCTION( F_VPALIGNR, FCML_AM_ALL ), 0 }, { FCML_TEXT("pand"), FCML_ASM_DIALECT_INSTRUCTION( F_PAND, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpand"), FCML_ASM_DIALECT_INSTRUCTION( F_VPAND, FCML_AM_ALL ), 0 }, { FCML_TEXT("pandn"), FCML_ASM_DIALECT_INSTRUCTION( F_PANDN, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpandn"), FCML_ASM_DIALECT_INSTRUCTION( F_VPANDN, FCML_AM_ALL ), 0 }, { FCML_TEXT("pause"), FCML_ASM_DIALECT_INSTRUCTION( F_PAUSE, FCML_AM_ALL ), 0 }, { FCML_TEXT("pavgw"), FCML_ASM_DIALECT_INSTRUCTION( F_PAVGW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pavgb"), FCML_ASM_DIALECT_INSTRUCTION( F_PAVGB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpavgw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPAVGW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpavgb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPAVGB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pblendvb"), FCML_ASM_DIALECT_INSTRUCTION( F_PBLENDVB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpblendvb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPBLENDVB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pblendw"), FCML_ASM_DIALECT_INSTRUCTION( F_PBLENDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpblendw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPBLENDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpblendd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPBLENDD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pclmulqdq"), FCML_ASM_DIALECT_INSTRUCTION( F_PCLMULQDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpclmulqdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCLMULQDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpeqw"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPEQW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpeqb"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPEQB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpeqd"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPEQD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpeqd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPEQD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpeqw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPEQW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpeqb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPEQB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpeqq"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPEQQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpeqq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPEQQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpestri"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPESTRI, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpestri"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPESTRI, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpestrm"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPESTRM, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpestrm"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPESTRM, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpgtw"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPGTW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpgtd"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPGTD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpgtb"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPGTB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpgtw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPGTW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpgtd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPGTD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpgtb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPGTB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpgtq"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPGTQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpgtq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPGTQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpistri"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPISTRI, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpistri"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPISTRI, FCML_AM_ALL ), 0 }, { FCML_TEXT("pcmpistrm"), FCML_ASM_DIALECT_INSTRUCTION( F_PCMPISTRM, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmpistrm"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMPISTRM, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpextrb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPEXTRB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpextrq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPEXTRQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pextrq"), FCML_ASM_DIALECT_INSTRUCTION( F_PEXTRQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pextrb"), FCML_ASM_DIALECT_INSTRUCTION( F_PEXTRB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pextrd"), FCML_ASM_DIALECT_INSTRUCTION( F_PEXTRD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpextrd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPEXTRD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pextrw"), FCML_ASM_DIALECT_INSTRUCTION( F_PEXTRW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpextrw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPEXTRW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDD, FCML_AM_ALL ), 0 }, { FCML_TEXT("phaddd"), FCML_ASM_DIALECT_INSTRUCTION( F_PHADDD, FCML_AM_ALL ), 0 }, { FCML_TEXT("phaddw"), FCML_ASM_DIALECT_INSTRUCTION( F_PHADDW, FCML_AM_ALL ), 0 }, { FCML_TEXT("phaddsw"), FCML_ASM_DIALECT_INSTRUCTION( F_PHADDSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddsw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("phminposuw"), FCML_ASM_DIALECT_INSTRUCTION( F_PHMINPOSUW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphminposuw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHMINPOSUW, FCML_AM_ALL ), 0 }, { FCML_TEXT("phsubd"), FCML_ASM_DIALECT_INSTRUCTION( F_PHSUBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("phsubw"), FCML_ASM_DIALECT_INSTRUCTION( F_PHSUBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphsubd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHSUBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphsubw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHSUBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("phsubsw"), FCML_ASM_DIALECT_INSTRUCTION( F_PHSUBSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphsubsw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHSUBSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pinsrd"), FCML_ASM_DIALECT_INSTRUCTION( F_PINSRD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpinsrq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPINSRQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pinsrq"), FCML_ASM_DIALECT_INSTRUCTION( F_PINSRQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pinsrb"), FCML_ASM_DIALECT_INSTRUCTION( F_PINSRB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpinsrd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPINSRD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpinsrb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPINSRB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pinsrw"), FCML_ASM_DIALECT_INSTRUCTION( F_PINSRW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpinsrw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPINSRW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmaddubsw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMADDUBSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaddubsw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMADDUBSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmaddwd"), FCML_ASM_DIALECT_INSTRUCTION( F_PMADDWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaddwd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMADDWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmaxsb"), FCML_ASM_DIALECT_INSTRUCTION( F_PMAXSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaxsb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMAXSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmaxsd"), FCML_ASM_DIALECT_INSTRUCTION( F_PMAXSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaxsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMAXSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmaxsw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMAXSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaxsw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMAXSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmaxub"), FCML_ASM_DIALECT_INSTRUCTION( F_PMAXUB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaxub"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMAXUB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmaxud"), FCML_ASM_DIALECT_INSTRUCTION( F_PMAXUD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaxud"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMAXUD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmaxuw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMAXUW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmaxuw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMAXUW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pminsb"), FCML_ASM_DIALECT_INSTRUCTION( F_PMINSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpminsb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMINSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pminsd"), FCML_ASM_DIALECT_INSTRUCTION( F_PMINSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpminsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMINSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pminsw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMINSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpminsw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMINSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pminuw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMINUW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpminuw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMINUW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pminub"), FCML_ASM_DIALECT_INSTRUCTION( F_PMINUB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpminub"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMINUB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pminud"), FCML_ASM_DIALECT_INSTRUCTION( F_PMINUD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpminud"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMINUD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovmskb"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVMSKB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovmskb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVMSKB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovsxbq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVSXBQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovsxbw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVSXBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovsxwq"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVSXWQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovsxwq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVSXWQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovsxwd"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVSXWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovsxbd"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVSXBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovsxdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVSXDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovsxwd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVSXWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovsxbq"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVSXBQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovsxbw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVSXBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovsxdq"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVSXDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovsxbd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVSXBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovzxwd"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVZXWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovzxdq"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVZXDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovzxdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVZXDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovzxwq"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVZXWQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovzxbq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVZXBQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovzxbq"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVZXBQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovzxwd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVZXWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovzxbd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVZXBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovzxwq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVZXWQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovzxbd"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVZXBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmovzxbw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMOVZXBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmovzxbw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMOVZXBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmuldq"), FCML_ASM_DIALECT_INSTRUCTION( F_PMULDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmulhrsw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMULHRSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmulhuw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMULHUW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmuldq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMULDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmulhrsw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMULHRSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmulhuw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMULHUW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmulhw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMULHW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmulhw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMULHW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmuludq"), FCML_ASM_DIALECT_INSTRUCTION( F_PMULUDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmuludq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMULUDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmullw"), FCML_ASM_DIALECT_INSTRUCTION( F_PMULLW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pmulld"), FCML_ASM_DIALECT_INSTRUCTION( F_PMULLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmulld"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMULLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmullw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMULLW, FCML_AM_ALL ), 0 }, { FCML_TEXT("popcnt"), FCML_ASM_DIALECT_INSTRUCTION( F_POPCNT, FCML_AM_ALL ), 0 }, { FCML_TEXT("por"), FCML_ASM_DIALECT_INSTRUCTION( F_POR, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpor"), FCML_ASM_DIALECT_INSTRUCTION( F_VPOR, FCML_AM_ALL ), 0 }, { FCML_TEXT("prefetcht2"), FCML_ASM_DIALECT_INSTRUCTION( F_PREFETCHT2, FCML_AM_ALL ), 0 }, { FCML_TEXT("prefetchw"), FCML_ASM_DIALECT_INSTRUCTION( F_PREFETCHW, FCML_AM_ALL ), 0 }, { FCML_TEXT("prefetcht1"), FCML_ASM_DIALECT_INSTRUCTION( F_PREFETCHT1, FCML_AM_ALL ), 0 }, { FCML_TEXT("prefetchnta"), FCML_ASM_DIALECT_INSTRUCTION( F_PREFETCHNTA, FCML_AM_ALL ), 0 }, { FCML_TEXT("prefetcht0"), FCML_ASM_DIALECT_INSTRUCTION( F_PREFETCHT0, FCML_AM_ALL ), 0 }, { FCML_TEXT("psadbw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSADBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsadbw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSADBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pshufb"), FCML_ASM_DIALECT_INSTRUCTION( F_PSHUFB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pshufd"), FCML_ASM_DIALECT_INSTRUCTION( F_PSHUFD, FCML_AM_ALL ), 0 }, { FCML_TEXT("pshufhw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSHUFHW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshufd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHUFD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshufb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHUFB, FCML_AM_ALL ), 0 }, { FCML_TEXT("pshuflw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSHUFLW, FCML_AM_ALL ), 0 }, { FCML_TEXT("pshufw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSHUFW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshuflw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHUFLW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshufhw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHUFHW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsignb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSIGNB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsignd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSIGND, FCML_AM_ALL ), 0 }, { FCML_TEXT("psignw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSIGNW, FCML_AM_ALL ), 0 }, { FCML_TEXT("psignb"), FCML_ASM_DIALECT_INSTRUCTION( F_PSIGNB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsignw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSIGNW, FCML_AM_ALL ), 0 }, { FCML_TEXT("psignd"), FCML_ASM_DIALECT_INSTRUCTION( F_PSIGND, FCML_AM_ALL ), 0 }, { FCML_TEXT("pslldq"), FCML_ASM_DIALECT_INSTRUCTION( F_PSLLDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpslldq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSLLDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("psllq"), FCML_ASM_DIALECT_INSTRUCTION( F_PSLLQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pslld"), FCML_ASM_DIALECT_INSTRUCTION( F_PSLLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsllw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSLLW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsllq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSLLQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("psllw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSLLW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpslld"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSLLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsraw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSRAW, FCML_AM_ALL ), 0 }, { FCML_TEXT("psrad"), FCML_ASM_DIALECT_INSTRUCTION( F_PSRAD, FCML_AM_ALL ), 0 }, { FCML_TEXT("psraw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSRAW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsrad"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSRAD, FCML_AM_ALL ), 0 }, { FCML_TEXT("psrldq"), FCML_ASM_DIALECT_INSTRUCTION( F_PSRLDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsrldq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSRLDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsrlq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSRLQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("psrlq"), FCML_ASM_DIALECT_INSTRUCTION( F_PSRLQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("psrld"), FCML_ASM_DIALECT_INSTRUCTION( F_PSRLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("psrlw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSRLW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsrld"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSRLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsrlw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSRLW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsubd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSUBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("psubd"), FCML_ASM_DIALECT_INSTRUCTION( F_PSUBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("psubw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSUBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsubb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSUBB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsubq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSUBQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("psubb"), FCML_ASM_DIALECT_INSTRUCTION( F_PSUBB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsubw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSUBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("psubq"), FCML_ASM_DIALECT_INSTRUCTION( F_PSUBQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("psubsb"), FCML_ASM_DIALECT_INSTRUCTION( F_PSUBSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsubsw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSUBSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsubsb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSUBSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("psubsw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSUBSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsubusw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSUBUSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsubusb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSUBUSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("psubusb"), FCML_ASM_DIALECT_INSTRUCTION( F_PSUBUSB, FCML_AM_ALL ), 0 }, { FCML_TEXT("psubusw"), FCML_ASM_DIALECT_INSTRUCTION( F_PSUBUSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vptest"), FCML_ASM_DIALECT_INSTRUCTION( F_VPTEST, FCML_AM_ALL ), 0 }, { FCML_TEXT("ptest"), FCML_ASM_DIALECT_INSTRUCTION( F_PTEST, FCML_AM_ALL ), 0 }, { FCML_TEXT("punpcklbw"), FCML_ASM_DIALECT_INSTRUCTION( F_PUNPCKLBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("punpcklqdq"), FCML_ASM_DIALECT_INSTRUCTION( F_PUNPCKLQDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpunpcklwd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPUNPCKLWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpunpcklqdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPUNPCKLQDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpunpcklbw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPUNPCKLBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("punpcklwd"), FCML_ASM_DIALECT_INSTRUCTION( F_PUNPCKLWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("punpckldq"), FCML_ASM_DIALECT_INSTRUCTION( F_PUNPCKLDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpunpckldq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPUNPCKLDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpunpckhwd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPUNPCKHWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("punpckhdq"), FCML_ASM_DIALECT_INSTRUCTION( F_PUNPCKHDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("punpckhwd"), FCML_ASM_DIALECT_INSTRUCTION( F_PUNPCKHWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("punpckhqdq"), FCML_ASM_DIALECT_INSTRUCTION( F_PUNPCKHQDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpunpckhqdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPUNPCKHQDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpunpckhbw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPUNPCKHBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("punpckhbw"), FCML_ASM_DIALECT_INSTRUCTION( F_PUNPCKHBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpunpckhdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPUNPCKHDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("pxor"), FCML_ASM_DIALECT_INSTRUCTION( F_PXOR, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpxor"), FCML_ASM_DIALECT_INSTRUCTION( F_VPXOR, FCML_AM_ALL ), 0 }, { FCML_TEXT("prefetch"), FCML_ASM_DIALECT_INSTRUCTION( F_PREFETCH, FCML_AM_ALL ), 0 }, { FCML_TEXT("rcl;rclw[sf,ow,mm];rcll[sf,od,mm];rclq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_RCL, FCML_AM_RMO ), 0 }, { FCML_TEXT("rcl;rclw[sf,ow,mm];rcll[sf,od,mm];rclq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_RCL, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("rcl;rclb[sb,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_RCL, FCML_AM_RM8 ), 0 }, { FCML_TEXT("rcl;rclb[sb,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_RCL, FCML_AM_RM8_IMM8 ), 0 }, { FCML_TEXT("rcl"), FCML_ASM_DIALECT_INSTRUCTION( F_RCL, FCML_AM_ALL ), 0 }, { FCML_TEXT("rcr;rcrw[sf,ow,mm];rcrl[sf,od,mm];rcrq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_RCR, FCML_AM_RMO ), 0 }, { FCML_TEXT("rcr;rcrw[sf,ow,mm];rcrl[sf,od,mm];rcrq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_RCR, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("rcr;rcrb[sb,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_RCR, FCML_AM_RM8 ), 0 }, { FCML_TEXT("rcr;rcrb[sb,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_RCR, FCML_AM_RM8_IMM8 ), 0 }, { FCML_TEXT("rcr"), FCML_ASM_DIALECT_INSTRUCTION( F_RCR, FCML_AM_ALL ), 0 }, { FCML_TEXT("rol;rolw[sf,ow,mm];roll[sf,od,mm];rolq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_ROL, FCML_AM_RMO ), 0 }, { FCML_TEXT("rol;rolw[sf,ow,mm];roll[sf,od,mm];rolq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_ROL, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("rol;rolb[sb,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_ROL, FCML_AM_RM8 ), 0 }, { FCML_TEXT("rol;rolb[sb,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_ROL, FCML_AM_RM8_IMM8 ), 0 }, { FCML_TEXT("rol"), FCML_ASM_DIALECT_INSTRUCTION( F_ROL, FCML_AM_ALL ), 0 }, { FCML_TEXT("ror;rorw[sf,ow,mm];rorl[sf,od,mm];rorq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_ROR, FCML_AM_RMO ), 0 }, { FCML_TEXT("ror;rorw[sf,ow,mm];rorl[sf,od,mm];rorq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_ROR, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("ror;rorb[sb,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_ROR, FCML_AM_RM8 ), 0 }, { FCML_TEXT("ror;rorb[sb,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_ROR, FCML_AM_RM8_IMM8 ), 0 }, { FCML_TEXT("ror"), FCML_ASM_DIALECT_INSTRUCTION( F_ROR, FCML_AM_ALL ), 0 }, { FCML_TEXT("retw[ow];ret[od];retq[oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_RET, FCML_AM_ALL ), 0 }, { FCML_TEXT("lretw[ow];lret[od];lretq[oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_RETF, FCML_AM_ALL ), 0 }, { FCML_TEXT("rcpps"), FCML_ASM_DIALECT_INSTRUCTION( F_RCPPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vrcpps"), FCML_ASM_DIALECT_INSTRUCTION( F_VRCPPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("rcpss"), FCML_ASM_DIALECT_INSTRUCTION( F_RCPSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vrcpss"), FCML_ASM_DIALECT_INSTRUCTION( F_VRCPSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("rdfsbase"), FCML_ASM_DIALECT_INSTRUCTION( F_RDFSBASE, FCML_AM_ALL ), 0 }, { FCML_TEXT("rdgsbase"), FCML_ASM_DIALECT_INSTRUCTION( F_RDGSBASE, FCML_AM_ALL ), 0 }, { FCML_TEXT("rdrand"), FCML_ASM_DIALECT_INSTRUCTION( F_RDRAND, FCML_AM_ALL ), 0 }, { FCML_TEXT("rdtscp"), FCML_ASM_DIALECT_INSTRUCTION( F_RDTSCP, FCML_AM_ALL ), 0 }, { FCML_TEXT("rdtsc"), FCML_ASM_DIALECT_INSTRUCTION( F_RDTSC, FCML_AM_ALL ), 0 }, { FCML_TEXT("rdpmc"), FCML_ASM_DIALECT_INSTRUCTION( F_RDPMC, FCML_AM_ALL ), 0 }, { FCML_TEXT("rdmsr"), FCML_ASM_DIALECT_INSTRUCTION( F_RDMSR, FCML_AM_ALL ), 0 }, { FCML_TEXT("roundpd"), FCML_ASM_DIALECT_INSTRUCTION( F_ROUNDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vroundpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VROUNDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("roundps"), FCML_ASM_DIALECT_INSTRUCTION( F_ROUNDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vroundps"), FCML_ASM_DIALECT_INSTRUCTION( F_VROUNDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("roundsd"), FCML_ASM_DIALECT_INSTRUCTION( F_ROUNDSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vroundsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VROUNDSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("roundss"), FCML_ASM_DIALECT_INSTRUCTION( F_ROUNDSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vroundss"), FCML_ASM_DIALECT_INSTRUCTION( F_VROUNDSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("rsm"), FCML_ASM_DIALECT_INSTRUCTION( F_RSM, FCML_AM_ALL ), 0 }, { FCML_TEXT("rsqrtps"), FCML_ASM_DIALECT_INSTRUCTION( F_RSQRTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vrsqrtps"), FCML_ASM_DIALECT_INSTRUCTION( F_VRSQRTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("rsqrtss"), FCML_ASM_DIALECT_INSTRUCTION( F_RSQRTSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vrsqrtss"), FCML_ASM_DIALECT_INSTRUCTION( F_VRSQRTSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("sahf"), FCML_ASM_DIALECT_INSTRUCTION( F_SAHF, FCML_AM_ALL ), 0 }, { FCML_TEXT("sar;sarw[sf,ow,mm];sarl[sf,od,mm];sarq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_SAR, FCML_AM_RMO ), 0 }, { FCML_TEXT("sar;sarw[sf,ow,mm];sarl[sf,od,mm];sarq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_SAR, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("sar;sarb[sb,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_SAR, FCML_AM_RM8 ), 0 }, { FCML_TEXT("sar;sarb[sb,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_SAR, FCML_AM_RM8_IMM8 ), 0 }, { FCML_TEXT("sar"), FCML_ASM_DIALECT_INSTRUCTION( F_SAR, FCML_AM_ALL ), 0 }, { FCML_TEXT("shl;shlw[sf,ow,mm];shll[sf,od,mm];shlq[sf,oq,mm];salw[sf,ow,mm];sall[sf,od,mm];salq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_SHL, FCML_AM_RMO ), 0 }, { FCML_TEXT("shl;shlw[sf,ow,mm];shll[sf,od,mm];shlq[sf,oq,mm];salw[sf,ow,mm];sall[sf,od,mm];salq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_SHL, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("shl;shlb[sb,mm];sal;salb[sb,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_SHL, FCML_AM_RM8 ), 0 }, { FCML_TEXT("shl;shlb[sb,mm];sal;salb[sb,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_SHL, FCML_AM_RM8_IMM8 ), 0 }, { FCML_TEXT("shl;sal"), FCML_ASM_DIALECT_INSTRUCTION( F_SHL, FCML_AM_ALL ), 0 }, { FCML_TEXT("shr;shrw[sf,ow,mm];shrl[sf,od,mm];shrq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_SHR, FCML_AM_RMO ), 0 }, { FCML_TEXT("shr;shrw[sf,ow,mm];shrl[sf,od,mm];shrq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_SHR, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("shr;shrb[sb,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_SHR, FCML_AM_RM8 ), 0 }, { FCML_TEXT("shr;shrb[sb,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_SHR, FCML_AM_RM8_IMM8 ), 0 }, { FCML_TEXT("shr"), FCML_ASM_DIALECT_INSTRUCTION( F_SHR, FCML_AM_ALL ), 0 }, { FCML_TEXT("sbb"), FCML_ASM_DIALECT_INSTRUCTION( F_SBB, FCML_AM_ALL ), 0 }, { FCML_TEXT("sbb;sbbb[sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_SBB, FCML_AM_RM8_IMM8 ), 0 }, { FCML_TEXT("sbb;sbbw[sf,ow,mm];sbbl[sf,od,mm];sbbq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_SBB, FCML_AM_RMO_IMMO ), 0 }, { FCML_TEXT("sbb;sbbw[sf,ow,mm];sbbl[sf,od,mm];sbbq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_SBB, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("scas;scasb[tb,sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_SCAS, FCML_AM_RM8 ), 0 }, { FCML_TEXT("scas;scasw[tb,sf,ow];scasl[tb,sf,od];scasq[tb,sf,oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_SCAS, FCML_AM_RMO ), 0 }, { FCML_TEXT("set"), FCML_ASM_DIALECT_INSTRUCTION( F_SET, FCML_AM_ALL ), 0 }, { FCML_TEXT("stos;stosb[tb,sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_STOS, FCML_AM_RM8 ), 0 }, { FCML_TEXT("stos;stosw[tb,sf,ow];stosl[tb,sf,od];stosq[tb,sf,oq]"), FCML_ASM_DIALECT_INSTRUCTION( F_STOS, FCML_AM_RMO ), 0 }, { FCML_TEXT("sub"), FCML_ASM_DIALECT_INSTRUCTION( F_SUB, FCML_AM_ALL ), 0 }, { FCML_TEXT("sub;subb[sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_SUB, FCML_AM_RM8_IMM8 ), 0 }, { FCML_TEXT("sub;subw[sf,ow,mm];subl[sf,od,mm];subq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_SUB, FCML_AM_RMO_IMMO ), 0 }, { FCML_TEXT("sub;subw[sf,ow,mm];subl[sf,od,mm];subq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_SUB, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("sfence"), FCML_ASM_DIALECT_INSTRUCTION( F_SFENCE, FCML_AM_ALL ), 0 }, { FCML_TEXT("sgdt"), FCML_ASM_DIALECT_INSTRUCTION( F_SGDT, FCML_AM_ALL ), 0 }, { FCML_TEXT("shld"), FCML_ASM_DIALECT_INSTRUCTION( F_SHLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("shrd"), FCML_ASM_DIALECT_INSTRUCTION( F_SHRD, FCML_AM_ALL ), 0 }, { FCML_TEXT("skinit"), FCML_ASM_DIALECT_INSTRUCTION( F_SKINIT, FCML_AM_ALL ), 0 }, { FCML_TEXT("slwpcb"), FCML_ASM_DIALECT_INSTRUCTION( F_SLWPCB, FCML_AM_ALL ), 0 }, { FCML_TEXT("shufpd"), FCML_ASM_DIALECT_INSTRUCTION( F_SHUFPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vshufpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VSHUFPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("shufps"), FCML_ASM_DIALECT_INSTRUCTION( F_SHUFPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vshufps"), FCML_ASM_DIALECT_INSTRUCTION( F_VSHUFPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("sidt"), FCML_ASM_DIALECT_INSTRUCTION( F_SIDT, FCML_AM_ALL ), 0 }, { FCML_TEXT("sldt"), FCML_ASM_DIALECT_INSTRUCTION( F_SLDT, FCML_AM_ALL ), 0 }, { FCML_TEXT("smsw"), FCML_ASM_DIALECT_INSTRUCTION( F_SMSW, FCML_AM_ALL ), 0 }, { FCML_TEXT("sqrtpd"), FCML_ASM_DIALECT_INSTRUCTION( F_SQRTPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vsqrtpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VSQRTPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("sqrtps"), FCML_ASM_DIALECT_INSTRUCTION( F_SQRTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vsqrtps"), FCML_ASM_DIALECT_INSTRUCTION( F_VSQRTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("sqrtsd"), FCML_ASM_DIALECT_INSTRUCTION( F_SQRTSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vsqrtsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VSQRTSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("sqrtss"), FCML_ASM_DIALECT_INSTRUCTION( F_SQRTSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vsqrtss"), FCML_ASM_DIALECT_INSTRUCTION( F_VSQRTSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("stc"), FCML_ASM_DIALECT_INSTRUCTION( F_STC, FCML_AM_ALL ), 0 }, { FCML_TEXT("std"), FCML_ASM_DIALECT_INSTRUCTION( F_STD, FCML_AM_ALL ), 0 }, { FCML_TEXT("stgi"), FCML_ASM_DIALECT_INSTRUCTION( F_STGI, FCML_AM_ALL ), 0 }, { FCML_TEXT("sti"), FCML_ASM_DIALECT_INSTRUCTION( F_STI, FCML_AM_ALL ), 0 }, { FCML_TEXT("stmxcsr"), FCML_ASM_DIALECT_INSTRUCTION( F_STMXCSR, FCML_AM_ALL ), 0 }, { FCML_TEXT("vstmxcsr"), FCML_ASM_DIALECT_INSTRUCTION( F_VSTMXCSR, FCML_AM_ALL ), 0 }, { FCML_TEXT("str"), FCML_ASM_DIALECT_INSTRUCTION( F_STR, FCML_AM_ALL ), 0 }, { FCML_TEXT("subpd"), FCML_ASM_DIALECT_INSTRUCTION( F_SUBPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vsubpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VSUBPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("subps"), FCML_ASM_DIALECT_INSTRUCTION( F_SUBPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vsubps"), FCML_ASM_DIALECT_INSTRUCTION( F_VSUBPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("subsd"), FCML_ASM_DIALECT_INSTRUCTION( F_SUBSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vsubsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VSUBSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("subss"), FCML_ASM_DIALECT_INSTRUCTION( F_SUBSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vsubss"), FCML_ASM_DIALECT_INSTRUCTION( F_VSUBSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("swapgs"), FCML_ASM_DIALECT_INSTRUCTION( F_SWAPGS, FCML_AM_ALL ), 0 }, { FCML_TEXT("syscall"), FCML_ASM_DIALECT_INSTRUCTION( F_SYSCALL, FCML_AM_ALL ), 0 }, { FCML_TEXT("sysenter"), FCML_ASM_DIALECT_INSTRUCTION( F_SYSENTER, FCML_AM_ALL ), 0 }, { FCML_TEXT("sysexit"), FCML_ASM_DIALECT_INSTRUCTION( F_SYSEXIT, FCML_AM_ALL ), 0 }, { FCML_TEXT("sysret"), FCML_ASM_DIALECT_INSTRUCTION( F_SYSRET, FCML_AM_ALL ), 0 }, { FCML_TEXT("test"), FCML_ASM_DIALECT_INSTRUCTION( F_TEST, FCML_AM_ALL ), 0 }, { FCML_TEXT("test;testb[sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_TEST, FCML_AM_RM8_IMM8 ), 0 }, { FCML_TEXT("test;testw[sf,ow,mm];testl[sf,od,mm];testq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_TEST, FCML_AM_RMO_IMMO ), 0 }, { FCML_TEXT("test;testw[sf,ow,mm];testl[sf,od,mm];testq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_TEST, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("t1mskc"), FCML_ASM_DIALECT_INSTRUCTION( F_T1MSKC, FCML_AM_ALL ), 0 }, { FCML_TEXT("ucomisd"), FCML_ASM_DIALECT_INSTRUCTION( F_UCOMISD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vucomisd"), FCML_ASM_DIALECT_INSTRUCTION( F_VUCOMISD, FCML_AM_ALL ), 0 }, { FCML_TEXT("ucomiss"), FCML_ASM_DIALECT_INSTRUCTION( F_UCOMISS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vucomiss"), FCML_ASM_DIALECT_INSTRUCTION( F_VUCOMISS, FCML_AM_ALL ), 0 }, { FCML_TEXT("ud2"), FCML_ASM_DIALECT_INSTRUCTION( F_UD2, FCML_AM_ALL ), 0 }, { FCML_TEXT("unpckhpd"), FCML_ASM_DIALECT_INSTRUCTION( F_UNPCKHPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vunpckhpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VUNPCKHPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("unpckhps"), FCML_ASM_DIALECT_INSTRUCTION( F_UNPCKHPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vunpckhps"), FCML_ASM_DIALECT_INSTRUCTION( F_VUNPCKHPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("unpcklpd"), FCML_ASM_DIALECT_INSTRUCTION( F_UNPCKLPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vunpcklpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VUNPCKLPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("unpcklps"), FCML_ASM_DIALECT_INSTRUCTION( F_UNPCKLPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vunpcklps"), FCML_ASM_DIALECT_INSTRUCTION( F_VUNPCKLPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmload[tb]"), FCML_ASM_DIALECT_INSTRUCTION( F_VMLOAD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmrun[tb]"), FCML_ASM_DIALECT_INSTRUCTION( F_VMRUN, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmsave[tb]"), FCML_ASM_DIALECT_INSTRUCTION( F_VMSAVE, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfrczpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFRCZPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfrczps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFRCZPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfrczsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFRCZSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfrczss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFRCZSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcmov"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCMOV, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpermil2pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERMIL2PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpermil2ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERMIL2PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddbd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddbw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddbq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDBQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphadddq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddubd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDUBD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddubq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDUBQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddubw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDUBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddudq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDUDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphadduwd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDUWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphadduwq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDUWQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddwd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphaddwq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHADDWQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphsubbw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHSUBBW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphsubdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHSUBDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphsubdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHSUBDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vphsubwd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPHSUBWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacsdd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSDD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacsdqh"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSDQH, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacsdql"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSDQL, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacssdd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSSDD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacssdqh"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSSDQH, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacssdql"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSSDQL, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacsswd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSSWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacssww"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSSWW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacswd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmacsww"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMACSWW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmadcsswd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMADCSSWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpmadcswd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPMADCSWD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpperm"), FCML_ASM_DIALECT_INSTRUCTION( F_VPPERM, FCML_AM_ALL ), 0 }, { FCML_TEXT("vprotd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPROTD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vprotb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPROTB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vprotq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPROTQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vprotw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPROTW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshab"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHAB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshad"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHAD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshaq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHAQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshaw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHAW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshlb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHLB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshld"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshlq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHLQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpshlw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSHLW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd213pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD213PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd132pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD132PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd231pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD231PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd231ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD231PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd132ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD132PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd213ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD213PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd132sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD132SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd213sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD213SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd231sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD231SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd132ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD132SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd213ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD213SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmadd231ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADD231SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddsub132pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSUB132PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddsub213pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSUB213PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddsubpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSUBPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddsub231pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSUB231PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddsub231ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSUB231PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddsubps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSUBPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddsub132ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSUB132PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmaddsub213ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMADDSUB213PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubaddpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBADDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubadd213pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBADD213PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubadd132pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBADD132PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubadd231pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBADD231PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubaddps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBADDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubadd213ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBADD213PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubadd132ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBADD132PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubadd231ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBADD231PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub213pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB213PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub132pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB132PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub231pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB231PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub213ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB213PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub132ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB132PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub231ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB231PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub231sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB231SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub132sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB132SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub213sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB213SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub231ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB231SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub213ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB213SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsub132ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUB132SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfmsubss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFMSUBSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd231pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD231PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmaddpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd132pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD132PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd213pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD213PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd231ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD231PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd132ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD132PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd213ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD213PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmaddps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd213sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD213SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmaddsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADDSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd231sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD231SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd132sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD132SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd213ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD213SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmaddss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADDSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd231ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD231SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmadd132ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMADD132SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub132pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB132PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub213pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB213PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub231pd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB231PD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsubpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUBPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsubps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUBPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub213ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB213PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub132ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB132PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub231ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB231PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsubsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUBSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub231sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB231SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub213sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB213SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub132sd"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB132SD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsubss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUBSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub132ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB132SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub213ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB213SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vfnmsub231ss"), FCML_ASM_DIALECT_INSTRUCTION( F_VFNMSUB231SS, FCML_AM_ALL ), 0 }, { FCML_TEXT("bextr"), FCML_ASM_DIALECT_INSTRUCTION( F_BEXTR, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpbroadcastw"), FCML_ASM_DIALECT_INSTRUCTION( F_VPBROADCASTW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpbroadcastb"), FCML_ASM_DIALECT_INSTRUCTION( F_VPBROADCASTB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpbroadcastd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPBROADCASTD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpbroadcastq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPBROADCASTQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmptrld"), FCML_ASM_DIALECT_INSTRUCTION( F_VMPTRLD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmptrst"), FCML_ASM_DIALECT_INSTRUCTION( F_VMPTRST, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmclear"), FCML_ASM_DIALECT_INSTRUCTION( F_VMCLEAR, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmread"), FCML_ASM_DIALECT_INSTRUCTION( F_VMREAD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmwrite"), FCML_ASM_DIALECT_INSTRUCTION( F_VMWRITE, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmlaunch"), FCML_ASM_DIALECT_INSTRUCTION( F_VMLAUNCH, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmresume"), FCML_ASM_DIALECT_INSTRUCTION( F_VMRESUME, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmxoff"), FCML_ASM_DIALECT_INSTRUCTION( F_VMXOFF, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmxon"), FCML_ASM_DIALECT_INSTRUCTION( F_VMXON, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmcall"), FCML_ASM_DIALECT_INSTRUCTION( F_VMCALL, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmfunc"), FCML_ASM_DIALECT_INSTRUCTION( F_VMFUNC, FCML_AM_ALL ), 0 }, { FCML_TEXT("vbroadcastsd"), FCML_ASM_DIALECT_INSTRUCTION( F_VBROADCASTSD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vbroadcastss"), FCML_ASM_DIALECT_INSTRUCTION( F_VBROADCASTSS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vbroadcasti128"), FCML_ASM_DIALECT_INSTRUCTION( F_VBROADCASTI128, FCML_AM_ALL ), 0 }, { FCML_TEXT("vbroadcastf128"), FCML_ASM_DIALECT_INSTRUCTION( F_VBROADCASTF128, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtph2ps"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTPH2PS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vcvtps2ph"), FCML_ASM_DIALECT_INSTRUCTION( F_VCVTPS2PH, FCML_AM_ALL ), 0 }, { FCML_TEXT("verr"), FCML_ASM_DIALECT_INSTRUCTION( F_VERR, FCML_AM_ALL ), 0 }, { FCML_TEXT("verw"), FCML_ASM_DIALECT_INSTRUCTION( F_VERW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vmmcall"), FCML_ASM_DIALECT_INSTRUCTION( F_VMMCALL, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpermilpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERMILPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpermilps"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERMILPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsllvq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSLLVQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vperm2f128"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERM2F128, FCML_AM_ALL ), 0 }, { FCML_TEXT("vperm2i128"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERM2I128, FCML_AM_ALL ), 0 }, { FCML_TEXT("vextracti128"), FCML_ASM_DIALECT_INSTRUCTION( F_VEXTRACTI128, FCML_AM_ALL ), 0 }, { FCML_TEXT("vinserti128"), FCML_ASM_DIALECT_INSTRUCTION( F_VINSERTI128, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsravd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSRAVD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpermd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERMD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsllvd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSLLVD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsrlvd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSRLVD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpsrlvq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPSRLVQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpermpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERMPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpermq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERMQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpermps"), FCML_ASM_DIALECT_INSTRUCTION( F_VPERMPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vtestps"), FCML_ASM_DIALECT_INSTRUCTION( F_VTESTPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vtestpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VTESTPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vgatherdpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VGATHERDPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vgatherqpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VGATHERQPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vgatherdps"), FCML_ASM_DIALECT_INSTRUCTION( F_VGATHERDPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vgatherqps"), FCML_ASM_DIALECT_INSTRUCTION( F_VGATHERQPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpgatherdd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPGATHERDD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpgatherqd"), FCML_ASM_DIALECT_INSTRUCTION( F_VPGATHERQD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpgatherdq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPGATHERDQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpgatherqq"), FCML_ASM_DIALECT_INSTRUCTION( F_VPGATHERQQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vzeroall"), FCML_ASM_DIALECT_INSTRUCTION( F_VZEROALL, FCML_AM_ALL ), 0 }, { FCML_TEXT("vzeroupper"), FCML_ASM_DIALECT_INSTRUCTION( F_VZEROUPPER, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcomb;vpcomltb[p00];vpcomleb[p01];vpcomgtb[p02];vpcomgeb[p03];vpcomeqb[p04];vpcomneqb[p05];vpcomfalseb[p06];vpcomtrueb[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCOMB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcomw;vpcomltw[p00];vpcomlew[p01];vpcomgtw[p02];vpcomgew[p03];vpcomeqw[p04];vpcomneqw[p05];vpcomfalsew[p06];vpcomtruew[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCOMW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcomd;vpcomltd[p00];vpcomled[p01];vpcomgtd[p02];vpcomged[p03];vpcomeqd[p04];vpcomneqd[p05];vpcomfalsed[p06];vpcomtrued[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCOMD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcomq;vpcomltq[p00];vpcomleq[p01];vpcomgtq[p02];vpcomgeq[p03];vpcomeqq[p04];vpcomneqq[p05];vpcomfalseq[p06];vpcomtrueq[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCOMQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcomub;vpcomltub[p00];vpcomleub[p01];vpcomgtub[p02];vpcomgeub[p03];vpcomequb[p04];vpcomnequb[p05];vpcomfalseub[p06];vpcomtrueub[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCOMUB, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcomuw;vpcomltuw[p00];vpcomleuw[p01];vpcomgtuw[p02];vpcomgeuw[p03];vpcomequw[p04];vpcomnequw[p05];vpcomfalseuw[p06];vpcomtrueuw[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCOMUW, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcomud;vpcomltud[p00];vpcomleud[p01];vpcomgtud[p02];vpcomgeud[p03];vpcomequd[p04];vpcomnequd[p05];vpcomfalseud[p06];vpcomtrueud[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCOMUD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vpcomuq;vpcomltuq[p00];vpcomleuq[p01];vpcomgtuq[p02];vpcomgeuq[p03];vpcomequq[p04];vpcomnequq[p05];vpcomfalseuq[p06];vpcomtrueuq[p07]"), FCML_ASM_DIALECT_INSTRUCTION( F_VPCOMUQ, FCML_AM_ALL ), 0 }, { FCML_TEXT("wait;fwait"), FCML_ASM_DIALECT_INSTRUCTION( F_WAIT, FCML_AM_ALL ), 0 }, { FCML_TEXT("wbinvd"), FCML_ASM_DIALECT_INSTRUCTION( F_WBINVD, FCML_AM_ALL ), 0 }, { FCML_TEXT("wrfsbase"), FCML_ASM_DIALECT_INSTRUCTION( F_WRFSBASE, FCML_AM_ALL ), 0 }, { FCML_TEXT("wrgsbase"), FCML_ASM_DIALECT_INSTRUCTION( F_WRGSBASE, FCML_AM_ALL ), 0 }, { FCML_TEXT("wrmsr"), FCML_ASM_DIALECT_INSTRUCTION( F_WRMSR, FCML_AM_ALL ), 0 }, { FCML_TEXT("xlat[tb,sb];xlatb[tb,sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_XLAT, FCML_AM_ALL ), 0 }, { FCML_TEXT("xor"), FCML_ASM_DIALECT_INSTRUCTION( F_XOR, FCML_AM_ALL ), 0 }, { FCML_TEXT("xor;xorb[sb]"), FCML_ASM_DIALECT_INSTRUCTION( F_XOR, FCML_AM_RM8_IMM8 ), 0 }, { FCML_TEXT("xor;xorw[sf,ow,mm];xorl[sf,od,mm];xorq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_XOR, FCML_AM_RMO_IMMO ), 0 }, { FCML_TEXT("xor;xorw[sf,ow,mm];xorl[sf,od,mm];xorq[sf,oq,mm]"), FCML_ASM_DIALECT_INSTRUCTION( F_XOR, FCML_AM_RMO_IMM8 ), 0 }, { FCML_TEXT("xadd"), FCML_ASM_DIALECT_INSTRUCTION( F_XADD, FCML_AM_ALL ), 0 }, { FCML_TEXT("xchg"), FCML_ASM_DIALECT_INSTRUCTION( F_XCHG, FCML_AM_ALL ), 0 }, { FCML_TEXT("xgetbv"), FCML_ASM_DIALECT_INSTRUCTION( F_XGETBV, FCML_AM_ALL ), 0 }, { FCML_TEXT("xorpd"), FCML_ASM_DIALECT_INSTRUCTION( F_XORPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("vxorpd"), FCML_ASM_DIALECT_INSTRUCTION( F_VXORPD, FCML_AM_ALL ), 0 }, { FCML_TEXT("xorps"), FCML_ASM_DIALECT_INSTRUCTION( F_XORPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("vxorps"), FCML_ASM_DIALECT_INSTRUCTION( F_VXORPS, FCML_AM_ALL ), 0 }, { FCML_TEXT("xrstor"), FCML_ASM_DIALECT_INSTRUCTION( F_XRSTOR, FCML_AM_ALL ), 0 }, { FCML_TEXT("xrstor64"), FCML_ASM_DIALECT_INSTRUCTION( F_XRSTOR64, FCML_AM_ALL ), 0 }, { FCML_TEXT("xsave"), FCML_ASM_DIALECT_INSTRUCTION( F_XSAVE, FCML_AM_ALL ), 0 }, { FCML_TEXT("xsave64"), FCML_ASM_DIALECT_INSTRUCTION( F_XSAVE64, FCML_AM_ALL ), 0 }, { FCML_TEXT("xsaveopt"), FCML_ASM_DIALECT_INSTRUCTION( F_XSAVEOPT, FCML_AM_ALL ), 0 }, { FCML_TEXT("xsaveopt64"), FCML_ASM_DIALECT_INSTRUCTION( F_XSAVEOPT64, FCML_AM_ALL ), 0 }, { FCML_TEXT("xsetbv"), FCML_ASM_DIALECT_INSTRUCTION( F_XSETBV, FCML_AM_ALL ), 0 }, { FCML_TEXT("mulx"), FCML_ASM_DIALECT_INSTRUCTION( F_MULX, FCML_AM_ALL ), 0 }, { FCML_TEXT("pdep"), FCML_ASM_DIALECT_INSTRUCTION( F_PDEP, FCML_AM_ALL ), 0 }, { FCML_TEXT("pext"), FCML_ASM_DIALECT_INSTRUCTION( F_PEXT, FCML_AM_ALL ), 0 }, { FCML_TEXT("rorx"), FCML_ASM_DIALECT_INSTRUCTION( F_RORX, FCML_AM_ALL ), 0 }, { FCML_TEXT("shlx"), FCML_ASM_DIALECT_INSTRUCTION( F_SHLX, FCML_AM_ALL ), 0 }, { FCML_TEXT("shrx"), FCML_ASM_DIALECT_INSTRUCTION( F_SHRX, FCML_AM_ALL ), 0 }, { FCML_TEXT("sarx"), FCML_ASM_DIALECT_INSTRUCTION( F_SARX, FCML_AM_ALL ), 0 }, { FCML_TEXT("tzcnt"), FCML_ASM_DIALECT_INSTRUCTION( F_TZCNT, FCML_AM_ALL ), 0 }, { FCML_TEXT("tzmsk"), FCML_ASM_DIALECT_INSTRUCTION( F_TZMSK, FCML_AM_ALL ), 0 }, { FCML_TEXT("xabort"), FCML_ASM_DIALECT_INSTRUCTION( F_XABORT, FCML_AM_ALL ), 0 }, { FCML_TEXT("xbegin"), FCML_ASM_DIALECT_INSTRUCTION( F_XBEGIN, FCML_AM_ALL ), 0 }, { FCML_TEXT("xend"), FCML_ASM_DIALECT_INSTRUCTION( F_XEND, FCML_AM_ALL ), 0 }, { FCML_TEXT("xtest"), FCML_ASM_DIALECT_INSTRUCTION( F_XTEST, FCML_AM_ALL ), 0 }, { FCML_TEXT("rdseed"), FCML_ASM_DIALECT_INSTRUCTION( F_RDSEED, FCML_AM_ALL ), 0 }, { FCML_TEXT("clac"), FCML_ASM_DIALECT_INSTRUCTION( F_CLAC, FCML_AM_ALL ), 0 }, { FCML_TEXT("stac"), FCML_ASM_DIALECT_INSTRUCTION( F_STAC, FCML_AM_ALL ), 0 }, { NULL, 0, 0 } }; /**********************/ /** END OF MNEMONICS **/ /**********************/ fcml_string fcml_ar_asm_dialect_reg_symbol_table_gas[16] = { FCML_TEXT( "db0" ), FCML_TEXT( "db1" ), FCML_TEXT( "db2" ), FCML_TEXT( "db3" ), FCML_TEXT( "db4" ), FCML_TEXT( "db5" ), FCML_TEXT( "db6" ), FCML_TEXT( "db7" ), FCML_TEXT( "" ), FCML_TEXT( "" ), FCML_TEXT( "" ), FCML_TEXT( "" ), FCML_TEXT( "" ), FCML_TEXT( "" ), FCML_TEXT( "" ), FCML_TEXT( "" ) }; fcml_ceh_error fcml_ifn_asm_dialect_get_register_gas( const fcml_st_register *reg, fcml_string buffer, fcml_int buffer_length, fcml_bool is_rex ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_string printable_reg; if ( reg->type == FCML_REG_DR ) { printable_reg = fcml_ar_asm_dialect_reg_symbol_table_gas[reg->reg]; } else { error = fcml_fn_cmn_dialect_get_register( reg, &printable_reg, is_rex ); } if ( error ) { return error; } fcml_fn_env_str_snprintf( buffer, buffer_length, FCML_TEXT( "%%%s" ), printable_reg ); return error; } fcml_ceh_error fcml_ifn_asm_dialect_get_parsed_mnemonics_gas( const fcml_st_dialect *dialect, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_st_mp_mnemonic_set **mnemonics ) { fcml_string mnemonic_pattern = NULL; fcml_uint32_t flags = 0; fcml_uint32_t keys[] = { FCML_ASM_DIALECT_INSTRUCTION( instruction->instruction, addr_mode->addr_mode ), FCML_ASM_DIALECT_INSTRUCTION( instruction->instruction, FCML_AM_ALL ) }; fcml_st_dialect_context_int *dialect_context = (fcml_st_dialect_context_int*) dialect; int i; for ( i = 0; i < sizeof( keys ) / sizeof(fcml_uint32_t) && !mnemonic_pattern; i++ ) { fcml_st_dialect_mnemonic *dialect_mnemonic = (fcml_st_dialect_mnemonic*) fcml_fn_coll_map_get( dialect_context->dialect_mnemonics_lookup, &( keys[i] ) ); if ( dialect_mnemonic ) { fcml_bool ignore = FCML_FALSE; /* Check if this mnemonics set is available for current dialect configuration. */ ignore |= ( dialect_context->config_flags & FCML_GAS_DIALECT_CF_SYSV_SVR32_INCOMPATIBLE ) && ( dialect_mnemonic->flags & FCML_GAS_DF_SYSV_SVR32_COMPATIBLE ); if ( !ignore ) { mnemonic_pattern = dialect_mnemonic->mnemonic; flags = dialect_mnemonic->flags; } } } if ( !mnemonic_pattern ) { /* Choose best mnemonic for instruction.*/ mnemonic_pattern = instruction->mnemonic; } fcml_ceh_error error = fcml_fn_mp_parse_mnemonics( mnemonic_pattern, mnemonics ); if ( !error ) { /* Set flags for every parsed mnemonic. */ if ( *mnemonics ) { fcml_st_mp_mnemonic_set *m_set = *mnemonics; fcml_st_coll_list_element *current = m_set->mnemonics->head; while ( current ) { ( (fcml_st_mp_mnemonic*) current->item )->flags = flags; current = current->next; } } } return error; } fcml_ceh_error fcml_ifn_asm_dialect_get_mnemonic_gas( const fcml_st_dialect *dialect, fcml_st_def_instruction_desc *instruction, fcml_st_def_addr_mode_desc *addr_mode, fcml_st_condition *condition, fcml_st_mp_mnemonic **mnemonics, int *mnemonics_counter ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_mp_mnemonic_set *mnemonic_set; error = fcml_ifn_asm_dialect_get_parsed_mnemonics_gas( dialect, instruction, addr_mode, &mnemonic_set ); if ( !error ) { error = fcml_fn_cmn_dialect_get_mnemonic( dialect, mnemonic_set, mnemonics, condition, mnemonics_counter ); fcml_fn_mp_free_mnemonics( mnemonic_set ); } return error; } void fcml_ifn_asm_dialect_gas_revert_operands( fcml_st_operand *operands, fcml_int count ) { fcml_st_operand tmp_operand; fcml_int i; for ( i = 0; i < count / 2; i++ ) { tmp_operand = operands[i]; operands[i] = operands[count - i - 1]; operands[count - i - 1] = tmp_operand; } } fcml_bool fcml_ifn_asm_dialect_gas_far_pointer_correction( fcml_st_instruction *instruction ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; /* Correction for ambiguous FAR_POINTER addressing mode. Unfortunately we can not treat it as two IMM operands.*/ if ( instruction->operands_count == 2 && instruction->operands[0].type == FCML_OT_IMMEDIATE && instruction->operands[1].type == FCML_OT_IMMEDIATE ) { /* Remember that operands are reverted for GAS!*/ fcml_st_integer *segment = &( instruction->operands[1].immediate ); fcml_st_integer *offset = &( instruction->operands[0].immediate ); fcml_st_far_pointer far_pointer = { 0 }; error = fcml_fn_utils_convert_integer_to_uint16( segment, &( far_pointer.segment ) ); if ( !error ) { error = fcml_fn_utils_convert_integer_to_int16( offset, &( far_pointer.offset16 ) ); if ( error ) { error = fcml_fn_utils_convert_integer_to_int32( offset, &( far_pointer.offset32 ) ); if ( !error ) { far_pointer.offset_size = FCML_DS_32; } } else { far_pointer.offset_size = FCML_DS_16; } if ( !error ) { /* Clean operands.*/ fcml_fn_env_memory_clear( instruction->operands, sizeof( instruction->operands ) ); instruction->operands[0].type = FCML_OT_FAR_POINTER; instruction->operands[0].far_pointer = far_pointer; instruction->operands_count = 1; return FCML_TRUE; } } } return FCML_FALSE; } fcml_ceh_error fcml_ifn_asm_dialect_assembler_preprocessor_gas( const fcml_st_assembler_conf *conf, const fcml_st_dialect *dialect, fcml_st_instruction *instrunction, fcml_st_def_addr_mode_desc *addr_mode_desc, fcml_en_instruction instruction_code, fcml_st_mp_mnemonic *mnemonic, fcml_bool *has_been_changed ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_bool changed = FCML_FALSE; if ( !mnemonic ) { /* Operands has to be reverted.*/ if ( instrunction->operands_count > 1 ) { fcml_ifn_asm_dialect_gas_revert_operands( instrunction->operands, instrunction->operands_count ); changed = FCML_TRUE; } } else { /* For bound and enter instructions operands should be provided in the same * order as for Intel assembler, so they should be reverted one more time. * We can gain some performance by doubling this operation for these two * instructions instead of reverting operands for any checked addressing mode. * But for now such solution is acceptable. */ if ( mnemonic->flags & FCML_GAS_DF_DO_NOT_REVERT_OPERANDS ) { fcml_ifn_asm_dialect_gas_revert_operands( instrunction->operands, instrunction->operands_count ); changed = FCML_TRUE; } /* Mnemonic has been found, check if data size should be corrected for instruction. * Take into account that data size specified by mnemonic has greater priority than * data size set directly by user. */ fcml_usize data_size = FCML_DS_UNDEF; if ( mnemonic->memory_data.is_not_null ) { data_size = mnemonic->memory_data.value * 8; } else if ( mnemonic->is_byte_ds ) { data_size = FCML_DS_8; } else if ( mnemonic->is_full_ds ) { /* Full data size is based on effective operand size attribute. */ data_size = mnemonic->supported_osa; } else if ( mnemonic->l.is_not_null ) { /* Data size based on L VEX/XOP prefix field. */ data_size = mnemonic->l.value ? FCML_DS_256 : FCML_DS_128; } if ( data_size != FCML_DS_UNDEF ) { /* Find effective address and make a correction to the size operator. * In the future size operator should be moved to the instruction itself, * because there is always only one memory access for the instruction. */ int i; for ( i = 0; i < instrunction->operands_count; i++ ) { fcml_st_operand *operand = &( instrunction->operands[i] ); if ( operand->type == FCML_OT_ADDRESS ) { operand->address.size_operator = data_size; changed = FCML_TRUE; } } } /* Check if addressing mode expects FAR_POINTER addressing mode. */ if ( addr_mode_desc ) { if ( addr_mode_desc->opperands[0] == FCML_OP_FAR_POINTER ) { /* Prepare operands. */ if ( instrunction->operands_count == 2 && instrunction->operands[0].type == FCML_OT_IMMEDIATE && instrunction->operands[1].type == FCML_OT_IMMEDIATE ) { if ( fcml_ifn_asm_dialect_gas_far_pointer_correction( instrunction ) ) { changed = FCML_TRUE; } } } } /* * In case of AT&T dialect, offsets encoded as effective addresses of type OFFSET * are always treated as direct pointers. It means that every time you encode * offset as effective address of FCML_AF_OFFSET type it'll be encoded as * an indirect pointer (as long as the instruction level FCML_HINT_INDIRECT_POINTER hint isn't used). * This rule is used to make AT&T parser, where the offset operands are treated as direct pointers * and indirect ones have the appropriate hint always set, works as expected. */ /* JMP and CALL needs hint FCML_HINT_DIRECT_POINTER explicitly set if * absolute offsets are used instead of immediate values. */ if ( instruction_code == F_JMP || instruction_code == F_CALL ) { if ( !( instrunction->hints & FCML_HINT_INDIRECT_POINTER ) ) { instrunction->hints = FCML_HINT_DIRECT_POINTER; changed = FCML_TRUE; } } } if ( has_been_changed ) { *has_been_changed = changed; } return error; } fcml_ceh_error fcml_ifn_asm_dialect_disassembler_postprocessor_gas( const fcml_st_disassembler_conf *configuration, const fcml_st_mp_mnemonic *mnemonic, fcml_st_disassembler_result *disassembler_result ) { fcml_int operands_count = disassembler_result->instruction.operands_count; if ( operands_count > 1 ) { if ( !( mnemonic->flags & FCML_GAS_DF_DO_NOT_REVERT_OPERANDS ) ) { /* Revert operands.*/ fcml_ifn_asm_dialect_gas_revert_operands( disassembler_result->instruction.operands, operands_count ); /* Revert operand details.*/ fcml_st_operand_details *operand_details = disassembler_result->instruction_details.operand_details; fcml_st_operand_details tmp_operand_details; fcml_int i; for ( i = 0; i < operands_count / 2; i++ ) { tmp_operand_details = operand_details[i]; operand_details[i] = operand_details[operands_count - i - 1]; operand_details[operands_count - i - 1] = tmp_operand_details; } } } return FCML_CEH_GEC_NO_ERROR; } fcml_string fcml_ifn_asm_dialect_get_pseudo_operation_mnemonic_gas( fcml_en_pseudo_operations pseudo_operation ) { fcml_string mnemonic = NULL; switch ( pseudo_operation ) { case FP_DB: mnemonic = fcml_fn_env_str_strdup( FCML_TEXT( "db" ) ); break; default: break; } return mnemonic; } fcml_st_dialect_pseudpo_operation_mnemonic fcml_iarr_dialect_pseudpo_operation_mnemonic_gas[] = { { ".byte", FP_DB }, { NULL, FP_NO_PSEUDO_OP } }; fcml_st_dialect_pseudpo_operation_mnemonic *fcml_ifn_asm_get_pseudo_operation_mnemonics_gas( void ) { return &fcml_iarr_dialect_pseudpo_operation_mnemonic_gas[0]; } fcml_ceh_error LIB_CALL fcml_fn_dialect_init_gas( fcml_uint32_t config_flags, fcml_st_dialect **dialect ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_dialect_context_int *dialect_context_gas = NULL; error = fcml_fn_asm_dialect_alloc_mnemonic_lookup( &dialect_context_gas, fcml_arr_dialect_gas_mnemonics, sizeof( fcml_arr_dialect_gas_mnemonics ) / sizeof(fcml_st_dialect_mnemonic) ); if ( error ) { fcml_fn_env_memory_free( dialect_context_gas ); return error; } /* Prepares dialect instance.*/ dialect_context_gas->get_mnemonic = &fcml_ifn_asm_dialect_get_mnemonic_gas; dialect_context_gas->get_pseudo_operation_mnemonics = &fcml_ifn_asm_get_pseudo_operation_mnemonics_gas; dialect_context_gas->get_pseudo_operation_mnemonic = &fcml_ifn_asm_dialect_get_pseudo_operation_mnemonic_gas; dialect_context_gas->get_parsed_mnemonics = &fcml_ifn_asm_dialect_get_parsed_mnemonics_gas; dialect_context_gas->render_mnemonic = &fcml_fn_cmn_dialect_render_mnemonic; dialect_context_gas->free_mnemonic = &fcml_fn_asm_dialect_free_mnemonic; dialect_context_gas->instruction_renderer = &fcml_fn_rend_render_instruction_gas; dialect_context_gas->instruction_parser = &fcml_fn_gas_parse_instruction_to_ast; dialect_context_gas->free_dialect = &fcml_fn_cmn_dialect_free; /* This method should be available in renderer, but having it here can be useful in the future.*/ dialect_context_gas->get_register = &fcml_ifn_asm_dialect_get_register_gas; dialect_context_gas->assembler_preprocessor = &fcml_ifn_asm_dialect_assembler_preprocessor_gas; dialect_context_gas->disassembler_postprocessor = &fcml_ifn_asm_dialect_disassembler_postprocessor_gas; dialect_context_gas->config_flags = config_flags; *dialect = (fcml_st_dialect*) dialect_context_gas; return error; } fcml-1.1.1/src/fcml_messages.c0000644000175000017500000000530012560745216013125 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "fcml_messages.h" #include "fcml_ceh.h" #include "fcml_env_int.h" #define FCML_MAX_MESSAGE_LENGTH 512 fcml_string fcml_iarr_messages[] = { /* Messages for global error codes. */ FCML_TEXT("No error."), FCML_TEXT("Out of memory."), FCML_TEXT("Invalid input."), FCML_TEXT("Internal error."), FCML_TEXT("Not initialized."), FCML_TEXT("Unexpected end of data."), FCML_TEXT("Value out of range."), FCML_TEXT("Feature not supported."), FCML_TEXT("Invalid addressing mode."), FCML_TEXT("Invalid addressing form."), FCML_TEXT("Invalid instruction form."), FCML_TEXT("Invalid operand."), FCML_TEXT("Unknown mnemonic."), FCML_TEXT("Invalid operand size."), FCML_TEXT("Invalid address size."), FCML_TEXT("Unknown instruction."), FCML_TEXT("Invalid prefix."), FCML_TEXT("Invalid register type."), FCML_TEXT("Invalid register."), FCML_TEXT("Undefined symbol."), /* Messages for message error codes. */ FCML_TEXT("Segment register can not be overridden."), FCML_TEXT("Invalid pseudo opcode value."), FCML_TEXT("HLA prefixes are not allowed for instruction."), FCML_TEXT("More than one HLA prefix."), FCML_TEXT("Segment register expected."), FCML_TEXT("Symbol already defined: %s."), FCML_TEXT("Undefined symbol: %s."), FCML_TEXT("Parsed line exceed maximum allowed length."), /* Messages for warnings. */ }; fcml_string fcml_fn_msg_get_message( fcml_en_msg_message_code code ) { return fcml_iarr_messages[code]; } void fcml_fn_msg_add_error_message( fcml_st_ceh_error_container *errors, fcml_en_msg_message_code msg_code, fcml_ceh_error code, fcml_en_ceh_error_level level, ... ) { fcml_char buffer[FCML_MAX_MESSAGE_LENGTH]; va_list args; va_start( args, level ); fcml_fn_env_str_vsnprintf( buffer, sizeof( buffer ), fcml_fn_msg_get_message( msg_code ), args ); va_end( args ); fcml_fn_ceh_add_error( errors, (const fcml_string)buffer, code, level ); } fcml-1.1.1/src/fcml_common_dialect.h0000644000175000017500000000334012560745216014302 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_COMMON_DIALECT_H_ #define FCML_COMMON_DIALECT_H_ #include #include #include #include "fcml_ceh.h" #include "fcml_mnemonic_parser.h" extern fcml_string fcml_ar_asm_conditional_suffixes[3][16]; extern fcml_string fcml_ar_asm_conditional_suffixes_render[2][16]; fcml_ceh_error fcml_fn_cmn_dialect_get_mnemonic( const fcml_st_dialect *dialect, fcml_st_mp_mnemonic_set *mnemonic_set, fcml_st_mp_mnemonic **mnemonics, fcml_st_condition *condition, int *mnemonics_counter ); fcml_string fcml_fn_cmn_dialect_render_mnemonic( fcml_string mnemonic, fcml_st_condition *condition, fcml_uint8_t conditional_group, fcml_bool show_carry ); fcml_ceh_error fcml_fn_cmn_dialect_get_register( const fcml_st_register *reg, fcml_string *printable_reg, fcml_bool is_rex ); void fcml_fn_cmn_dialect_free( fcml_st_dialect *dialect ); #endif /* FCML_COMMON_DIALECT_H_ */ fcml-1.1.1/src/fcml_stream.h0000644000175000017500000000560112560745216012622 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_STREAMING_H_ #define FCML_STREAMING_H_ #include /* Structures used to store information about memory. */ typedef struct fcml_st_memory_stream { void *base_address; /* Base address of memory. */ fcml_int32_t offset; /* Offset. */ fcml_int32_t size; /* Size. */ } fcml_st_memory_stream; typedef fcml_uint32_t fcml_stream_pointer; /* Methods used for streaming. */ typedef enum fcml_en_stream_seek_type { FCML_EN_ST_START = 0, FCML_EN_ST_END, FCML_EN_ST_CURRENT } fcml_en_stream_seek_type; void fcml_fn_stream_seek( fcml_st_memory_stream *stream, fcml_int32_t offset, fcml_en_stream_seek_type type ); fcml_uint8_t fcml_fn_stream_read( fcml_st_memory_stream *stream, fcml_bool *result ); fcml_bool fcml_fn_stream_write( fcml_st_memory_stream *stream, fcml_uint8_t data ); fcml_uint8_t fcml_fn_stream_peek( fcml_st_memory_stream *stream, fcml_bool *result ); fcml_int32_t fcml_fn_stream_size( const fcml_st_memory_stream *stream ); int fcml_fn_stream_read_bytes( fcml_st_memory_stream *stream, fcml_ptr buffer, fcml_usize size ); int fcml_fn_stream_write_bytes( fcml_st_memory_stream *stream, fcml_ptr buffer, fcml_usize size ); fcml_uint16_t fcml_fn_stream_read_word( fcml_st_memory_stream *stream, fcml_bool *result ); fcml_uint32_t fcml_fn_stream_read_dword( fcml_st_memory_stream *stream, fcml_bool *result ); fcml_uint64_t fcml_fn_stream_read_qword( fcml_st_memory_stream *stream, fcml_bool *result ); fcml_bool fcml_fn_stream_write_word( fcml_st_memory_stream *stream, fcml_uint16_t data ); fcml_bool fcml_fn_stream_write_dword( fcml_st_memory_stream *stream, fcml_uint32_t data ); fcml_bool fcml_fn_stream_write_qword( fcml_st_memory_stream *stream, fcml_uint64_t data ); fcml_stream_pointer fcml_fn_stream_save_point( const fcml_st_memory_stream *stream ); void fcml_fn_stream_restore_point( fcml_st_memory_stream *stream, const fcml_stream_pointer stream_pointer ); void fcml_fn_stream_clean( fcml_st_memory_stream *stream ); fcml_st_memory_stream fcml_fn_stream_wrap( fcml_string buffer, fcml_usize length ); #endif /* FCML_STREAMING_H_ */ fcml-1.1.1/src/fcml_rend_utils.h0000644000175000017500000000573012560745216013502 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_REND_UTILS_H_ #define FCML_REND_UTILS_H_ #include #include #include "fcml_ceh.h" #include "fcml_dialect_int.h" #include "fcml_stream.h" void fcml_fn_rend_utils_format_printf( struct fcml_st_memory_stream *stream, const fcml_string format, ... ); void fcml_fn_rend_utils_format_append_hex_byte( fcml_st_memory_stream *stream, fcml_uint8_t hex_byte ); void fcml_fn_rend_utils_format_append_code( const fcml_st_render_config *config, fcml_st_memory_stream *stream, const fcml_uint8_t *instrunction_code, fcml_usize instruction_code_size ); fcml_int fcml_fn_rend_utils_format_append_str_if( fcml_st_memory_stream *stream, const fcml_string string, fcml_bool condition ); void fcml_fn_rend_utils_format_finish_str( fcml_st_memory_stream *stream ); fcml_int fcml_fn_rend_utils_format_repeat_char( fcml_st_memory_stream *stream, fcml_char character, fcml_int repeats ); fcml_int fcml_fn_rend_utils_format_append_str( fcml_st_memory_stream *stream, const fcml_string source ); fcml_int fcml_fn_rend_utils_format_append_str_padding( fcml_st_memory_stream *stream, const fcml_string source, fcml_int16_t padding ); void fcml_fn_rend_utils_format_append_stream( fcml_st_memory_stream *destination_stream, const fcml_st_memory_stream *source_stream ); fcml_ceh_error fcml_fn_rend_utils_format_append_integer( fcml_string patterns[6][4], fcml_st_memory_stream *stream, const fcml_st_integer *integer, fcml_bool is_hex, fcml_bool remove_leading_zeros ); void fcml_fn_rend_utils_format_append_reg( const fcml_st_dialect_context_int *dialect_context, fcml_st_memory_stream *stream, const fcml_st_register *reg, fcml_bool is_rex ); fcml_int fcml_fn_rend_utils_padding( fcml_st_memory_stream *output_stream, fcml_int len, fcml_int padding, fcml_int default_padding ); fcml_int fcml_ifn_rend_utils_print_prefixes( fcml_st_memory_stream *output_stream, const fcml_st_prefixes_details *prefixes, fcml_uint32_t flags ); fcml_bool fcml_fn_rend_utils_render_operand_separator( const fcml_st_render_config *config, fcml_st_memory_stream *output_stream, fcml_int padding_length, fcml_bool first_operand ); #endif /* FCML_REND_UTILS_H_ */ fcml-1.1.1/src/fcml_lag_assembler.c0000644000175000017500000007030612560745216014126 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include #include #include "fcml_parser_int.h" #include "fcml_assembler_int.h" #include "fcml_env_int.h" #include "fcml_coll.h" #include "fcml_apc_ast.h" #include "fcml_messages.h" #include "fcml_utils.h" typedef struct fcml_ist_lag_pass_holder { /* Pass number. */ fcml_int pass; } fcml_ist_lag_pass_holder; /* Holds information about last symbol value modification. */ typedef struct fcml_ist_lag_symbol_state { /* Name of the symbol. */ fcml_string symbol_name; /* Pass which modified symbol. */ fcml_int pass; } fcml_ist_symbol_state; typedef struct fcml_ist_lag_instruction { fcml_ip ip; /* Next instruction. */ struct fcml_ist_lag_instruction *next; /* If instruction has symbols, we have its AST just to reassemble it when needed. */ fcml_st_parser_ast ast; /* List of symbols used by instruction. Every symbol is represented by its name (list of fcml_string). */ fcml_st_coll_list *used_symbols; /* Number of undefined symbols when instruction was assembled last time. */ fcml_int undefined_symbols; /* Assembled instruction. */ fcml_st_assembled_instruction *instruction; /* Line number where instruction is defined. */ fcml_int line; /* Generated instruction can not be shorter than */ fcml_int size_guard; } fcml_ist_lag_instruction; /* Details about processing errors. */ typedef struct fcml_ist_lag_error_details { /* Errors. */ fcml_st_ceh_error_container errors; /* Line where assembling failed. */ fcml_int line; } fcml_ist_lag_error_details; /* Context shared between multiple passes. */ typedef struct fcml_ist_lag_processing_context { /* Parsed/Converted/Assembled instructions. */ fcml_ist_lag_instruction *first_instruction; fcml_ist_lag_instruction *last_instruction; /* One line assembler used to assemble code. */ fcml_st_assembler_context assembler_context; /* Global errors going here. */ fcml_ist_lag_error_details error_details; } fcml_ist_log_asseblation_context; /* Returns true if any of the symbols from given list exists in the state map. */ fcml_bool fcml_ifn_lag_is_any_symbol_modified( fcml_coll_map symbol_state_map, fcml_st_coll_list *symbol_names ) { if ( symbol_names ) { fcml_st_coll_list_element *element = symbol_names->head; while ( element ) { fcml_string symbol_name = (fcml_string) element->item; if ( fcml_fn_coll_map_get( symbol_state_map, symbol_name ) ) { return FCML_TRUE; } element = element->next; } } return FCML_FALSE; } /* Frees symbol state structure used by secod pass and laters. */ void fcml_ifn_lag_map_symbol_state_free( fcml_ptr key, fcml_ptr value, fcml_ptr args ) { if ( value ) { /* Symbol name is managed by parser context, so it can not be free'd here. */ fcml_ist_symbol_state *symbol = (fcml_ist_symbol_state*) value; fcml_fn_env_memory_free( symbol ); } } /* Decides if symbol state has to be removed from state stable. */ fcml_bool fcml_ifn_lag_map_prev_pass_symbol_if( fcml_ptr key, fcml_ptr value, fcml_ptr args ) { fcml_bool remove = FCML_FALSE; fcml_ist_lag_pass_holder *pass_holder = (fcml_ist_lag_pass_holder*) args; if ( value && pass_holder ) { fcml_ist_symbol_state *symbol = (fcml_ist_symbol_state*) value; if ( symbol->pass < pass_holder->pass ) { remove = FCML_TRUE; } } return remove; } /* Adds symbol status to the map. */ fcml_ceh_error fcml_ifn_lag_add_symbol_state( fcml_coll_map symbol_state_map, fcml_string symbol, fcml_int pass ) { fcml_ist_symbol_state *state = (fcml_ist_symbol_state*) fcml_fn_coll_map_get( symbol_state_map, symbol ); if ( state ) { state->pass = pass; } else { state = (fcml_ist_symbol_state*) fcml_fn_env_memory_alloc( sizeof(fcml_ist_symbol_state) ); if ( !state ) { return FCML_CEH_GEC_OUT_OF_MEMORY; } state->pass = pass; state->symbol_name = symbol; fcml_int map_error = 0; fcml_fn_coll_map_put( symbol_state_map, symbol, state, &map_error ); if ( map_error ) { /* Can not add symbol to the map. */ fcml_fn_env_memory_free( state ); return FCML_CEH_GEC_OUT_OF_MEMORY; } } return FCML_CEH_GEC_NO_ERROR; } /* Allocates map used as fast-access storage for symbols statuses. */ fcml_coll_map fcml_ifn_lag_alloc_symbol_state_map() { fcml_st_coll_map_descriptor map_descriptor = fcml_coll_map_descriptor_string; map_descriptor.entry_free_function = &fcml_ifn_lag_map_symbol_state_free; fcml_int map_error = 0; return fcml_fn_coll_map_alloc( &map_descriptor, 10, &map_error ); } /* Removes all symbols from previous passes. */ void fcml_ifn_lag_clean_symbol_state_map( fcml_coll_map symbol_state_map, fcml_int pass ) { fcml_ist_lag_pass_holder holder; holder.pass = pass; fcml_fn_coll_map_remove_if( symbol_state_map, &fcml_ifn_lag_map_prev_pass_symbol_if, &holder ); } /* Adds new instruction to the processing context. */ fcml_ist_lag_instruction *fcml_ifn_lag_add_lag_instruction_to_context( fcml_ist_log_asseblation_context *processing_ctx ) { fcml_ist_lag_instruction *lag_instruction = (fcml_ist_lag_instruction*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_ist_lag_instruction) ); if ( !lag_instruction ) { return NULL; } if ( !processing_ctx->first_instruction ) { processing_ctx->first_instruction = lag_instruction; processing_ctx->last_instruction = lag_instruction; } else { processing_ctx->last_instruction->next = lag_instruction; processing_ctx->last_instruction = lag_instruction; } return lag_instruction; } /* Free lag instruction. */ void fcml_ifn_lag_free_instruction( fcml_ist_lag_instruction *instruction, fcml_st_symbol_table symbol_table ) { if ( instruction ) { fcml_ist_lag_instruction *current = instruction; while ( current ) { fcml_ist_lag_instruction *next = current->next; /* It is really important! Remember that the same symbol is stored * in the internal symbol table, and it's symbol table that is * responsible for freeing it. */ if ( current->ast.symbol && symbol_table ) { /* Anyway, if symbol table is given, remove symbol from it here. */ fcml_fn_symbol_remove( symbol_table, current->ast.symbol->symbol ); } current->ast.symbol = NULL; /* Free everything else. */ fcml_fn_parser_free_ast( &( current->ast ) ); /* Free assembled instruction. */ if ( current->instruction ) { fcml_fn_assembler_instruction_free( current->instruction ); } /* Free symbols list but leave symbols themselves alone. */ if ( current->used_symbols ) { fcml_fn_coll_list_free( current->used_symbols, NULL, NULL ); } fcml_fn_env_memory_free( current ); current = next; } } } fcml_st_assembled_instruction *fcml_ifn_lag_choose_second_pass_best_instruction( fcml_ist_lag_instruction *lag_instruction, fcml_st_assembler_result *assembler_result ) { fcml_st_assembled_instruction **instructions = &( assembler_result->instructions ); fcml_st_assembled_instruction *choosen_instruction = assembler_result->chosen_instruction; fcml_int guard = lag_instruction->size_guard; if ( !lag_instruction->undefined_symbols && guard > 0 ) { fcml_st_assembled_instruction *chosen_instruction = NULL; /* Choose the longest form. */ fcml_st_assembled_instruction *current = *instructions; while ( current ) { if ( !chosen_instruction && guard <= current->code_length ) { chosen_instruction = current; } else if ( current->code_length > chosen_instruction->code_length && guard <= current->code_length ) { chosen_instruction = current; } current = current->next; } } if ( !lag_instruction->undefined_symbols ) { if ( choosen_instruction->code_length > lag_instruction->instruction->code_length ) { lag_instruction->size_guard = choosen_instruction->code_length; } } /* Detach chosen instruction. */ fcml_fn_assembler_instruction_detach( instructions, choosen_instruction ); assembler_result->number_of_instructions--; return choosen_instruction; } /* Chooses best instruction as a result for the first pass. */ fcml_st_assembled_instruction *fcml_ifn_lag_choose_first_pass_best_instruction( fcml_int ignored_symbols, fcml_st_assembler_result *assembler_result ) { fcml_st_assembled_instruction *chosen_instruction = NULL; if ( ignored_symbols > 0 ) { /* Choose the longest form. */ fcml_st_assembled_instruction *current = assembler_result->instructions; while ( current ) { if ( !chosen_instruction ) { chosen_instruction = current; } else if ( current->code_length > chosen_instruction->code_length ) { chosen_instruction = current; } current = current->next; } } else { /* Default chooser chooses the shortest form for us. */ chosen_instruction = assembler_result->chosen_instruction; } /* Detach instruction to avoid its deallocation. */ fcml_fn_assembler_instruction_detach( &( assembler_result->instructions ), chosen_instruction ); assembler_result->number_of_instructions--; return chosen_instruction; } /* First pass of the load-and-go assembler. */ fcml_ceh_error fcml_ifn_lag_assembler_pass_1( fcml_st_lag_assembler_context *context, const fcml_string *source_code, fcml_ist_log_asseblation_context *processing_ctx, fcml_bool *invoke_next_pass ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_assembler_context *assembler_context = &( processing_ctx->assembler_context ); /* Parses instructions one by one. Every parsed instruction is * then converted to CIF and assembled. Assembler should return * all allowed forms of assembled instruction. If all symbols * were known, the shortest instruction for is chosen; otherwise * the longest one. */ fcml_st_parser_context parser_context = { 0 }; parser_context.configuration.ignore_undefined_symbols = FCML_TRUE; parser_context.configuration.override_labels = FCML_FALSE; parser_context.configuration.disable_symbols_declaration = FCML_FALSE; parser_context.configuration.alloc_symbol_table_if_needed = FCML_FALSE; parser_context.ip = assembler_context->entry_point.ip; parser_context.dialect = fcml_fn_assembler_extract_dialect( assembler_context->assembler ); fcml_st_assembler_result assembler_result; fcml_fn_assembler_result_prepare( &assembler_result ); fcml_st_parser_result parser_result; fcml_fn_parser_result_prepare( &parser_result ); fcml_int line = 0; const fcml_string instruction; /* Parse source code, line by line. */ while ( ( instruction = source_code[line] ) ) { processing_ctx->error_details.line = line; /* Check if line is blank. */ fcml_int length = fcml_fn_env_str_strlen( instruction ); if ( length > FCML_PARSER_MAX_INSTRUCTION_LEN ) { fcml_fn_ceh_add_error( &( processing_ctx->error_details.errors ), fcml_fn_msg_get_message( FCML_MC_SEGMENT_PARSED_LINE_TO_LONG ), FCML_CEH_MEC_ERROR_PARSED_LINE_TOO_LONG, FCML_EN_CEH_EL_ERROR ); error = FCML_CEH_GEC_INVALID_INPUT; break; } /* Empty lines should be ignored. */ if ( !fcml_fn_env_str_strblank( instruction ) ) { /* Allocate space for current instruction. */ fcml_ist_lag_instruction *lag_instruction = fcml_ifn_lag_add_lag_instruction_to_context( processing_ctx ); if ( !lag_instruction ) { break; } fcml_st_parser_ast *ast = &( lag_instruction->ast ); /* Parse instruction to AST. */ error = fcml_fn_parse_to_ast( &parser_context, instruction, ast ); if ( error ) { fcml_fn_ceh_move_errors( &( processing_ctx->error_details.errors ), &( ast->errors ) ); break; } /* There is a symbol definition, so store it in the symbol table. */ if ( ast->symbol ) { /* Check if the symbol is already defined. */ if ( fcml_fn_symbol_get( context->symbol_table, ast->symbol->symbol ) ) { fcml_fn_msg_add_error_message( &( processing_ctx->error_details.errors ), FCML_MC_SEGMENT_SYMBOL_ALREADY_DEFINED, FCML_CEH_MEC_ERROR_SYMBOL_ALREADY_DEFINED, FCML_EN_CEH_EL_ERROR, ast->symbol->symbol ); /* Already defined. It doesn't finish up inside symbol table, which should free it later, so * we have to free it manually here. */ fcml_fn_symbol_free( ast->symbol ); ast->symbol = NULL; error = FCML_CEH_GEC_INVALID_INPUT; break; } /* Take into account that the same symbol is hold by AST and symbol table. * It is detached from AST when AST is free'd and in result symbol table * is responsible for freeing it. */ error = fcml_fn_symbol_add( context->symbol_table, ast->symbol ); if ( error ) { /* It doesn't finish up inside symbol table, which should free * it later, so we have to free it manually here. */ fcml_fn_symbol_free( ast->symbol ); ast->symbol = NULL; break; } } lag_instruction->line = line; fcml_int code_length = 0; /* Check if there is any instruction to assemble. */ if ( ast->tree ) { /* Convert AST to common instruction format. */ fcml_st_cif_converter_context cif_context = { 0 }; cif_context.ignore_undefined_symbols = FCML_TRUE; cif_context.symbol_table = context->symbol_table; fcml_st_instruction *cif_instruction; error = fcml_fn_ast_to_cif_converter( &cif_context, ast->tree, &cif_instruction ); if ( error ) { /* Should never happened, because we ignore undefined symbols. */ break; } /* Instruction uses symbols, so extract it just in order to make * them visible later in second stage, because we have to reassemble * instructions which use modified symbols. */ if ( cif_context.evaluated_symbols > 0 ) { error = fcml_fn_ast_extract_used_symbols( ast->tree, &( lag_instruction->used_symbols ) ); if ( error ) { fcml_fn_ast_free_converted_cif( cif_instruction ); break; } } lag_instruction->undefined_symbols = cif_context.ignored_symbols; /* There are undefined symbols, so next pass is definitely needed. */ if ( cif_context.ignored_symbols > 0 ) { *invoke_next_pass = FCML_TRUE; } /* Assemble instruction. */ assembler_context->entry_point.ip = parser_context.ip; /* In case of first pass even if instruction fails, we will try again in the * next pass, because it might fail because of some calculations that take * place after choosing default value for undefined symbols. */ error = fcml_fn_assemble( assembler_context, cif_instruction, &assembler_result ); if ( !error ) { /* Choose the best instruction. */ fcml_st_assembled_instruction *chosen_instruction = fcml_ifn_lag_choose_first_pass_best_instruction( cif_context.ignored_symbols, &assembler_result ); code_length += chosen_instruction->code_length; lag_instruction->instruction = chosen_instruction; } else { error = FCML_CEH_GEC_NO_ERROR; } /* Free instruction model. */ fcml_fn_ast_free_converted_cif( cif_instruction ); } lag_instruction->ip = parser_context.ip; /* Increment instruction pointer. */ parser_context.ip += code_length; } line++; } fcml_fn_assembler_result_free( &assembler_result ); fcml_fn_parser_result_free( &parser_result ); return error; } fcml_ceh_error fcml_ifn_lag_assembler_pass_2_to_n( fcml_st_lag_assembler_context *context, fcml_ist_log_asseblation_context *processing_ctx ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_assembler_context *assembler_context = &( processing_ctx->assembler_context ); fcml_st_assembler_result assembler_result; fcml_fn_assembler_result_prepare( &assembler_result ); /* Allocate map for information about symbols modifications. */ fcml_coll_map symbol_state_map = fcml_ifn_lag_alloc_symbol_state_map(); if ( !symbol_state_map ) { return FCML_CEH_GEC_OUT_OF_MEMORY; } /* Passes counter. */ fcml_int pass = 2; fcml_bool invoke_next_pass = FCML_TRUE; /* Main loop of second and further passes. */ while ( !error && invoke_next_pass ) { fcml_ist_lag_instruction *lag_instruction = processing_ctx->first_instruction; fcml_ip ip_disp = 0; while ( lag_instruction ) { processing_ctx->error_details.line = lag_instruction->line; lag_instruction->ip += ip_disp; fcml_st_symbol *def_symbol = lag_instruction->ast.symbol; /* Update defined symbol if there is such need. */ if ( def_symbol && ip_disp != 0 ) { def_symbol->value += ip_disp; /* Adds symbol to the map of recently modified symbols. */ error = fcml_ifn_lag_add_symbol_state( symbol_state_map, def_symbol->symbol, pass ); if ( error ) { break; } } /* Instruction has to be reassembled in three cases. If it ignored * any undefined symbol in the first phase, if it uses any symbol * which is marked as recently modified and the last case if instruction * IP has been modified and instruction uses symbols. */ if ( lag_instruction->ast.tree && ( !lag_instruction->instruction || lag_instruction->undefined_symbols || ( lag_instruction->used_symbols && ip_disp ) || fcml_ifn_lag_is_any_symbol_modified( symbol_state_map, lag_instruction->used_symbols ) ) ) { fcml_st_instruction *cif_instruction; fcml_st_cif_converter_context cif_context = { 0 }; cif_context.ignore_undefined_symbols = FCML_TRUE; cif_context.symbol_table = context->symbol_table; /* Regenerate instruction with new/modified symbols. */ error = fcml_fn_ast_to_cif_converter( &cif_context, lag_instruction->ast.tree, &cif_instruction ); if ( error ) { break; } lag_instruction->undefined_symbols = cif_context.ignored_symbols; if ( lag_instruction->undefined_symbols ) { fcml_fn_ast_free_converted_cif( cif_instruction ); /* Find undefined symbol. */ fcml_st_coll_list_element *element = lag_instruction->used_symbols->head; while ( element ) { fcml_string symbol = (fcml_string) element->item; if ( fcml_fn_symbol_get( context->symbol_table, symbol ) == NULL ) { fcml_fn_msg_add_error_message( &( processing_ctx->error_details.errors ), FCML_MC_SEGMENT_UNDEFINED_SYMBOL, FCML_CEH_MEC_ERROR_UNDEFINED_SYMBOL, FCML_EN_CEH_EL_ERROR, symbol ); } element = element->next; } /* Undefined symbol. */ error = FCML_CEH_GEC_UNDEFINED_SYMBOL; break; } /* Assemble instruction. */ assembler_context->entry_point.ip = (fcml_ip) lag_instruction->ip; error = fcml_fn_assemble( assembler_context, cif_instruction, &assembler_result ); if ( error ) { /* Copy potential error messages. */ fcml_fn_ceh_move_errors( &( processing_ctx->error_details.errors ), &( assembler_result.errors ) ); fcml_fn_ast_free_converted_cif( cif_instruction ); break; } fcml_fn_ast_free_converted_cif( cif_instruction ); fcml_int code_length = lag_instruction->instruction->code_length; /* Choose the best instruction form. */ fcml_st_assembled_instruction *choosen_instruction = fcml_ifn_lag_choose_second_pass_best_instruction( lag_instruction, &assembler_result ); if ( lag_instruction->instruction ) { /* Free previous instruction. */ fcml_fn_assembler_instruction_free( lag_instruction->instruction ); } lag_instruction->instruction = choosen_instruction; ip_disp += ( (fcml_int) lag_instruction->instruction->code_length - code_length ); } lag_instruction = lag_instruction->next; } /* Remove symbols from previous passes. */ fcml_ifn_lag_clean_symbol_state_map( symbol_state_map, pass ); /* Invoke next phase if and only if current phase modified any symbols. */ invoke_next_pass = fcml_fn_coll_map_size( symbol_state_map ) > 0; pass++; } /* Free all symbol states stored in the map. Take into * account that map should be already empty here if * assemblation succeeded. */ fcml_fn_coll_map_free( symbol_state_map ); fcml_fn_assembler_result_free( &assembler_result ); return error; } /* Copies assembled instructions from LAG context to the result. */ void fcml_ifn_lag_convert_instructions( fcml_ist_log_asseblation_context *processing_ctx, fcml_st_lag_assembler_result *result ) { fcml_ist_lag_instruction *current_lag = processing_ctx->first_instruction; fcml_st_assembled_instruction *first = NULL, *current = NULL; while ( current_lag ) { fcml_ist_lag_instruction *next = current_lag->next; if ( current_lag->instruction && !first ) { first = current_lag->instruction; current = first; } else if ( current_lag->instruction ) { current->next = current_lag->instruction; current = current_lag->instruction; } current_lag->instruction = NULL; current_lag = next; } result->instructions = first; } /* Assembles code available in "source_code" array. */ fcml_ceh_error LIB_CALL fcml_ifn_lag_assemble_core( fcml_st_lag_assembler_context *context, const fcml_string *source_code, fcml_st_lag_assembler_result *result ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_ist_log_asseblation_context processing_ctx = { 0 }; /* Free result of the previous assemblation. */ fcml_fn_lag_assembler_result_free( result ); /* Allocate symbol table, if it hasn't been defined yet. */ fcml_bool local_st = FCML_FALSE; if ( !context->symbol_table ) { context->symbol_table = fcml_fn_symbol_table_alloc(); if ( !context->symbol_table ) { return FCML_CEH_GEC_OUT_OF_MEMORY; } local_st = FCML_TRUE; } fcml_st_assembler_context *assembler_context = &( processing_ctx.assembler_context ); /* It's really important to use default implementations of optimizer and chooser here. */ assembler_context->assembler = context->assembler; assembler_context->configuration = context->configuration; assembler_context->configuration.optimizer = &fcml_fn_asm_default_optimizer; assembler_context->configuration.chooser = &fcml_fn_asm_default_instruction_chooser; assembler_context->entry_point = context->entry_point; /* Pass 1 */ fcml_bool invoke_next_pass = FCML_FALSE; error = fcml_ifn_lag_assembler_pass_1( context, source_code, &processing_ctx, &invoke_next_pass ); /* Pass 2 */ if ( !error && invoke_next_pass ) { error = fcml_ifn_lag_assembler_pass_2_to_n( context, &processing_ctx ); } /* Prepare result. */ if ( !error ) { fcml_ifn_lag_convert_instructions( &processing_ctx, result ); } /* Copy line number in case of errors. */ if ( error ) { result->error_line = processing_ctx.error_details.line; } /* Free all assembled instructions. In case of error clean symbol table as well. */ fcml_ifn_lag_free_instruction( processing_ctx.first_instruction, error ? context->symbol_table : NULL ); /* It's our own symbol table so free it. Remember that user's symbol table is populated * with symbols defined while assembling. It can be useful to get these information * when code is already assembled, but it has also disadvantages, because user have * to free them. Fortunately it is completely transparent functionality realized by * "fcml_fn_symbol_table_free" function which user is obliged to call anyway. */ if ( local_st ) { fcml_fn_symbol_table_free( context->symbol_table ); context->symbol_table = NULL; } fcml_fn_ceh_move_errors( &( result->errors ), &( processing_ctx.error_details.errors ) ); return error; } /* Load-and-go assembler. */ fcml_ceh_error LIB_CALL fcml_fn_lag_assemble( fcml_st_lag_assembler_context *context, const fcml_string *source_code, fcml_st_lag_assembler_result *result ) { fcml_ceh_error error = fcml_ifn_lag_assemble_core( context, source_code, result ); if ( error ) { // Try to convert error code to error message if there is such need. fcml_fn_utils_convert_gec_to_error_info( context->configuration.enable_error_messages, &( result->errors ), error ); } return error; } /* Free result of the load-and-go assemblation process. */ void LIB_CALL fcml_fn_lag_assembler_result_free( fcml_st_lag_assembler_result *result ) { if ( result ) { fcml_fn_ceh_free_errors_only( &( result->errors ) ); fcml_st_assembled_instruction *instruction = result->instructions; while ( instruction ) { fcml_st_assembled_instruction *next = instruction->next; fcml_fn_assembler_instruction_free( instruction ); instruction = next; } result->error_line = 0; result->instructions = NULL; } } void LIB_CALL fcml_fn_lag_assembler_result_prepare( fcml_st_lag_assembler_result *result ) { if ( result ) { fcml_fn_env_memory_clear( result, sizeof(fcml_st_lag_assembler_result) ); } } fcml-1.1.1/src/fcml_parser_int.h0000644000175000017500000000353012560745216013474 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_PARSER_INT_H_ #define FCML_PARSER_INT_H_ #include #include "fcml_apc_ast.h" #include "fcml_coll.h" #include "fcml_ceh.h" typedef struct fcml_st_parser_ast { /* Defined symbol. */ fcml_st_symbol *symbol; /* Abstract syntax tree of parsed isntruction. */ fcml_st_ast_node *tree; /* All potential errors going here. */ fcml_st_ceh_error_container errors; } fcml_st_parser_ast; fcml_ceh_error fcml_fn_parse_to_cif( fcml_st_parser_context *context, const fcml_string instruction, fcml_st_parser_result *result_out ); fcml_ceh_error fcml_fn_parse_to_ast( fcml_st_parser_context *context, const fcml_string instruction, fcml_st_parser_ast *ast_out ); fcml_ceh_error fcml_fn_parser_add_symbol_to_symbol_table( fcml_st_ceh_error_container *errors, fcml_st_symbol_table symbol_table, fcml_st_symbol *symbol, fcml_bool allow_override ); void fcml_fn_parser_free_ast( fcml_st_parser_ast *ast ); void fcml_fn_parser_free_symbol( fcml_st_symbol *symbol ); #endif /* FCML_PARSER_INT_H_ */ fcml-1.1.1/src/fcml_gas_parser.c0000644000175000017500000000562012560745216013451 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include #include #include "fcml_gas_parser.h" #include "fcml_ceh.h" #include "fcml_env_int.h" #include "fcml_parser_utils.h" #include "fcml_gas_parser_def.h" #include "fcml_gas_lexer.h" #include "fcml_utils.h" #include "fcml_messages.h" #include "fcml_parser_int.h" void gas_error( struct fcml_st_parser_data *pd, const char *error ) { /* Stores parser error into standard container.*/ fcml_fn_ceh_add_error( &( pd->errors ), (const fcml_string) error, FCML_CEH_MEC_ERROR_INVALID_SYNTAX, FCML_EN_CEH_EL_ERROR ); } void *gas_alloc( yy_size_t size, yyscan_t yyscanner ) { return fcml_fn_env_memory_alloc( (fcml_usize) size ); } void *gas_realloc( void *ptr, yy_size_t size, yyscan_t yyscanner ) { return fcml_fn_env_memory_realloc( ptr, (fcml_usize) size ); } void gas_free( void *ptr, yyscan_t yyscanner ) { return fcml_fn_env_memory_free( ptr ); } fcml_ceh_error fcml_fn_gas_parse_instruction_to_ast( fcml_ip ip, const fcml_string mnemonic, fcml_st_parser_ast *ast ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; /* Instruction size is limited to prevent from parser's stack and buffer overflows. */ if ( !mnemonic || !ast || fcml_fn_env_str_strlen( mnemonic ) > FCML_PARSER_MAX_INSTRUCTION_LEN ) { return FCML_CEH_GEC_INVALID_INPUT; } /* Fill instruction pointer. */ fcml_st_parser_data parser = { 0 }; parser.ip = ip; /* Set up scanner. */ if ( gas_lex_init_extra( &parser, &( parser.scannerInfo ) ) ) { return FCML_CEH_GEC_OUT_OF_MEMORY; } gas__scan_string( mnemonic, parser.scannerInfo ); int yyresult = gas_parse( &parser ); gas_lex_destroy( parser.scannerInfo ); ast->errors = parser.errors; ast->symbol = parser.symbol; ast->tree = parser.tree; if ( yyresult ) { switch ( yyresult ) { case 1: /*Syntax error.*/ error = FCML_CEH_GEC_INVALID_INPUT; break; case 2: /*Out of memory*/ error = FCML_CEH_GEC_OUT_OF_MEMORY; break; } } return error; } fcml-1.1.1/src/fcml_trace.h0000644000175000017500000000232612560745216012426 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_TRACE_H_ #define FCML_TRACE_H_ #include "stdio.h" #ifdef FCML_DEBUG #define FCML_TRACE(pattern, ...) { printf("%s:%d ", __FILE__, __LINE__); printf(pattern, ##__VA_ARGS__); printf("\n");} #define FCML_TRACE_MSG(msg) { printf("%s:%d ", __FILE__, __LINE__); printf("%s\n", msg); } #else #define FCML_TRACE(pattern, ...) #define FCML_TRACE_MSG(msg) #endif #endif /* FCML_TRACE_H_ */ fcml-1.1.1/src/fcml_gas_lexer.l0000644000175000017500000002727712560745216013321 00000000000000 /* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include #include "fcml_common_lex.h" #include "fcml_gas_parser_def.h" %} %option noyywrap %option nounput %option noinput %option noyyalloc %option noyyrealloc %option noyyfree %option batch %option nodefault %option never-interactive %option case-insensitive %option 8bit %option reentrant %option bison-bridge %option outfile="fcml_gas_lexer.c" %option header-file="fcml_gas_lexer.h" %option nounistd %option prefix="gas_" %option extra-type="struct fcml_st_parser_data *" /* White spaces. */ WS [ \t]* /*Dec and hex values.*/ DEC ([1-9][0-9]*|0+) HEX 0x[0-9a-f]+ %% /* Decimal integers. */ {DEC} { fcml_fn_pu_parse_integer( yytext, &(yylval->integer_value), 10 ); return FCML_TK_INTEGER; } /* HEX integers. */ {HEX} { fcml_fn_pu_parse_integer( yytext, &(yylval->integer_value), 16 ); return FCML_TK_INTEGER; } fcml_fn_pu_parse_intege_flags /* GPR. */ "%al" FCML_FM_GPRS_8_REG(FCML_REG_AL) "%cl" FCML_FM_GPRS_8_REG(FCML_REG_CL) "%dl" FCML_FM_GPRS_8_REG(FCML_REG_DL) "%bl" FCML_FM_GPRS_8_REG(FCML_REG_BL) "%ah" FCML_FM_GPRS_8_REG(FCML_REG_AH) "%ch" FCML_FM_GPRS_8_REG(FCML_REG_CH) "%dh" FCML_FM_GPRS_8_REG(FCML_REG_DH) "%bh" FCML_FM_GPRS_8_REG(FCML_REG_BH) "%r8l" FCML_FM_GPRS_8_REG(FCML_REG_R8L) "%r9l" FCML_FM_GPRS_8_REG(FCML_REG_R9L) "%r10l" FCML_FM_GPRS_8_REG(FCML_REG_R10L) "%r11l" FCML_FM_GPRS_8_REG(FCML_REG_R11L) "%r12l" FCML_FM_GPRS_8_REG(FCML_REG_R12L) "%r13l" FCML_FM_GPRS_8_REG(FCML_REG_R13L) "%r14l" FCML_FM_GPRS_8_REG(FCML_REG_R14L) "%r15l" FCML_FM_GPRS_8_REG(FCML_REG_R15L) "%spl" FCML_FM_GPRS_8_X_REG(FCML_REG_SPL) "%bpl" FCML_FM_GPRS_8_X_REG(FCML_REG_BPL) "%sil" FCML_FM_GPRS_8_X_REG(FCML_REG_SIL) "%dil" FCML_FM_GPRS_8_X_REG(FCML_REG_DIL) "%ax" FCML_FM_GPRS_16_REG(FCML_REG_AX) "%cx" FCML_FM_GPRS_16_REG(FCML_REG_CX) "%dx" FCML_FM_GPRS_16_REG(FCML_REG_DX) "%bx" FCML_FM_GPRS_16_REG(FCML_REG_BX) "%sp" FCML_FM_GPRS_16_REG(FCML_REG_SP) "%bp" FCML_FM_GPRS_16_REG(FCML_REG_BP) "%si" FCML_FM_GPRS_16_REG(FCML_REG_SI) "%di" FCML_FM_GPRS_16_REG(FCML_REG_DI) "%r8w" FCML_FM_GPRS_16_REG(FCML_REG_R8W) "%r9w" FCML_FM_GPRS_16_REG(FCML_REG_R9W) "%r10w" FCML_FM_GPRS_16_REG(FCML_REG_R10W) "%r11w" FCML_FM_GPRS_16_REG(FCML_REG_R11W) "%r12w" FCML_FM_GPRS_16_REG(FCML_REG_R12W) "%r13w" FCML_FM_GPRS_16_REG(FCML_REG_R13W) "%r14w" FCML_FM_GPRS_16_REG(FCML_REG_R14W) "%r15w" FCML_FM_GPRS_16_REG(FCML_REG_R15W) "%eax" FCML_FM_GPRS_32_REG(FCML_REG_EAX) "%ecx" FCML_FM_GPRS_32_REG(FCML_REG_ECX) "%edx" FCML_FM_GPRS_32_REG(FCML_REG_EDX) "%ebx" FCML_FM_GPRS_32_REG(FCML_REG_EBX) "%esp" FCML_FM_GPRS_32_REG(FCML_REG_ESP) "%ebp" FCML_FM_GPRS_32_REG(FCML_REG_EBP) "%esi" FCML_FM_GPRS_32_REG(FCML_REG_ESI) "%edi" FCML_FM_GPRS_32_REG(FCML_REG_EDI) "%r8d" FCML_FM_GPRS_32_REG(FCML_REG_R8D) "%r9d" FCML_FM_GPRS_32_REG(FCML_REG_R9D) "%r10d" FCML_FM_GPRS_32_REG(FCML_REG_R10D) "%r11d" FCML_FM_GPRS_32_REG(FCML_REG_R11D) "%r12d" FCML_FM_GPRS_32_REG(FCML_REG_R12D) "%r13d" FCML_FM_GPRS_32_REG(FCML_REG_R13D) "%r14d" FCML_FM_GPRS_32_REG(FCML_REG_R14D) "%r15d" FCML_FM_GPRS_32_REG(FCML_REG_R15D) "%rax" FCML_FM_GPRS_64_REG(FCML_REG_RAX) "%rcx" FCML_FM_GPRS_64_REG(FCML_REG_RCX) "%rdx" FCML_FM_GPRS_64_REG(FCML_REG_RDX) "%rbx" FCML_FM_GPRS_64_REG(FCML_REG_RBX) "%rsp" FCML_FM_GPRS_64_REG(FCML_REG_RSP) "%rbp" FCML_FM_GPRS_64_REG(FCML_REG_RBP) "%rsi" FCML_FM_GPRS_64_REG(FCML_REG_RSI) "%rdi" FCML_FM_GPRS_64_REG(FCML_REG_RDI) "%r8" FCML_FM_GPRS_64_REG(FCML_REG_R8) "%r9" FCML_FM_GPRS_64_REG(FCML_REG_R9) "%r10" FCML_FM_GPRS_64_REG(FCML_REG_R10) "%r11" FCML_FM_GPRS_64_REG(FCML_REG_R11) "%r12" FCML_FM_GPRS_64_REG(FCML_REG_R12) "%r13" FCML_FM_GPRS_64_REG(FCML_REG_R13) "%r14" FCML_FM_GPRS_64_REG(FCML_REG_R14) "%r15" FCML_FM_GPRS_64_REG(FCML_REG_R15) /* SIMD-MMX */ "%mm0" FCML_FM_SIMD_64_REG(FCML_REG_MM0) "%mm1" FCML_FM_SIMD_64_REG(FCML_REG_MM1) "%mm2" FCML_FM_SIMD_64_REG(FCML_REG_MM2) "%mm3" FCML_FM_SIMD_64_REG(FCML_REG_MM3) "%mm4" FCML_FM_SIMD_64_REG(FCML_REG_MM4) "%mm5" FCML_FM_SIMD_64_REG(FCML_REG_MM5) "%mm6" FCML_FM_SIMD_64_REG(FCML_REG_MM6) "%mm7" FCML_FM_SIMD_64_REG(FCML_REG_MM7) /* SIMD-XMM */ "%xmm0" FCML_FM_SIMD_128_REG(FCML_REG_XMM0) "%xmm1" FCML_FM_SIMD_128_REG(FCML_REG_XMM1) "%xmm2" FCML_FM_SIMD_128_REG(FCML_REG_XMM2) "%xmm3" FCML_FM_SIMD_128_REG(FCML_REG_XMM3) "%xmm4" FCML_FM_SIMD_128_REG(FCML_REG_XMM4) "%xmm5" FCML_FM_SIMD_128_REG(FCML_REG_XMM5) "%xmm6" FCML_FM_SIMD_128_REG(FCML_REG_XMM6) "%xmm7" FCML_FM_SIMD_128_REG(FCML_REG_XMM7) "%xmm8" FCML_FM_SIMD_128_REG(FCML_REG_XMM8) "%xmm9" FCML_FM_SIMD_128_REG(FCML_REG_XMM9) "%xmm10" FCML_FM_SIMD_128_REG(FCML_REG_XMM10) "%xmm11" FCML_FM_SIMD_128_REG(FCML_REG_XMM11) "%xmm12" FCML_FM_SIMD_128_REG(FCML_REG_XMM12) "%xmm13" FCML_FM_SIMD_128_REG(FCML_REG_XMM13) "%xmm14" FCML_FM_SIMD_128_REG(FCML_REG_XMM14) "%xmm15" FCML_FM_SIMD_128_REG(FCML_REG_XMM15) /* SIMD-YMM */ "%ymm0" FCML_FM_SIMD_256_REG(FCML_REG_YMM0) "%ymm1" FCML_FM_SIMD_256_REG(FCML_REG_YMM1) "%ymm2" FCML_FM_SIMD_256_REG(FCML_REG_YMM2) "%ymm3" FCML_FM_SIMD_256_REG(FCML_REG_YMM3) "%ymm4" FCML_FM_SIMD_256_REG(FCML_REG_YMM4) "%ymm5" FCML_FM_SIMD_256_REG(FCML_REG_YMM5) "%ymm6" FCML_FM_SIMD_256_REG(FCML_REG_YMM6) "%ymm7" FCML_FM_SIMD_256_REG(FCML_REG_YMM7) "%ymm8" FCML_FM_SIMD_256_REG(FCML_REG_YMM8) "%ymm9" FCML_FM_SIMD_256_REG(FCML_REG_YMM9) "%ymm10" FCML_FM_SIMD_256_REG(FCML_REG_YMM10) "%ymm11" FCML_FM_SIMD_256_REG(FCML_REG_YMM11) "%ymm12" FCML_FM_SIMD_256_REG(FCML_REG_YMM12) "%ymm13" FCML_FM_SIMD_256_REG(FCML_REG_YMM13) "%ymm14" FCML_FM_SIMD_256_REG(FCML_REG_YMM14) "%ymm15" FCML_FM_SIMD_256_REG(FCML_REG_YMM15) /* FPU */ %st{WS}("("{WS}0{WS}")"|0) FCML_FM_FPU_REG(FCML_REG_ST0) %st{WS}("("{WS}1{WS}")"|1) FCML_FM_FPU_REG(FCML_REG_ST1) %st{WS}("("{WS}2{WS}")"|2) FCML_FM_FPU_REG(FCML_REG_ST2) %st{WS}("("{WS}3{WS}")"|3) FCML_FM_FPU_REG(FCML_REG_ST3) %st{WS}("("{WS}4{WS}")"|4) FCML_FM_FPU_REG(FCML_REG_ST4) %st{WS}("("{WS}5{WS}")"|5) FCML_FM_FPU_REG(FCML_REG_ST5) %st{WS}("("{WS}6{WS}")"|6) FCML_FM_FPU_REG(FCML_REG_ST6) %st{WS}("("{WS}7{WS}")"|7) FCML_FM_FPU_REG(FCML_REG_ST7) /* Control registers. */ "%cr0" FCML_FM_CR_REG(FCML_REG_CR0) "%cr2" FCML_FM_CR_REG(FCML_REG_CR2) "%cr3" FCML_FM_CR_REG(FCML_REG_CR3) "%cr4" FCML_FM_CR_REG(FCML_REG_CR4) "%cr8" FCML_FM_CR_REG(FCML_REG_CR8) /* Debug registers. */ "%db0" FCML_FM_DR_REG(FCML_REG_DR0) "%db1" FCML_FM_DR_REG(FCML_REG_DR1) "%db2" FCML_FM_DR_REG(FCML_REG_DR2) "%db3" FCML_FM_DR_REG(FCML_REG_DR3) "%db4" FCML_FM_DR_REG(FCML_REG_DR4) "%db5" FCML_FM_DR_REG(FCML_REG_DR5) "%db6" FCML_FM_DR_REG(FCML_REG_DR6) "%db7" FCML_FM_DR_REG(FCML_REG_DR7) /* Segment registers. */ "%es" FCML_FM_SEG_REG(FCML_REG_ES) "%cs" FCML_FM_SEG_REG(FCML_REG_CS) "%ss" FCML_FM_SEG_REG(FCML_REG_SS) "%ds" FCML_FM_SEG_REG(FCML_REG_DS) "%fs" FCML_FM_SEG_REG(FCML_REG_FS) "%gs" FCML_FM_SEG_REG(FCML_REG_GS) /* RIP */ "%rip" FCML_FM_RIP /* Prefixes */ "lock" { yylval->prefixes = FCML_PREFIX_LOCK; return FCML_TK_PREFIX; } "repne"|"repnz" { yylval->prefixes = FCML_PREFIX_REPNE; return FCML_TK_PREFIX; } "repe"|"repz"|"rep" { yylval->prefixes = FCML_PREFIX_REPE; return FCML_TK_PREFIX; } "xacquire" { yylval->prefixes = FCML_PREFIX_XACQUIRE; return FCML_TK_PREFIX; } "xrelease" { yylval->prefixes = FCML_PREFIX_XRELEASE; return FCML_TK_PREFIX; } "branch" { yylval->hints = FCML_PREFIX_BRANCH_HINT; return FCML_TK_PREFIX; } "nobranch" { yylval->hints = FCML_PREFIX_NOBRANCH_HINT; return FCML_TK_PREFIX; } /* Identifiers. */ ".byte" { yylval->symbol.text = (fcml_string)yytext; yylval->symbol.length = (fcml_usize)yyleng; return FCML_TK_PO_BYTE; } /* Identifiers. */ [a-z\._][0-9a-z\._]* { yylval->symbol.text = (fcml_string)yytext; yylval->symbol.length = (fcml_usize)yyleng; return FCML_TK_SYMBOL; } /* Operators and parentheses. */ "," { return ','; } "+" { return '+'; } "-" { return '-'; } "*" { return '*'; } "/" { return '/'; } "(" { return '('; } ")" { return ')'; } ":" { return ':'; } "\$" { return '$'; } /* Ignore white spaces. */ {WS} /*Anything else is not expected.*/ . { return FCML_TK_UNEXPECTED; } /*Ignore like white spaces.*/ \n %% fcml-1.1.1/src/fcml_parser_utils.c0000644000175000017500000000457412560745216014046 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_parser_utils.h" #include #include void fcml_fn_pu_parse_integer( const fcml_char *str, fcml_st_ast_val_integer *integer_value, int base ) { #ifdef FCML_MSCC fcml_uint64_t value = _strtoui64( str, NULL, base ); #else fcml_uint64_t value = strtoull( str, NULL, base ); #endif integer_value->overflow = ( errno == ERANGE ); integer_value->value = value; integer_value->is_signed = FCML_FALSE; } void fcml_fn_pu_parse_float( const fcml_char *str, fcml_st_ast_val_float *float_value ) { // Floats are not supported yet. #ifdef FCML_MSCC float_value->value = (float)strtod( str, NULL ); #else float_value->value = strtof( str, NULL ); #endif float_value->overflow = ( errno == ERANGE ) ? FCML_TRUE : FCML_FALSE; } void fcml_fn_pu_parse_register( fcml_en_register type, fcml_usize size, fcml_uint8_t reg, fcml_bool x64_exp, fcml_st_register *reg_dest ) { reg_dest->type = type; reg_dest->size = size; reg_dest->reg = reg; reg_dest->x64_exp = x64_exp; } fcml_char *fcml_fn_pu_reg_type_to_string( fcml_en_register type ) { fcml_char *desc; switch ( type ) { case FCML_REG_GPR: desc = "GPR"; break; case FCML_REG_SIMD: desc = "SIMD"; break; case FCML_REG_FPU: desc = "FPU"; break; case FCML_REG_SEG: desc = "SEG"; break; case FCML_REG_DR: desc = "DR"; break; case FCML_REG_CR: desc = "CR"; break; default: desc = "Unknown"; break; } return desc; } fcml-1.1.1/src/fcml_mnemonic_parser.h0000644000175000017500000000417612560745216014516 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_MNEMONIC_PARSER_H_ #define FCML_MNEMONIC_PARSER_H_ #include "fcml_env_int.h" #include "fcml_ceh.h" #include "fcml_coll.h" typedef struct fcml_st_mp_mnemonic { fcml_string mnemonic; fcml_bool is_shortcut; fcml_bool is_classic; fcml_bool is_mode_mem_only; fcml_bool is_mode_reg_only; fcml_usize is_byte_ds; fcml_usize is_full_ds; fcml_usize supported_osa; fcml_usize supported_asa; fcml_nuint8_t suffix; fcml_nuint8_t pseudo_op; fcml_nuint8_t memory_data; fcml_bool is_default; fcml_nuint8_t l; fcml_uint32_t flags; } fcml_st_mp_mnemonic; typedef struct fcml_st_mp_mnemonic_set { fcml_st_coll_list *mnemonics; } fcml_st_mp_mnemonic_set; typedef struct fcml_st_mp_config { fcml_bool use_shortcut; fcml_nuint8_t pseudo_opcode; fcml_nuint8_t suffix; fcml_usize effective_osa; fcml_usize effective_asa; fcml_bool is_memory; fcml_usize memory_data_size; fcml_nuint8_t l; } fcml_st_mp_config; fcml_ceh_error fcml_fn_mp_parse_mnemonics( fcml_string mnemonics_pattern, fcml_st_mp_mnemonic_set **mnemonics ); void fcml_fn_mp_free_mnemonics( fcml_st_mp_mnemonic_set *mnemonics ); fcml_st_mp_mnemonic *fcml_fn_mp_choose_mnemonic( fcml_st_mp_mnemonic_set *mnemonics, fcml_st_mp_config *config ); #endif /* FCML_MNEMONIC_PARSER_H_ */ fcml-1.1.1/src/fcml_ceh.h0000644000175000017500000000266212560745216012072 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_CEH_H_ #define FCML_CEH_H_ #include #include void fcml_fn_ceh_move_errors( fcml_st_ceh_error_container *destination, fcml_st_ceh_error_container *source ); void fcml_fn_ceh_free_errors_only( fcml_st_ceh_error_container *error_container ); void fcml_fn_ceh_free_errors_only_with_level( fcml_st_ceh_error_container *error_container, fcml_en_ceh_error_level level ); fcml_st_ceh_error_info *fcml_fn_ceh_add_error( fcml_st_ceh_error_container *error_container, const fcml_string message, fcml_ceh_error code, fcml_en_ceh_error_level level ); #endif /* FCML_CEH_H_ */ fcml-1.1.1/src/fcml_utils.c0000644000175000017500000006143512560745216012471 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include #include "fcml_utils.h" #include "fcml_coll.h" #include "fcml_trace.h" #include "fcml_messages.h" fcml_ceh_error fcml_fn_utils_int64_to_integer( fcml_uint64_t src, fcml_bool is_src_signed, fcml_st_integer *integer, fcml_en_utils_size_flags filter ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( is_src_signed ) { fcml_int64_t imm = (fcml_int64_t) src; if ( ( filter & FCML_ENUSF_8 ) && imm <= FCML_INT8_MAX && imm >= FCML_INT8_MIN ) { integer->int8 = (fcml_int8_t) imm; integer->size = FCML_DS_8; } else if ( ( filter & FCML_ENUSF_16 ) && imm <= FCML_INT16_MAX && imm >= FCML_INT16_MIN ) { integer->int16 = (fcml_int16_t) imm; integer->size = FCML_DS_16; } else if ( ( filter & FCML_ENUSF_32 ) && imm <= FCML_INT32_MAX && imm >= FCML_INT32_MIN ) { integer->int32 = (fcml_int32_t) imm; integer->size = FCML_DS_32; } else { if ( filter & FCML_ENUSF_64 ) { integer->int64 = src; integer->size = FCML_DS_64; } else { error = FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } } } else { if ( ( filter & FCML_ENUSF_8 ) && ( src <= FCML_UINT8_MAX ) ) { integer->int8 = (fcml_uint8_t) src; integer->size = FCML_DS_8; } else if ( ( filter & FCML_ENUSF_16 ) && ( src <= FCML_UINT16_MAX ) ) { integer->int16 = (fcml_uint16_t) src; integer->size = FCML_DS_16; } else if ( ( filter & FCML_ENUSF_32 ) && ( src <= FCML_UINT32_MAX ) ) { integer->int32 = (fcml_uint32_t) src; integer->size = FCML_DS_32; } else if ( filter & FCML_ENUSF_64 ) { integer->int64 = src; integer->size = FCML_DS_64; } else { error = FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } } integer->is_signed = is_src_signed; return error; } fcml_ceh_error fcml_fn_utils_convert_integer_to_integer( const fcml_st_integer *source, fcml_st_integer *destination, fcml_usize expected_source_size, fcml_usize destination_size ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; /* Convert given source immediate value to expected one.*/ fcml_st_integer expected = { 0 }; expected.size = expected_source_size; expected.is_signed = source->is_signed; if ( source->size != expected_source_size ) { switch ( expected_source_size ) { case FCML_DS_8: error = fcml_fn_utils_convert_integer_to_int8( source, &( expected.int8 ) ); break; case FCML_DS_16: error = fcml_fn_utils_convert_integer_to_int16( source, &( expected.int16 ) ); break; case FCML_DS_32: error = fcml_fn_utils_convert_integer_to_int32( source, &( expected.int32 ) ); break; case FCML_DS_64: error = fcml_fn_utils_convert_integer_to_int64( source, &( expected.int64 ) ); break; } } else { expected = *source; } if ( !error ) { /* Convert expected value to destination one.*/ switch ( destination_size ) { case FCML_DS_8: error = fcml_fn_utils_convert_integer_to_int8( &expected, &( destination->int8 ) ); break; case FCML_DS_16: error = fcml_fn_utils_convert_integer_to_int16( &expected, &( destination->int16 ) ); break; case FCML_DS_32: error = fcml_fn_utils_convert_integer_to_int32( &expected, &( destination->int32 ) ); break; case FCML_DS_64: error = fcml_fn_utils_convert_integer_to_int64( &expected, &( destination->int64 ) ); break; } destination->size = destination_size; destination->is_signed = expected.is_signed; } return error; } fcml_ceh_error fcml_fn_utils_convert_integer_to_uint8( const fcml_st_integer *integer, fcml_uint8_t *value ) { switch ( integer->size ) { case FCML_DS_8: /* In this case we doesn't care what is in IMM, because no conversion is needed.*/ *value = integer->int8; break; case FCML_DS_16: if ( integer->is_signed ) { if ( integer->int16 > FCML_UINT8_MAX || integer->int16 < 0 ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_uint8_t) (fcml_int16_t) integer->int16; } else { if ( (fcml_uint16_t) integer->int16 > FCML_UINT8_MAX ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_uint8_t) integer->int16; } break; case FCML_DS_32: if ( integer->is_signed ) { if ( integer->int32 > FCML_UINT8_MAX || integer->int32 < 0 ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_uint8_t) (fcml_int32_t) integer->int32; } else { if ( (fcml_uint32_t) integer->int32 > FCML_UINT8_MAX ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_uint8_t) integer->int32; } break; case FCML_DS_64: if ( integer->is_signed ) { if ( integer->int64 > FCML_UINT8_MAX || integer->int64 < 0 ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_uint8_t) (fcml_int64_t) integer->int64; } else { if ( (fcml_uint64_t) integer->int64 > FCML_UINT8_MAX ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_uint8_t) integer->int64; } break; default: return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_fn_utils_convert_integer_to_uint16( const fcml_st_integer *integer, fcml_uint16_t *value ) { switch ( integer->size ) { case FCML_DS_8: if ( integer->is_signed ) { *value = (fcml_uint16_t) integer->int8; } else { *value = (fcml_uint16_t) (fcml_uint8_t) integer->int8; } break; case FCML_DS_16: *value = (fcml_uint16_t) integer->int16; break; case FCML_DS_32: if ( integer->is_signed ) { if ( integer->int32 > FCML_UINT16_MAX || integer->int32 < 0 ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_uint16_t) integer->int32; } else { if ( (fcml_uint32_t) integer->int32 > FCML_UINT16_MAX ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_uint16_t) integer->int32; } break; case FCML_DS_64: if ( integer->is_signed ) { if ( integer->int64 > FCML_UINT16_MAX || integer->int64 < 0 ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_uint16_t) integer->int64; } else { if ( (fcml_uint64_t) integer->int64 > FCML_UINT16_MAX ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_uint16_t) integer->int64; } break; default: return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_fn_utils_convert_integer_to_uint32( const fcml_st_integer *integer, fcml_uint32_t *value ) { switch ( integer->size ) { case FCML_DS_8: if ( integer->is_signed ) { *value = (fcml_uint32_t) integer->int8; } else { *value = (fcml_uint32_t) (fcml_uint8_t) integer->int8; } break; case FCML_DS_16: if ( integer->is_signed ) { *value = (fcml_uint32_t) integer->int16; } else { *value = (fcml_uint32_t) (fcml_uint16_t) integer->int16; } break; case FCML_DS_32: *value = (fcml_uint32_t) integer->int32; break; case FCML_DS_64: if ( integer->is_signed ) { if ( integer->int64 > FCML_UINT32_MAX || integer->int64 < 0 ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_uint32_t) integer->int16; } else { if ( (fcml_uint64_t) integer->int64 > FCML_UINT32_MAX ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_uint32_t) integer->int64; } break; default: return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_fn_utils_convert_integer_to_uint64( const fcml_st_integer *integer, fcml_uint64_t *value ) { switch ( integer->size ) { case FCML_DS_8: if ( integer->is_signed ) { *value = (fcml_uint64_t) integer->int8; } else { *value = (fcml_uint64_t) (fcml_uint8_t) integer->int8; } break; case FCML_DS_16: if ( integer->is_signed ) { *value = (fcml_uint64_t) integer->int16; } else { *value = (fcml_uint64_t) (fcml_uint16_t) integer->int16; } break; case FCML_DS_32: if ( integer->is_signed ) { *value = (fcml_uint64_t) integer->int32; } else { *value = (fcml_uint64_t) (fcml_uint32_t) integer->int32; } break; case FCML_DS_64: *value = (fcml_uint64_t) integer->int64; break; default: return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_fn_utils_convert_integer_to_int8( const fcml_st_integer *integer, fcml_int8_t *value ) { switch ( integer->size ) { case FCML_DS_8: *value = (fcml_int8_t) integer->int8; break; case FCML_DS_16: if ( integer->is_signed ) { if ( integer->int16 < FCML_INT8_MIN || integer->int16 > FCML_INT8_MAX ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_int8_t) integer->int16; } else { if ( (fcml_uint16_t) integer->int16 > FCML_UINT8_MAX ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_int8_t) (fcml_uint16_t) integer->int16; } break; case FCML_DS_32: if ( integer->is_signed ) { if ( integer->int32 < FCML_INT8_MIN || integer->int32 > FCML_INT8_MAX ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_int8_t) integer->int32; } else { if ( (fcml_uint32_t) integer->int32 > FCML_INT8_MAX ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_int8_t) (fcml_uint32_t) integer->int32; } break; case FCML_DS_64: if ( integer->is_signed ) { if ( (fcml_int64_t) integer->int64 < FCML_INT8_MIN || (fcml_int64_t) integer->int64 > FCML_INT8_MAX ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_int8_t) integer->int64; } else { if ( (fcml_uint64_t) integer->int64 > FCML_INT8_MAX ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_int8_t) (fcml_uint64_t) integer->int64; } break; default: return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_fn_utils_convert_integer_to_int16( const fcml_st_integer *integer, fcml_int16_t *value ) { switch ( integer->size ) { case FCML_DS_8: *value = integer->is_signed ? (fcml_int16_t) integer->int8 : (fcml_int16_t) (fcml_uint8_t) integer->int8; break; case FCML_DS_16: *value = integer->int16; break; case FCML_DS_32: if ( integer->is_signed ) { if ( integer->int32 < FCML_INT16_MIN || integer->int32 > FCML_INT16_MAX ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_int16_t) integer->int32; } else { if ( (fcml_uint32_t) integer->int32 > FCML_INT16_MAX ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_int16_t) (fcml_uint32_t) integer->int32; } break; case FCML_DS_64: if ( integer->is_signed ) { if ( integer->int64 < FCML_INT16_MIN || integer->int64 > FCML_INT16_MAX ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_int16_t) integer->int64; } else { if ( (fcml_uint64_t) integer->int64 > FCML_INT16_MAX ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_int16_t) (fcml_uint64_t) integer->int64; } break; default: return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_fn_utils_convert_integer_to_int32( const fcml_st_integer *integer, fcml_int32_t *value ) { switch ( integer->size ) { case FCML_DS_8: *value = integer->is_signed ? (fcml_int32_t) integer->int8 : (fcml_int32_t) (fcml_uint8_t) integer->int8; break; case FCML_DS_16: *value = integer->is_signed ? (fcml_int32_t) integer->int16 : (fcml_int32_t) (fcml_uint16_t) integer->int16; break; case FCML_DS_32: *value = integer->int32; break; case FCML_DS_64: if ( integer->is_signed ) { if ( integer->int64 < FCML_INT32_MIN || integer->int64 > FCML_INT32_MAX ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_int32_t) integer->int64; } else { if ( (fcml_uint64_t) integer->int64 > FCML_INT32_MAX ) { return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } *value = (fcml_int32_t) (fcml_uint64_t) integer->int64; } break; default: return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_fn_utils_convert_integer_to_int64( const fcml_st_integer *integer, fcml_int64_t *value ) { switch ( integer->size ) { case FCML_DS_8: *value = integer->is_signed ? (fcml_int64_t) integer->int8 : (fcml_int64_t) (fcml_uint8_t) integer->int8; break; case FCML_DS_16: *value = integer->is_signed ? (fcml_int64_t) integer->int16 : (fcml_int64_t) (fcml_uint16_t) integer->int16; break; case FCML_DS_32: *value = integer->is_signed ? (fcml_int64_t) integer->int32 : (fcml_int64_t) (fcml_uint32_t) integer->int32; break; case FCML_DS_64: *value = integer->int64; break; default: return FCML_CEH_GEC_VALUE_OUT_OF_RANGE; } return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_fn_utils_decode_integer( fcml_st_memory_stream *stream, fcml_st_integer *integer, fcml_usize size ) { fcml_bool result = FCML_FALSE; switch ( size ) { case FCML_DS_8: integer->int8 = fcml_fn_stream_read( stream, &result ); integer->size = FCML_DS_8; break; case FCML_DS_16: integer->int16 = fcml_fn_stream_read_word( stream, &result ); integer->size = FCML_DS_16; break; case FCML_DS_32: integer->int32 = fcml_fn_stream_read_dword( stream, &result ); integer->size = FCML_DS_32; break; case FCML_DS_64: integer->int64 = fcml_fn_stream_read_qword( stream, &result ); integer->size = FCML_DS_64; break; default: return FCML_CEH_GEC_INVALID_INPUT; } if ( !result ) { return FCML_CEH_GEC_EOF; } return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error fcml_fn_utils_encode_integer( fcml_st_memory_stream *stream, const fcml_st_integer *integer ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_bool result = FCML_FALSE; switch ( integer->size ) { case FCML_DS_8: result = fcml_fn_stream_write( stream, integer->int8 ); break; case FCML_DS_16: result = fcml_fn_stream_write_word( stream, integer->int16 ); break; case FCML_DS_32: result = fcml_fn_stream_write_dword( stream, integer->int32 ); break; case FCML_DS_64: result = fcml_fn_stream_write_qword( stream, integer->int64 ); break; } if ( !result ) { /* Insufficient stream size.*/ error = FCML_CEH_GEC_INVALID_INPUT; } return error; } fcml_ceh_error fcml_fn_utils_offset_to_integer( const fcml_st_offset *offset, fcml_st_integer *integer ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; integer->int64 = 0; switch ( offset->size ) { case FCML_DS_16: integer->int16 = offset->off16; integer->size = FCML_DS_16; break; case FCML_DS_32: integer->int32 = offset->off32; integer->size = FCML_DS_32; break; case FCML_DS_64: integer->int64 = offset->off64; integer->size = FCML_DS_64; break; default: error = FCML_CEH_GEC_INVALID_INPUT; break; } integer->is_signed = offset->is_signed; return error; } fcml_ceh_error fcml_fn_utils_integer_to_offset( const fcml_st_integer *integer, fcml_st_offset *offset ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; offset->off64 = 0; switch ( integer->size ) { case FCML_DS_8: offset->off16 = (fcml_uint16_t) integer->int8; offset->size = FCML_DS_16; break; case FCML_DS_16: offset->off16 = (fcml_uint16_t) integer->int16; offset->size = FCML_DS_16; break; case FCML_DS_32: offset->off32 = (fcml_uint32_t) integer->int32; offset->size = FCML_DS_32; break; case FCML_DS_64: offset->off64 = (fcml_uint64_t) integer->int64; offset->size = FCML_DS_64; break; default: error = FCML_CEH_GEC_INVALID_INPUT; break; } offset->is_signed = integer->is_signed; return error; } fcml_ceh_error fcml_fn_utils_extend_integer( fcml_st_integer *integer, fcml_usize extension ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if ( !integer->is_signed ) { fcml_uint64_t temp_int = 0; switch ( integer->size ) { case 8: temp_int = (fcml_uint8_t) integer->int8; break; case 16: temp_int = (fcml_uint16_t) integer->int16; break; case 32: temp_int = (fcml_uint32_t) integer->int32; break; case 64: temp_int = (fcml_uint64_t) integer->int64; break; default: error = FCML_CEH_GEC_INVALID_INPUT; break; } if ( !error ) { integer->int64 = 0; switch ( extension ) { case 8: integer->int8 = (fcml_uint8_t) temp_int; break; case 16: integer->int16 = (fcml_uint16_t) temp_int; break; case 32: integer->int32 = (fcml_uint32_t) temp_int; break; case 64: integer->int64 = (fcml_uint64_t) temp_int; break; } integer->size = extension; } } else { fcml_int64_t temp_int = 0; switch ( integer->size ) { case 8: temp_int = integer->int8; break; case 16: temp_int = integer->int16; break; case 32: temp_int = integer->int32; break; case 64: temp_int = integer->int64; break; default: error = FCML_CEH_GEC_INVALID_INPUT; break; } if ( !error ) { integer->int64 = 0; switch ( extension ) { case 8: integer->int8 = (fcml_int8_t) temp_int; break; case 16: integer->int16 = (fcml_int16_t) temp_int; break; case 32: integer->int32 = (fcml_int32_t) temp_int; break; case 64: integer->int64 = (fcml_int64_t) temp_int; break; } integer->size = extension; } return error; } return error; } fcml_bool fcml_fn_utils_is_reg_undef( const fcml_st_register *reg ) { return reg->type == FCML_REG_UNDEFINED; } fcml_ceh_error fcml_fn_utils_convert_map_error( fcml_int error ) { fcml_ceh_error ceh_error = FCML_CEH_GEC_NO_ERROR; switch ( error ) { case FCML_COLL_ERROR_NO_ERROR: ceh_error = FCML_CEH_GEC_NO_ERROR; break; case FCML_COLL_ERROR_OUT_OF_MEMORY: ceh_error = FCML_CEH_GEC_OUT_OF_MEMORY; break; case FCML_COLL_ERROR_BAD_ARGS: case FCML_COLL_ERROR_MAP_FULL: // Should never happened in case of FCML. FCML_TRACE_MSG( "Map reached its maximal size or something different related to map processing happened." ); ceh_error = FCML_CEH_GEC_INTERNAL_ERROR; break; } return ceh_error; } void fcml_fn_utils_convert_gec_to_error_info( fcml_bool enabled, fcml_st_ceh_error_container *error_container, fcml_ceh_error code ) { if ( enabled ) { // Prepare standard description of the error code, but only if there is no other error on the list. fcml_st_ceh_error_info *current = error_container->errors; while ( current ) { if ( current->level == FCML_EN_CEH_EL_ERROR ) { return; } current = current->next_error; } if ( !fcml_fn_ceh_add_error( error_container, fcml_fn_msg_get_message( (fcml_en_msg_message_code) code ), code, FCML_EN_CEH_EL_ERROR ) ) { FCML_TRACE_MSG( "Out of memory, can not allocate space for error info." ); } } } fcml_ceh_error fcml_fn_prepare_entry_point( fcml_st_entry_point *entry_point ) { /* Mode has to be set. */ if ( entry_point->op_mode != FCML_OM_16_BIT && entry_point->op_mode != FCML_OM_32_BIT && entry_point->op_mode != FCML_OM_64_BIT ) { return FCML_CEH_GEC_INVALID_OPERATING_MODE; } /* 16 bit address size attribute is not supported in 64bit mode. */ if ( entry_point->op_mode == FCML_OM_64_BIT && entry_point->address_size_attribute == FCML_DS_16 ) { return FCML_CEH_GEC_INVALID_ADDRESS_SIZE; } /* Check if attributes are valid and set them to default values. */ if ( !entry_point->address_size_attribute ) { switch ( entry_point->op_mode ) { case FCML_OM_16_BIT: entry_point->address_size_attribute = FCML_DS_16; break; case FCML_OM_32_BIT: entry_point->address_size_attribute = FCML_DS_32; break; case FCML_OM_64_BIT: entry_point->address_size_attribute = FCML_DS_64; break; } } if ( !entry_point->operand_size_attribute ) { switch ( entry_point->op_mode ) { case FCML_OM_16_BIT: entry_point->operand_size_attribute = FCML_DS_16; break; case FCML_OM_32_BIT: entry_point->operand_size_attribute = FCML_DS_32; break; case FCML_OM_64_BIT: entry_point->operand_size_attribute = FCML_DS_32; break; } } /* Check if ASA is value.*/ fcml_usize asa = entry_point->address_size_attribute; if ( asa != FCML_DS_16 && asa != FCML_DS_32 && asa != FCML_DS_64 ) { return FCML_CEH_GEC_INVALID_ADDRESS_SIZE; } /* Check if OSA is value.*/ fcml_usize osa = entry_point->operand_size_attribute; if ( osa != FCML_DS_16 && osa != FCML_DS_32 && osa != FCML_DS_64 ) { return FCML_CEH_GEC_INVALID_OPPERAND_SIZE; } return FCML_CEH_GEC_NO_ERROR; } fcml_bool fcml_fn_utils_is_displacement_negative( const fcml_st_integer *displacement ) { if ( !displacement->is_signed ) { return FCML_FALSE; } switch ( displacement->size ) { case FCML_DS_8: return displacement->int8 < 0; case FCML_DS_16: return displacement->int16 < 0; case FCML_DS_32: return displacement->int32 < 0; case FCML_DS_64: return displacement->int64 < 0; default: return FCML_FALSE; } } fcml-1.1.1/src/fcml_def.c0000644000175000017500000172210012560745216012061 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_def.h" struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_AAA[] = { { FCML_AMT_GPI, 0x0000, 0x00440000, { 0x37, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_NO_OPERANS, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_AAD[] = { { FCML_AMT_GPI, 0x0000, 0x00580000, { 0xD5, 0x0A, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_NO_OPERANS, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00440000, { 0xD5, 0x00, 0x00 }, { FCML_OP_IB | FCML_OA_RW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_IMM8, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_AAM[] = { { FCML_AMT_GPI, 0x0000, 0x00580000, { 0xD4, 0x0A, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_NO_OPERANS, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00440000, { 0xD4, 0x00, 0x00 }, { FCML_OP_IB | FCML_OA_RW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_IMM8, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_AAS[] = { { FCML_AMT_GPI, 0x0000, 0x00440000, { 0x3F, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_NO_OPERANS, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ADC[] = { { FCML_AMT_GPI, 0x0000, 0x00C40002, { 0x14, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_BYTE ) | FCML_OA_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ER8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40002, { 0x15, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_EOSA ) | FCML_OA_RW, FCML_OP_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ERO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C59006, { 0x80, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C59006, { 0x81, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C59006, { 0x83, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_IB_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C48002, { 0x10, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_8_RW, FCML_OP_MODRM_R_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_R8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C48002, { 0x11, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_RW, FCML_OP_MODRM_R, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_RO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48002, { 0x12, 0x00, 0x00 }, { FCML_OP_MODRM_R_8_RW, FCML_OP_MODRM_RM_OP_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R8_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48002, { 0x13, 0x00, 0x00 }, { FCML_OP_MODRM_R_RW, FCML_OP_MODRM_RM_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ADD[] = { { FCML_AMT_GPI, 0x0000, 0x00C40002, { 0x04, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_BYTE ) | FCML_OA_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ER8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40002, { 0x05, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_EOSA ) | FCML_OA_RW, FCML_OP_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ERO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C58006, { 0x80, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C58006, { 0x81, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C58006, { 0x83, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_IB_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C48002, { 0x00, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_OP_MODRM_R_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_R8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C48002, { 0x01, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_MODRM_R, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_RO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48002, { 0x02, 0x00, 0x00 }, { FCML_OP_MODRM_R_8_RW, FCML_OP_MODRM_RM_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R8_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48002, { 0x03, 0x00, 0x00 }, { FCML_OP_MODRM_R_RW, FCML_OP_MODRM_RM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ADDPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x58, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VADDPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x58, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ADDPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x58, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VADDPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x58, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ADDSD[] = { { FCML_AMT_SSE2_SIMD, 0x2000, 0x00D88000, { 0x0F, 0x58, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VADDSD[] = { { FCML_AMT_AVX_SIMD, 0x20C0, 0x00D88000, { 0x0F, 0x58, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ADDSS[] = { { FCML_AMT_SSE_SIMD, 0x4000, 0x00D88000, { 0x0F, 0x58, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VADDSS[] = { { FCML_AMT_AVX_SIMD, 0x40C0, 0x00D88000, { 0x0F, 0x58, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ADDSUBPD[] = { { FCML_AMT_SSE3_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xD0, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VADDSUBPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0xD0, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ADDSUBPS[] = { { FCML_AMT_SSE3_SIMD, 0x2000, 0x00D88000, { 0x0F, 0xD0, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VADDSUBPS[] = { { FCML_AMT_AVX_SIMD, 0x2080, 0x00D88000, { 0x0F, 0xD0, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_AESDEC[] = { { FCML_AMT_AES, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0xDE }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VAESDEC[] = { { FCML_AMT_AVX | FCML_AMT_AES, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0xDE }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_AESDECLAST[] = { { FCML_AMT_AES, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0xDF }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VAESDECLAST[] = { { FCML_AMT_AVX | FCML_AMT_AES, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0xDF }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_AESENC[] = { { FCML_AMT_AES, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0xDC }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VAESENC[] = { { FCML_AMT_AVX | FCML_AMT_AES, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0xDC }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_AESENCLAST[] = { { FCML_AMT_AES, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0xDD }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VAESENCLAST[] = { { FCML_AMT_AVX | FCML_AMT_AES, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0xDD }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_AESIMC[] = { { FCML_AMT_AES, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0xDB }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VAESIMC[] = { { FCML_AMT_AVX | FCML_AMT_AES, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0xDB }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_AESKEYGENASSIST[] = { { FCML_AMT_AES, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0xDF }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VAESKEYGENASSIST[] = { { FCML_AMT_AVX | FCML_AMT_AES, 0x10C0, 0x00EC8000, { 0x0F, 0x3A, 0xDF }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_AND[] = { { FCML_AMT_GPI, 0x0000, 0x00C40002, { 0x24, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_BYTE ) | FCML_OA_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ER8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40002, { 0x25, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_EOSA ) | FCML_OA_RW, FCML_OP_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ERO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C5A006, { 0x80, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C5A006, { 0x81, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C5A006, { 0x83, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_IB_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C48002, { 0x20, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_8_RW, FCML_OP_MODRM_R_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_R8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C48002, { 0x21, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_RW, FCML_OP_MODRM_R, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_RO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48002, { 0x22, 0x00, 0x00 }, { FCML_OP_MODRM_R_8_RW, FCML_OP_MODRM_RM_OP_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R8_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48002, { 0x23, 0x00, 0x00 }, { FCML_OP_MODRM_R_RW, FCML_OP_MODRM_RM_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ANDPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x54, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VANDPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x54, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ANDPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x54, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VANDPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x54, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ANDNPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x55, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VANDNPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x55, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ANDNPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x55, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VANDNPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x55, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ARPL[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00448000, { 0x63, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_16_W, FCML_OP_MODRM_R_16, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BLENDPD[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0x0D }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VBLENDPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00EC8000, { 0x0F, 0x3A, 0x0D }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BLENDPS[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0x0C }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VBLENDPS[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00EC8000, { 0x0F, 0x3A, 0x0C }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BLENDVPD[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x15 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_EXPLICIT_REG( FCML_REG_SIMD, FCML_REG_XMM0, FCML_EOS_XWORD ), FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VBLENDVPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00EC8000, { 0x0F, 0x3A, 0x4B }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BLENDVPS[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x14 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_EXPLICIT_REG( FCML_REG_SIMD, FCML_REG_XMM0, FCML_EOS_XWORD ), FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VBLENDVPS[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00EC8000, { 0x0F, 0x3A, 0x4A }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BOUND[] = { { FCML_AMT_GPI | FCML_AMT_CTI, 0x0000, 0x00448000, { 0x62, 0x00, 0x00 }, { FCML_OP_MODRM_R, FCML_OP_MODRM_MM_OP_OSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BSF[] = { { FCML_AMT_GPI, 0x0000, 0x00D88000, { 0x0F, 0xBC, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_RM_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BSR[] = { { FCML_AMT_GPI, 0x0000, 0x00D88000, { 0x0F, 0xBC, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_RM_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BSWAP[] = { { FCML_AMT_GPI, 0x0010, 0x03D80001, { 0x0F, 0xC8, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_GPR, FCML_EOS_DWORD ) | FCML_OA_RW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0008, 0x04980001, { 0x0F, 0xC8, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_GPR, FCML_EOS_QWORD ) | FCML_OA_RW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BT[] = { { FCML_AMT_GPI, 0x0000, 0x00D88000, { 0x0F, 0xA3, 0x00 }, { FCML_OP_MODRM_RM_OP, FCML_OP_MODRM_R, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_RO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00D9A000, { 0x0F, 0xBA, 0x00 }, { FCML_OP_MODRM_RM, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMM8, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BTC[] = { { FCML_AMT_GPI, 0x0807, 0x00D88000, { 0x0F, 0xBB, 0x00 }, { FCML_OP_MODRM_RM_OP, FCML_OP_MODRM_R, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_RO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00D9B800, { 0x0F, 0xBA, 0x00 }, { FCML_OP_MODRM_RM, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMM8, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BTR[] = { { FCML_AMT_GPI, 0x0807, 0x00D88000, { 0x0F, 0xB3, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_MODRM_R, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_RO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00D9B000, { 0x0F, 0xBA, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMM8, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BTS[] = { { FCML_AMT_GPI, 0x0807, 0x00D88000, { 0x0F, 0xAB, 0x00 }, { FCML_OP_MODRM_RM_OP_RW, FCML_OP_MODRM_R, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_RO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00D9A800, { 0x0F, 0xBA, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMM8, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CALL[] = { { FCML_AMT_GPI | FCML_AMT_CTI | FCML_AMT_BRANCH, 0x0000, 0x40C40000, { 0xE8, 0x00, 0x00 }, { FCML_OP_IMMEDIATE_DIS_RELATIVE_EOSA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_REL0, FCML_HINT_DIRECT_POINTER | FCML_HINT_NEAR_POINTER }, { FCML_AMT_GPI | FCML_AMT_CTI | FCML_AMT_BRANCH, 0x0000, 0x40C59000, { 0xFF, 0x00, 0x00 }, { FCML_OP_MODRM_RM_I, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NEAR_POINTER | FCML_HINT_INDIRECT_POINTER }, { FCML_AMT_GPI | FCML_AMT_CTI | FCML_AMT_BRANCH, 0x0000, 0x00440000, { 0x9A, 0x00, 0x00 }, { FCML_OP_FAR_POINTER, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_PTR16_O, FCML_HINT_FAR_POINTER | FCML_HINT_DIRECT_POINTER }, { FCML_AMT_GPI | FCML_AMT_CTI | FCML_AMT_BRANCH, 0x0000, 0x00C59800, { 0xFF, 0x00, 0x00 }, { FCML_OP_MODRM_M_FPI, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M16_O, FCML_HINT_INDIRECT_POINTER | FCML_HINT_FAR_POINTER } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CBW[] = { { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0x98, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CLC[] = { { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0xF8, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CLD[] = { { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0xFC, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CLFLUSH[] = { { FCML_AMT_SSE2, 0x0000, 0x00D9B800, { 0x0F, 0xAE, 0x00 }, { FCML_OP_MODRM_M_OP_8_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CLI[] = { { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0xFA, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CLGI[] = { { FCML_AMT_SVM, 0x0000, 0x00EC0000, { 0x0F, 0x01, 0xDD }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CLTS[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D80000, { 0x0F, 0x06, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CMC[] = { { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0xF5, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CMOV[] = { { FCML_AMT_EDX | FCML_AMT_GPI, 0x0000, 0x00D88040, { 0x0F, 0x40, 0x00 }, { FCML_OP_MODRM_R_RW, FCML_OP_MODRM_RM_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_JCXZ[] = { { FCML_AMT_GPI, 0x0000, 0x40C40000, { 0xE3, 0x00, 0x00 }, { FCML_OP_IMMEDIATE_DIS_RELATIVE_R_8, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_JCC[] = { { FCML_AMT_GPI | FCML_AMT_CTI | FCML_AMT_BRANCH, 0x0000, 0x40C40040, { 0x70, 0x00, 0x00 }, { FCML_OP_IMMEDIATE_DIS_RELATIVE_R_8, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI | FCML_AMT_CTI | FCML_AMT_BRANCH, 0x0000, 0x40D80040, { 0x0F, 0x80, 0x00 }, { FCML_OP_IMMEDIATE_DIS_RELATIVE_EOSA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_JMP[] = { { FCML_AMT_GPI | FCML_AMT_CTI | FCML_AMT_BRANCH, 0x0000, 0x40C40000, { 0xEB, 0x00, 0x00 }, { FCML_OP_IMMEDIATE_DIS_RELATIVE_R_8, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_REL8, FCML_HINT_DIRECT_POINTER | FCML_HINT_NEAR_POINTER }, { FCML_AMT_GPI | FCML_AMT_CTI | FCML_AMT_BRANCH, 0x0000, 0x40C40000, { 0xE9, 0x00, 0x00 }, { FCML_OP_IMMEDIATE_DIS_RELATIVE_EOSA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_REL0, FCML_HINT_DIRECT_POINTER | FCML_HINT_NEAR_POINTER }, { FCML_AMT_GPI | FCML_AMT_CTI | FCML_AMT_BRANCH, 0x0000, 0x40C5A000, { 0xFF, 0x00, 0x00 }, { FCML_OP_MODRM_RM_I, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NEAR_POINTER | FCML_HINT_INDIRECT_POINTER }, { FCML_AMT_GPI | FCML_AMT_CTI | FCML_AMT_BRANCH, 0x0000, 0x00440000, { 0xEA, 0x00, 0x00 }, { FCML_OP_FAR_POINTER, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_PTR16_O, FCML_HINT_FAR_POINTER | FCML_HINT_DIRECT_POINTER }, { FCML_AMT_GPI | FCML_AMT_CTI | FCML_AMT_BRANCH, 0x0000, 0x00C5A800, { 0xFF, 0x00, 0x00 }, { FCML_OP_MODRM_M_FPI, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M16_O, FCML_HINT_INDIRECT_POINTER | FCML_HINT_FAR_POINTER } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CMP[] = { { FCML_AMT_GPI, 0x0000, 0x00C40002, { 0x3C, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_BYTE ) | FCML_OA_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ER8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40002, { 0x3D, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_EOSA ) | FCML_OA_RW, FCML_OP_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ERO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5B806, { 0x80, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5B806, { 0x81, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5B806, { 0x83, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_IB_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48002, { 0x38, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_8_RW, FCML_OP_MODRM_R_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_R8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48002, { 0x39, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_RW, FCML_OP_MODRM_R, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_RO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48002, { 0x3A, 0x00, 0x00 }, { FCML_OP_MODRM_R_8_RW, FCML_OP_MODRM_RM_OP_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R8_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48002, { 0x3B, 0x00, 0x00 }, { FCML_OP_MODRM_R_RW, FCML_OP_MODRM_RM_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CMPPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xC2, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCMPPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0xC2, 0x0C }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CMPPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xC2, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCMPPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0xC2, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CMPS[] = { { FCML_AMT_GPI, 0x0002, 0x00C40000, { 0xA6, 0x00, 0x00 }, { FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_SI, FCML_EOS_BYTE, FCML_SEG_ENCODE_REGISTER( FCML_REG_DS, FCML_SEG_ALLOW_OVERRIDE ) ), FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_DI, FCML_EOS_BYTE, FCML_SEG_ENCODE_REGISTER( FCML_REG_ES, FCML_SEG_DENY_OVERRIDE ) ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M8_M8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0002, 0x00C40000, { 0xA7, 0x00, 0x00 }, { FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_SI, FCML_EOS_EOSA, FCML_SEG_ENCODE_REGISTER( FCML_REG_DS, FCML_SEG_ALLOW_OVERRIDE ) ), FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_DI, FCML_EOS_EOSA, FCML_SEG_ENCODE_REGISTER( FCML_REG_ES, FCML_SEG_DENY_OVERRIDE ) ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_MO_MO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CMPSD[] = { { FCML_AMT_SSE2_SIMD, 0x2000, 0x00D88000, { 0x0F, 0xC2, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_64, FCML_OP_PSEUDO_OP( 0x07 ), FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCMPSD[] = { { FCML_AMT_AVX_SIMD, 0x20C0, 0x00D88000, { 0x0F, 0xC2, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_OP_PSEUDO_OP( 0x1F ), FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CMPSS[] = { { FCML_AMT_SSE_SIMD, 0x4000, 0x00DA8000, { 0x0F, 0xC2, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_32, FCML_OP_PSEUDO_OP( 0x07 ), FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCMPSS[] = { { FCML_AMT_AVX_SIMD, 0x40C0, 0x00DA8000, { 0x0F, 0xC2, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_OP_PSEUDO_OP( 0x1F ), FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CMPXCHG[] = { { FCML_AMT_GPI, 0x0807, 0x00D88000, { 0x0F, 0xB0, 0x00 }, { FCML_OP_MODRM_RM_OP_8_RW, FCML_OP_MODRM_R_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_R8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00D88000, { 0x0F, 0xB1, 0x00 }, { FCML_OP_MODRM_RM_OP_RW, FCML_OP_MODRM_R, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_RO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CMPXCHGXB[] = { { FCML_AMT_GPI, 0x0807, 0x03D98800, { 0x0F, 0xC7, 0x00 }, { FCML_OP_MODRM_M_OP_64_RW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M64, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0001, 0x04998800, { 0x0F, 0xC7, 0x00 }, { FCML_OP_MODRM_M_OP_128_RW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M128, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_COMISD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x2F, 0x00 }, { FCML_OP_MODRM_R_XMM, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCOMISD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x2F, 0x00 }, { FCML_OP_MODRM_R_XMM, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_COMISS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x2F, 0x00 }, { FCML_OP_MODRM_R_XMM, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCOMISS[] = { { FCML_AMT_AVX_SIMD, 0x00C0, 0x00D88000, { 0x0F, 0x2F, 0x00 }, { FCML_OP_MODRM_R_XMM, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CPUID[] = { { FCML_AMT_GPI, 0x0000, 0x00D80000, { 0x0F, 0xA2, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CRC32[] = { { FCML_AMT_SSE42, 0x2010, 0x03EC8000, { 0x0F, 0x38, 0xF0 }, { FCML_OP_MODRM_R_32_RW, FCML_OP_MODRM_RM_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE42, 0x2008, 0x04AC8000, { 0x0F, 0x38, 0xF0 }, { FCML_OP_MODRM_R_64_RW, FCML_OP_MODRM_RM_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE42, 0x2010, 0x03EC8000, { 0x0F, 0x38, 0xF1 }, { FCML_OP_MODRM_R_32_RW, FCML_OP_MODRM_RM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE42, 0x2008, 0x04AC8000, { 0x0F, 0x38, 0xF1 }, { FCML_OP_MODRM_R_64_RW, FCML_OP_MODRM_RM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTDQ2PD[] = { { FCML_AMT_SSE2_SIMD, 0x4000, 0x00D88000, { 0x0F, 0xE6, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCVTDQ2PD[] = { { FCML_AMT_AVX_SIMD, 0x40C0, 0x00D88000, { 0x0F, 0xE6, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x40A0, 0x00D88000, { 0x0F, 0xE6, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTDQ2PS[] = { { FCML_AMT_SSE2_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x5B, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCVTDQ2PS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x5B, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTPD2DQ[] = { { FCML_AMT_SSE2_SIMD, 0x2000, 0x00D88000, { 0x0F, 0xE6, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCVTPD2DQ[] = { { FCML_AMT_AVX_SIMD, 0x2080, 0x00D88000, { 0x0F, 0xE6, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTPD2PI[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x2D, 0x00 }, { FCML_OP_MODRM_R_MMX_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTPD2PS[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x5A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCVTPD2PS[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, {0x0F, 0x5A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTPI2PD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x2A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTPI2PS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x2A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTPS2DQ[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x5B, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCVTPS2DQ[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x5B, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTPS2PD[] = { { FCML_AMT_SSE2_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x5A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCVTPS2PD[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x5A, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTPS2PI[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x2D, 0x00 }, { FCML_OP_MODRM_R_MMX_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTSD2SI[] = { { FCML_AMT_SSE2_SIMD, 0x2010, 0x03D88000, { 0x0F, 0x2D, 0x00 }, { FCML_OP_MODRM_R_32_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x2008, 0x04988000, { 0x0F, 0x2D, 0x00 }, { FCML_OP_MODRM_R_64_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCVTSD2SI[] = { { FCML_AMT_AVX_SIMD, 0x20D0, 0x03D88000, { 0x0F, 0x2D, 0x00 }, { FCML_OP_MODRM_R_32_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x20C8, 0x04988000, { 0x0F, 0x2D, 0x00 }, { FCML_OP_MODRM_R_64_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTSD2SS[] = { { FCML_AMT_SSE2_SIMD, 0x2000, 0x00D88000, { 0x0F, 0x5A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCVTSD2SS[] = { { FCML_AMT_AVX_SIMD, 0x20C0, 0x00D88000, { 0x0F, 0x5A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTSI2SD[] = { { FCML_AMT_SSE2_SIMD, 0x2000, 0x03D88000, { 0x0F, 0x2A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RX_RM32, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x2008, 0x04988000, { 0x0F, 0x2A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RX_RM64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCVTSI2SD[] = { { FCML_AMT_AVX_SIMD, 0x20D0, 0x03D88000, { 0x0F, 0x2A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_32, FCML_NA, FCML_NA }, FCML_AM_RX_RX_RM32, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x20C8, 0x04988000, { 0x0F, 0x2A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_64, FCML_NA, FCML_NA }, FCML_AM_RX_RX_RM64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTSI2SS[] = { { FCML_AMT_SSE_SIMD, 0x4010, 0x03D88000, { 0x0F, 0x2A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RX_RM32, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE_SIMD, 0x4008, 0x04988000, { 0x0F, 0x2A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RX_RM64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCVTSI2SS[] = { { FCML_AMT_AVX_SIMD, 0x40D0, 0x03D88000, { 0x0F, 0x2A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_32, FCML_NA, FCML_NA }, FCML_AM_RX_RX_RM32, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x40C8, 0x04988000, { 0x0F, 0x2A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_64, FCML_NA, FCML_NA }, FCML_AM_RX_RX_RM64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTSS2SD[] = { { FCML_AMT_SSE2_SIMD, 0x4000, 0x00D88000, { 0x0F, 0x5A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCVTSS2SD[] = { { FCML_AMT_AVX_SIMD, 0x40C0, 0x00D88000, { 0x0F, 0x5A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTSS2SI[] = { { FCML_AMT_SSE_SIMD, 0x4010, 0x03D88000, { 0x0F, 0x2D, 0x00 }, { FCML_OP_MODRM_R_32_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE_SIMD, 0x4008, 0x04988000, { 0x0F, 0x2D, 0x00 }, { FCML_OP_MODRM_R_64_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCVTSS2SI[] = { { FCML_AMT_AVX_SIMD, 0x40D0, 0x03D88000, { 0x0F, 0x2D, 0x00 }, { FCML_OP_MODRM_R_32_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x40C8, 0x04988000, { 0x0F, 0x2D, 0x00 }, { FCML_OP_MODRM_R_64_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTTPD2DQ[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xE6, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCVTTPD2DQ[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0xE6, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_SIMD_L, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTTPD2PI[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x2C, 0x00 }, { FCML_OP_MODRM_R_MMX_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTTPS2DQ[] = { { FCML_AMT_SSE2_SIMD, 0x4000, 0x00D88000, { 0x0F, 0x5B, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCVTTPS2DQ[] = { { FCML_AMT_AVX_SIMD, 0x4080, 0x00D88000, { 0x0F, 0x5B, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTTPS2PI[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x2C, 0x00 }, { FCML_OP_MODRM_R_MMX_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTTSD2SI[] = { { FCML_AMT_SSE2_SIMD, 0x2000, 0x03D88000, { 0x0F, 0x2C, 0x00 }, { FCML_OP_MODRM_R_32_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R32_RXM64, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x2008, 0x04988000, { 0x0F, 0x2C, 0x00 }, { FCML_OP_MODRM_R_64_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R64_RXM64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCVTTSD2SI[] = { { FCML_AMT_AVX_SIMD, 0x20D0, 0x03D88000, { 0x0F, 0x2C, 0x00 }, { FCML_OP_MODRM_R_32_W, FCML_OP_MODRM_RM_SIMD_L_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R32_RXM64, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x20C8, 0x04988000, { 0x0F, 0x2C, 0x00 }, { FCML_OP_MODRM_R_64_W, FCML_OP_MODRM_RM_SIMD_L_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R64_RXM64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CVTTSS2SI[] = { { FCML_AMT_SSE_SIMD, 0x4010, 0x03D88000, { 0x0F, 0x2C, 0x00 }, { FCML_OP_MODRM_R_32_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE_SIMD, 0x4008, 0x04988000, { 0x0F, 0x2C, 0x00 }, { FCML_OP_MODRM_R_64_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCVTTSS2SI[] = { { FCML_AMT_AVX_SIMD, 0x4390, 0x03D88000, { 0x0F, 0x2C, 0x00 }, { FCML_OP_MODRM_R_32_W, FCML_OP_MODRM_RM_SIMD_L_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x4388, 0x04988000, { 0x0F, 0x2C, 0x00 }, { FCML_OP_MODRM_R_64_W, FCML_OP_MODRM_RM_SIMD_L_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CWD_CDQ_CQO[] = { { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0x99, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_DAA[] = { { FCML_AMT_GPI, 0x0000, 0x00440000, { 0x27, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_DAS[] = { { FCML_AMT_GPI, 0x0000, 0x00440000, { 0x2F, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_DEC[] = { { FCML_AMT_GPI, 0x0807, 0x00C58800, { 0xFE, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C58800, { 0xFF, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00440001, { 0x48, 0x00, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_GPR, FCML_EOS_EOSA ) | FCML_OA_RW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_DIV[] = { { FCML_AMT_GPI, 0x0000, 0x00C5B000, { 0xF6, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_WORD ), FCML_OP_MODRM_RM_8_W, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R16_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5B000, { 0xF7, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AX, FCML_EOS_EOSA ), FCML_OP_MODRM_RM_W, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_DIVPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x5E, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VDIVPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x5E, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_DIVPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x5E, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VDIVPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x5E, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_DIVSD[] = { { FCML_AMT_SSE2_SIMD, 0x2000, 0x00D88000, { 0x0F, 0x5E, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VDIVSD[] = { { FCML_AMT_AVX_SIMD, 0x20C0, 0x00D88000, { 0x0F, 0x5E, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_DIVSS[] = { { FCML_AMT_SSE_SIMD, 0x4000, 0x00D88000, { 0x0F, 0x5E, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VDIVSS[] = { { FCML_AMT_AVX_SIMD, 0x40C0, 0x00D88000, { 0x0F, 0x5E, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_DPPD[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0x41 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VDPPD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x3A, 0x41 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_DPPS[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0x40 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VDPPS[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00EC8000, { 0x0F, 0x3A, 0x40 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_EMMS[] = { { FCML_AMT_MMX, 0x0000, 0x00D80000, { 0x0F, 0x77, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ENTER[] = { { FCML_AMT_GPI | FCML_AMT_CTI, 0x0000, 0x00C40000, { 0xC8, 0x00, 0x00 }, { FCML_OP_IW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_EXTRACTPS[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0x17 }, { FCML_OP_MODRM_RM_OP_32_W, FCML_OP_MODRM_R_XMM, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VEXTRACTPS[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x3A, 0x17 }, { FCML_OP_MODRM_RM_OP_32_W, FCML_OP_MODRM_R_XMM, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_EXTRQ[] = { { FCML_AMT_SSE4A, 0x1000, 0x00D98000, { 0x0F, 0x78, 0x00 }, { FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_RW, FCML_OP_IB, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE4A, 0x1000, 0x00D88000, { 0x0F, 0x79, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_F2XM1[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xF0, 0x17 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FABS[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xE1, 0x17 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FADD[] = { { FCML_AMT_FPU, 0x0000, 0x00C58000, { 0xD8, 0x00, 0x00 }, { FCML_OP_MODRM_M_32, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C58000, { 0xDC, 0x00, 0x00 }, { FCML_OP_MODRM_M_64, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M64, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xD8, 0xC0, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST0_ST, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDC, 0xC0, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST_ST0, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FIADD[] = { { FCML_AMT_FPU, 0x0000, 0x00C58000, { 0xDA, 0x00, 0x00 }, { FCML_OP_MODRM_M_32, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C58000, { 0xDE, 0x00, 0x00 }, { FCML_OP_MODRM_M_16, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FADDP[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDE, 0xC0, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xDE, 0xC1, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FBLD[] = { { FCML_AMT_FPU, 0x0000, 0x00C5A000, { 0xDF, 0x00, 0x00 }, { FCML_OP_MODRM_M_OP_80, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FBSTP[] = { { FCML_AMT_FPU, 0x0000, 0x00C5B000, { 0xDF, 0x00, 0x00 }, { FCML_OP_MODRM_M_OP_80, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FCHS[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xE0, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FCLEX[] = { { FCML_AMT_FPU, 0x0000, 0x00EC0000, { 0x9B, 0xDB, 0xE2 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FNCLEX[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xDB, 0xE2, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FCMOVB[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDA, 0xC0, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FCMOVE[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDA, 0xC8, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FCMOVBE[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDA, 0xD0, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FCMOVU[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDA, 0xD8, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FCMOVNB[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDB, 0xC0, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FCMOVNE[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDB, 0xC8, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FCMOVNBE[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDB, 0xD0, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FCMOVNU[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDB, 0xD8, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FCOM[] = { { FCML_AMT_FPU, 0x0000, 0x00C59000, { 0xD8, 0x00, 0x00 }, { FCML_OP_MODRM_M_32, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C59000, { 0xDC, 0x00, 0x00 }, { FCML_OP_MODRM_M_64, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M64, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xD8, 0xD0, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD8, 0xD1, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FCOMP[] = { { FCML_AMT_FPU, 0x0000, 0x00C59800, { 0xD8, 0x00, 0x00 }, { FCML_OP_MODRM_M_32, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C59800, { 0xDC, 0x00, 0x00 }, { FCML_OP_MODRM_M_64, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M64, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xD8, 0xD8, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD8, 0xD9, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FCOMPP[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xDE, 0xD9, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FCOMI[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDB, 0xF0, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FCOMIP[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDF, 0xF0, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FUCOMI[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDB, 0xE8, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FUCOMIP[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDF, 0xE8, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FCOS[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xFF, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FDECSTP[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xF6, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FDIV[] = { { FCML_AMT_FPU, 0x0000, 0x00C5B000, { 0xD8, 0x00, 0x00 }, { FCML_OP_MODRM_M_32, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C5B000, { 0xDC, 0x00, 0x00 }, { FCML_OP_MODRM_M_64, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M64, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xD8, 0xF0, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST0_ST, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDC, 0xF8, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST_ST0, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FDIVP[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDE, 0xF8, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST_ST0, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xDE, 0xF9, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FIDIV[] = { { FCML_AMT_FPU, 0x0000, 0x00C5B000, { 0xDA, 0x00, 0x00 }, { FCML_OP_MODRM_M_32, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C5B000, { 0xDE, 0x00, 0x00 }, { FCML_OP_MODRM_M_16, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M16, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FDIVR[] = { { FCML_AMT_FPU, 0x0000, 0x00C5B800, { 0xD8, 0x00, 0x00 }, { FCML_OP_MODRM_M_32, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C5B800, { 0xDC, 0x00, 0x00 }, { FCML_OP_MODRM_M_64, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M64, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xD8, 0xF8, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST0_ST, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDC, 0xF0, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST_ST0, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FDIVRP[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDE, 0xF0, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST_ST0, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xDE, 0xF1, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FIDIVR[] = { { FCML_AMT_FPU, 0x0000, 0x00C5B800, { 0xDA, 0x00, 0x00 }, { FCML_OP_MODRM_M_32, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C5B800, { 0xDE, 0x00, 0x00 }, { FCML_OP_MODRM_M_16, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M16, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FFREE[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDD, 0xC0, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FICOM[] = { { FCML_AMT_FPU, 0x0000, 0x00C59000, { 0xDE, 0x00, 0x00 }, { FCML_OP_MODRM_M_16, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M16, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C59000, { 0xDA, 0x00, 0x00 }, { FCML_OP_MODRM_M_32, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FICOMP[] = { { FCML_AMT_FPU, 0x0000, 0x00C59800, { 0xDE, 0x00, 0x00 }, { FCML_OP_MODRM_M_16, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M16, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C59800, { 0xDA, 0x00, 0x00 }, { FCML_OP_MODRM_M_32, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FILD[] = { { FCML_AMT_FPU, 0x0000, 0x00C58000, { 0xDF, 0x00, 0x00 }, { FCML_OP_MODRM_M_16, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M16, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C58000, { 0xDB, 0x00, 0x00 }, { FCML_OP_MODRM_M_32, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C5A800, { 0xDF, 0x00, 0x00 }, { FCML_OP_MODRM_M_64, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FINCSTP[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xF7, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FINIT[] = { { FCML_AMT_FPU, 0x0000, 0x00EC0000, { 0x9B, 0xDB, 0xE3 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FNINIT[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xDB, 0xE3, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FIST[] = { { FCML_AMT_FPU, 0x0000, 0x00C59000, { 0xDF, 0x00, 0x00 }, { FCML_OP_MODRM_M_16_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M16, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C59000, { 0xDB, 0x00, 0x00 }, { FCML_OP_MODRM_M_32_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FISTP[] = { { FCML_AMT_FPU, 0x0000, 0x00C59800, { 0xDF, 0x00, 0x00 }, { FCML_OP_MODRM_M_16_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M16, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C59800, { 0xDB, 0x00, 0x00 }, { FCML_OP_MODRM_M_32_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C5B800, { 0xDF, 0x00, 0x00 }, { FCML_OP_MODRM_M_64_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FISTTP[] = { { FCML_AMT_SSE3 | FCML_AMT_FPU, 0x0000, 0x00C58800, { 0xDF, 0x00, 0x00 }, { FCML_OP_MODRM_M_16_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE3 | FCML_AMT_FPU, 0x0000, 0x00C58800, { 0xDB, 0x00, 0x00 }, { FCML_OP_MODRM_M_32_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE3 | FCML_AMT_FPU, 0x0000, 0x00C58800, { 0xDD, 0x00, 0x00 }, { FCML_OP_MODRM_M_64_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FLD[] = { { FCML_AMT_FPU, 0x0000, 0x00C58000, { 0xD9, 0x00, 0x00 }, { FCML_OP_MODRM_M_32, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C58000, { 0xDD, 0x00, 0x00 }, { FCML_OP_MODRM_M_64, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M64, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C5A800, { 0xDB, 0x00, 0x00 }, { FCML_OP_MODRM_M_80, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M80, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xD9, 0xC0, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FLD1[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xE8, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FLDL2T[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xE9, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FLDL2E[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xEA, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FLDPI[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xEB, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FLDLG2[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xEC, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FLDLN2[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xED, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FLDZ[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xEE, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FLDCW[] = { { FCML_AMT_FPU, 0x0000, 0x00C5A800, { 0xD9, 0x00, 0x00 }, { FCML_OP_MODRM_M_OP_16, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FLDENV[] = { { FCML_AMT_FPU, 0x0000, 0x00C5A000, { 0xD9, 0x00, 0x00 }, { FCML_OP_MODRM_M_14_28, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FMUL[] = { { FCML_AMT_FPU, 0x0000, 0x00C58800, { 0xD8, 0x00, 0x00 }, { FCML_OP_MODRM_M_32, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C58800, { 0xDC, 0x00, 0x00 }, { FCML_OP_MODRM_M_64, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M64, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xD8, 0xC8, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST0_ST, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDC, 0xC8, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST_ST0, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FMULP[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDE, 0xC8, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST_ST0, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xDE, 0xC9, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FIMUL[] = { { FCML_AMT_FPU, 0x0000, 0x00C58800, { 0xDA, 0x00, 0x00 }, { FCML_OP_MODRM_M_32, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C58800, { 0xDE, 0x00, 0x00 }, { FCML_OP_MODRM_M_16, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M16, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FNOP[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xD0, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FPATAN[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xF3, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FPREM[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xF8, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FPREM1[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xF5, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FPTAN[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xF2, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FRNDINT[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xFC, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FRSTOR[] = { { FCML_AMT_FPU, 0x0000, 0x00C5A000, { 0xDD, 0x00, 0x00 }, { FCML_OP_MODRM_M_94_108, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FSAVE[] = { { FCML_AMT_FPU, 0x0000, 0x00D9B000, { 0x9B, 0xDD, 0x00 }, { FCML_OP_MODRM_M_94_108_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FNSAVE[] = { { FCML_AMT_FPU, 0x0000, 0x00C5B000, { 0xDD, 0x00, 0x00 }, { FCML_OP_MODRM_M_94_108_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FSCALE[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xFD, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FSIN[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xFE, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FSINCOS[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xFB, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FSQRT[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xFA, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FST[] = { { FCML_AMT_FPU, 0x0000, 0x00C59000, { 0xD9, 0x00, 0x00 }, { FCML_OP_MODRM_M_32_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C59000, { 0xDD, 0x00, 0x00 }, { FCML_OP_MODRM_M_64_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M64, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDD, 0xD0, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FSTP[] = { { FCML_AMT_FPU, 0x0000, 0x00C59800, { 0xD9, 0x00, 0x00 }, { FCML_OP_MODRM_M_32_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C59800, { 0xDD, 0x00, 0x00 }, { FCML_OP_MODRM_M_64_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M64, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C5B800, { 0xDB, 0x00, 0x00 }, { FCML_OP_MODRM_M_80_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M80, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDD, 0xD8, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FSTCW[] = { { FCML_AMT_FPU, 0x0000, 0x00D9B800, { 0x9B, 0xD9, 0x00 }, { FCML_OP_MODRM_M_OP_16_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FNSTCW[] = { { FCML_AMT_FPU, 0x0000, 0x00C5B800, { 0xD9, 0x00, 0x00 }, { FCML_OP_MODRM_M_OP_16_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FSTENV[] = { { FCML_AMT_FPU, 0x0000, 0x00D9B000, { 0x9B, 0xD9, 0x00 }, { FCML_OP_MODRM_M_14_28_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FNSTENV[] = { { FCML_AMT_FPU, 0x0000, 0x00C5B000, { 0xD9, 0x00, 0x00 }, { FCML_OP_MODRM_M_14_28_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FSTSW[] = { { FCML_AMT_FPU, 0x0000, 0x00D9B800, { 0x9B, 0xDD, 0x00 }, { FCML_OP_MODRM_M_OP_16_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M2BYTE, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00EC0000, { 0x9B, 0xDF, 0xE0 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AX, FCML_EOS_WORD ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_AX, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FNSTSW[] = { { FCML_AMT_FPU, 0x0000, 0x00C5B800, { 0xDD, 0x00, 0x00 }, { FCML_OP_MODRM_M_OP_16_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M2BYTE, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xDF, 0xE0, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AX, FCML_EOS_WORD ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_AX, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FSUB[] = { { FCML_AMT_FPU, 0x0000, 0x00C5A000, { 0xD8, 0x00, 0x00 }, { FCML_OP_MODRM_M_32, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C5A000, { 0xDC, 0x00, 0x00 }, { FCML_OP_MODRM_M_64, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M64, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xD8, 0xE0, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST0_ST, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDC, 0xE8, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST_ST0, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FSUBP[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDE, 0xE8, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST_ST0, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xDE, 0xE9, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FISUB[] = { { FCML_AMT_FPU, 0x0000, 0x00C5A000, { 0xDA, 0x00, 0x00 }, { FCML_OP_MODRM_M_32, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C5A000, { 0xDE, 0x00, 0x00 }, { FCML_OP_MODRM_M_16, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M16, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FSUBR[] = { { FCML_AMT_FPU, 0x0000, 0x00C5A800, { 0xD8, 0x00, 0x00 }, { FCML_OP_MODRM_M_32, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C5A800, { 0xDC, 0x00, 0x00 }, { FCML_OP_MODRM_M_64, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M64, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xD8, 0xE8, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST0_ST, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDC, 0xE0, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST_ST0, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FSUBRP[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDE, 0xE0, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_OP_EXPLICIT_REG( FCML_REG_FPU, FCML_REG_ST0, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST_ST0, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xDE, 0xE1, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FISUBR[] = { { FCML_AMT_FPU, 0x0000, 0x00C5A800, { 0xDE, 0x00, 0x00 }, { FCML_OP_MODRM_M_16, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M16, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00C5A800, { 0xDA, 0x00, 0x00 }, { FCML_OP_MODRM_M_32, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FTST[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xE4, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FUCOM[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDD, 0xE0, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST0_ST, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xDD, 0xE1, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FUCOMP[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xDD, 0xE8, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST0_ST, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xDD, 0xE9, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FUCOMPP[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xDA, 0xE9, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST0_ST, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FXAM[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xE5, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FXCH[] = { { FCML_AMT_FPU, 0x0000, 0x00D80001, { 0xD9, 0xC8, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_FPU, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ST0_ST, FCML_HINT_NO_HINTS }, { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xC9, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FXRSTOR[] = { { FCML_AMT_SIMD | FCML_AMT_FPU, 0x0000, 0x03D98800, { 0x0F, 0xAE, 0x00 }, { FCML_OP_MODRM_M_OP_512B, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FXRSTOR64[] = { { FCML_AMT_SIMD | FCML_AMT_FPU, 0x0008, 0x04998800, { 0x0F, 0xAE, 0x00 }, { FCML_OP_MODRM_M_OP_512B, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FXSAVE[] = { { FCML_AMT_SIMD | FCML_AMT_FPU, 0x0000, 0x03D98000, { 0x0F, 0xAE, 0x00 }, { FCML_OP_MODRM_M_OP_512B_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FXSAVE64[] = { { FCML_AMT_SIMD | FCML_AMT_FPU, 0x0008, 0x04998000, { 0x0F, 0xAE, 0x00 }, { FCML_OP_MODRM_M_OP_512B_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FXTRACT[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xF4, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FYL2X[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xF1, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FYL2XP1[] = { { FCML_AMT_FPU, 0x0000, 0x00D80000, { 0xD9, 0xF9, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_GETSEC[] = { { FCML_AMT_SMX, 0x0000, 0x00D80000, { 0x0F, 0x37, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_HADDPD[] = { { FCML_AMT_SSE3_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x7C, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VHADDPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x7C, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_HADDPS[] = { { FCML_AMT_SSE3_SIMD, 0x2000, 0x00D88000, { 0x0F, 0x7C, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VHADDPS[] = { { FCML_AMT_AVX_SIMD, 0x2080, 0x00D88000, { 0x0F, 0x7C, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_HLT[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00C40000, { 0xF4, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_HSUBPD[] = { { FCML_AMT_SSE3_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x7D, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VHSUBPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x7D, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_HSUBPS[] = { { FCML_AMT_SSE3_SIMD, 0x2000, 0x00D88000, { 0x0F, 0x7D, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VHSUBPS[] = { { FCML_AMT_AVX_SIMD, 0x2080, 0x00D88000, { 0x0F, 0x7D, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_INVEPT[] = { { FCML_AMT_VMX, 0x1000, 0x006C8000, { 0x0F, 0x38, 0x80 }, { FCML_OP_MODRM_R_32, FCML_OP_MODRM_RM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R32_M128, FCML_HINT_NO_HINTS }, { FCML_AMT_VMX, 0x1000, 0x00AC8000, { 0x0F, 0x38, 0x80 }, { FCML_OP_MODRM_R_64, FCML_OP_MODRM_RM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R64_M128, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_INVVPID[] = { { FCML_AMT_VMX, 0x1000, 0x006C8000, { 0x0F, 0x38, 0x81 }, { FCML_OP_MODRM_R_32, FCML_OP_MODRM_RM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R32_M128, FCML_HINT_NO_HINTS }, { FCML_AMT_VMX, 0x1000, 0x00AC8000, { 0x0F, 0x38, 0x81 }, { FCML_OP_MODRM_R_64, FCML_OP_MODRM_RM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R64_M128, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_IDIV[] = { { FCML_AMT_GPI, 0x0000, 0x00C5B800, { 0xF6, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AX, FCML_EOS_WORD ), FCML_OP_MODRM_RM_8_W, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5B800, { 0xF7, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_EOSA ), FCML_OP_MODRM_RM_W, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_IMUL[] = { { FCML_AMT_GPI, 0x0000, 0x00C5A800, { 0xF6, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5A800, { 0xF7, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00D88000, { 0x0F, 0xAF, 0x00 }, { FCML_OP_MODRM_R_RW, FCML_OP_MODRM_RM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_RO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48004, { 0x6B, 0x00, 0x00 }, { FCML_OP_MODRM_R_RW, FCML_OP_MODRM_RM, FCML_OP_IB_EX_EOSA, FCML_NA, FCML_NA }, FCML_AM_RO_RMO_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0010, 0x03C48004, { 0x69, 0x00, 0x00 }, { FCML_OP_MODRM_R_RW, FCML_OP_MODRM_RM_OP, FCML_OP_IMM_EOSA, FCML_NA, FCML_NA }, FCML_AM_RO_RMO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0008, 0x04848004, { 0x69, 0x00, 0x00 }, { FCML_OP_MODRM_R_RW, FCML_OP_MODRM_RM_OP, FCML_OP_ID, FCML_NA, FCML_NA }, FCML_AM_RO_RMO_IMMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_IN[] = { { FCML_AMT_GPI, 0x0000, 0x07C40000, { 0xE4, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_BYTE ) | FCML_OA_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x01C40000, { 0xE5, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_WORD) | FCML_OA_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x06C40000, { 0xE5, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_DWORD) | FCML_OA_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x07C40000, { 0xEC, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_BYTE ) | FCML_OA_W, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_DX, FCML_EOS_WORD ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x01C40000, { 0xED, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_WORD ) | FCML_OA_W, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_DX, FCML_EOS_WORD ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x06C40000, { 0xED, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_DWORD ) | FCML_OA_W, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_DX, FCML_EOS_WORD ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_INC[] = { { FCML_AMT_GPI, 0x0807, 0x00C58000, { 0xFE, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C58000, { 0xFF, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00440001, { 0x40, 0x00, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_GPR, FCML_EOS_EOSA ) | FCML_OA_RW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_INS[] = { { FCML_AMT_GPI, 0x0004, 0x07C40000, { 0x6C, 0x00, 0x00 }, { FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_DI, FCML_EOS_BYTE, FCML_SEG_ENCODE_REGISTER( FCML_REG_ES, FCML_SEG_DENY_OVERRIDE ) ), FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_DX, FCML_EOS_WORD ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0004, 0x01C40000, { 0x6D, 0x00, 0x00 }, { FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_DI, FCML_EOS_WORD, FCML_SEG_ENCODE_REGISTER( FCML_REG_ES, FCML_SEG_DENY_OVERRIDE ) ), FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_DX, FCML_EOS_WORD ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M16, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0004, 0x06C40000, { 0x6D, 0x00, 0x00 }, { FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_DI, FCML_EOS_DWORD, FCML_SEG_ENCODE_REGISTER( FCML_REG_ES, FCML_SEG_DENY_OVERRIDE ) ), FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_DX, FCML_EOS_WORD ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_INSERTPS[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0x021 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VINSERTPS[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x3A, 0x21 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_INSERTQ[] = { { FCML_AMT_SSE4A, 0x2000, 0x00DA8000, { 0x0F, 0x78, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_OP_IB, FCML_NA }, FCML_AM_RX_RX_I8_I8, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE4A, 0x2000, 0x00DA8000, { 0x0F, 0x79, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RX_RX, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VEXTRACTF128[] = { { FCML_AMT_AVX_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x3A, 0x19 }, { FCML_OP_MODRM_RM_XMM_OP_128_W, FCML_OP_MODRM_R_YMM, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VINSERTF128[] = { { FCML_AMT_AVX_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x3A, 0x18 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_INT3[] = { { FCML_AMT_GPI | FCML_AMT_CTI, 0x0000, 0x00C40000, { 0xCC, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_INT[] = { { FCML_AMT_GPI | FCML_AMT_CTI, 0x0000, 0x00C40000, { 0xCD, 0x00, 0x00 }, { FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_IMM8, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_INTO[] = { { FCML_AMT_GPI | FCML_AMT_CTI, 0x0000, 0x00440000, { 0xCE, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_INVD[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D80000, { 0x0F, 0x08, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_INVLPG[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D9B800, { 0x0F, 0x01, 0x00 }, { FCML_OP_MODRM_M_UNDEF_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_INVLPGA[] = { { FCML_AMT_SVM, 0x0000, 0x00EC0000, { 0x0F, 0x01, 0xDF }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_EAX, FCML_EOS_EASA ), FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_ECX, FCML_EOS_DWORD ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_INVPCID[] = { { FCML_AMT_SYSTEM, 0x1000, 0x006C8000, { 0x0F, 0x38, 0x82 }, { FCML_OP_MODRM_R_32, FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_OWORD | FCML_EOS_OPT, FCML_RMF_M ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_MO, FCML_HINT_NO_HINTS }, { FCML_AMT_SYSTEM, 0x1000, 0x00AC8000, { 0x0F, 0x38, 0x82 }, { FCML_OP_MODRM_R_64, FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_OWORD | FCML_EOS_OPT, FCML_RMF_M ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_MO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_IRET[] = { { FCML_AMT_GPI | FCML_AMT_CTI, 0x0000, 0x00C40000, { 0xCF, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LAHF[] = { { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0x9F, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LAR[] = { { FCML_AMT_SYSTEM, 0x0000, 0x03D88000, { 0x0F, 0x02, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_RM( FCML_REG_GPR, FCML_EOS_EOSA, FCML_EOS_WORD | FCML_EOS_OPT, FCML_RMF_RM ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SYSTEM, 0x0000, 0x04988000, { 0x0F, 0x02, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_RM( FCML_REG_GPR, FCML_EOS_DWORD, FCML_EOS_WORD | FCML_EOS_OPT, FCML_RMF_RM ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LDDQU[] = { { FCML_AMT_SSE3, 0x2000, 0x00D88000, { 0x0F, 0xF0, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_M_UNDEF, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VLDDQU[] = { { FCML_AMT_AVX_SIMD, 0x2080, 0x00D88000, { 0x0F, 0xF0, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_UNDEFINED, FCML_EOS_L | FCML_EOS_OPT, FCML_RMF_M ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LDMXCSR[] = { { FCML_AMT_SSE, 0x0000, 0x00D99000, { 0x0F, 0xAE, 0x00 }, { FCML_OP_MODRM_M_OP_32, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VLDMXCSR[] = { { FCML_AMT_AVX, 0x00C0, 0x00D99000, { 0x0F, 0xAE, 0x00 }, { FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_DWORD | FCML_EOS_OPT, FCML_RMF_M ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LDS[] = { { FCML_AMT_GPI, 0x0000, 0x00448000, { 0xC5, 0x00, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_M_OP_FP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LSS[] = { { FCML_AMT_GPI, 0x0000, 0x00D88000, { 0x0F, 0xB2, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_M_OP_FP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LES[] = { { FCML_AMT_GPI, 0x0000, 0x00448000, { 0xC4, 0x00, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_M_OP_FP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LFS[] = { { FCML_AMT_GPI, 0x0000, 0x00D88000, { 0x0F, 0xB4, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_M_OP_FP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LGS[] = { { FCML_AMT_GPI, 0x0000, 0x00D88000, { 0x0F, 0xB5, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_M_OP_FP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LEA[] = { { FCML_AMT_GPI, 0x0000, 0x00C48000, { 0x8D, 0x00, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_M_UNDEF, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LEAVE[] = { { FCML_AMT_GPI | FCML_AMT_CTI, 0x0000, 0x00C40000, { 0xC9, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LFENCE[] = { { FCML_AMT_SSE2, 0x0000, 0x00EC0000, { 0x0F, 0xAE, 0xE8 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LLWPCB[] = { { FCML_AMT_LWP, 0x0450, 0x00DB8000, { 0x09, 0x12, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_DWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_LWP, 0x0448, 0x00DB8000, { 0x09, 0x12, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_QWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LGDT[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00599000, { 0x0F, 0x01, 0x00 }, { FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, (FCML_EOS_WORD + FCML_EOS_DWORD) | FCML_EOS_OPT, FCML_RMF_M ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SYSTEM, 0x0000, 0x00999000, { 0x0F, 0x01, 0x00 }, { FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, (FCML_EOS_WORD + FCML_EOS_QWORD) | FCML_EOS_OPT, FCML_RMF_M ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LIDT[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00599800, { 0x0F, 0x01, 0x00 }, { FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, (FCML_EOS_WORD + FCML_EOS_DWORD) | FCML_EOS_OPT, FCML_RMF_M ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SYSTEM, 0x0000, 0x00999800, { 0x0F, 0x01, 0x00 }, { FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, (FCML_EOS_WORD + FCML_EOS_QWORD) | FCML_EOS_OPT, FCML_RMF_M ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LLDT[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D99000, { 0x0F, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_16, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LMSW[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D9B000, { 0x0F, 0x01, 0x00 }, { FCML_OP_MODRM_RM_OP_16, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LODS[] = { { FCML_AMT_GPI, 0x0004, 0x00C40000, { 0xAC, 0x00, 0x00 }, { FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_SI, FCML_EOS_BYTE, FCML_SEG_ENCODE_REGISTER( FCML_REG_DS, FCML_SEG_ALLOW_OVERRIDE ) ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0004, 0x00C40000, { 0xAD, 0x00, 0x00 }, { FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_SI, FCML_EOS_EOSA,FCML_SEG_ENCODE_REGISTER( FCML_REG_DS, FCML_SEG_ALLOW_OVERRIDE ) ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LOOP[] = { { FCML_AMT_GPI | FCML_AMT_CTI | FCML_AMT_BRANCH, 0x0000, 0x00C40000, { 0xE2, 0x00, 0x00 }, { FCML_OP_IMMEDIATE_DIS_RELATIVE_R_8, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LOOPE[] = { { FCML_AMT_GPI | FCML_AMT_CTI | FCML_AMT_BRANCH, 0x0000, 0x00C40000, { 0xE1, 0x00, 0x00 }, { FCML_OP_IMMEDIATE_DIS_RELATIVE_R_8, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LOOPNE[] = { { FCML_AMT_GPI | FCML_AMT_CTI | FCML_AMT_BRANCH, 0x0000, 0x00C40000, { 0xE0, 0x00, 0x00 }, { FCML_OP_IMMEDIATE_DIS_RELATIVE_R_8, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LWPINS[] = { { FCML_AMT_LWP, 0x0450, 0x00D98000, { 0x0A, 0x12, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_32, FCML_OP_ID, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_LWP, 0x0448, 0x00D98000, { 0x0A, 0x12, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_32, FCML_OP_ID, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LWPVAL[] = { { FCML_AMT_LWP, 0x0450, 0x00D98800, { 0x0A, 0x12, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_32, FCML_OP_ID, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_LWP, 0x0448, 0x00D98800, { 0x0A, 0x12, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_32, FCML_OP_ID, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LSL[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D88000, { 0x0F, 0x03, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_RM_OP_16, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LTR[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D99800, { 0x0F, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_16, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MASKMOVDQU[] = { { FCML_AMT_SSE2, 0x1000, 0x00DA8000, { 0x0F, 0xF7, 0x00 }, { FCML_OP_R( FCML_REG_SIMD, FCML_EOS_XWORD ) | FCML_OA_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMASKMOVDQU[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00DA8000, { 0x0F, 0xF7, 0x00 }, { FCML_OP_R( FCML_REG_SIMD, FCML_EOS_XWORD ) | FCML_OA_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMASKMOVPS[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00EC8000, { 0x0F, 0x38, 0x2C }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_M_SIMD_OPL, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x1080, 0x00EC8000, { 0x0F, 0x38, 0x2E }, { FCML_OP_MODRM_M_SIMD_OPL_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_R_SIMD_L, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMASKMOVPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00EC8000, { 0x0F, 0x38, 0x2D }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_M_SIMD_OPL, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x1080, 0x00EC8000, { 0x0F, 0x38, 0x2F }, { FCML_OP_MODRM_M_SIMD_OPL_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_R_SIMD_L, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMASKMOVD[] = { { FCML_AMT_AVX2_SIMD, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0x8C }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_M_SIMD_OPL, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0x8E }, { FCML_OP_MODRM_M_SIMD_OPL_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_R_SIMD_L, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMASKMOVQ[] = { { FCML_AMT_AVX2_SIMD, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0x8C }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_M_SIMD_OPL, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0x8E }, { FCML_OP_MODRM_M_SIMD_OPL_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_R_SIMD_L, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MASKMOVQ[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00DA8000, { 0x0F, 0xF7, 0x00 }, { FCML_OP_R( FCML_REG_SIMD, FCML_EOS_MWORD ), FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_MWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MAXPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x5F, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMAXPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x5F, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MAXPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x5F, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMAXPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x5F, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MAXSD[] = { { FCML_AMT_SSE2_SIMD, 0x2000, 0x00D88000, { 0x0F, 0x5F, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMAXSD[] = { { FCML_AMT_AVX_SIMD, 0x20C0, 0x00D88000, { 0x0F, 0x5F, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MAXSS[] = { { FCML_AMT_SSE_SIMD, 0x4000, 0x00D88000, { 0x0F, 0x5F, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMAXSS[] = { { FCML_AMT_AVX_SIMD, 0x40C0, 0x00D88000, { 0x0F, 0x5F, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MFENCE[] = { { FCML_AMT_SSE2, 0x0000, 0x00EC0000, { 0x0F, 0xAE, 0xF0 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MINPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x5D, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMINPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x5D, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MINPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x5D, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMINPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x5D, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MINSD[] = { { FCML_AMT_SSE2_SIMD, 0x2000, 0x00D88000, { 0x0F, 0x5D, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMINSD[] = { { FCML_AMT_AVX_SIMD, 0x20C0, 0x00D88000, { 0x0F, 0x5D, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MINSS[] = { { FCML_AMT_SSE_SIMD, 0x4000, 0x00D88000, { 0x0F, 0x5D, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMINSS[] = { { FCML_AMT_AVX_SIMD, 0x40C0, 0x00D88000, { 0x0F, 0x5D, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MONITOR[] = { { FCML_AMT_SSE3, 0x0000, 0x006C0000, { 0x0F, 0x01, 0xC8 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_EAX, FCML_EOS_DWORD ), FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_ECX, FCML_EOS_DWORD ), FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_EDX, FCML_EOS_DWORD ), FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE3, 0x0000, 0x00AC0000, { 0x0F, 0x01, 0xC8 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_RAX, FCML_EOS_QWORD ), FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_RCX, FCML_EOS_QWORD ), FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_RDX, FCML_EOS_QWORD ), FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOV[] = { { FCML_AMT_GPI, 0x0804, 0x00C48000, { 0x88, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_8_W, FCML_OP_MODRM_R_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_R8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0804, 0x00C48000, { 0x89, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_W, FCML_OP_MODRM_R, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_RO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48000, { 0x8A, 0x00, 0x00 }, { FCML_OP_MODRM_R_8_W, FCML_OP_MODRM_RM_OP_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R8_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48000, { 0x8B, 0x00, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_RM_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48000, { 0x8C, 0x00, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_EOSA, FCML_EOS_WORD | FCML_EOS_OPT, FCML_RMF_RM ) | FCML_OA_W, FCML_OP_R( FCML_REG_SEG, FCML_EOS_WORD ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM_SR, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48000, { 0x8E, 0x00, 0x00 }, { FCML_OP_R( FCML_REG_SEG, FCML_EOS_WORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_16_W, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_SR_RM, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0xA0, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_BYTE ) | FCML_OA_W, FCML_OP_SEGMENT_RELATIVE_OFFSET( FCML_EOS_BYTE, FCML_SEG_ENCODE_REGISTER( FCML_REG_DS, FCML_SEG_ALLOW_OVERRIDE ) ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R8_MOFF8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0xA1, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_EOSA ) | FCML_OA_W, FCML_OP_SEGMENT_RELATIVE_OFFSET( FCML_EOS_EOSA, FCML_SEG_ENCODE_REGISTER( FCML_REG_DS, FCML_SEG_ALLOW_OVERRIDE ) ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_MOFFO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0xA2, 0x00, 0x00 }, { FCML_OP_SEGMENT_RELATIVE_OFFSET( FCML_EOS_BYTE, FCML_SEG_ENCODE_REGISTER( FCML_REG_DS, FCML_SEG_ALLOW_OVERRIDE ) ) | FCML_OA_W, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_BYTE ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_MOFF8_R8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0xA3, 0x00, 0x00 }, { FCML_OP_SEGMENT_RELATIVE_OFFSET( FCML_EOS_EOSA, FCML_SEG_ENCODE_REGISTER( FCML_REG_DS, FCML_SEG_ALLOW_OVERRIDE ) ) | FCML_OA_W, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_EOSA ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_MOFFO_RO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40001, { 0xB0, 0x00, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_GPR, FCML_EOS_BYTE ) | FCML_OA_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40001, { 0xB8, 0x00, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_GPR, FCML_EOS_EOSA ) | FCML_OA_W, FCML_OP_IMM_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R0_IMM0, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C58000, { 0xC6, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0010, 0x03C58000, { 0xC7, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_IMM_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0008, 0x04858000, { 0xC7, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_ID_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_SYSTEM, 0x0000, 0x00588000, { 0x0F, 0x21, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_DWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_W, FCML_OP_R( FCML_REG_DR, FCML_EOS_DWORD ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R32_DR, FCML_HINT_NO_HINTS }, { FCML_AMT_SYSTEM, 0x0000, 0x00988000, { 0x0F, 0x21, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_QWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_W, FCML_OP_R( FCML_REG_DR, FCML_EOS_QWORD ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R64_DR, FCML_HINT_NO_HINTS }, { FCML_AMT_SYSTEM, 0x0000, 0x00588000, { 0x0F, 0x23, 0x00 }, { FCML_OP_R( FCML_REG_DR, FCML_EOS_DWORD ) | FCML_OA_W, FCML_OP_RM( FCML_REG_GPR, FCML_EOS_DWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_DR_R32, FCML_HINT_NO_HINTS }, { FCML_AMT_SYSTEM, 0x0000, 0x00988000, { 0x0F, 0x23, 0x00 }, { FCML_OP_R( FCML_REG_DR, FCML_EOS_QWORD ) | FCML_OA_W, FCML_OP_RM( FCML_REG_GPR, FCML_EOS_QWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_DR_R64, FCML_HINT_NO_HINTS }, { FCML_AMT_SYSTEM, 0x0000, 0x00588000, { 0x0F, 0x20, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_DWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_W, FCML_OP_R( FCML_REG_CR, FCML_EOS_DWORD ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R32_CR, FCML_HINT_NO_HINTS }, { FCML_AMT_SYSTEM, 0x0000, 0x00988000, { 0x0F, 0x20, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_QWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_W, FCML_OP_R( FCML_REG_CR, FCML_EOS_QWORD ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R64_CR, FCML_HINT_NO_HINTS }, { FCML_AMT_SYSTEM, 0x0000, 0x00588000, { 0x0F, 0x22, 0x00 }, { FCML_OP_R( FCML_REG_CR, FCML_EOS_DWORD ) | FCML_OA_W, FCML_OP_RM( FCML_REG_GPR, FCML_EOS_DWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_CR_R32, FCML_HINT_NO_HINTS }, { FCML_AMT_SYSTEM, 0x0000, 0x00988000, { 0x0F, 0x22, 0x00 }, { FCML_OP_R( FCML_REG_CR, FCML_EOS_QWORD ) | FCML_OA_W, FCML_OP_RM( FCML_REG_GPR, FCML_EOS_QWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_CR_R64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVAPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x28, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x29, 0x00 }, { FCML_OP_MODRM_RM_XMM_OP_128_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVAPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x28, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x29, 0x00 }, { FCML_OP_MODRM_RM_SIMD_L_OP_W, FCML_OP_MODRM_R_SIMD_L, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVAPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x28, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x29, 0x00 }, { FCML_OP_MODRM_RM_XMM_OP_128_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVAPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x28, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x29, 0x00 }, { FCML_OP_MODRM_RM_SIMD_L_OP_W, FCML_OP_MODRM_R_SIMD_L, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVBE[] = { { FCML_AMT_GPI, 0x0000, 0x00EC8000, { 0x0F, 0x38, 0xF0 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_M_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00EC8000, { 0x0F, 0x38, 0xF1 }, { FCML_OP_MODRM_M_OP_W, FCML_OP_MODRM_R, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVD[] = { { FCML_AMT_MMX_SIMD, 0x0010, 0x03D88000, { 0x0F, 0x6E, 0x00 }, { FCML_OP_MODRM_R_MMX_W, FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_MMX_SIMD, 0x0010, 0x03D88000, { 0x0F, 0x7E, 0x00 }, { FCML_OP_MODRM_RM_OP_32_W, FCML_OP_MODRM_R_MMX, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1010, 0x03D88000, { 0x0F, 0x7E, 0x00 }, { FCML_OP_MODRM_RM_OP_32_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1010, 0x03D88000, { 0x0F, 0x6E, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVD[] = { { FCML_AMT_AVX_SIMD, 0x10D0, 0x00D88000, { 0x0F, 0x6E, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x10D0, 0x00D88000, { 0x0F, 0x7E, 0x00 }, { FCML_OP_MODRM_RM_OP_32_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVQ[] = { { FCML_AMT_MMX_SIMD, 0x0008, 0x04988000, { 0x0F, 0x6E, 0x00 }, { FCML_OP_MODRM_R_MMX_W, FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1008, 0x04988000, { 0x0F, 0x6E, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_MMX_SIMD, 0x0008, 0x04988000, { 0x0F, 0x7E, 0x00 }, { FCML_OP_MODRM_RM_OP_64_W, FCML_OP_MODRM_R_MMX, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1008, 0x04988000, { 0x0F, 0x7E, 0x00 }, { FCML_OP_MODRM_RM_OP_64_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x4000, 0x00D88000, { 0x0F, 0x7E, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x6F, 0x00 }, { FCML_OP_MODRM_R_MMX_W, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x7F, 0x00 }, { FCML_OP_MODRM_RM_MMX_OP_W, FCML_OP_MODRM_R_MMX, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xD6, 0x00 }, { FCML_OP_MODRM_RM_XMM_OP_64_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVQ[] = { { FCML_AMT_AVX_SIMD, 0x10C8, 0x04988000, { 0x0F, 0x6E, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x10C8, 0x04988000, { 0x0F, 0x7E, 0x00 }, { FCML_OP_MODRM_RM_OP_64_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x40C0, 0x00D88000, { 0x0F, 0x7E, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xD6, 0x00 }, { FCML_OP_MODRM_RM_XMM_OP_64_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVDDUP[] = { { FCML_AMT_SSE3_SIMD, 0x2000, 0x00D88000, { 0x0F, 0x12, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVDDUP[] = { { FCML_AMT_AVX_SIMD, 0x20C0, 0x00D88000, { 0x0F, 0x12, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x20A0, 0x00D88000, { 0x0F, 0x12, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVDQA[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x6F, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x7F, 0x00 }, { FCML_OP_MODRM_RM_XMM_OP_128_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVDQA[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x6F, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x7F, 0x00 }, { FCML_OP_MODRM_RM_SIMD_L_OP_W, FCML_OP_MODRM_R_SIMD_L, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVDQU[] = { { FCML_AMT_SSE2_SIMD, 0x4000, 0x00D88000, { 0x0F, 0x6F, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x4000, 0x00D88000, { 0x0F, 0x7F, 0x00 }, { FCML_OP_MODRM_RM_XMM_OP_128_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVDQU[] = { { FCML_AMT_AVX_SIMD, 0x4080, 0x00D88000, { 0x0F, 0x6F, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x4080, 0x00D88000, { 0x0F, 0x7F, 0x00 }, { FCML_OP_MODRM_RM_SIMD_L_OP_W, FCML_OP_MODRM_R_SIMD_L, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVDQ2Q[] = { { FCML_AMT_SSE2_SIMD, 0x2000, 0x00DA8000, { 0x0F, 0xD6, 0x00 }, { FCML_OP_MODRM_R_MMX_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVHLPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00DA8000, { 0x0F, 0x12, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVHLPS[] = { { FCML_AMT_AVX_SIMD, 0x00C0, 0x00DA8000, { 0x0F, 0x12, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVHPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x16, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_QWORD | FCML_EOS_OPT, FCML_RMF_M ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x17, 0x00 }, { FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_QWORD | FCML_EOS_OPT, FCML_RMF_M ) | FCML_OA_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVHPD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x16, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x17, 0x00 }, { FCML_OP_MODRM_RM_OP_64_W, FCML_OP_MODRM_R_XMM_W, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVHPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x16, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_MWORD | FCML_EOS_OPT, FCML_RMF_M ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x17, 0x00 }, { FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_MWORD | FCML_EOS_OPT, FCML_RMF_M ) | FCML_OA_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVHPS[] = { { FCML_AMT_AVX_SIMD, 0x00C0, 0x00D88000, { 0x0F, 0x16, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_M_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x00C0, 0x00D88000, { 0x0F, 0x17, 0x00 }, { FCML_OP_MODRM_RM_OP_64_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVLHPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x16, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVLHPS[] = { { FCML_AMT_AVX_SIMD, 0x00C0, 0x00D88000, { 0x0F, 0x16, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVLPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x12, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_QWORD | FCML_EOS_OPT, FCML_RMF_M ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x13, 0x00 }, { FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_QWORD | FCML_EOS_OPT, FCML_RMF_M ) | FCML_OA_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVLPD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x12, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x13, 0x00 }, { FCML_OP_MODRM_RM_OP_64_W, FCML_OP_MODRM_R_XMM_W, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVLPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x12, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_QWORD | FCML_EOS_OPT, FCML_RMF_M ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x13, 0x00 }, { FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_QWORD | FCML_EOS_OPT, FCML_RMF_M ) | FCML_OA_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVLPS[] = { { FCML_AMT_AVX_SIMD, 0x00C0, 0x00D88000, { 0x0F, 0x12, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_M_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x00C0, 0x00D88000, { 0x0F, 0x13, 0x00 }, { FCML_OP_MODRM_M_OP_64_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVMSKPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x005A8000, { 0x0F, 0x50, 0x00 }, { FCML_OP_MODRM_R_32_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x009A8000, { 0x0F, 0x50, 0x00 }, { FCML_OP_MODRM_R_64_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVMSKPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00588000, { 0x0F, 0x50, 0x00 }, { FCML_OP_MODRM_R_32_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_L, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x1080, 0x00988000, { 0x0F, 0x50, 0x00 }, { FCML_OP_MODRM_R_64_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_L, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVMSKPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00588000, { 0x0F, 0x50, 0x00 }, { FCML_OP_MODRM_R_32_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE_SIMD, 0x0000, 0x00988000, { 0x0F, 0x50, 0x00 }, { FCML_OP_MODRM_R_64_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVMSKPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00588000, { 0x0F, 0x50, 0x00 }, { FCML_OP_MODRM_R_32_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_L, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x0080, 0x00988000, { 0x0F, 0x50, 0x00 }, { FCML_OP_MODRM_R_64_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_L, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVNTDQA[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x2A }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_UNDEFINED, FCML_EOS_XWORD | FCML_EOS_OPT, FCML_RMF_M ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVNTDQA[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x2A }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_M_OP_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x2A }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_M_OP_YMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVNTDQ[] = { { FCML_AMT_SSE2, 0x1000, 0x00D88000, { 0x0F, 0xE7, 0x00 }, { FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_UNDEFINED, FCML_EOS_XWORD | FCML_EOS_OPT, FCML_RMF_M ) | FCML_OA_W, FCML_OP_MODRM_R_XMM , FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVNTDQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xE7, 0x00 }, { FCML_OP_MODRM_M_OP_XMM_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVNTI[] = { { FCML_AMT_SSE2, 0x0010, 0x03D88000, { 0x0F, 0xC3, 0x00 }, { FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_DWORD | FCML_EOS_OPT, FCML_RMF_M ) | FCML_OA_W, FCML_OP_MODRM_R_32 , FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2, 0x0008, 0x04988000, { 0x0F, 0xC3, 0x00 }, { FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_QWORD | FCML_EOS_OPT, FCML_RMF_M ) | FCML_OA_W, FCML_OP_MODRM_R_64 , FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVNTPD[] = { { FCML_AMT_SSE2, 0x1000, 0x00D88000, { 0x0F, 0x2B, 0x00 }, { FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_UNDEFINED, FCML_EOS_XWORD | FCML_EOS_OPT, FCML_RMF_M ) | FCML_OA_W, FCML_OP_MODRM_R_XMM , FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVNTPD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x2B, 0x00 }, { FCML_OP_MODRM_M_OP_XMM_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVNTPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x2B, 0x00 }, { FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_UNDEFINED, FCML_EOS_XWORD | FCML_EOS_OPT, FCML_RMF_M ) | FCML_OA_W, FCML_OP_MODRM_R_XMM , FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVNTPS[] = { { FCML_AMT_AVX_SIMD, 0x00C0, 0x00D88000, { 0x0F, 0x2B, 0x00 }, { FCML_OP_MODRM_M_OP_XMM_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVNTSD[] = { { FCML_AMT_SSE4A, 0x2000, 0x00D88000, { 0x0F, 0x2B, 0x00 }, { FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_QWORD | FCML_EOS_OPT, FCML_RMF_M ) | FCML_OA_W, FCML_OP_MODRM_R_XMM , FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVNTSS[] = { { FCML_AMT_SSE4A, 0x4000, 0x00D88000, { 0x0F, 0x2B, 0x00 }, { FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_DWORD | FCML_EOS_OPT, FCML_RMF_M ) | FCML_OA_W, FCML_OP_MODRM_R_XMM , FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVNTQ[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xE7, 0x00 }, { FCML_OP_RM( FCML_REG_UNDEFINED, FCML_EOS_UNDEFINED, FCML_EOS_MWORD | FCML_EOS_OPT, FCML_RMF_M ) | FCML_OA_W, FCML_OP_MODRM_R_MMX , FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVQ2DQ[] = { { FCML_AMT_SSE2_SIMD, 0x4000, 0x00D88000, { 0x0F, 0xD6, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_MWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVS[] = { { FCML_AMT_GPI, 0x0004, 0x00C40000, { 0xA4, 0x00, 0x00 }, { FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_DI, FCML_EOS_BYTE, FCML_SEG_ENCODE_REGISTER( FCML_REG_DS, FCML_SEG_ALLOW_OVERRIDE ) ), FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_SI, FCML_EOS_BYTE, FCML_SEG_ENCODE_REGISTER( FCML_REG_ES, FCML_SEG_DENY_OVERRIDE ) ) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M8_M8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0004, 0x00C40000, { 0xA5, 0x00, 0x00 }, { FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_DI, FCML_EOS_EOSA,FCML_SEG_ENCODE_REGISTER( FCML_REG_DS, FCML_SEG_ALLOW_OVERRIDE ) ), FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_SI, FCML_EOS_EOSA,FCML_SEG_ENCODE_REGISTER( FCML_REG_ES, FCML_SEG_DENY_OVERRIDE ) ) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_MO_MO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVSD[] = { { FCML_AMT_SSE2_SIMD, 0x2000, 0x00D88000, { 0x0F, 0x10, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x2000, 0x00D88000, { 0x0F, 0x11, 0x00 }, { FCML_OP_MODRM_RM_XMM_OP_64_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVSD[] = { { FCML_AMT_AVX_SIMD, 0x20C0, 0x00D88000, { 0x0F, 0x10, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x20C0, 0x00D88000, { 0x0F, 0x11, 0x00 }, { FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x20C0, 0x00D88000, { 0x0F, 0x10, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_M_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x20C0, 0x00D88000, { 0x0F, 0x11, 0x00 }, { FCML_OP_MODRM_M_OP_64_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVSHDUP[] = { { FCML_AMT_SSE3_SIMD, 0x4000, 0x00D88000, { 0x0F, 0x16, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVSHDUP[] = { { FCML_AMT_AVX_SIMD, 0x4080, 0x00D88000, { 0x0F, 0x16, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVSLDUP[] = { { FCML_AMT_SSE3_SIMD, 0x4000, 0x00D88000, { 0x0F, 0x12, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVSLDUP[] = { { FCML_AMT_AVX_SIMD, 0x4080, 0x00D88000, { 0x0F, 0x12, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVSS[] = { { FCML_AMT_SSE_SIMD, 0x4000, 0x00D88000, { 0x0F, 0x10, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE_SIMD, 0x4000, 0x00D88000, { 0x0F, 0x11, 0x00 }, { FCML_OP_MODRM_RM_XMM_OP_32_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVSS[] = { { FCML_AMT_AVX_SIMD, 0x40C0, 0x00DA8000, { 0x0F, 0x10, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x40C0, 0x00DA8000, { 0x0F, 0x11, 0x00 }, { FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x40C0, 0x00D88000, { 0x0F, 0x10, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_M_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x40C0, 0x00D88000, { 0x0F, 0x11, 0x00 }, { FCML_OP_MODRM_M_OP_32_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVSX[] = { { FCML_AMT_GPI, 0x0000, 0x00D88000, { 0x0F, 0xBE, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_RM_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x03D88000, { 0x0F, 0xBF, 0x00 }, { FCML_OP_MODRM_R_32_W, FCML_OP_MODRM_RM_16, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RM16, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0008, 0x04988000, { 0x0F, 0xBF, 0x00 }, { FCML_OP_MODRM_R_64_W, FCML_OP_MODRM_RM_16, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RM16, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVSXD[] = { { FCML_AMT_GPI, 0x0008, 0x04848000, { 0x63, 0x00, 0x00 }, { FCML_OP_MODRM_R_64_W, FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVUPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x10, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x11, 0x00 }, { FCML_OP_MODRM_RM_XMM_OP_128_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVUPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x10, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x11, 0x00 }, { FCML_OP_MODRM_RM_SIMD_L_OP_W, FCML_OP_MODRM_R_SIMD_L, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVUPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x10, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x11, 0x00 }, { FCML_OP_MODRM_RM_XMM_OP_128_W, FCML_OP_MODRM_R_XMM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMOVUPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x10, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x11, 0x00 }, { FCML_OP_MODRM_RM_SIMD_L_OP_W, FCML_OP_MODRM_R_SIMD_L, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MOVZX[] = { { FCML_AMT_GPI, 0x0000, 0x00D88000, { 0x0F, 0xB6, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_RM_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x03D88000, { 0x0F, 0xB7, 0x00 }, { FCML_OP_MODRM_R_32_W, FCML_OP_MODRM_RM_16, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RM16, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x04988000, { 0x0F, 0xB7, 0x00 }, { FCML_OP_MODRM_R_64_W, FCML_OP_MODRM_RM_16, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RM16, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MPSADBW[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0x42 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMPSADBW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x3A, 0x42 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x3A, 0x42 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MUL[] = { { FCML_AMT_GPI, 0x0000, 0x00C5A000, { 0xF6, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5A000, { 0xF7, 0x00, 0x00 }, { FCML_OP_MODRM_RM, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MULPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x59, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMULPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x59, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MULPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x59, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMULPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x59, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MULSD[] = { { FCML_AMT_SSE2_SIMD, 0x2000, 0x00D88000, { 0x0F, 0x59, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMULSD[] = { { FCML_AMT_AVX_SIMD, 0x20C0, 0x00D88000, { 0x0F, 0x59, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MULSS[] = { { FCML_AMT_SSE_SIMD, 0x4000, 0x00D88000, { 0x0F, 0x59, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMULSS[] = { { FCML_AMT_AVX_SIMD, 0x40C0, 0x00D88000, { 0x0F, 0x59, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MWAIT[] = { { FCML_AMT_SSE3, 0x0000, 0x00EC0000, { 0x0F, 0x01, 0xC9 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_NEG[] = { { FCML_AMT_GPI, 0x0807, 0x00C59800, { 0xF6, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C59800, { 0xF7, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_NOP[] = { { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0x90, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00D98000, { 0x0F, 0x1F, 0x00 }, { FCML_OP_MODRM_RM, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_NOT[] = { { FCML_AMT_GPI, 0x0807, 0x00C59000, { 0xF6, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C59000, { 0xF7, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_OR[] = { { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0x0C, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_BYTE ) | FCML_OA_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ER8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0x0D, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_EOSA ) | FCML_OA_RW, FCML_OP_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ERO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C58804, { 0x80, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C58804, { 0x81, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C58804, { 0x83, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_IB_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C48000, { 0x08, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_8_RW, FCML_OP_MODRM_R_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_R8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C48000, { 0x09, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_RW, FCML_OP_MODRM_R, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_RO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48000, { 0x0A, 0x00, 0x00 }, { FCML_OP_MODRM_R_8_RW, FCML_OP_MODRM_RM_OP_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R8_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48000, { 0x0B, 0x00, 0x00 }, { FCML_OP_MODRM_R_RW, FCML_OP_MODRM_RM_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ORPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x56, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VORPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x56, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ORPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x56, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VORPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x56, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_OUT[] = { { FCML_AMT_GPI, 0x0000, 0x07C40000, { 0xE6, 0x00, 0x00 }, { FCML_OP_IB, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_BYTE ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x01C40000, { 0xE7, 0x00, 0x00 }, { FCML_OP_IB, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_WORD), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x06C40000, { 0xE7, 0x00, 0x00 }, { FCML_OP_IB, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_DWORD), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x07C40000, { 0xEE, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_DX, FCML_EOS_WORD ), FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_BYTE ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x01C40000, { 0xEF, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_DX, FCML_EOS_WORD ), FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_WORD ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x06C40000, { 0xEF, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_DX, FCML_EOS_WORD ), FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_DWORD ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_OUTS[] = { { FCML_AMT_GPI, 0x0004, 0x07C40000, { 0x6E, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_DX, FCML_EOS_WORD ), FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_SI, FCML_EOS_BYTE, FCML_SEG_ENCODE_REGISTER( FCML_REG_ES, FCML_SEG_DENY_OVERRIDE ) ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0004, 0x01C40000, { 0x6F, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_DX, FCML_EOS_WORD ), FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_SI, FCML_EOS_WORD, FCML_SEG_ENCODE_REGISTER( FCML_REG_ES, FCML_SEG_DENY_OVERRIDE ) ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M16, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0004, 0x06C40000, { 0x6F, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_DX, FCML_EOS_WORD ), FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_SI, FCML_EOS_DWORD, FCML_SEG_ENCODE_REGISTER( FCML_REG_ES, FCML_SEG_DENY_OVERRIDE ) ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_M32, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PABSW[] = { { FCML_AMT_SSSE3_SIMD, 0x0000, 0x00EC8000, { 0x0F, 0x38, 0x1D }, { FCML_OP_MODRM_R_MMX_W, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSSE3_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x1D }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PABSB[] = { { FCML_AMT_SSSE3_SIMD, 0x0000, 0x00EC8000, { 0x0F, 0x38, 0x1C }, { FCML_OP_MODRM_R_MMX_W, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSSE3_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x1C }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PABSD[] = { { FCML_AMT_SSSE3_SIMD, 0x0000, 0x00EC8000, { 0x0F, 0x38, 0x1E }, { FCML_OP_MODRM_R_MMX_W, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSSE3_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x1E }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPABSB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x1C }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x1C }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPABSW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x1D }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x1D }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPABSD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x1E }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x1E }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPACKSSWB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x63, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0x63, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PACKSSWB[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x63, 0x00 }, { FCML_OP_MODRM_R_MMX_W, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x63, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPACKSSDW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x6B, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0x6B, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PACKSSDW[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x6B, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x6B, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PACKUSDW[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x2B }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPACKUSDW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x2B }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x2B }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PACKUSWB[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x67, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x67, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPACKUSWB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x67, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0x67, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPADDW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xFD, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xFD, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPADDQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xD4, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xD4, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PADDW[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xFD, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xFD, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPADDB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xFC, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xFC, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPADDD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xFE, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xFE, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PADDB[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xFC, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xFC, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PADDD[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xFE, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xFE, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPADDSW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xED, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xED, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PADDSB[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xEC, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xEC, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PADDSW[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xED, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xED, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPADDSB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xEC, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xEC, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PADDUSW[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xDD, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xDD, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PADDUSB[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xDC, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xDC, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPADDUSW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xDD, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xDD, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPADDUSB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xDC, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xDC, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PADDQ[] = { { FCML_AMT_SSE2_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xD4, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xD4, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PALIGNR[] = { { FCML_AMT_SSSE3_SIMD, 0x0000, 0x00EC8000, { 0x0F, 0x3A, 0x00F }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSSE3_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0x00F }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPALIGNR[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x3A, 0x0F }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x3A, 0x0F }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PAND[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xDB, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xDB, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPAND[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xDB, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xDB, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PANDN[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xDF, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xDF, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPANDN[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xDF, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xDF, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PAUSE[] = { { FCML_AMT_SSE2, 0x4000, 0x00C40000, { 0x90, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PAVGW[] = { { FCML_AMT_MMX, 0x0000, 0x00D88000, { 0x0F, 0xE3, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xE3, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PAVGB[] = { { FCML_AMT_MMX, 0x0000, 0x00D88000, { 0x0F, 0xE0, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xE0, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPAVGW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xE3, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xE3, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPAVGB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xE0, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xE0, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PBLENDVB[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x10 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_EXPLICIT_REG( FCML_REG_SIMD, FCML_REG_XMM0, FCML_EOS_OWORD ), FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPBLENDVB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x3A, 0x4C }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x3A, 0x4C }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PBLENDW[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0x0E }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPBLENDW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x3A, 0x0E }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x3A, 0x0E }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPBLENDD[] = { { FCML_AMT_AVX2_SIMD, 0x1090, 0x00EC8000, { 0x0F, 0x3A, 0x02 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PCLMULQDQ[] = { { FCML_AMT_CLMUL, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0x44 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCLMULQDQ[] = { { FCML_AMT_AVX_SIMD | FCML_AMT_CLMUL, 0x10C0, 0x00EC8000, { 0x0F, 0x3A, 0x44 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PCMPEQB[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x74, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x74, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PCMPEQW[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x75, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x75, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PCMPEQD[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x76, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x76, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCMPEQD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x76, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0x76, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCMPEQW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x75, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0x75, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCMPEQB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x74, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0x74, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PCMPEQQ[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x29 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCMPEQQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x29 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x29 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PCMPESTRI[] = { { FCML_AMT_SSE42_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0x61 }, { FCML_OP_MODRM_R_XMM, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCMPESTRI[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x3A, 0x61 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PCMPESTRM[] = { { FCML_AMT_SSE42_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0x60 }, { FCML_OP_MODRM_R_XMM, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCMPESTRM[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x3A, 0x60 }, { FCML_OP_MODRM_R_XMM, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PCMPGTW[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x65, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x65, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PCMPGTD[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x66, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x66, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PCMPGTB[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x64, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x64, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCMPGTW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x65, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0x65, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCMPGTD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x66, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0x66, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCMPGTB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x64, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0x64, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PCMPGTQ[] = { { FCML_AMT_SSE42_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x37 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCMPGTQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x37 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x37 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PCMPISTRI[] = { { FCML_AMT_SSE42_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0x63 }, { FCML_OP_MODRM_R_XMM, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCMPISTRI[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x3A, 0x63 }, { FCML_OP_MODRM_R_XMM, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PCMPISTRM[] = { { FCML_AMT_SSE42_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0x62 }, { FCML_OP_MODRM_R_XMM, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCMPISTRM[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x3A, 0x62 }, { FCML_OP_MODRM_R_XMM, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPEXTRB[] = { { FCML_AMT_AVX_SIMD, 0x12C0, 0x40EC8000, { 0x0F, 0x3A, 0x14 }, { FCML_OP_RM(FCML_REG_GPR, FCML_EOS_EOSA, FCML_EOS_BYTE | FCML_EOS_OPT, FCML_RMF_RM ) | FCML_OA_W, FCML_OP_MODRM_R_XMM, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPEXTRQ[] = { { FCML_AMT_AVX_SIMD, 0x10C8, 0x04AC8000, { 0x0F, 0x3A, 0x16 }, { FCML_OP_RM(FCML_REG_GPR, FCML_EOS_QWORD, FCML_EOS_QWORD | FCML_EOS_OPT, FCML_RMF_RM ) | FCML_OA_W, FCML_OP_MODRM_R_XMM, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PEXTRQ[] = { { FCML_AMT_SSE41_SIMD, 0x1008, 0x04AC8000, { 0x0F, 0x3A, 0x16 }, { FCML_OP_RM(FCML_REG_GPR, FCML_EOS_QWORD, FCML_EOS_QWORD | FCML_EOS_OPT, FCML_RMF_RM ) | FCML_OA_W, FCML_OP_MODRM_R_XMM, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PEXTRB[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x40EC8000, { 0x0F, 0x3A, 0x14 }, { FCML_OP_RM(FCML_REG_GPR, FCML_EOS_EOSA, FCML_EOS_BYTE | FCML_EOS_OPT, FCML_RMF_RM ) | FCML_OA_W, FCML_OP_MODRM_R_XMM, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PEXTRD[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x40EC8000, { 0x0F, 0x3A, 0x16 }, { FCML_OP_RM(FCML_REG_GPR, FCML_EOS_EOSA, FCML_EOS_DWORD | FCML_EOS_OPT, FCML_RMF_RM ) | FCML_OA_W, FCML_OP_MODRM_R_XMM, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPEXTRD[] = { { FCML_AMT_AVX_SIMD, 0x13D0, 0x40EC8000, { 0x0F, 0x3A, 0x16 }, { FCML_OP_RM(FCML_REG_GPR, FCML_EOS_EOSA, FCML_EOS_DWORD | FCML_EOS_OPT, FCML_RMF_RM ) | FCML_OA_W, FCML_OP_MODRM_R_XMM, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PEXTRW[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x40D88000, { 0x0F, 0xC5, 0x00 }, { FCML_OP_R(FCML_REG_GPR, FCML_EOS_EOSA) | FCML_OA_W, FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_MWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE_SIMD, 0x1000, 0x40D88000, { 0x0F, 0xC5, 0x00 }, { FCML_OP_R(FCML_REG_GPR, FCML_EOS_EOSA) | FCML_OA_W, FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE41_SIMD, 0x1000, 0x40EC8000, { 0x0F, 0x3A, 0x15 }, { FCML_OP_RM(FCML_REG_GPR, FCML_EOS_EOSA, FCML_EOS_WORD | FCML_EOS_OPT, FCML_RMF_RM ) | FCML_OA_W, FCML_OP_R(FCML_REG_SIMD, FCML_EOS_XWORD), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPEXTRW[] = { { FCML_AMT_AVX_SIMD, 0x13C0, 0x40D88000, { 0x0F, 0xC5, 0x00 }, { FCML_OP_R(FCML_REG_GPR, FCML_EOS_EOSA) | FCML_OA_W, FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x13C0, 0x40EC8000, { 0x0F, 0x3A, 0x15 }, { FCML_OP_RM(FCML_REG_GPR, FCML_EOS_EOSA, FCML_EOS_WORD | FCML_EOS_OPT, FCML_RMF_RM ) | FCML_OA_W, FCML_OP_R(FCML_REG_SIMD, FCML_EOS_XWORD), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHADDW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x01 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x01 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHADDD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x02 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x02 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PHADDD[] = { { FCML_AMT_SSSE3_SIMD, 0x0000, 0x00EC8000, { 0x0F, 0x38, 0x02 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSSE3_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x02 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PHADDW[] = { { FCML_AMT_SSSE3_SIMD, 0x0000, 0x00EC8000, { 0x0F, 0x38, 0x01 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSSE3_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x01 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PHADDSW[] = { { FCML_AMT_SSSE3_SIMD, 0x0000, 0x00EC8000, { 0x0F, 0x38, 0x03 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSSE3_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x03 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHADDSW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x03 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x03 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PHMINPOSUW[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x41 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHMINPOSUW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x41 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PHSUBD[] = { { FCML_AMT_SSSE3_SIMD, 0x0000, 0x00EC8000, { 0x0F, 0x38, 0x06 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSSE3_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x06 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PHSUBW[] = { { FCML_AMT_SSSE3_SIMD, 0x0000, 0x00EC8000, { 0x0F, 0x38, 0x05 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSSE3_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x05 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHSUBD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x06 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x06 }, { FCML_OP_MODRM_R_YMM_RW, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHSUBW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x05 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x05 }, { FCML_OP_MODRM_R_YMM_RW, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PHSUBSW[] = { { FCML_AMT_SSSE3_SIMD, 0x0000, 0x00EC8000, { 0x0F, 0x38, 0x07 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSSE3_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x07 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHSUBSW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x07 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x07 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PINSRD[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x03EC8000, { 0x0F, 0x3A, 0x22 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_OP_32, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPINSRQ[] = { { FCML_AMT_AVX_SIMD, 0x10C8, 0x00EC8000, { 0x0F, 0x3A, 0x22 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_OP_64, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PINSRQ[] = { { FCML_AMT_SSE41_SIMD, 0x1008, 0x04AC8000, { 0x0F, 0x3A, 0x22 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_OP_64, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PINSRB[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0x20 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_RM(FCML_REG_GPR, FCML_EOS_DWORD, FCML_EOS_BYTE | FCML_EOS_OPT, FCML_RMF_RM ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPINSRD[] = { { FCML_AMT_AVX_SIMD, 0x10D0, 0x00EC8000, { 0x0F, 0x3A, 0x22 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_OP_32, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPINSRB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x3A, 0x20 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_RM(FCML_REG_GPR, FCML_EOS_DWORD, FCML_EOS_BYTE | FCML_EOS_OPT, FCML_RMF_RM ), FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PINSRW[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xC4, 0x00 }, { FCML_OP_MODRM_R_MMX_W, FCML_OP_RM(FCML_REG_GPR, FCML_EOS_DWORD, FCML_EOS_WORD | FCML_EOS_OPT, FCML_RMF_RM ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xC4, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_RM(FCML_REG_GPR, FCML_EOS_DWORD, FCML_EOS_WORD | FCML_EOS_OPT, FCML_RMF_RM ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPINSRW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xC4, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_RM(FCML_REG_GPR, FCML_EOS_DWORD, FCML_EOS_WORD | FCML_EOS_OPT, FCML_RMF_RM ), FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMADDUBSW[] = { { FCML_AMT_SSSE3_SIMD, 0x0000, 0x00EC8000, { 0x0F, 0x38, 0x04 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSSE3_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x04 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMADDUBSW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x04 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x04 }, { FCML_OP_MODRM_R_YMM_RW, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMADDWD[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xF5, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xF5, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMADDWD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xF5, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xF5, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMAXSB[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x3C }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMAXSB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x3C }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x3C }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMAXSD[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x3D }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMAXSD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x3D }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x3D }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMAXSW[] = { { FCML_AMT_MMX, 0x0000, 0x00D88000, { 0x0F, 0xEE, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE, 0x1000, 0x00D88000, { 0x0F, 0xEE, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMAXSW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xEE, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xEE, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMAXUB[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xDE, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xDE, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMAXUB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xDE, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xDE, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMAXUD[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x3F }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMAXUD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x3F }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x3F }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMAXUW[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x3E }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMAXUW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x3E }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x3E }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMINSB[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x38 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMINSB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x38 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x38 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMINSD[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x39 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMINSD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x39 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x39 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMINSW[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xEA, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xEA, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMINSW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xEA, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xEA, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMINUB[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xDA, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xDA, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMINUB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xDA, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xDA, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMINUW[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x3A }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMINUW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x3A }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x3A }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMINUD[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x3B }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMINUD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x3B }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x3B }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMOVMSKB[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x40D88000, { 0x0F, 0xD7, 0x00 }, { FCML_OP_R(FCML_REG_GPR, FCML_EOS_EOSA) | FCML_OA_W, FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_MWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE_SIMD, 0x1000, 0x40D88000, { 0x0F, 0xD7, 0x00 }, { FCML_OP_R(FCML_REG_GPR, FCML_EOS_EOSA) | FCML_OA_W, FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMOVMSKB[] = { { FCML_AMT_AVX_SIMD, 0x13C0, 0x40DA8000, { 0x0F, 0xD7, 0x22 }, { FCML_OP_MODRM_R_W, FCML_OP_VEX_VVVV_REG( FCML_REG_SIMD, FCML_EOS_XWORD ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x13A0, 0x40DA8000, { 0x0F, 0xD7, 0x22 }, { FCML_OP_MODRM_R_W, FCML_OP_VEX_VVVV_REG( FCML_REG_SIMD, FCML_EOS_YWORD ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMOVSXBQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x22 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_16, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x22 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMOVSXBW[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x20 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMOVSXWQ[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x24 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMOVSXWQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x24 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMOVSXWD[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x23 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMOVSXBD[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x21 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMOVSXDQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x25 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMOVSXWD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x23 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMOVSXBQ[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x22 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_16, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMOVSXBW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x20 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x20 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMOVSXDQ[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x25 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMOVSXBD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x21 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x21 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMOVZXWD[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x33 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMOVZXDQ[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x35 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMOVZXDQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x35 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMOVZXWQ[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x34 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMOVZXBQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x32 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_16, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x32 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMOVZXBQ[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x32 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_16, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMOVZXWD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x33 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x33 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMOVZXBD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x31 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x31 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMOVZXWQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x34 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMOVZXBD[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x31 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMOVZXBW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x30 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x30 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMOVZXBW[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x30 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMULDQ[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x28 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMULDQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x28 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x28 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMULHRSW[] = { { FCML_AMT_SSSE3_SIMD, 0x0000, 0x00EC8000, { 0x0F, 0x38, 0x0B }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSSE3_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x0B }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMULHRSW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x0B }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x0B }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMULHUW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xE4, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xE4, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMULHUW[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xE4, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xE4, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMULHW[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xE5, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xE5, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMULHW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xE5, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xE5, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMULUDQ[] = { { FCML_AMT_SSE2_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xF4, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xF4, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMULUDQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xF4, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xF4, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMULLW[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xD5, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xD5, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMULLW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xD5, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xD5, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PMULLD[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x40 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMULLD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x40 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x40 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_POP[] = { { FCML_AMT_GPI, 0x0000, 0x00C58080, { 0x8F, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40081, { 0x58, 0x00, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_GPR, FCML_EOS_EOSA) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00440000, { 0x1F, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_SEG, FCML_REG_DS, FCML_EOS_UNDEFINED ) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_SRO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00440000, { 0x07, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_SEG, FCML_REG_ES, FCML_EOS_UNDEFINED ) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_SRO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00440000, { 0x17, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_SEG, FCML_REG_SS, FCML_EOS_UNDEFINED ) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_SRO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00D80080, { 0x0F, 0xA1, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_SEG, FCML_REG_FS, FCML_EOS_UNDEFINED ) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_SR_FSGSO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00D80080, { 0x0F, 0xA9, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_SEG, FCML_REG_GS, FCML_EOS_UNDEFINED ) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_SR_FSGSO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_POPA[] = { { FCML_AMT_GPI, 0x0000, 0x01440000, { 0x61, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_POPAD[] = { { FCML_AMT_GPI, 0x0000, 0x02440000, { 0x61, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_POPCNT[] = { { FCML_AMT_POPCNT, 0x4000, 0x00D88000, { 0x0F, 0xB8, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_RM_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_POPF[] = { { FCML_AMT_GPI, 0x0000, 0x01C40000, { 0x9D, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_POPFQ[] = { { FCML_AMT_GPI, 0x0000, 0x04840000, { 0x9D, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_POPFD[] = { { FCML_AMT_GPI, 0x0000, 0x02440000, { 0x9D, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_POR[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xEB, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xEB, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPOR[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xEB, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xEB, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PREFETCHT2[] = { { FCML_AMT_SSE, 0x0000, 0x00D99800, { 0x0F, 0x18, 0x00 }, { FCML_OP_MODRM_M_OP_8, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PREFETCHT1[] = { { FCML_AMT_SSE, 0x0000, 0x00D99000, { 0x0F, 0x18, 0x00 }, { FCML_OP_MODRM_M_OP_8, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PREFETCHNTA[] = { { FCML_AMT_SSE, 0x0000, 0x00D98000, { 0x0F, 0x18, 0x00 }, { FCML_OP_MODRM_M_OP_8, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PREFETCHT0[] = { { FCML_AMT_SSE, 0x0000, 0x00D98800, { 0x0F, 0x18, 0x00 }, { FCML_OP_MODRM_M_OP_8, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSADBW[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xF6, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xF6, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSADBW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xF6, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xF6, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSHUFB[] = { { FCML_AMT_SSSE3_SIMD, 0x0000, 0x00EC8000, { 0x0F, 0x38, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSSE3_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSHUFB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSHUFD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x70, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSHUFD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x70, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0x70, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_RM_YMM_OP_256, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSHUFHW[] = { { FCML_AMT_SSE2_SIMD, 0x4000, 0x00D88000, { 0x0F, 0x70, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSHUFHW[] = { { FCML_AMT_AVX_SIMD, 0x40C0, 0x00D88000, { 0x0F, 0x70, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x40A0, 0x00D88000, { 0x0F, 0x70, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_RM_YMM_OP_256, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSHUFLW[] = { { FCML_AMT_SSE2_SIMD, 0x2000, 0x00D88000, { 0x0F, 0x70, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSHUFLW[] = { { FCML_AMT_AVX_SIMD, 0x20C0, 0x00D88000, { 0x0F, 0x70, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x20A0, 0x00D88000, { 0x0F, 0x70, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_RM_YMM_OP_256, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSHUFW[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x70, 0x00 }, { FCML_OP_MODRM_R_MMX_W, FCML_OP_MODRM_RM_MMX_OP, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSIGNB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x08 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x08 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSIGND[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x0A }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x0A }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSIGNW[] = { { FCML_AMT_SSSE3_SIMD, 0x0000, 0x00EC8000, { 0x0F, 0x38, 0x09 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSSE3_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x09 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSIGNB[] = { { FCML_AMT_SSSE3_SIMD, 0x0000, 0x00EC8000, { 0x0F, 0x38, 0x08 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSSE3_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x08 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSIGNW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x38, 0x09 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x09 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSIGND[] = { { FCML_AMT_SSSE3_SIMD, 0x0000, 0x00EC8000, { 0x0F, 0x38, 0x0A }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSSE3_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x0A }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSLLDQ[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00DBB800, { 0x0F, 0x73, 0x00 }, { FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSLLDQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00DBB800, { 0x0F, 0x73, 0x00 }, { FCML_OP_VEX_VVVV_SIMD_REG | FCML_OA_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00DBB800, { 0x0F, 0x73, 0x00 }, { FCML_OP_VEX_VVVV_SIMD_REG | FCML_OA_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_YWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSLLW[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xF1, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xF1, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_MMX_SIMD, 0x0000, 0x00DBB000, { 0x0F, 0x71, 0x00 }, { FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_QWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00DBB000, { 0x0F, 0x71, 0x00 }, { FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSLLD[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xF2, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xF2, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_MMX_SIMD, 0x0000, 0x00DBB000, { 0x0F, 0x72, 0x00 }, { FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_MWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00DBB000, { 0x0F, 0x72, 0x00 }, { FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSLLQ[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xF3, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xF3, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_MMX_SIMD, 0x0000, 0x00DBB000, { 0x0F, 0x73, 0x00 }, { FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_MWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00DBB000, { 0x0F, 0x73, 0x00 }, { FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSLLW[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0xF1, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x1080, 0x00DBB000, { 0x0F, 0x71, 0x00 }, { FCML_OP_VEX_VVVV_SIMD_REG | FCML_OA_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_L, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSLLD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0xF2, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x1080, 0x00DBB000, { 0x0F, 0x72, 0x00 }, { FCML_OP_VEX_VVVV_SIMD_REG | FCML_OA_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_L, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSLLQ[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0xF3, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x1080, 0x00DBB000, { 0x0F, 0x73, 0x00 }, { FCML_OP_VEX_VVVV_SIMD_REG | FCML_OA_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_L, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSRAW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xE1, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xE1, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x10C0, 0x00DBA000, { 0x0F, 0x71, 0x00 }, { FCML_OP_VEX_VVVV_XMM_REG | FCML_OA_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00DBA000, { 0x0F, 0x71, 0x00 }, { FCML_OP_VEX_VVVV_YMM_REG | FCML_OA_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_YWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSRAD[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xE2, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xE2, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_MMX_SIMD, 0x0000, 0x00DBA000, { 0x0F, 0x72, 0x00 }, { FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_MWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00DBA000, { 0x0F, 0x72, 0x00 }, { FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSRAW[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xE1, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xE1, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_MMX_SIMD, 0x0000, 0x00DBA000, { 0x0F, 0x71, 0x00 }, { FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_MWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00DBA000, { 0x0F, 0x71, 0x00 }, { FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSRAD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xE2, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xE2, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x10C0, 0x00DBA000, { 0x0F, 0x72, 0x00 }, { FCML_OP_VEX_VVVV_XMM_REG | FCML_OA_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00DBA000, { 0x0F, 0x72, 0x00 }, { FCML_OP_VEX_VVVV_YMM_REG | FCML_OA_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_YWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSRLDQ[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00DB9800, { 0x0F, 0x73, 0x00 }, { FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSRLDQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00DB9800, { 0x0F, 0x73, 0x00 }, { FCML_OP_VEX_VVVV_XMM_REG | FCML_OA_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00DB9800, { 0x0F, 0x73, 0x00 }, { FCML_OP_VEX_VVVV_YMM_REG | FCML_OA_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_YWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSRLQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xD3, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x10C0, 0x00DB9000, { 0x0F, 0x73, 0x00 }, { FCML_OP_VEX_VVVV_XMM_REG | FCML_OA_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSRLQ[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xD3, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xD3, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_MMX_SIMD, 0x0000, 0x00DB9000, { 0x0F, 0x73, 0x00 }, { FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_MWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00DB9000, { 0x0F, 0x73, 0x00 }, { FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSRLD[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xD2, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xD2, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_MMX_SIMD, 0x0000, 0x00DB9000, { 0x0F, 0x72, 0x00 }, { FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_MWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00DB9000, { 0x0F, 0x72, 0x00 }, { FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSRLW[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xD1, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xD1, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_MMX_SIMD, 0x0000, 0x00DB9000, { 0x0F, 0x71, 0x00 }, { FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_QWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00DB9000, { 0x0F, 0x71, 0x00 }, { FCML_OP_RM(FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSRLD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xD2, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xD2, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x10C0, 0x00DB9000, { 0x0F, 0x72, 0x00 }, { FCML_OP_VEX_VVVV_XMM_REG | FCML_OA_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSRLW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xD1, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xD1, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x10C0, 0x00DB9000, { 0x0F, 0x71, 0x00 }, { FCML_OP_VEX_VVVV_XMM_REG | FCML_OA_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00DB9000, { 0x0F, 0x71, 0x00 }, { FCML_OP_VEX_VVVV_YMM_REG | FCML_OA_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_YWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSUBD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xFA, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xFA, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSUBD[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xFA, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xFA, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSUBW[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xF9, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xF9, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSUBB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xF8, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xF8, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSUBB[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xF8, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xF8, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSUBW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xF9, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xF9, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSUBQ[] = { { FCML_AMT_SSE2_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xFB, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xFB, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSUBQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xFB, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xFB, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSUBSB[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xE8, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xE8, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSUBSW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xE9, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xE9, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSUBSB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xE8, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xE8, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSUBSW[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xE9, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xE9, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSUBUSW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xD9, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xD9, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSUBUSB[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xD8, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xD8, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSUBUSB[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xD8, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xD8, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PSUBUSW[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xD9, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xD9, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPTEST[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00EC8000, { 0x0F, 0x38, 0x17 }, { FCML_OP_MODRM_R_SIMD_L, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PTEST[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0x17 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PUNPCKLBW[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x60, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2, 0x1000, 0x00D88000, { 0x0F, 0x60, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PUNPCKLQDQ[] = { { FCML_AMT_SSE2, 0x1000, 0x00D88000, { 0x0F, 0x6C, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPUNPCKLWD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x61, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0x61, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPUNPCKLQDQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x6C, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0x6C, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPUNPCKLBW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x60, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0x60, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PUNPCKLWD[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x61, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2, 0x1000, 0x00D88000, { 0x0F, 0x61, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PUNPCKLDQ[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x62, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2, 0x1000, 0x00D88000, { 0x0F, 0x62, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPUNPCKLDQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x62, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0x62, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPUNPCKHWD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x69, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0x69, 0x00 }, { FCML_OP_MODRM_R_YMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PUNPCKHDQ[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x6A, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x6A, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PUNPCKHWD[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x69, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x69, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PUNPCKHQDQ[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x6D, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPUNPCKHQDQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x6D, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0x6D, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPUNPCKHBW[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x68, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0x68, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PUNPCKHBW[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x68, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x68, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPUNPCKHDQ[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x6A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0x6A, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PUSH[] = { { FCML_AMT_GPI, 0x0000, 0x00C5B080, { 0xFF, 0x00, 0x00 }, { FCML_OP_MODRM_RM, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40081, { 0x50, 0x00, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_GPR, FCML_EOS_EOSA) | FCML_OA_W , FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40004, { 0x6A, 0x00, 0x00 }, { FCML_OP_IB_EX_EOSA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40084, { 0x68, 0x00, 0x00 }, { FCML_OP_EX_EOSA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00440000, { 0x1E, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_SEG, FCML_REG_DS, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_SRO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00440000, { 0x06, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_SEG, FCML_REG_ES, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_SRO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00440000, { 0x16, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_SEG, FCML_REG_SS, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_SRO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00440000, { 0x0E, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_SEG, FCML_REG_CS, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_SRO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00D80080, { 0x0F, 0xA0, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_SEG, FCML_REG_FS, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_SR_FSGSO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00D80080, { 0x0F, 0xA8, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_SEG, FCML_REG_GS, FCML_EOS_UNDEFINED ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_SR_FSGSO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PUSHA[] = { { FCML_AMT_GPI, 0x0000, 0x01440000, { 0x60, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PUSHAD[] = { { FCML_AMT_GPI, 0x0000, 0x02440000, { 0x60, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PUSHF[] = { { FCML_AMT_GPI, 0x0000, 0x01C40000, { 0x9C, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PUSHFQ[] = { { FCML_AMT_GPI, 0x0000, 0x00840080, { 0x9C, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PUSHFD[] = { { FCML_AMT_GPI, 0x0000, 0x02440000, { 0x9C, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PXOR[] = { { FCML_AMT_MMX_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xEF, 0x00 }, { FCML_OP_MODRM_R_MMX_RW, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xEF, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPXOR[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0xEF, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00D88000, { 0x0F, 0xEF, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_RCL[] = { { FCML_AMT_GPI, 0x0000, 0x00C59000, { 0xD0, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_W, FCML_OP_EXPLICIT_IB(1), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C59000, { 0xD2, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_W, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_CL, FCML_EOS_BYTE ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C59000, { 0xC0, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C59000, { 0xD1, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_EXPLICIT_IB(1), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C59000, { 0xD3, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_CL, FCML_EOS_BYTE ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C59000, { 0xC1, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMM8, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_RCR[] = { { FCML_AMT_GPI, 0x0000, 0x00C59800, { 0xD0, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_W, FCML_OP_EXPLICIT_IB(1), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C59800, { 0xD2, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_W, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_CL, FCML_EOS_BYTE ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C59800, { 0xC0, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C59800, { 0xD1, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_EXPLICIT_IB(1), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C59800, { 0xD3, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_CL, FCML_EOS_BYTE ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C59800, { 0xC1, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMM8, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ROL[] = { { FCML_AMT_GPI, 0x0000, 0x00C58000, { 0xD0, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_W, FCML_OP_EXPLICIT_IB(1), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C58000, { 0xD2, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_W, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_CL, FCML_EOS_BYTE ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C58000, { 0xC0, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C58000, { 0xD1, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_EXPLICIT_IB(1), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C58000, { 0xD3, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_CL, FCML_EOS_BYTE ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C58000, { 0xC1, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMM8, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ROR[] = { { FCML_AMT_GPI, 0x0000, 0x00C58800, { 0xD0, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_W, FCML_OP_EXPLICIT_IB(1), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C58800, { 0xD2, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_W, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_CL, FCML_EOS_BYTE ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C58800, { 0xC0, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C58800, { 0xD1, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_EXPLICIT_IB(1), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C58800, { 0xD3, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_CL, FCML_EOS_BYTE ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C58800, { 0xC1, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMM8, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_RCPPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x53, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VRCPPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x53, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_RCPSS[] = { { FCML_AMT_SSE_SIMD, 0x4000, 0x00D88000, { 0x0F, 0x53, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VRCPSS[] = { { FCML_AMT_AVX_SIMD, 0x40C0, 0x00D88000, { 0x0F, 0x53, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_RDFSBASE[] = { { FCML_AMT_SYSTEM, 0x4000, 0x03998000, { 0x0F, 0xAE, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_DWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SYSTEM, 0x4000, 0x04998000, { 0x0F, 0xAE, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_QWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_RDGSBASE[] = { { FCML_AMT_SYSTEM, 0x4000, 0x03998800, { 0x0F, 0xAE, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_DWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SYSTEM, 0x4000, 0x04998800, { 0x0F, 0xAE, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_QWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_RDRAND[] = { { FCML_AMT_RDRAND, 0x0000, 0x00DBB000, { 0x0F, 0xC7, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_EOSA, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_RDTSCP[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00EC0000, { 0x0F, 0x01, 0xF9 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_RDTSC[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D80000, { 0x0F, 0x31, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_RDPMC[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D80000, { 0x0F, 0x33, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_RDMSR[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D80000, { 0x0F, 0x32, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_RET[] = { { FCML_AMT_GPI | FCML_AMT_CTI, 0x0000, 0x00C40080, { 0xC3, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI | FCML_AMT_CTI, 0x0000, 0x00C40080, { 0xC2, 0x00, 0x00 }, { FCML_OP_IW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_RETF[] = { { FCML_AMT_GPI | FCML_AMT_CTI, 0x0000, 0x00C40000, { 0xCB, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI | FCML_AMT_CTI, 0x0000, 0x00C40000, { 0xCA, 0x00, 0x00 }, { FCML_OP_IW, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ROUNDPD[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0x09 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VROUNDPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00EC8000, { 0x0F, 0x3A, 0x09 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ROUNDPS[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0x08 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VROUNDPS[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00EC8000, { 0x0F, 0x3A, 0x08 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ROUNDSD[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0x0B }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VROUNDSD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x3A, 0x0B }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ROUNDSS[] = { { FCML_AMT_SSE41_SIMD, 0x1000, 0x00EC8000, { 0x0F, 0x3A, 0x0A }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VROUNDSS[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00EC8000, { 0x0F, 0x3A, 0x0A }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_RSM[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00580000, { 0x0F, 0xAA, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VRSQRTPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x52, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_RSQRTPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x52, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_RSQRTSS[] = { { FCML_AMT_SSE_SIMD, 0x4000, 0x00D88000, { 0x0F, 0x52, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VRSQRTSS[] = { { FCML_AMT_AVX_SIMD, 0x40C0, 0x00D88000, { 0x0F, 0x52, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SAHF[] = { { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0x9E, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SAR[] = { { FCML_AMT_GPI, 0x0000, 0x00C5B800, { 0xD0, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_OP_EXPLICIT_IB(1), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5B800, { 0xD2, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_CL, FCML_EOS_BYTE ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5B800, { 0xC0, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5B800, { 0xD1, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_EXPLICIT_IB(1), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5B800, { 0xD3, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_CL, FCML_EOS_BYTE ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5B800, { 0xC1, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMM8, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SHL_SAL[] = { { FCML_AMT_GPI, 0x0000, 0x00C5A000, { 0xD0, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_OP_EXPLICIT_IB(1), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5A000, { 0xD2, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_CL, FCML_EOS_BYTE ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5A000, { 0xC0, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5A000, { 0xD1, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_EXPLICIT_IB(1), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5A000, { 0xD3, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_CL, FCML_EOS_BYTE ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5A000, { 0xC1, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMM8, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SHR[] = { { FCML_AMT_GPI, 0x0000, 0x00C5A800, { 0xD0, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_OP_EXPLICIT_IB(1), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5A800, { 0xD2, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_CL, FCML_EOS_BYTE ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5A800, { 0xC0, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5A800, { 0xD1, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_EXPLICIT_IB(1), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5A800, { 0xD3, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_CL, FCML_EOS_BYTE ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C5A800, { 0xC1, 0x00, 0x00 }, { FCML_OP_MODRM_RM_RW, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMM8, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SBB[] = { { FCML_AMT_GPI, 0x0000, 0x00C40002, { 0x1C, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_BYTE ) | FCML_OA_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ER8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40002, { 0x1D, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_EOSA ) | FCML_OA_W, FCML_OP_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ERO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C59806, { 0x80, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C59806, { 0x81, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C59806, { 0x83, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_IB_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C48002, { 0x18, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_8_W, FCML_OP_MODRM_R_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_R8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C48002, { 0x19, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_W, FCML_OP_MODRM_R, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_RO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48002, { 0x1A, 0x00, 0x00 }, { FCML_OP_MODRM_R_8_W, FCML_OP_MODRM_RM_OP_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R8_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48002, { 0x1B, 0x00, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_RM_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SCAS[] = { { FCML_AMT_GPI, 0x0002, 0x00C40000, { 0xAE, 0x00, 0x00 }, { FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_DI, FCML_EOS_BYTE, FCML_SEG_ENCODE_REGISTER( FCML_REG_ES, FCML_SEG_DENY_OVERRIDE ) ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0002, 0x00C40000, { 0xAF, 0x00, 0x00 }, { FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_DI, FCML_EOS_EOSA,FCML_SEG_ENCODE_REGISTER( FCML_REG_ES, FCML_SEG_DENY_OVERRIDE ) ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SETCC[] = { { FCML_AMT_GPI, 0x0000, 0x00D88040, { 0x0F, 0x90, 0x00 }, { FCML_OP_MODRM_RM_OP_8_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SFENCE[] = { { FCML_AMT_SSE, 0x0000, 0x00EC0000, { 0x0F, 0xAE, 0xF8 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SGDT[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D98000, { 0x0F, 0x01, 0x00 }, { FCML_OP_MODRM_M_UNDEF, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SHLD[] = { { FCML_AMT_GPI, 0x0000, 0x00D88000, { 0x0F, 0xA4, 0x00 }, { FCML_OP_MODRM_RM_OP_W, FCML_OP_MODRM_R, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00D88000, { 0x0F, 0xA5, 0x00 }, { FCML_OP_MODRM_RM_OP_W, FCML_OP_MODRM_R, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_CL, FCML_EOS_BYTE ), FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SHRD[] = { { FCML_AMT_GPI, 0x0000, 0x00D88000, { 0x0F, 0xAC, 0x00 }, { FCML_OP_MODRM_RM_OP_W, FCML_OP_MODRM_R,FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00D88000, { 0x0F, 0xAD, 0x00 }, { FCML_OP_MODRM_RM_OP_W, FCML_OP_MODRM_R,FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_CL, FCML_EOS_BYTE ), FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SKINIT[] = { { FCML_AMT_SVM, 0x0000, 0x00EC0000, { 0x0F, 0x01, 0xDE }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_EAX, FCML_EOS_DWORD ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SVM, 0x0000, 0x00EC0000, { 0x0F, 0x01, 0xDE }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SLWPCB[] = { { FCML_AMT_LWP, 0x0450, 0x00DB8800, { 0x09, 0x12, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_DWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_LWP, 0x0448, 0x00DB8800, { 0x09, 0x12, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_QWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SHUFPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0xC6, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VSHUFPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0xC6, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SHUFPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0xC6, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VSHUFPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0xC6, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SIDT[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D98800, { 0x0F, 0x01, 0x00 }, { FCML_OP_MODRM_M_UNDEF, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SLDT[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D98000, { 0x0F, 0x00, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_EOSA, FCML_EOS_WORD | FCML_EOS_OPT, FCML_RMF_RM ) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SMSW[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D9A000, { 0x0F, 0x01, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_EOSA, FCML_EOS_WORD | FCML_EOS_OPT, FCML_RMF_RM ) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SQRTPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x51, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VSQRTPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x51, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SQRTPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x51, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VSQRTPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x51, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SQRTSD[] = { { FCML_AMT_SSE2_SIMD, 0x2000, 0x00D88000, { 0x0F, 0x51, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VSQRTSD[] = { { FCML_AMT_AVX_SIMD, 0x20C0, 0x00D88000, { 0x0F, 0x51, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SQRTSS[] = { { FCML_AMT_SSE_SIMD, 0x4000, 0x00D88000, { 0x0F, 0x51, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VSQRTSS[] = { { FCML_AMT_AVX_SIMD, 0x40C0, 0x00D88000, { 0x0F, 0x51, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_STC[] = { { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0xF9, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_STD[] = { { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0xFD, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_STGI[] = { { FCML_AMT_SVM, 0x0000, 0x00EC0000, { 0x0F, 0x01, 0xDC }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_STI[] = { { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0xFB, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_STMXCSR[] = { { FCML_AMT_SSE, 0x0000, 0x00D99800, { 0x0F, 0xAE, 0x00 }, { FCML_OP_MODRM_M_OP_32_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VSTMXCSR[] = { { FCML_AMT_AVX, 0x00C0, 0x00D99800, { 0x0F, 0xAE, 0x00 }, { FCML_OP_MODRM_M_OP_32_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_STOS[] = { { FCML_AMT_GPI, 0x0004, 0x00C40000, { 0xAA, 0x00, 0x00 }, { FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_DI, FCML_EOS_BYTE, FCML_SEG_ENCODE_REGISTER( FCML_REG_ES, FCML_SEG_DENY_OVERRIDE ) ) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0004, 0x00C40000, { 0xAB, 0x00, 0x00 }, { FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_DI, FCML_EOS_EOSA,FCML_SEG_ENCODE_REGISTER( FCML_REG_ES, FCML_SEG_DENY_OVERRIDE ) ) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_STR[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D98800, { 0x0F, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_16_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SUB[] = { { FCML_AMT_GPI, 0x0000, 0x00C40002, { 0x2C, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_BYTE ) | FCML_OA_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ER8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40002, { 0x2D, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_EOSA ) | FCML_OA_W, FCML_OP_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ERO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C5A806, { 0x80, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C5A806, { 0x81, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C5A806, { 0x83, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_IB_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C48002, { 0x28, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_8_W, FCML_OP_MODRM_R_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_R8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C48002, { 0x29, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_W, FCML_OP_MODRM_R, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_RO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48002, { 0x2A, 0x00, 0x00 }, { FCML_OP_MODRM_R_8_W, FCML_OP_MODRM_RM_OP_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R8_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48002, { 0x2B, 0x00, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_RM_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SUBPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x5C, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VSUBPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x5C, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SUBPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x5C, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VSUBPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x5C, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SUBSD[] = { { FCML_AMT_SSE2_SIMD, 0x2000, 0x00D88000, { 0x0F, 0x5C, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VSUBSD[] = { { FCML_AMT_AVX_SIMD, 0x20C0, 0x00D88000, { 0x0F, 0x5C, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SUBSS[] = { { FCML_AMT_SSE_SIMD, 0x4000, 0x00D88000, { 0x0F, 0x5C, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VSUBSS[] = { { FCML_AMT_AVX_SIMD, 0x40C0, 0x00D88000, { 0x0F, 0x5C, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SWAPGS[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00AC0000, { 0x0F, 0x01, 0xF8 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SYSCALL[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00980000, { 0x0F, 0x05, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SYSENTER[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D80000, { 0x0F, 0x34, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SYSEXIT[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D80000, { 0x0F, 0x35, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SYSRET[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00980000, { 0x0F, 0x07, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_T1MSKC[] = { { FCML_AMT_TBM, 0x0450, 0x00D9B800, { 0x09, 0x01, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_TBM, 0x0448, 0x00D9B800, { 0x09, 0x01, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_TEST[] = { { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0xA8, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_BYTE ) | FCML_OA_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ER8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0xA9, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_EOSA ) | FCML_OA_W, FCML_OP_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ERO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C58000, { 0xF6, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C58000, { 0xF7, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48000, { 0x84, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_8_W, FCML_OP_MODRM_R_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_R8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48000, { 0x85, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_W, FCML_OP_MODRM_R, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_UCOMISD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x2E, 0x00 }, { FCML_OP_MODRM_R_XMM, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VUCOMISD[] = { { FCML_AMT_AVX_SIMD, 0x10C0, 0x00D88000, { 0x0F, 0x2E, 0x00 }, { FCML_OP_MODRM_R_XMM, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_UCOMISS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x2E, 0x00 }, { FCML_OP_MODRM_R_XMM, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VUCOMISS[] = { { FCML_AMT_AVX_SIMD, 0x00C0, 0x00D88000, { 0x0F, 0x2E, 0x00 }, { FCML_OP_MODRM_R_XMM, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_UD2[] = { { FCML_AMT_GPI, 0x0000, 0x00D80000, { 0x0F, 0x0B, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_UNPCKHPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x15, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VUNPCKHPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x15, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_UNPCKHPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x15, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VUNPCKHPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x15, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_UNPCKLPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x14, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VUNPCKLPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x14, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_UNPCKLPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x14, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VUNPCKLPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x14, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMPTRLD[] = { { FCML_AMT_VMX, 0x0000, 0x0099B000, { 0x0F, 0xC7, 0x00 }, { FCML_OP_MODRM_M_OP_64_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMPTRST[] = { { FCML_AMT_VMX, 0x0000, 0x0099B800, { 0x0F, 0xC7, 0x00 }, { FCML_OP_MODRM_M_OP_64_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMCLEAR[] = { { FCML_AMT_VMX, 0x1000, 0x0099B800, { 0x0F, 0xC7, 0x00 }, { FCML_OP_MODRM_M_OP_64_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMREAD[] = { { FCML_AMT_VMX, 0x0000, 0x00588000, { 0x0F, 0x78, 0x00 }, { FCML_OP_MODRM_RM_OP_32_W, FCML_OP_MODRM_R_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_VMX, 0x0000, 0x00988000, { 0x0F, 0x78, 0x00 }, { FCML_OP_MODRM_RM_OP_64_W, FCML_OP_MODRM_R_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMWRITE[] = { { FCML_AMT_VMX, 0x0000, 0x00588000, { 0x0F, 0x79, 0x00 }, { FCML_OP_MODRM_R_32_W, FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_VMX, 0x0000, 0x00988000, { 0x0F, 0x79, 0x00 }, { FCML_OP_MODRM_R_64_W, FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMLAUNCH[] = { { FCML_AMT_VMX, 0x0000, 0x00AC0000, { 0x0F, 0x01, 0xC2 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMRESUME[] = { { FCML_AMT_VMX, 0x0000, 0x00AC0000, { 0x0F, 0x01, 0xC3 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMXOFF[] = { { FCML_AMT_VMX, 0x0000, 0x00AC0000, { 0x0F, 0x01, 0xC4 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMXON[] = { { FCML_AMT_VMX, 0x4000, 0x0099B000, { 0x0F, 0xC7, 0x00 }, { FCML_OP_MODRM_M_OP_64_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMCALL[] = { { FCML_AMT_VMX, 0x0000, 0x00AC0000, { 0x0F, 0x01, 0xC1 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMFUNC[] = { { FCML_AMT_VMX, 0x0000, 0x00AC0000, { 0x0F, 0x01, 0xD4 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VBROADCASTSD[] = { { FCML_AMT_AVX_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x19 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A0, 0x00EC8000, { 0x0F, 0x38, 0x19 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_XWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VBROADCASTSS[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00EC8000, { 0x0F, 0x38, 0x18 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_M_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x1080, 0x00EE8000, { 0x0F, 0x38, 0x18 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_RM( FCML_REG_SIMD, FCML_EOS_OWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VBROADCASTI128[] = { { FCML_AMT_AVX2_SIMD, 0x10B0, 0x00EC8000, { 0x0F, 0x38, 0x5A }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_M_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VBROADCASTF128[] = { { FCML_AMT_AVX_SIMD, 0x10B0, 0x00EC8000, { 0x0F, 0x38, 0x1A }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_M_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPBROADCASTB[] = { { FCML_AMT_AVX2_SIMD, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0x78 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_XMM_OP_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPBROADCASTW[] = { { FCML_AMT_AVX2_SIMD, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0x79 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_XMM_OP_16, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPBROADCASTD[] = { { FCML_AMT_AVX2_SIMD, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0x58 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPBROADCASTQ[] = { { FCML_AMT_AVX2_SIMD, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0x59 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCVTPH2PS[] = { { FCML_AMT_F16C, 0x10D0, 0x00EC8000, { 0x0F, 0x38, 0x13 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_F16C, 0x10B0, 0x00EC8000, { 0x0F, 0x38, 0x13 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VCVTPS2PH[] = { { FCML_AMT_F16C, 0x10D0, 0x00EC8000, { 0x0F, 0x3A, 0x1D }, { FCML_OP_MODRM_RM_XMM_OP_64_W, FCML_OP_MODRM_R_XMM, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_F16C, 0x10B0, 0x00EC8000, { 0x0F, 0x3A, 0x1D }, { FCML_OP_MODRM_RM_XMM_OP_128_W, FCML_OP_MODRM_R_YMM, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VERR[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D9A000, { 0x0F, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_16, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VERW[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D9A800, { 0x0F, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_16, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMLOAD[] = { { FCML_AMT_SVM, 0x0000, 0x00EC0000, { 0x0F, 0x01, 0xDA }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_EAX, FCML_EOS_EASA ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMMCALL[] = { { FCML_AMT_SVM, 0x0000, 0x00EC0000, { 0x0F, 0x01, 0xD9 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMRUN[] = { { FCML_AMT_SVM, 0x0000, 0x00EC0000, { 0x0F, 0x01, 0xD8 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_EAX, FCML_EOS_EASA ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VMSAVE[] = { { FCML_AMT_SVM, 0x0000, 0x00EC0000, { 0x0F, 0x01, 0xDB }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_EAX, FCML_EOS_EASA ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPERMILPD[] = { { FCML_AMT_AVX_SIMD, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0x0D }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x1090, 0x00EC8000, { 0x0F, 0x3A, 0x05 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPERMILPS[] = { { FCML_AMT_AVX_SIMD, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0x0C }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX_SIMD, 0x1090, 0x00EC8000, { 0x0F, 0x3A, 0x04 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSLLVQ[] = { { FCML_AMT_AVX2_SIMD, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0x47 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSLLVD[] = { { FCML_AMT_AVX2_SIMD, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0x47 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSRLVD[] = { { FCML_AMT_AVX2_SIMD, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0x45 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSRLVQ[] = { { FCML_AMT_AVX2_SIMD, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0x45 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSRAVD[] = { { FCML_AMT_AVX2_SIMD, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0x46 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPERMD[] = { { FCML_AMT_AVX2_SIMD, 0x10B0, 0x00EC8000, { 0x0F, 0x38, 0x36 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPERMPD[] = { { FCML_AMT_AVX2_SIMD, 0x10A8, 0x00EC8000, { 0x0F, 0x3A, 0x01 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_RM_YMM_OP_256, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPERMQ[] = { { FCML_AMT_AVX2_SIMD, 0x10A8, 0x00EC8000, { 0x0F, 0x3A, 0x00 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_MODRM_RM_YMM_OP_256, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPERMPS[] = { { FCML_AMT_AVX2_SIMD, 0x10B0, 0x00EC8000, { 0x0F, 0x38, 0x16 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPERM2F128[] = { { FCML_AMT_AVX_SIMD, 0x10B0, 0x00EC8000, { 0x0F, 0x3A, 0x06 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPERM2I128[] = { { FCML_AMT_AVX2_SIMD, 0x10B0, 0x00EC8000, { 0x0F, 0x3A, 0x46 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_YMM_OP_256, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VEXTRACTI128[] = { { FCML_AMT_AVX2_SIMD, 0x10B0, 0x00EC8000, { 0x0F, 0x3A, 0x39 }, { FCML_OP_MODRM_RM_XMM_OP_128_W, FCML_OP_MODRM_R_YMM, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VINSERTI128[] = { { FCML_AMT_AVX2_SIMD, 0x10B0, 0x00EC8000, { 0x0F, 0x3A, 0x38 }, { FCML_OP_MODRM_R_YMM_W, FCML_OP_VEX_VVVV_YMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VTESTPS[] = { { FCML_AMT_AVX_SIMD, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0x0E }, { FCML_OP_MODRM_R_SIMD_L, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VTESTPD[] = { { FCML_AMT_AVX_SIMD, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0x0F }, { FCML_OP_MODRM_R_SIMD_L, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VGATHERDPD[] = { { FCML_AMT_AVX2_SIMD, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0x92 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VSIB(FCML_VSIB_XMM,FCML_EOS_DWORD | FCML_EOS_OPT), FCML_OP_VEX_VVVV_SIMD_REG | FCML_OA_RW, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VGATHERQPD[] = { { FCML_AMT_AVX2_SIMD, 0x10C8, 0x00EC8000, { 0x0F, 0x38, 0x93 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VSIB(FCML_VSIB_XMM,FCML_EOS_QWORD | FCML_EOS_OPT), FCML_OP_VEX_VVVV_SIMD_REG | FCML_OA_RW, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A8, 0x00EC8000, { 0x0F, 0x38, 0x93 }, { FCML_OP_MODRM_R_YMM_RW, FCML_OP_VSIB(FCML_VSIB_YMM,FCML_EOS_QWORD | FCML_EOS_OPT), FCML_OP_VEX_VVVV_SIMD_REG | FCML_OA_RW, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VGATHERDPS[] = { { FCML_AMT_AVX2_SIMD, 0x10D0, 0x00EC8000, { 0x0F, 0x38, 0x92 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VSIB(FCML_VSIB_XMM,FCML_EOS_DWORD | FCML_EOS_OPT), FCML_OP_VEX_VVVV_SIMD_REG | FCML_OA_RW, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10B0, 0x00EC8000, { 0x0F, 0x38, 0x92 }, { FCML_OP_MODRM_R_YMM_RW, FCML_OP_VSIB(FCML_VSIB_YMM,FCML_EOS_DWORD | FCML_EOS_OPT), FCML_OP_VEX_VVVV_SIMD_REG | FCML_OA_RW, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VGATHERQPS[] = { { FCML_AMT_AVX2_SIMD, 0x10D0, 0x00EC8000, { 0x0F, 0x38, 0x93 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VSIB(FCML_VSIB_XMM,FCML_EOS_QWORD | FCML_EOS_OPT), FCML_OP_VEX_VVVV_XMM_REG | FCML_OA_RW, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10B0, 0x00EC8000, { 0x0F, 0x38, 0x93 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VSIB(FCML_VSIB_YMM,FCML_EOS_QWORD | FCML_EOS_OPT), FCML_OP_VEX_VVVV_XMM_REG | FCML_OA_RW, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPGATHERDD[] = { { FCML_AMT_AVX2_SIMD, 0x10D0, 0x00EC8000, { 0x0F, 0x38, 0x90 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VSIB(FCML_VSIB_XMM,FCML_EOS_DWORD | FCML_EOS_OPT), FCML_OP_VEX_VVVV_SIMD_REG | FCML_OA_RW, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10B0, 0x00EC8000, { 0x0F, 0x38, 0x90 }, { FCML_OP_MODRM_R_YMM_RW, FCML_OP_VSIB(FCML_VSIB_YMM,FCML_EOS_DWORD | FCML_EOS_OPT), FCML_OP_VEX_VVVV_SIMD_REG | FCML_OA_RW, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPGATHERQD[] = { { FCML_AMT_AVX2_SIMD, 0x10D0, 0x00EC8000, { 0x0F, 0x38, 0x91 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VSIB(FCML_VSIB_XMM,FCML_EOS_QWORD | FCML_EOS_OPT), FCML_OP_VEX_VVVV_XMM_REG | FCML_OA_RW, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10B0, 0x00EC8000, { 0x0F, 0x38, 0x91 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VSIB(FCML_VSIB_YMM,FCML_EOS_QWORD | FCML_EOS_OPT), FCML_OP_VEX_VVVV_XMM_REG | FCML_OA_RW, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPGATHERDQ[] = { { FCML_AMT_AVX2_SIMD, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0x90 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VSIB(FCML_VSIB_XMM,FCML_EOS_DWORD | FCML_EOS_OPT), FCML_OP_VEX_VVVV_SIMD_REG | FCML_OA_RW, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPGATHERQQ[] = { { FCML_AMT_AVX2_SIMD, 0x10C8, 0x00EC8000, { 0x0F, 0x38, 0x91 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VSIB(FCML_VSIB_XMM,FCML_EOS_QWORD | FCML_EOS_OPT), FCML_OP_VEX_VVVV_SIMD_REG | FCML_OA_RW, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_AVX2_SIMD, 0x10A8, 0x00EC8000, { 0x0F, 0x38, 0x91 }, { FCML_OP_MODRM_R_YMM_RW, FCML_OP_VSIB(FCML_VSIB_YMM,FCML_EOS_QWORD | FCML_EOS_OPT), FCML_OP_VEX_VVVV_SIMD_REG | FCML_OA_RW, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VZEROALL[] = { { FCML_AMT_AVX_SIMD, 0x00A0, 0x00D80000, { 0x0F, 0x77, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VZEROUPPER[] = { { FCML_AMT_AVX_SIMD, 0x00C0, 0x00D80000, { 0x0F, 0x77, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_WAIT[] = { { FCML_AMT_FPU, 0x0000, 0x00C40000, { 0x9B, 0x00, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_WBINVD[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D80000, { 0x0F, 0x09, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_WRFSBASE[] = { { FCML_AMT_SYSTEM | FCML_AMT_FSGSBASE, 0x4010, 0x03DB9000, { 0x0F, 0xAE, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_DWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA , FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SYSTEM | FCML_AMT_FSGSBASE, 0x4008, 0x049B9000, { 0x0F, 0xAE, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_QWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA , FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_WRGSBASE[] = { { FCML_AMT_SYSTEM | FCML_AMT_FSGSBASE, 0x4010, 0x03DB9800, { 0x0F, 0xAE, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_DWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA , FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_SYSTEM | FCML_AMT_FSGSBASE, 0x4008, 0x049B9800, { 0x0F, 0xAE, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_QWORD, FCML_EOS_UNDEFINED, FCML_RMF_R ), FCML_NA , FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_WRMSR[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00D80000, { 0x0F, 0x30, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_XADD[] = { { FCML_AMT_GPI, 0x0807, 0x00D88000, { 0x0F, 0xC0, 0x00 }, { FCML_OP_MODRM_RM_OP_8_RW, FCML_OP_MODRM_R_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_R8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00D88000, { 0x0F, 0xC1, 0x00 }, { FCML_OP_MODRM_RM_OP_RW, FCML_OP_MODRM_R, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_RO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_XCHG[] = { { FCML_AMT_GPI, 0x0000, 0x00C40001, { 0x90, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_EAX, FCML_EOS_EOSA ) | FCML_OA_RW, FCML_OP_OPCODE_REG( FCML_REG_GPR, FCML_EOS_EOSA) | FCML_OA_RW, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40001, { 0x90, 0x00, 0x00 }, { FCML_OP_OPCODE_REG( FCML_REG_GPR, FCML_EOS_EOSA) | FCML_OA_RW, FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_EAX, FCML_EOS_EOSA ) | FCML_OA_RW, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C48000, { 0x86, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_8_RW, FCML_OP_MODRM_R_8_W, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C48000, { 0x86, 0x00, 0x00 }, { FCML_OP_MODRM_R_8_W, FCML_OP_MODRM_RM_OP_8_W, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C48000, { 0x87, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_RW, FCML_OP_MODRM_R_W, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C48000, { 0x87, 0x00, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_RM_OP_W, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_XGETBV[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00EC0000, { 0x0F, 0x01, 0xD0 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_XLAT[] = { { FCML_AMT_GPI, 0x0000, 0x00C40000, { 0xD7, 0x00, 0x00 }, { FCML_OP_EXPLICIT_GPS_REG_ADDRESSING( FCML_REG_BX, FCML_EOS_BYTE, FCML_SEG_ENCODE_REGISTER( FCML_REG_DS, FCML_SEG_ALLOW_OVERRIDE ) ), FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_XOR[] = { { FCML_AMT_GPI, 0x0000, 0x00C40002, { 0x34, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_BYTE ), FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ER8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C40002, { 0x35, 0x00, 0x00 }, { FCML_OP_EXPLICIT_REG( FCML_REG_GPR, FCML_REG_AL, FCML_EOS_EOSA ) | FCML_OA_W, FCML_OP_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_ERO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C5B006, { 0x80, 0x00, 0x00 }, { FCML_OP_MODRM_RM_8_W, FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C5B006, { 0x81, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMMO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C5B006, { 0x83, 0x00, 0x00 }, { FCML_OP_MODRM_RM_W, FCML_OP_IB_EX_EOSA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_IMM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C48002, { 0x30, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_8_W, FCML_OP_MODRM_R_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RM8_R8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0807, 0x00C48002, { 0x31, 0x00, 0x00 }, { FCML_OP_MODRM_RM_OP_W, FCML_OP_MODRM_R, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RMO_RO, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48002, { 0x32, 0x00, 0x00 }, { FCML_OP_MODRM_R_8_W, FCML_OP_MODRM_RM_OP_8, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R8_RM8, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x0000, 0x00C48002, { 0x33, 0x00, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_RM_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_RO_RMO, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_XORPD[] = { { FCML_AMT_SSE2_SIMD, 0x1000, 0x00D88000, { 0x0F, 0x57, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VXORPD[] = { { FCML_AMT_AVX_SIMD, 0x1080, 0x00D88000, { 0x0F, 0x57, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_XORPS[] = { { FCML_AMT_SSE_SIMD, 0x0000, 0x00D88000, { 0x0F, 0x57, 0x00 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VXORPS[] = { { FCML_AMT_AVX_SIMD, 0x0080, 0x00D88000, { 0x0F, 0x57, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_XRSTOR[] = { { FCML_AMT_SYSTEM, 0x0010, 0x03D9A800, { 0x0F, 0xAE, 0x00 }, { FCML_OP_MODRM_M_OP_512B, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_XRSTOR64[] = { { FCML_AMT_SYSTEM, 0x0008, 0x0499A800, { 0x0F, 0xAE, 0x00 }, { FCML_OP_MODRM_M_OP_512B, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_XSAVE[] = { { FCML_AMT_SYSTEM, 0x0010, 0x03D9A000, { 0x0F, 0xAE, 0x00 }, { FCML_OP_MODRM_M_OP_512B_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_XSAVE64[] = { { FCML_AMT_SYSTEM, 0x0008, 0x0499A000, { 0x0F, 0xAE, 0x00 }, { FCML_OP_MODRM_M_OP_512B_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_XSAVEOPT[] = { { FCML_AMT_SYSTEM, 0x0010, 0x03D9B000, { 0x0F, 0xAE, 0x00 }, { FCML_OP_MODRM_M_UNDEF_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_XSAVEOPT64[] = { { FCML_AMT_SYSTEM, 0x0008, 0x0499B000, { 0x0F, 0xAE, 0x00 }, { FCML_OP_MODRM_M_UNDEF_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_XSETBV[] = { { FCML_AMT_SYSTEM, 0x0000, 0x00EC0000, { 0x0F, 0x01, 0xD1 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; /**************** * AMD 3D Now! ****************/ struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_FEMMS[] = { { FCML_AMT_3DNOW, 0x0000, 0x00D80000, { 0x0F, 0x0E, 0x00 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; fcml_st_def_instruction_code_desc fcml_st_def_instruction_code_def_AMD3DNOW[] = { { F_PAVGUSB, 0xBF }, { F_PF2ID, 0x1D }, { F_PFACC, 0xAE }, { F_PFADD, 0x9E }, { F_PFCMPEQ, 0xB0 }, { F_PFCMPGE, 0x90 }, { F_PFCMPGT, 0xA0 }, { F_PFMAX, 0xA4 }, { F_PFMIN, 0x94 }, { F_PFMUL, 0xB4 }, { F_PFRCP, 0x96 }, { F_PFRCPIT1, 0xA6 }, { F_PFRCPIT2, 0xB6 }, { F_PFRSQIT1, 0xA7 }, { F_PFRSQRT, 0x97 }, { F_PFSUB, 0x9A }, { F_PFSUBR, 0xAA }, { F_PI2FD, 0x0D }, { F_PMULHRW, 0xB7 }, { F_PF2IW, 0x1C }, { F_PFNACC, 0x8A }, { F_PFPNACC, 0x8E }, { F_PI2FW, 0x0C }, { F_PSWAPD, 0xBB }, { 0, 0 } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MI_AMD3DNOW[] = { { FCML_AMT_3DNOW_SIMD, 0x8000, 0x00D88000, { 0x0F, 0x0F, 0x00 }, { FCML_OP_MODRM_R_MMX_W, FCML_OP_MODRM_RM_MMX_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PREFETCH[] = { { FCML_AMT_3DNOW | FCML_AMT_PRFCHW, 0x0000, 0x00D98000, { 0x0F, 0x0D, 0x00 }, { FCML_OP_MODRM_M_OP_8, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PREFETCHW[] = { { FCML_AMT_3DNOW | FCML_AMT_PRFCHW, 0x0000, 0x00D98800, { 0x0F, 0x0D, 0x00 }, { FCML_OP_MODRM_M_OP_8, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADD213PD[] = { { FCML_AMT_FMA, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0xA8 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADDPD[] = { { FCML_AMT_FMA4, 0x1090, 0x00EC8000, { 0x0F, 0x3A, 0x69 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x1088, 0x00EC8000, { 0x0F, 0x3A, 0x69 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADD132PD[] = { { FCML_AMT_FMA, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0x98 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADD231PD[] = { { FCML_AMT_FMA, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0xB8 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADDPS[] = { { FCML_AMT_FMA4, 0x1090, 0x00EC8000, { 0x0F, 0x3A, 0x68 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x1088, 0x00EC8000, { 0x0F, 0x3A, 0x68 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADD231PS[] = { { FCML_AMT_FMA, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0xB8 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADD132PS[] = { { FCML_AMT_FMA, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0x98 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADD213PS[] = { { FCML_AMT_FMA, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0xA8 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADD132SD[] = { { FCML_AMT_FMA, 0x10C8, 0x00EC8000, { 0x0F, 0x38, 0x99 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADD213SD[] = { { FCML_AMT_FMA, 0x10C8, 0x00EC8000, { 0x0F, 0x38, 0xA9 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADDSD[] = { { FCML_AMT_FMA4, 0x10D0, 0x00EC8000, { 0x0F, 0x3A, 0x6B }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x10C8, 0x00EC8000, { 0x0F, 0x3A, 0x6B }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADD231SD[] = { { FCML_AMT_FMA, 0x10C8, 0x00EC8000, { 0x0F, 0x38, 0xB9 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADD132SS[] = { { FCML_AMT_FMA, 0x10D0, 0x00EC8000, { 0x0F, 0x38, 0x99 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADD213SS[] = { { FCML_AMT_FMA, 0x10D0, 0x00EC8000, { 0x0F, 0x38, 0xA9 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADDSS[] = { { FCML_AMT_FMA4, 0x10D0, 0x00EC8000, { 0x0F, 0x3A, 0x6A }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x10C8, 0x00EC8000, { 0x0F, 0x3A, 0x6A }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADD231SS[] = { { FCML_AMT_FMA, 0x10D0, 0x00EC8000, { 0x0F, 0x38, 0xB9 }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADDSUB132PD[] = { { FCML_AMT_FMA, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0x96 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADDSUB213PD[] = { { FCML_AMT_FMA, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0xA6 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADDSUBPD[] = { { FCML_AMT_FMA4, 0x1090, 0x00EC8000, { 0x0F, 0x3A, 0x5D }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x1088, 0x00EC8000, { 0x0F, 0x3A, 0x5D }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADDSUB231PD[] = { { FCML_AMT_FMA, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0xB6 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADDSUB231PS[] = { { FCML_AMT_FMA, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0xB6 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADDSUBPS[] = { { FCML_AMT_FMA4, 0x1090, 0x00EC8000, { 0x0F, 0x3A, 0x5C }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x1088, 0x00EC8000, { 0x0F, 0x3A, 0x5C }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADDSUB132PS[] = { { FCML_AMT_FMA, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0x96 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMADDSUB213PS[] = { { FCML_AMT_FMA, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0xA6 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUBADDPD[] = { { FCML_AMT_FMA4, 0x1090, 0x00EC8000, { 0x0F, 0x3A, 0x5F }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x1088, 0x00EC8000, { 0x0F, 0x3A, 0x5F }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUBADD213PD[] = { { FCML_AMT_FMA, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0xA7 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUBADD132PD[] = { { FCML_AMT_FMA, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0x97 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUBADD231PD[] = { { FCML_AMT_FMA, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0xB7 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUBADDPS[] = { { FCML_AMT_FMA4, 0x1090, 0x00EC8000, { 0x0F, 0x3A, 0x5E }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x1088, 0x00EC8000, { 0x0F, 0x3A, 0x5E }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUBADD213PS[] = { { FCML_AMT_FMA, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0xA7 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUBADD132PS[] = { { FCML_AMT_FMA, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0x97 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUBADD231PS[] = { { FCML_AMT_FMA, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0xB7 }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUB213PD[] = { { FCML_AMT_FMA, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0xAA }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUBPD[] = { { FCML_AMT_FMA4, 0x1090, 0x00EC8000, { 0x0F, 0x3A, 0x6D }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x1088, 0x00EC8000, { 0x0F, 0x3A, 0x6D }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUB132PD[] = { { FCML_AMT_FMA, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0x9A }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUB231PD[] = { { FCML_AMT_FMA, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0xBA }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUB213PS[] = { { FCML_AMT_FMA, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0xAA }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUBPS[] = { { FCML_AMT_FMA4, 0x1090, 0x00EC8000, { 0x0F, 0x3A, 0x6C }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x1088, 0x00EC8000, { 0x0F, 0x3A, 0x6C }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUB132PS[] = { { FCML_AMT_FMA, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0x9A }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUB231PS[] = { { FCML_AMT_FMA, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0xBA }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUBSD[] = { { FCML_AMT_FMA4, 0x10D0, 0x00EC8000, { 0x0F, 0x3A, 0x6F }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x10C8, 0x00EC8000, { 0x0F, 0x3A, 0x6F }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUB231SD[] = { { FCML_AMT_FMA, 0x10C8, 0x00EC8000, { 0x0F, 0x38, 0xBB }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUB132SD[] = { { FCML_AMT_FMA, 0x10C8, 0x00EC8000, { 0x0F, 0x38, 0x9B }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUB213SD[] = { { FCML_AMT_FMA, 0x10C8, 0x00EC8000, { 0x0F, 0x38, 0xAB }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUB231SS[] = { { FCML_AMT_FMA, 0x10D0, 0x00EC8000, { 0x0F, 0x38, 0xBB }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUB213SS[] = { { FCML_AMT_FMA, 0x10D0, 0x00EC8000, { 0x0F, 0x38, 0xAB }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUB132SS[] = { { FCML_AMT_FMA, 0x10D0, 0x00EC8000, { 0x0F, 0x38, 0x9B }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFMSUBSS[] = { { FCML_AMT_FMA4, 0x10D0, 0x00EC8000, { 0x0F, 0x3A, 0x6E }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x10C8, 0x00EC8000, { 0x0F, 0x3A, 0x6E }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMADD231PD[] = { { FCML_AMT_FMA, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0xBC }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMADDPD[] = { { FCML_AMT_FMA4, 0x1090, 0x00EC8000, { 0x0F, 0x3A, 0x79 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x1088, 0x00EC8000, { 0x0F, 0x3A, 0x79 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMADD132PD[] = { { FCML_AMT_FMA, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0x9C }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMADD213PD[] = { { FCML_AMT_FMA, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0xAC }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMADD231PS[] = { { FCML_AMT_FMA, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0xBC }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMADD132PS[] = { { FCML_AMT_FMA, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0x9C }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMADD213PS[] = { { FCML_AMT_FMA, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0xAC }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMADDPS[] = { { FCML_AMT_FMA4, 0x1090, 0x00EC8000, { 0x0F, 0x3A, 0x78 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x1088, 0x00EC8000, { 0x0F, 0x3A, 0x78 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMADD213SD[] = { { FCML_AMT_FMA, 0x10C8, 0x00EC8000, { 0x0F, 0x38, 0xAD }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMADDSD[] = { { FCML_AMT_FMA4, 0x10D0, 0x00EC8000, { 0x0F, 0x3A, 0x7B }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x10C8, 0x00EC8000, { 0x0F, 0x3A, 0x7B }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMADD231SD[] = { { FCML_AMT_FMA, 0x10C8, 0x00EC8000, { 0x0F, 0x38, 0xBD }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMADD132SD[] = { { FCML_AMT_FMA, 0x10C8, 0x00EC8000, { 0x0F, 0x38, 0x9D }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMADD213SS[] = { { FCML_AMT_FMA, 0x10D0, 0x00EC8000, { 0x0F, 0x38, 0xAD }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMADDSS[] = { { FCML_AMT_FMA4, 0x10D0, 0x00EC8000, { 0x0F, 0x3A, 0x7A }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x10C8, 0x00EC8000, { 0x0F, 0x3A, 0x7A }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMADD231SS[] = { { FCML_AMT_FMA, 0x10D0, 0x00EC8000, { 0x0F, 0x38, 0xBD }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMADD132SS[] = { { FCML_AMT_FMA, 0x10D0, 0x00EC8000, { 0x0F, 0x38, 0x9D }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMSUB132PD[] = { { FCML_AMT_FMA, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0x9E }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMSUB213PD[] = { { FCML_AMT_FMA, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0xAE }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMSUB231PD[] = { { FCML_AMT_FMA, 0x1088, 0x00EC8000, { 0x0F, 0x38, 0xBE }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMSUBPD[] = { { FCML_AMT_FMA4, 0x1090, 0x00EC8000, { 0x0F, 0x3A, 0x7D }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x1088, 0x00EC8000, { 0x0F, 0x3A, 0x7D }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMSUBPS[] = { { FCML_AMT_FMA4, 0x1090, 0x00EC8000, { 0x0F, 0x3A, 0x7C }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x1088, 0x00EC8000, { 0x0F, 0x3A, 0x7C }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMSUB213PS[] = { { FCML_AMT_FMA, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0xAE }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMSUB132PS[] = { { FCML_AMT_FMA, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0x9E }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMSUB231PS[] = { { FCML_AMT_FMA, 0x1090, 0x00EC8000, { 0x0F, 0x38, 0xBE }, { FCML_OP_MODRM_R_SIMD_L_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMSUBSD[] = { { FCML_AMT_FMA4, 0x10D0, 0x00EC8000, { 0x0F, 0x3A, 0x7F }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x10C8, 0x00EC8000, { 0x0F, 0x3A, 0x7F }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMSUB231SD[] = { { FCML_AMT_FMA, 0x10C8, 0x00EC8000, { 0x0F, 0x38, 0xBF }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMSUB213SD[] = { { FCML_AMT_FMA, 0x10C8, 0x00EC8000, { 0x0F, 0x38, 0xAF }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMSUB132SD[] = { { FCML_AMT_FMA, 0x10C8, 0x00EC8000, { 0x0F, 0x38, 0x9F }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMSUBSS[] = { { FCML_AMT_FMA4, 0x10D0, 0x00EC8000, { 0x0F, 0x3A, 0x7E }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_FMA4, 0x10C8, 0x00EC8000, { 0x0F, 0x3A, 0x7E }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMSUB132SS[] = { { FCML_AMT_FMA, 0x10D0, 0x00EC8000, { 0x0F, 0x38, 0x9F }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMSUB213SS[] = { { FCML_AMT_FMA, 0x10D0, 0x00EC8000, { 0x0F, 0x38, 0xAF }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFNMSUB231SS[] = { { FCML_AMT_FMA, 0x10D0, 0x00EC8000, { 0x0F, 0x38, 0xBF }, { FCML_OP_MODRM_R_XMM_RW, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ANDN[] = { { FCML_AMT_BMI1 | FCML_AMT_VEXx, 0x02D0, 0x00EC8000, { 0x0F, 0x38, 0xF2 }, { FCML_OP_MODRM_R_32_RW, FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ), FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA }, FCML_AM_R32A_RM32_R32B, FCML_HINT_NO_HINTS }, { FCML_AMT_BMI1 | FCML_AMT_VEXx, 0x02C8, 0x00EC8000, { 0x0F, 0x38, 0xF2 }, { FCML_OP_MODRM_R_64_RW, FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ), FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA }, FCML_AM_R64A_RM64_R64B, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BEXR[] = { { FCML_AMT_BMI1 | FCML_AMT_VEXx, 0x02D0, 0x00EC8000, { 0x0F, 0x38, 0xF7 }, { FCML_OP_MODRM_R_32_W, FCML_OP_MODRM_RM_OP_32, FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ), FCML_NA, FCML_NA }, FCML_AM_R32A_RM32_R32B, FCML_HINT_NO_HINTS }, { FCML_AMT_BMI1 | FCML_AMT_VEXx, 0x02C8, 0x00EC8000, { 0x0F, 0x38, 0xF7 }, { FCML_OP_MODRM_R_64_W, FCML_OP_MODRM_RM_OP_64, FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ), FCML_NA, FCML_NA }, FCML_AM_R64A_RM64_R64B, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BEXTR[] = { { FCML_AMT_BMI1 | FCML_AMT_VEXx, 0x0550, 0x00D88000, { 0x0A, 0x10, 0x00 }, { FCML_OP_MODRM_R_32_W, FCML_OP_MODRM_RM_OP_32, FCML_OP_ID, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_BMI1 | FCML_AMT_VEXx, 0x0548, 0x00D88000, { 0x0A, 0x10, 0x00 }, { FCML_OP_MODRM_R_64_W, FCML_OP_MODRM_RM_OP_64, FCML_OP_ID, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BLCFILL[] = { { FCML_AMT_TBM, 0x0450, 0x00D98800, { 0x09, 0x01, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R32_RM32, FCML_HINT_NO_HINTS }, { FCML_AMT_TBM, 0x0448, 0x00D98800, { 0x09, 0x01, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R64_RM64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BLCI[] = { { FCML_AMT_TBM, 0x0450, 0x00D9B000, { 0x09, 0x02, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R32_RM32, FCML_HINT_NO_HINTS }, { FCML_AMT_TBM, 0x0448, 0x00D9B000, { 0x09, 0x02, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R64_RM64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BLCIC[] = { { FCML_AMT_TBM, 0x0450, 0x00D9A800, { 0x09, 0x01, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R32_RM32, FCML_HINT_NO_HINTS }, { FCML_AMT_TBM, 0x0448, 0x00D9A800, { 0x09, 0x01, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R64_RM64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BLCMSK[] = { { FCML_AMT_TBM, 0x0450, 0x00D98800, { 0x09, 0x02, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R32_RM32, FCML_HINT_NO_HINTS }, { FCML_AMT_TBM, 0x0448, 0x00D98800, { 0x09, 0x02, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R64_RM64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BLCS[] = { { FCML_AMT_TBM, 0x0450, 0x00D99800, { 0x09, 0x01, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R32_RM32, FCML_HINT_NO_HINTS }, { FCML_AMT_TBM, 0x0448, 0x00D99800, { 0x09, 0x01, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R64_RM64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BLSFILL[] = { { FCML_AMT_TBM, 0x0450, 0x00D99000, { 0x09, 0x01, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R32_RM32, FCML_HINT_NO_HINTS }, { FCML_AMT_TBM, 0x0448, 0x00D99000, { 0x09, 0x01, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R64_RM64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BLSI[] = { { FCML_AMT_BMI1 | FCML_AMT_VEXx, 0x02D0, 0x00ED9800, { 0x0F, 0x38, 0xF3 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R32_RM32, FCML_HINT_NO_HINTS }, { FCML_AMT_BMI1 | FCML_AMT_VEXx, 0x02C8, 0x00ED9800, { 0x0F, 0x38, 0xF3 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R64_RM64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BLSIC[] = { { FCML_AMT_TBM, 0x0450, 0x00D9B000, { 0x09, 0x01, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R32_RM32, FCML_HINT_NO_HINTS }, { FCML_AMT_TBM, 0x0448, 0x00D9B000, { 0x09, 0x01, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R64_RM64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BLSMSK[] = { { FCML_AMT_BMI1 | FCML_AMT_VEXx, 0x02D0, 0x00ED9000, { 0x0F, 0x38, 0xF3 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R32_RM32, FCML_HINT_NO_HINTS }, { FCML_AMT_BMI1 | FCML_AMT_VEXx, 0x02C8, 0x00ED9000, { 0x0F, 0x38, 0xF3 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R64_RM64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BLSR[] = { { FCML_AMT_BMI1 | FCML_AMT_VEXx, 0x02D0, 0x00ED8800, { 0x0F, 0x38, 0xF3 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R32_RM32, FCML_HINT_NO_HINTS }, { FCML_AMT_BMI1 | FCML_AMT_VEXx, 0x02C8, 0x00ED8800, { 0x0F, 0x38, 0xF3 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_R64_RM64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_BZHI[] = { { FCML_AMT_BMI2 | FCML_AMT_VEXx, 0x02D0, 0x00EC8000, { 0x0F, 0x38, 0xF5 }, { FCML_OP_MODRM_R_32_W, FCML_OP_MODRM_RM_OP_32, FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ), FCML_NA, FCML_NA }, FCML_AM_R32_RM32_R32, FCML_HINT_NO_HINTS }, { FCML_AMT_BMI2 | FCML_AMT_VEXx, 0x02C8, 0x00EC8000, { 0x0F, 0x38, 0xF5 }, { FCML_OP_MODRM_R_64_W, FCML_OP_MODRM_RM_OP_64, FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ), FCML_NA, FCML_NA }, FCML_AM_R64_RM64_R64, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_LZCNT[] = { { FCML_AMT_ABM, 0x4000, 0x00D88000, { 0x0F, 0xBD, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_RM_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_MULX[] = { { FCML_AMT_BMI2 | FCML_AMT_VEXx, 0x22D0, 0x00EC8000, { 0x0F, 0x38, 0xF6 }, { FCML_OP_MODRM_R_32_W, FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ), FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_BMI2 | FCML_AMT_VEXx, 0x22C8, 0x00EC8000, { 0x0F, 0x38, 0xF6 }, { FCML_OP_MODRM_R_64_W, FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ), FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PDEP[] = { { FCML_AMT_BMI2 | FCML_AMT_VEXx, 0x22D0, 0x00EC8000, { 0x0F, 0x38, 0xF5 }, { FCML_OP_MODRM_R_32_W, FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ), FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_BMI2 | FCML_AMT_VEXx, 0x22C8, 0x00EC8000, { 0x0F, 0x38, 0xF5 }, { FCML_OP_MODRM_R_64_W, FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ), FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_PEXT[] = { { FCML_AMT_BMI2 | FCML_AMT_VEXx, 0x42D0, 0x00EC8000, { 0x0F, 0x38, 0xF5 }, { FCML_OP_MODRM_R_32_W, FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ), FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_BMI2 | FCML_AMT_VEXx, 0x42C8, 0x00EC8000, { 0x0F, 0x38, 0xF5 }, { FCML_OP_MODRM_R_64_W, FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ), FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_RORX[] = { { FCML_AMT_BMI2 | FCML_AMT_VEXx, 0x22D0, 0x00EC8000, { 0x0F, 0x3A, 0xF0 }, { FCML_OP_MODRM_R_32_W, FCML_OP_MODRM_RM_OP_32, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_BMI2 | FCML_AMT_VEXx, 0x22C8, 0x00EC8000, { 0x0F, 0x3A, 0xF0 }, { FCML_OP_MODRM_R_64_W, FCML_OP_MODRM_RM_OP_64, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SHLX[] = { { FCML_AMT_GPI, 0x12D0, 0x00EC8000, { 0x0F, 0x38, 0xF7 }, { FCML_OP_MODRM_R_32_W, FCML_OP_MODRM_RM_OP_32, FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ), FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_GPI, 0x12C8, 0x00EC8000, { 0x0F, 0x38, 0xF7 }, { FCML_OP_MODRM_R_64_W, FCML_OP_MODRM_RM_OP_64, FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ), FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SHRX[] = { { FCML_AMT_BMI2 | FCML_AMT_VEXx, 0x22D0, 0x00EC8000, { 0x0F, 0x38, 0xF7 }, { FCML_OP_MODRM_R_32_W, FCML_OP_MODRM_RM_OP_32, FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ), FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_BMI2 | FCML_AMT_VEXx, 0x22C8, 0x00EC8000, { 0x0F, 0x38, 0xF7 }, { FCML_OP_MODRM_R_64_W, FCML_OP_MODRM_RM_OP_64, FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ), FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_SARX[] = { { FCML_AMT_BMI2 | FCML_AMT_VEXx, 0x42D0, 0x00EC8000, { 0x0F, 0x38, 0xF7 }, { FCML_OP_MODRM_R_32_W, FCML_OP_MODRM_RM_OP_32, FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ), FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_BMI2 | FCML_AMT_VEXx, 0x42C8, 0x00EC8000, { 0x0F, 0x38, 0xF7 }, { FCML_OP_MODRM_R_64_W, FCML_OP_MODRM_RM_OP_64, FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ), FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_TZCNT[] = { { FCML_AMT_BMI1, 0x4000, 0x00D88000, { 0x0F, 0xBC, 0x00 }, { FCML_OP_MODRM_R_W, FCML_OP_MODRM_RM_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_TZMSK[] = { { FCML_AMT_TBM, 0x0450, 0x00D9A000, { 0x09, 0x01, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_DWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_TBM, 0x0448, 0x00D9A000, { 0x09, 0x01, 0x00 }, { FCML_OP_VEX_VVVV_REG( FCML_REG_GPR, FCML_EOS_QWORD ) | FCML_OA_W, FCML_OP_MODRM_RM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_XABORT[] = { { FCML_AMT_RTM, 0x0000, 0x00D80000, { 0xC6, 0xF8, 0x00 }, { FCML_OP_IB, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_XBEGIN[] = { { FCML_AMT_RTM, 0x0000, 0x40D80000, { 0xC7, 0xF8, 0x00 }, { FCML_OP_IMMEDIATE_DIS_RELATIVE_EOSA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_XEND[] = { { FCML_AMT_RTM, 0x0000, 0x00EC0000, { 0x0F, 0x01, 0xD5 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_XTEST[] = { { FCML_AMT_HLE | FCML_AMT_RTM, 0x0000, 0x00EC0000, { 0x0F, 0x01, 0xD6 }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ADCX[] = { { FCML_AMT_ADX, 0x1000, 0x00EC8000, { 0x0F, 0x38, 0xF6 }, { FCML_OP_MODRM_R_RW, FCML_OP_MODRM_RM, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_ADOX[] = { { FCML_AMT_ADX, 0x4000, 0x00EC8000, { 0x0F, 0x38, 0xF6 }, { FCML_OP_MODRM_R_RW, FCML_OP_MODRM_RM_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_RDSEED[] = { { FCML_AMT_RDSEED, 0x0000, 0x00DBB800, { 0x0F, 0xC7, 0x00 }, { FCML_OP_RM( FCML_REG_GPR, FCML_EOS_EOSA, FCML_EOS_UNDEFINED, FCML_RMF_R ) | FCML_OA_W, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_CLAC[] = { { FCML_AMT_GPI, 0x0000, 0x00EC0000, { 0x0F, 0x01, 0xCA }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_STAC[] = { { FCML_AMT_GPI, 0x0000, 0x00EC0000, { 0x0F, 0x01, 0xCB }, { FCML_NA, FCML_NA, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFRCZPD[] = { { FCML_AMT_XOP, 0x0510, 0x00D88000, { 0x09, 0x81, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFRCZPS[] = { { FCML_AMT_XOP, 0x0510, 0x00D88000, { 0x09, 0x80, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFRCZSD[] = { { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x09, 0x83, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_64, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VFRCZSS[] = { { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x09, 0x82, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_32, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCMOV[] = { { FCML_AMT_XOP, 0x0410, 0x00D88000, { 0x08, 0xA2, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x0408, 0x00D88000, { 0x08, 0xA2, 0x00 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCOMB[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0xCC, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_PSEUDO_OP( 0x07 ), FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCOMW[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0xCD, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_PSEUDO_OP( 0x07 ), FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCOMD[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0xCE, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_PSEUDO_OP( 0x07 ), FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCOMQ[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0xCF, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_PSEUDO_OP( 0x07 ), FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCOMUB[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0xEC, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_PSEUDO_OP( 0x07 ), FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCOMUW[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0xED, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_PSEUDO_OP( 0x07 ), FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCOMUD[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0xEE, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_PSEUDO_OP( 0x07 ), FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPCOMUQ[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0xEF, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_PSEUDO_OP( 0x07 ), FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPERMIL2PD[] = { { FCML_AMT_XOP, 0x1090, 0x00EC8000, { 0x0F, 0x3A, 0x49 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_OPERAND_IS5( FCML_ISF_IS5_SRC ), FCML_OP_OPERAND_IS5( FCML_ISF_IS5_M2Z ) }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x1088, 0x00EC8000, { 0x0F, 0x3A, 0x49 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_OPERAND_IS5( FCML_ISF_IS5_SRC ), FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_OPERAND_IS5( FCML_ISF_IS5_M2Z ) }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPERMIL2PS[] = { { FCML_AMT_XOP, 0x1090, 0x00EC8000, { 0x0F, 0x3A, 0x48 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_OPERAND_IS5( FCML_ISF_IS5_SRC ), FCML_OP_OPERAND_IS5( FCML_ISF_IS5_M2Z ) }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x1088, 0x00EC8000, { 0x0F, 0x3A, 0x48 }, { FCML_OP_MODRM_R_SIMD_L_W, FCML_OP_VEX_VVVV_SIMD_REG, FCML_OP_OPERAND_IS5( FCML_ISF_IS5_SRC ), FCML_OP_MODRM_RM_SIMD_L_OP, FCML_OP_OPERAND_IS5( FCML_ISF_IS5_M2Z ) }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHADDBD[] = { { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x09, 0xC2, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHADDBW[] = { { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x09, 0xC1, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHADDBQ[] = { { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x09, 0xC3, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHADDDQ[] = { { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x09, 0xCB, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHADDUBD[] = { { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x09, 0xD2, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHADDUBQ[] = { { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x09, 0xD3, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHADDUBW[] = { { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x09, 0xD1, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHADDUDQ[] = { { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x09, 0xDB, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHADDUWD[] = { { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x09, 0xD6, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHADDUWQ[] = { { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x09, 0xD7, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHADDWD[] = { { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x09, 0xC6, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHADDWQ[] = { { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x09, 0xC7, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHSUBBW[] = { { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x09, 0xE1, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHSUBDQ[] = { { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x09, 0xE3, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPHSUBWD[] = { { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x09, 0xE2, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMACSDD[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0x9E, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMACSDQH[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0x9F, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMACSDQL[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0x97, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMACSSDD[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0x8E, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMACSSDQH[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0x8F, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMACSSDQL[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0x87, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMACSSWD[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0x86, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMACSSWW[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0x85, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMACSWD[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0x96, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMACSWW[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0x95, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMADCSSWD[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0xA6, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPMADCSWD[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0xB6, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPPERM[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x08, 0xA3, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_OPERAND_IS4, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x0448, 0x00D88000, { 0x08, 0xA3, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_OPERAND_IS4, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPROTD[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x09, 0x92, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_VEX_VVVV_XMM_REG, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x0448, 0x00D88000, { 0x09, 0x92, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x08, 0xC2, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPROTB[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x09, 0x90, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_VEX_VVVV_XMM_REG, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x0448, 0x00D88000, { 0x09, 0x90, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x08, 0xC0, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPROTQ[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x09, 0x93, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_VEX_VVVV_XMM_REG, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x0448, 0x00D88000, { 0x09, 0x93, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x08, 0xC3, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPROTW[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x09, 0x91, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_VEX_VVVV_XMM_REG, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x0448, 0x00D88000, { 0x09, 0x91, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x0550, 0x00D88000, { 0x08, 0xC1, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_IB, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSHAB[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x09, 0x98, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_VEX_VVVV_XMM_REG, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x0448, 0x00D88000, { 0x09, 0x98, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSHAD[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x09, 0x9A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_VEX_VVVV_XMM_REG, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x0448, 0x00D88000, { 0x09, 0x9A, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSHAQ[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x09, 0x9B, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_VEX_VVVV_XMM_REG, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x0448, 0x00D88000, { 0x09, 0x9B, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSHAW[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x09, 0x99, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_VEX_VVVV_XMM_REG, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x0448, 0x00D88000, { 0x09, 0x99, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSHLB[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x09, 0x94, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_VEX_VVVV_XMM_REG, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x0448, 0x00D88000, { 0x09, 0x94, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSHLD[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x09, 0x96, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_VEX_VVVV_XMM_REG, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x0448, 0x00D88000, { 0x09, 0x96, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSHLQ[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x09, 0x97, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_VEX_VVVV_XMM_REG, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x0448, 0x00D88000, { 0x09, 0x97, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_addr_mode_desc fcml_st_def_addr_mode_desc_VPSHLW[] = { { FCML_AMT_XOP, 0x0450, 0x00D88000, { 0x09, 0x95, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_MODRM_RM_XMM_OP_128, FCML_OP_VEX_VVVV_XMM_REG, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS }, { FCML_AMT_XOP, 0x0448, 0x00D88000, { 0x09, 0x95, 0x00 }, { FCML_OP_MODRM_R_XMM_W, FCML_OP_VEX_VVVV_XMM_REG, FCML_OP_MODRM_RM_XMM_OP_128, FCML_NA, FCML_NA }, FCML_AM_UNKNOWN, FCML_HINT_NO_HINTS } }; struct fcml_st_def_instruction_desc fcml_ext_instructions_def[] = { FCML_IA_INSTRUCTION( F_AAA, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_AAA ), FCML_IA_INSTRUCTION( F_AAD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_AAD ), FCML_IA_INSTRUCTION( F_AAM, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_AAM ), FCML_IA_INSTRUCTION( F_AAS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_AAS ), FCML_IA_INSTRUCTION( F_ADC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ADC ), FCML_IA_INSTRUCTION( F_ADD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ADD ), FCML_IA_INSTRUCTION( F_ADDPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ADDPD ), FCML_IA_INSTRUCTION( F_VADDPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VADDPD ), FCML_IA_INSTRUCTION( F_ADDPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ADDPS ), FCML_IA_INSTRUCTION( F_VADDPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VADDPS ), FCML_IA_INSTRUCTION( F_ADDSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ADDSD ), FCML_IA_INSTRUCTION( F_VADDSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VADDSD ), FCML_IA_INSTRUCTION( F_ADDSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ADDSS ), FCML_IA_INSTRUCTION( F_VADDSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VADDSS ), FCML_IA_INSTRUCTION( F_ADDSUBPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ADDSUBPD ), FCML_IA_INSTRUCTION( F_VADDSUBPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VADDSUBPD ), FCML_IA_INSTRUCTION( F_ADDSUBPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ADDSUBPS ), FCML_IA_INSTRUCTION( F_VADDSUBPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VADDSUBPS ), FCML_IA_INSTRUCTION( F_AESDEC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_AESDEC ), FCML_IA_INSTRUCTION( F_VAESDEC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VAESDEC ), FCML_IA_INSTRUCTION( F_AESDECLAST, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_AESDECLAST ), FCML_IA_INSTRUCTION( F_VAESDECLAST, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VAESDECLAST ), FCML_IA_INSTRUCTION( F_AESENC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_AESENC ), FCML_IA_INSTRUCTION( F_VAESENC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VAESENC ), FCML_IA_INSTRUCTION( F_AESENCLAST, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_AESENCLAST ), FCML_IA_INSTRUCTION( F_VAESENCLAST, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VAESENCLAST ), FCML_IA_INSTRUCTION( F_AESIMC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_AESIMC ), FCML_IA_INSTRUCTION( F_VAESIMC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VAESIMC ), FCML_IA_INSTRUCTION( F_AESKEYGENASSIST, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_AESKEYGENASSIST ), FCML_IA_INSTRUCTION( F_VAESKEYGENASSIST, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VAESKEYGENASSIST ), FCML_IA_INSTRUCTION( F_AND, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_AND ), FCML_IA_INSTRUCTION( F_ANDPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ANDPD ), FCML_IA_INSTRUCTION( F_VANDPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VANDPD ), FCML_IA_INSTRUCTION( F_ANDPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ANDPS ), FCML_IA_INSTRUCTION( F_VANDPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VANDPS ), FCML_IA_INSTRUCTION( F_ANDNPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ANDNPD ), FCML_IA_INSTRUCTION( F_VANDNPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VANDNPD ), FCML_IA_INSTRUCTION( F_ANDNPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ANDNPS ), FCML_IA_INSTRUCTION( F_VANDNPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VANDNPS ), FCML_IA_INSTRUCTION( F_ARPL, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ARPL ), FCML_IA_INSTRUCTION( F_BLENDPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BLENDPD ), FCML_IA_INSTRUCTION( F_VBLENDPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VBLENDPD ), FCML_IA_INSTRUCTION( F_BLENDPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BLENDPS ), FCML_IA_INSTRUCTION( F_VBLENDPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VBLENDPS ), FCML_IA_INSTRUCTION( F_BLENDVPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BLENDVPD ), FCML_IA_INSTRUCTION( F_VBLENDVPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VBLENDVPD ), FCML_IA_INSTRUCTION( F_BLENDVPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BLENDVPS ), FCML_IA_INSTRUCTION( F_VBLENDVPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VBLENDVPS ), FCML_IA_INSTRUCTION( F_BOUND, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BOUND ), FCML_IA_INSTRUCTION( F_BSF, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BSF ), FCML_IA_INSTRUCTION( F_BSR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BSR ), FCML_IA_INSTRUCTION( F_BSWAP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BSWAP ), FCML_IA_INSTRUCTION( F_BT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BT ), FCML_IA_INSTRUCTION( F_BTC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BTC ), FCML_IA_INSTRUCTION( F_BTR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BTR ), FCML_IA_INSTRUCTION( F_BTS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BTS ), FCML_IA_INSTRUCTION( F_CALL, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CALL ), FCML_IA_INSTRUCTION( F_CBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CBW ), FCML_IA_INSTRUCTION( F_CLC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CLC ), FCML_IA_INSTRUCTION( F_CLD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CLD ), FCML_IA_INSTRUCTION( F_CLFLUSH, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CLFLUSH ), FCML_IA_INSTRUCTION( F_CLI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CLI ), FCML_IA_INSTRUCTION( F_CLGI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CLGI ), FCML_IA_INSTRUCTION( F_CLTS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CLTS ), FCML_IA_INSTRUCTION( F_CMC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CMC ), FCML_IA_INSTRUCTION( F_CMOV, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CMOV ), FCML_IA_INSTRUCTION( F_CMP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CMP ), FCML_IA_INSTRUCTION( F_CMPPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CMPPD ), FCML_IA_INSTRUCTION( F_VCMPPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCMPPD ), FCML_IA_INSTRUCTION( F_CMPPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CMPPS ), FCML_IA_INSTRUCTION( F_VCMPPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCMPPS ), FCML_IA_INSTRUCTION( F_CMPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CMPS ), FCML_IA_INSTRUCTION( F_CMPSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CMPSD ), FCML_IA_INSTRUCTION( F_VCMPSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCMPSD ), FCML_IA_INSTRUCTION( F_CMPSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CMPSS ), FCML_IA_INSTRUCTION( F_VCMPSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCMPSS ), FCML_IA_INSTRUCTION( F_CMPXCHG, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CMPXCHG ), FCML_IA_INSTRUCTION( F_CMPXCHGxB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CMPXCHGXB ), FCML_IA_INSTRUCTION( F_COMISD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_COMISD ), FCML_IA_INSTRUCTION( F_VCOMISD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCOMISD ), FCML_IA_INSTRUCTION( F_COMISS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_COMISS ), FCML_IA_INSTRUCTION( F_VCOMISS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCOMISS ), FCML_IA_INSTRUCTION( F_CPUID, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CPUID ), FCML_IA_INSTRUCTION( F_CRC32, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CRC32 ), FCML_IA_INSTRUCTION( F_CVTDQ2PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTDQ2PD ), FCML_IA_INSTRUCTION( F_VCVTDQ2PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCVTDQ2PD ), FCML_IA_INSTRUCTION( F_CVTDQ2PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTDQ2PS ), FCML_IA_INSTRUCTION( F_VCVTDQ2PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCVTDQ2PS ), FCML_IA_INSTRUCTION( F_CVTPD2DQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTPD2DQ ), FCML_IA_INSTRUCTION( F_VCVTPD2DQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCVTPD2DQ ), FCML_IA_INSTRUCTION( F_CVTPD2PI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTPD2PI ), FCML_IA_INSTRUCTION( F_CVTPD2PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTPD2PS ), FCML_IA_INSTRUCTION( F_VCVTPD2PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCVTPD2PS ), FCML_IA_INSTRUCTION( F_CVTPI2PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTPI2PD ), FCML_IA_INSTRUCTION( F_CVTPI2PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTPI2PS ), FCML_IA_INSTRUCTION( F_CVTPS2DQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTPS2DQ ), FCML_IA_INSTRUCTION( F_VCVTPS2DQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCVTPS2DQ ), FCML_IA_INSTRUCTION( F_CVTPS2PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTPS2PD ), FCML_IA_INSTRUCTION( F_VCVTPS2PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCVTPS2PD ), FCML_IA_INSTRUCTION( F_CVTPS2PI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTPS2PI ), FCML_IA_INSTRUCTION( F_CVTSD2SI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTSD2SI ), FCML_IA_INSTRUCTION( F_VCVTSD2SI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCVTSD2SI ), FCML_IA_INSTRUCTION( F_CVTSD2SS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTSD2SS ), FCML_IA_INSTRUCTION( F_VCVTSD2SS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCVTSD2SS ), FCML_IA_INSTRUCTION( F_CVTSI2SD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTSI2SD ), FCML_IA_INSTRUCTION( F_VCVTSI2SD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCVTSI2SD ), FCML_IA_INSTRUCTION( F_CVTSI2SS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTSI2SS ), FCML_IA_INSTRUCTION( F_VCVTSI2SS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCVTSI2SS ), FCML_IA_INSTRUCTION( F_CVTSS2SD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTSS2SD ), FCML_IA_INSTRUCTION( F_VCVTSS2SD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCVTSS2SD ), FCML_IA_INSTRUCTION( F_CVTSS2SI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTSS2SI ), FCML_IA_INSTRUCTION( F_VCVTSS2SI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCVTSS2SI ), FCML_IA_INSTRUCTION( F_CVTTPD2DQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTTPD2DQ ), FCML_IA_INSTRUCTION( F_VCVTTPD2DQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCVTTPD2DQ ), FCML_IA_INSTRUCTION( F_CVTTPD2PI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTTPD2PI ), FCML_IA_INSTRUCTION( F_CVTTPS2DQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTTPS2DQ ), FCML_IA_INSTRUCTION( F_VCVTTPS2DQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCVTTPS2DQ ), FCML_IA_INSTRUCTION( F_CVTTPS2PI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTTPS2PI ), FCML_IA_INSTRUCTION( F_CVTTSD2SI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTTSD2SI ), FCML_IA_INSTRUCTION( F_VCVTTSD2SI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCVTTSD2SI ), FCML_IA_INSTRUCTION( F_CVTTSS2SI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CVTTSS2SI ), FCML_IA_INSTRUCTION( F_VCVTTSS2SI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCVTTSS2SI ), FCML_IA_INSTRUCTION( F_CWD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CWD_CDQ_CQO ), FCML_IA_INSTRUCTION( F_DAA, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_DAA ), FCML_IA_INSTRUCTION( F_DAS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_DAS ), FCML_IA_INSTRUCTION( F_DEC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_DEC ), FCML_IA_INSTRUCTION( F_DIV, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_DIV ), FCML_IA_INSTRUCTION( F_DIVPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_DIVPD ), FCML_IA_INSTRUCTION( F_VDIVPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VDIVPD ), FCML_IA_INSTRUCTION( F_DIVPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_DIVPS ), FCML_IA_INSTRUCTION( F_VDIVPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VDIVPS ), FCML_IA_INSTRUCTION( F_DIVSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_DIVSD ), FCML_IA_INSTRUCTION( F_VDIVSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VDIVSD ), FCML_IA_INSTRUCTION( F_DIVSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_DIVSS ), FCML_IA_INSTRUCTION( F_VDIVSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VDIVSS ), FCML_IA_INSTRUCTION( F_DPPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_DPPD ), FCML_IA_INSTRUCTION( F_VDPPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VDPPD ), FCML_IA_INSTRUCTION( F_DPPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_DPPS ), FCML_IA_INSTRUCTION( F_VDPPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VDPPS ), FCML_IA_INSTRUCTION( F_EMMS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_EMMS ), FCML_IA_INSTRUCTION( F_ENTER, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ENTER ), FCML_IA_INSTRUCTION( F_EXTRACTPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_EXTRACTPS ), FCML_IA_INSTRUCTION( F_VEXTRACTPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VEXTRACTPS ), FCML_IA_INSTRUCTION( F_EXTRQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_EXTRQ ), FCML_IA_INSTRUCTION( F_F2XM1, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_F2XM1 ), FCML_IA_INSTRUCTION( F_FABS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FABS ), FCML_IA_INSTRUCTION( F_FADD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FADD ), FCML_IA_INSTRUCTION( F_FIADD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FIADD ), FCML_IA_INSTRUCTION( F_FADDP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FADDP ), FCML_IA_INSTRUCTION( F_FBLD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FBLD ), FCML_IA_INSTRUCTION( F_FBSTP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FBSTP ), FCML_IA_INSTRUCTION( F_FCHS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FCHS ), FCML_IA_INSTRUCTION( F_FCLEX, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FCLEX ), FCML_IA_INSTRUCTION( F_FNCLEX, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FNCLEX ), FCML_IA_INSTRUCTION( F_FCMOVB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FCMOVB ), FCML_IA_INSTRUCTION( F_FCMOVE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FCMOVE ), FCML_IA_INSTRUCTION( F_FCMOVBE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FCMOVBE ), FCML_IA_INSTRUCTION( F_FCMOVU, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FCMOVU ), FCML_IA_INSTRUCTION( F_FCMOVNB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FCMOVNB ), FCML_IA_INSTRUCTION( F_FCMOVNE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FCMOVNE ), FCML_IA_INSTRUCTION( F_FCMOVNBE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FCMOVNBE ), FCML_IA_INSTRUCTION( F_FCMOVNU, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FCMOVNU ), FCML_IA_INSTRUCTION( F_FCOM, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FCOM ), FCML_IA_INSTRUCTION( F_FCOMP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FCOMP ), FCML_IA_INSTRUCTION( F_FCOMPP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FCOMPP ), FCML_IA_INSTRUCTION( F_FCOMI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FCOMI ), FCML_IA_INSTRUCTION( F_FCOMIP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FCOMIP ), FCML_IA_INSTRUCTION( F_FUCOMI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FUCOMI ), FCML_IA_INSTRUCTION( F_FUCOMIP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FUCOMIP ), FCML_IA_INSTRUCTION( F_FCOS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FCOS ), FCML_IA_INSTRUCTION( F_FDECSTP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FDECSTP ), FCML_IA_INSTRUCTION( F_FDIV, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FDIV ), FCML_IA_INSTRUCTION( F_FDIVP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FDIVP ), FCML_IA_INSTRUCTION( F_FIDIV, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FIDIV ), FCML_IA_INSTRUCTION( F_FDIVR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FDIVR ), FCML_IA_INSTRUCTION( F_FDIVRP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FDIVRP ), FCML_IA_INSTRUCTION( F_FIDIVR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FIDIVR ), FCML_IA_INSTRUCTION( F_FFREE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FFREE ), FCML_IA_INSTRUCTION( F_FICOM, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FICOM ), FCML_IA_INSTRUCTION( F_FICOMP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FICOMP ), FCML_IA_INSTRUCTION( F_FILD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FILD ), FCML_IA_INSTRUCTION( F_FINCSTP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FINCSTP ), FCML_IA_INSTRUCTION( F_FINIT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FINIT ), FCML_IA_INSTRUCTION( F_FNINIT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FNINIT ), FCML_IA_INSTRUCTION( F_FIST, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FIST ), FCML_IA_INSTRUCTION( F_FISTP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FISTP ), FCML_IA_INSTRUCTION( F_FISTTP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FISTTP ), FCML_IA_INSTRUCTION( F_FLD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FLD ), FCML_IA_INSTRUCTION( F_FLD1, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FLD1 ), FCML_IA_INSTRUCTION( F_FLDL2T, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FLDL2T ), FCML_IA_INSTRUCTION( F_FLDL2E, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FLDL2E ), FCML_IA_INSTRUCTION( F_FLDPI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FLDPI ), FCML_IA_INSTRUCTION( F_FLDLG2, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FLDLG2 ), FCML_IA_INSTRUCTION( F_FLDLN2, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FLDLN2 ), FCML_IA_INSTRUCTION( F_FLDZ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FLDZ ), FCML_IA_INSTRUCTION( F_FLDCW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FLDCW ), FCML_IA_INSTRUCTION( F_FLDENV, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FLDENV ), FCML_IA_INSTRUCTION( F_FMUL, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FMUL ), FCML_IA_INSTRUCTION( F_FMULP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FMULP ), FCML_IA_INSTRUCTION( F_FIMUL, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FIMUL ), FCML_IA_INSTRUCTION( F_FNOP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FNOP ), FCML_IA_INSTRUCTION( F_FPATAN, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FPATAN ), FCML_IA_INSTRUCTION( F_FPREM, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FPREM ), FCML_IA_INSTRUCTION( F_FPREM1, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FPREM1 ), FCML_IA_INSTRUCTION( F_FPTAN, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FPTAN ), FCML_IA_INSTRUCTION( F_FRNDINT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FRNDINT ), FCML_IA_INSTRUCTION( F_FRSTOR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FRSTOR ), FCML_IA_INSTRUCTION( F_FSAVE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FSAVE ), FCML_IA_INSTRUCTION( F_FNSAVE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FNSAVE ), FCML_IA_INSTRUCTION( F_FSCALE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FSCALE ), FCML_IA_INSTRUCTION( F_FSIN, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FSIN ), FCML_IA_INSTRUCTION( F_FSINCOS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FSINCOS ), FCML_IA_INSTRUCTION( F_FSQRT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FSQRT ), FCML_IA_INSTRUCTION( F_FST, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FST ), FCML_IA_INSTRUCTION( F_FSTP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FSTP ), FCML_IA_INSTRUCTION( F_FSTCW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FSTCW ), FCML_IA_INSTRUCTION( F_FNSTCW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FNSTCW ), FCML_IA_INSTRUCTION( F_FSTENV, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FSTENV ), FCML_IA_INSTRUCTION( F_FNSTENV, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FNSTENV ), FCML_IA_INSTRUCTION( F_FSTSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FSTSW ), FCML_IA_INSTRUCTION( F_FNSTSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FNSTSW ), FCML_IA_INSTRUCTION( F_FSUB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FSUB ), FCML_IA_INSTRUCTION( F_FSUBP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FSUBP ), FCML_IA_INSTRUCTION( F_FISUB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FISUB ), FCML_IA_INSTRUCTION( F_FSUBR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FSUBR ), FCML_IA_INSTRUCTION( F_FSUBRP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FSUBRP ), FCML_IA_INSTRUCTION( F_FISUBR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FISUBR ), FCML_IA_INSTRUCTION( F_FTST, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FTST ), FCML_IA_INSTRUCTION( F_FUCOM, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FUCOM ), FCML_IA_INSTRUCTION( F_FUCOMP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FUCOMP ), FCML_IA_INSTRUCTION( F_FUCOMPP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FUCOMPP ), FCML_IA_INSTRUCTION( F_FXAM, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FXAM ), FCML_IA_INSTRUCTION( F_FXCH, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FXCH ), FCML_IA_INSTRUCTION( F_FXRSTOR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FXRSTOR ), FCML_IA_INSTRUCTION( F_FXRSTOR64, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FXRSTOR64 ), FCML_IA_INSTRUCTION( F_FXSAVE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FXSAVE ), FCML_IA_INSTRUCTION( F_FXSAVE64, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FXSAVE64 ), FCML_IA_INSTRUCTION( F_FXTRACT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FXTRACT ), FCML_IA_INSTRUCTION( F_FYL2X, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FYL2X ), FCML_IA_INSTRUCTION( F_FYL2XP1, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FYL2XP1 ), FCML_IA_INSTRUCTION( F_GETSEC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_GETSEC ), FCML_IA_INSTRUCTION( F_HADDPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_HADDPD ), FCML_IA_INSTRUCTION( F_VHADDPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VHADDPD ), FCML_IA_INSTRUCTION( F_HADDPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_HADDPS ), FCML_IA_INSTRUCTION( F_VHADDPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VHADDPS ), FCML_IA_INSTRUCTION( F_HLT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_HLT ), FCML_IA_INSTRUCTION( F_HSUBPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_HSUBPD ), FCML_IA_INSTRUCTION( F_VHSUBPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VHSUBPD ), FCML_IA_INSTRUCTION( F_HSUBPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_HSUBPS ), FCML_IA_INSTRUCTION( F_VHSUBPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VHSUBPS ), FCML_IA_INSTRUCTION( F_INVEPT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_INVEPT ), FCML_IA_INSTRUCTION( F_INVVPID, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_INVVPID ), FCML_IA_INSTRUCTION( F_IDIV, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_IDIV ), FCML_IA_INSTRUCTION( F_IMUL, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_IMUL ), FCML_IA_INSTRUCTION( F_IN, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_IN ), FCML_IA_INSTRUCTION( F_INC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_INC ), FCML_IA_INSTRUCTION( F_INS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_INS ), FCML_IA_INSTRUCTION( F_INSERTPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_INSERTPS ), FCML_IA_INSTRUCTION( F_VINSERTPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VINSERTPS ), FCML_IA_INSTRUCTION( F_INSERTQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_INSERTQ ), FCML_IA_INSTRUCTION( F_VINSERTF128, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VINSERTF128 ), FCML_IA_INSTRUCTION( F_INT3, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_INT3 ), FCML_IA_INSTRUCTION( F_INT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_INT ), FCML_IA_INSTRUCTION( F_INTO, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_INTO ), FCML_IA_INSTRUCTION( F_INVD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_INVD ), FCML_IA_INSTRUCTION( F_INVLPG, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_INVLPG ), FCML_IA_INSTRUCTION( F_INVLPGA, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_INVLPGA ), FCML_IA_INSTRUCTION( F_INVPCID, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_INVPCID ), FCML_IA_INSTRUCTION( F_IRET, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_IRET ), FCML_IA_INSTRUCTION( F_JCXZ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_JCXZ ), FCML_IA_INSTRUCTION( F_JCC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_JCC ), FCML_IA_INSTRUCTION( F_JMP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_JMP ), FCML_IA_INSTRUCTION( F_LAHF, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LAHF ), FCML_IA_INSTRUCTION( F_LAR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LAR ), FCML_IA_INSTRUCTION( F_LDDQU, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LDDQU ), FCML_IA_INSTRUCTION( F_VLDDQU, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VLDDQU ), FCML_IA_INSTRUCTION( F_LDMXCSR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LDMXCSR ), FCML_IA_INSTRUCTION( F_VLDMXCSR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VLDMXCSR ), FCML_IA_INSTRUCTION( F_LDS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LDS ), FCML_IA_INSTRUCTION( F_LSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LSS ), FCML_IA_INSTRUCTION( F_LES, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LES ), FCML_IA_INSTRUCTION( F_LFS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LFS ), FCML_IA_INSTRUCTION( F_LGS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LGS ), FCML_IA_INSTRUCTION( F_LEA, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LEA ), FCML_IA_INSTRUCTION( F_LEAVE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LEAVE ), FCML_IA_INSTRUCTION( F_LFENCE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LFENCE ), FCML_IA_INSTRUCTION( F_LLWPCB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LLWPCB ), FCML_IA_INSTRUCTION( F_LGDT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LGDT ), FCML_IA_INSTRUCTION( F_LIDT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LIDT ), FCML_IA_INSTRUCTION( F_LLDT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LLDT ), FCML_IA_INSTRUCTION( F_LMSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LMSW ), FCML_IA_INSTRUCTION( F_LODS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LODS ), FCML_IA_INSTRUCTION( F_LOOP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LOOP ), FCML_IA_INSTRUCTION( F_LOOPE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LOOPE ), FCML_IA_INSTRUCTION( F_LOOPNE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LOOPNE ), FCML_IA_INSTRUCTION( F_LWPINS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LWPINS ), FCML_IA_INSTRUCTION( F_LWPVAL, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LWPVAL ), FCML_IA_INSTRUCTION( F_LSL, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LSL ), FCML_IA_INSTRUCTION( F_LTR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LTR ), FCML_IA_INSTRUCTION( F_MASKMOVDQU, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MASKMOVDQU ), FCML_IA_INSTRUCTION( F_VMASKMOVDQU, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMASKMOVDQU ), FCML_IA_INSTRUCTION( F_VMASKMOVPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMASKMOVPS ), FCML_IA_INSTRUCTION( F_VMASKMOVPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMASKMOVPD ), FCML_IA_INSTRUCTION( F_VPMASKMOVD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMASKMOVD ), FCML_IA_INSTRUCTION( F_VPMASKMOVQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMASKMOVQ ), FCML_IA_INSTRUCTION( F_MASKMOVQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MASKMOVQ ), FCML_IA_INSTRUCTION( F_MAXPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MAXPD ), FCML_IA_INSTRUCTION( F_VMAXPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMAXPD ), FCML_IA_INSTRUCTION( F_MAXPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MAXPS ), FCML_IA_INSTRUCTION( F_VMAXPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMAXPS ), FCML_IA_INSTRUCTION( F_MAXSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MAXSD ), FCML_IA_INSTRUCTION( F_VMAXSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMAXSD ), FCML_IA_INSTRUCTION( F_MAXSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MAXSS ), FCML_IA_INSTRUCTION( F_VMAXSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMAXSS ), FCML_IA_INSTRUCTION( F_MFENCE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MFENCE ), FCML_IA_INSTRUCTION( F_MINPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MINPD ), FCML_IA_INSTRUCTION( F_VMINPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMINPD ), FCML_IA_INSTRUCTION( F_MINPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MINPS ), FCML_IA_INSTRUCTION( F_VMINPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMINPS ), FCML_IA_INSTRUCTION( F_MINSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MINSD ), FCML_IA_INSTRUCTION( F_VMINSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMINSD ), FCML_IA_INSTRUCTION( F_MINSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MINSS ), FCML_IA_INSTRUCTION( F_VMINSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMINSS ), FCML_IA_INSTRUCTION( F_MONITOR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MONITOR ), FCML_IA_INSTRUCTION( F_MOVAPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVAPD ), FCML_IA_INSTRUCTION( F_VMOVAPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVAPD ), FCML_IA_INSTRUCTION( F_MOVAPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVAPS ), FCML_IA_INSTRUCTION( F_VMOVAPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVAPS ), FCML_IA_INSTRUCTION( F_MOVBE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVBE ), FCML_IA_INSTRUCTION( F_MOV, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOV ), FCML_IA_INSTRUCTION( F_MOVD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVD ), FCML_IA_INSTRUCTION( F_VMOVD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVD ), FCML_IA_INSTRUCTION( F_MOVQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVQ ), FCML_IA_INSTRUCTION( F_VMOVQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVQ ), FCML_IA_INSTRUCTION( F_MOVDDUP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVDDUP ), FCML_IA_INSTRUCTION( F_VMOVDDUP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVDDUP ), FCML_IA_INSTRUCTION( F_MOVDQA, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVDQA ), FCML_IA_INSTRUCTION( F_VMOVDQA, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVDQA ), FCML_IA_INSTRUCTION( F_MOVDQU, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVDQU ), FCML_IA_INSTRUCTION( F_VMOVDQU, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVDQU ), FCML_IA_INSTRUCTION( F_MOVDQ2Q, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVDQ2Q ), FCML_IA_INSTRUCTION( F_MOVHLPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVHLPS ), FCML_IA_INSTRUCTION( F_VMOVHLPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVHLPS ), FCML_IA_INSTRUCTION( F_MOVHPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVHPD ), FCML_IA_INSTRUCTION( F_VMOVHPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVHPD ), FCML_IA_INSTRUCTION( F_MOVHPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVHPS ), FCML_IA_INSTRUCTION( F_VMOVHPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVHPS ), FCML_IA_INSTRUCTION( F_MOVLHPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVLHPS ), FCML_IA_INSTRUCTION( F_VMOVLHPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVLHPS ), FCML_IA_INSTRUCTION( F_MOVLPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVLPD ), FCML_IA_INSTRUCTION( F_VMOVLPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVLPD ), FCML_IA_INSTRUCTION( F_MOVLPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVLPS ), FCML_IA_INSTRUCTION( F_VMOVLPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVLPS ), FCML_IA_INSTRUCTION( F_MOVMSKPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVMSKPD ), FCML_IA_INSTRUCTION( F_VMOVMSKPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVMSKPD ), FCML_IA_INSTRUCTION( F_MOVMSKPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVMSKPS ), FCML_IA_INSTRUCTION( F_VMOVMSKPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVMSKPS ), FCML_IA_INSTRUCTION( F_MOVNTDQA, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVNTDQA ), FCML_IA_INSTRUCTION( F_VMOVNTDQA, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVNTDQA ), FCML_IA_INSTRUCTION( F_MOVNTDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVNTDQ ), FCML_IA_INSTRUCTION( F_VMOVNTDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVNTDQ ), FCML_IA_INSTRUCTION( F_MOVNTI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVNTI ), FCML_IA_INSTRUCTION( F_MOVNTPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVNTPD ), FCML_IA_INSTRUCTION( F_VMOVNTPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVNTPD ), FCML_IA_INSTRUCTION( F_MOVNTPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVNTPS ), FCML_IA_INSTRUCTION( F_VMOVNTPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVNTPS ), FCML_IA_INSTRUCTION( F_MOVNTSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVNTSD ), FCML_IA_INSTRUCTION( F_MOVNTSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVNTSS ), FCML_IA_INSTRUCTION( F_MOVNTQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVNTQ ), FCML_IA_INSTRUCTION( F_MOVQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVQ ), FCML_IA_INSTRUCTION( F_MOVQ2DQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVQ2DQ ), FCML_IA_INSTRUCTION( F_MOVS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVS ), FCML_IA_INSTRUCTION( F_MOVSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVSD ), FCML_IA_INSTRUCTION( F_VMOVSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVSD ), FCML_IA_INSTRUCTION( F_MOVSHDUP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVSHDUP ), FCML_IA_INSTRUCTION( F_VMOVSHDUP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVSHDUP ), FCML_IA_INSTRUCTION( F_MOVSLDUP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVSLDUP ), FCML_IA_INSTRUCTION( F_VMOVSLDUP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVSLDUP ), FCML_IA_INSTRUCTION( F_MOVSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVSS ), FCML_IA_INSTRUCTION( F_VMOVSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVSS ), FCML_IA_INSTRUCTION( F_MOVSX, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVSX ), FCML_IA_INSTRUCTION( F_MOVSXD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVSXD ), FCML_IA_INSTRUCTION( F_MOVUPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVUPD ), FCML_IA_INSTRUCTION( F_VMOVUPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVUPD ), FCML_IA_INSTRUCTION( F_MOVUPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVUPS ), FCML_IA_INSTRUCTION( F_VMOVUPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMOVUPS ), FCML_IA_INSTRUCTION( F_MOVZX, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MOVZX ), FCML_IA_INSTRUCTION( F_MPSADBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MPSADBW ), FCML_IA_INSTRUCTION( F_VMPSADBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMPSADBW ), FCML_IA_INSTRUCTION( F_MUL, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MUL ), FCML_IA_INSTRUCTION( F_MULPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MULPD ), FCML_IA_INSTRUCTION( F_VMULPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMULPD ), FCML_IA_INSTRUCTION( F_MULPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MULPS ), FCML_IA_INSTRUCTION( F_VMULPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMULPS ), FCML_IA_INSTRUCTION( F_MULSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MULSD ), FCML_IA_INSTRUCTION( F_VMULSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMULSD ), FCML_IA_INSTRUCTION( F_MULSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MULSS ), FCML_IA_INSTRUCTION( F_VMULSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMULSS ), FCML_IA_INSTRUCTION( F_MWAIT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MWAIT ), FCML_IA_INSTRUCTION( F_NEG, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_NEG ), FCML_IA_INSTRUCTION( F_NOP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_NOP ), FCML_IA_INSTRUCTION( F_NOT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_NOT ), FCML_IA_INSTRUCTION( F_OR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_OR ), FCML_IA_INSTRUCTION( F_ORPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ORPD ), FCML_IA_INSTRUCTION( F_VORPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VORPD ), FCML_IA_INSTRUCTION( F_ORPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ORPS ), FCML_IA_INSTRUCTION( F_VORPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VORPS ), FCML_IA_INSTRUCTION( F_OUT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_OUT ), FCML_IA_INSTRUCTION( F_OUTS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_OUTS ), FCML_IA_INSTRUCTION( F_PABSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PABSW), FCML_IA_INSTRUCTION( F_PABSB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PABSB), FCML_IA_INSTRUCTION( F_PABSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PABSD), FCML_IA_INSTRUCTION( F_VPABSB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPABSB), FCML_IA_INSTRUCTION( F_VPABSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPABSW), FCML_IA_INSTRUCTION( F_VPABSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPABSD), FCML_IA_INSTRUCTION( F_VPACKSSWB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPACKSSWB), FCML_IA_INSTRUCTION( F_PACKSSWB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PACKSSWB), FCML_IA_INSTRUCTION( F_VPACKSSDW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPACKSSDW), FCML_IA_INSTRUCTION( F_PACKSSDW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PACKSSDW), FCML_IA_INSTRUCTION( F_PACKUSDW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PACKUSDW), FCML_IA_INSTRUCTION( F_VPACKUSDW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPACKUSDW), FCML_IA_INSTRUCTION( F_PACKUSWB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PACKUSWB), FCML_IA_INSTRUCTION( F_VPACKUSWB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPACKUSWB), FCML_IA_INSTRUCTION( F_VPADDW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPADDW), FCML_IA_INSTRUCTION( F_VPADDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPADDQ), FCML_IA_INSTRUCTION( F_PADDW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PADDW), FCML_IA_INSTRUCTION( F_VPADDB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPADDB), FCML_IA_INSTRUCTION( F_VPADDD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPADDD), FCML_IA_INSTRUCTION( F_PADDB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PADDB), FCML_IA_INSTRUCTION( F_PADDD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PADDD), FCML_IA_INSTRUCTION( F_VPADDSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPADDSW), FCML_IA_INSTRUCTION( F_PADDSB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PADDSB), FCML_IA_INSTRUCTION( F_PADDSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PADDSW), FCML_IA_INSTRUCTION( F_VPADDSB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPADDSB), FCML_IA_INSTRUCTION( F_PADDUSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PADDUSW), FCML_IA_INSTRUCTION( F_PADDUSB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PADDUSB), FCML_IA_INSTRUCTION( F_VPADDUSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPADDUSW), FCML_IA_INSTRUCTION( F_VPADDUSB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPADDUSB), FCML_IA_INSTRUCTION( F_PADDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PADDQ), FCML_IA_INSTRUCTION( F_VPADDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPADDQ), FCML_IA_INSTRUCTION( F_PALIGNR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PALIGNR), FCML_IA_INSTRUCTION( F_VPALIGNR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPALIGNR), FCML_IA_INSTRUCTION( F_PAND, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PAND), FCML_IA_INSTRUCTION( F_VPAND, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPAND), FCML_IA_INSTRUCTION( F_PANDN, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PANDN), FCML_IA_INSTRUCTION( F_VPANDN, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPANDN), FCML_IA_INSTRUCTION( F_PAUSE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PAUSE), FCML_IA_INSTRUCTION( F_PAVGW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PAVGW), FCML_IA_INSTRUCTION( F_PAVGB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PAVGB), FCML_IA_INSTRUCTION( F_VPAVGW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPAVGW), FCML_IA_INSTRUCTION( F_VPAVGB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPAVGB), FCML_IA_INSTRUCTION( F_PBLENDVB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PBLENDVB), FCML_IA_INSTRUCTION( F_VPBLENDVB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPBLENDVB), FCML_IA_INSTRUCTION( F_PBLENDW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PBLENDW), FCML_IA_INSTRUCTION( F_VPBLENDW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPBLENDW), FCML_IA_INSTRUCTION( F_VPBLENDD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPBLENDD), FCML_IA_INSTRUCTION( F_PCLMULQDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PCLMULQDQ), FCML_IA_INSTRUCTION( F_VPCLMULQDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCLMULQDQ), FCML_IA_INSTRUCTION( F_PCMPEQW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PCMPEQW), FCML_IA_INSTRUCTION( F_PCMPEQB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PCMPEQB), FCML_IA_INSTRUCTION( F_PCMPEQD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PCMPEQD), FCML_IA_INSTRUCTION( F_VPCMPEQD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCMPEQD), FCML_IA_INSTRUCTION( F_VPCMPEQW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCMPEQW), FCML_IA_INSTRUCTION( F_VPCMPEQB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCMPEQB), FCML_IA_INSTRUCTION( F_PCMPEQQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PCMPEQQ), FCML_IA_INSTRUCTION( F_VPCMPEQQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCMPEQQ), FCML_IA_INSTRUCTION( F_PCMPESTRI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PCMPESTRI), FCML_IA_INSTRUCTION( F_VPCMPESTRI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCMPESTRI), FCML_IA_INSTRUCTION( F_PCMPESTRM, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PCMPESTRM), FCML_IA_INSTRUCTION( F_VPCMPESTRM, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCMPESTRM), FCML_IA_INSTRUCTION( F_PCMPGTW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PCMPGTW), FCML_IA_INSTRUCTION( F_PCMPGTD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PCMPGTD), FCML_IA_INSTRUCTION( F_PCMPGTB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PCMPGTB), FCML_IA_INSTRUCTION( F_VPCMPGTW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCMPGTW), FCML_IA_INSTRUCTION( F_VPCMPGTD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCMPGTD), FCML_IA_INSTRUCTION( F_VPCMPGTB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCMPGTB), FCML_IA_INSTRUCTION( F_PCMPGTQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PCMPGTQ), FCML_IA_INSTRUCTION( F_VPCMPGTQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCMPGTQ), FCML_IA_INSTRUCTION( F_PCMPISTRI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PCMPISTRI), FCML_IA_INSTRUCTION( F_VPCMPISTRI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCMPISTRI), FCML_IA_INSTRUCTION( F_PCMPISTRM, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PCMPISTRM), FCML_IA_INSTRUCTION( F_VPCMPISTRM, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCMPISTRM), FCML_IA_INSTRUCTION( F_VPEXTRB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPEXTRB), FCML_IA_INSTRUCTION( F_VPEXTRQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPEXTRQ), FCML_IA_INSTRUCTION( F_PEXTRQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PEXTRQ), FCML_IA_INSTRUCTION( F_PEXTRB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PEXTRB), FCML_IA_INSTRUCTION( F_PEXTRD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PEXTRD), FCML_IA_INSTRUCTION( F_VPEXTRD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPEXTRD), FCML_IA_INSTRUCTION( F_PEXTRW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PEXTRW), FCML_IA_INSTRUCTION( F_VPEXTRW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPEXTRW), FCML_IA_INSTRUCTION( F_VPHADDW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHADDW), FCML_IA_INSTRUCTION( F_VPHADDD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHADDD), FCML_IA_INSTRUCTION( F_PHADDD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PHADDD), FCML_IA_INSTRUCTION( F_PHADDW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PHADDW), FCML_IA_INSTRUCTION( F_PHADDSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PHADDSW), FCML_IA_INSTRUCTION( F_VPHADDSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHADDSW), FCML_IA_INSTRUCTION( F_PHMINPOSUW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PHMINPOSUW), FCML_IA_INSTRUCTION( F_VPHMINPOSUW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHMINPOSUW), FCML_IA_INSTRUCTION( F_PHSUBD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PHSUBD), FCML_IA_INSTRUCTION( F_PHSUBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PHSUBW), FCML_IA_INSTRUCTION( F_VPHSUBD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHSUBD), FCML_IA_INSTRUCTION( F_VPHSUBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHSUBW), FCML_IA_INSTRUCTION( F_PHSUBSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PHSUBSW), FCML_IA_INSTRUCTION( F_VPHSUBSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHSUBSW), FCML_IA_INSTRUCTION( F_PINSRD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PINSRD), FCML_IA_INSTRUCTION( F_VPINSRQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPINSRQ), FCML_IA_INSTRUCTION( F_PINSRQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PINSRQ), FCML_IA_INSTRUCTION( F_PINSRB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PINSRB), FCML_IA_INSTRUCTION( F_VPINSRD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPINSRD), FCML_IA_INSTRUCTION( F_VPINSRB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPINSRB), FCML_IA_INSTRUCTION( F_PINSRW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PINSRW), FCML_IA_INSTRUCTION( F_VPINSRW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPINSRW), FCML_IA_INSTRUCTION( F_PMADDUBSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMADDUBSW), FCML_IA_INSTRUCTION( F_VPMADDUBSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMADDUBSW), FCML_IA_INSTRUCTION( F_PMADDWD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMADDWD), FCML_IA_INSTRUCTION( F_VPMADDWD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMADDWD), FCML_IA_INSTRUCTION( F_PMAXSB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMAXSB), FCML_IA_INSTRUCTION( F_VPMAXSB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMAXSB), FCML_IA_INSTRUCTION( F_PMAXSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMAXSD), FCML_IA_INSTRUCTION( F_VPMAXSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMAXSD), FCML_IA_INSTRUCTION( F_PMAXSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMAXSW), FCML_IA_INSTRUCTION( F_VPMAXSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMAXSW), FCML_IA_INSTRUCTION( F_PMAXUB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMAXUB), FCML_IA_INSTRUCTION( F_VPMAXUB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMAXUB), FCML_IA_INSTRUCTION( F_PMAXUD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMAXUD), FCML_IA_INSTRUCTION( F_VPMAXUD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMAXUD), FCML_IA_INSTRUCTION( F_PMAXUW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMAXUW), FCML_IA_INSTRUCTION( F_VPMAXUW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMAXUW), FCML_IA_INSTRUCTION( F_PMINSB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMINSB), FCML_IA_INSTRUCTION( F_VPMINSB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMINSB), FCML_IA_INSTRUCTION( F_PMINSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMINSD), FCML_IA_INSTRUCTION( F_VPMINSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMINSD), FCML_IA_INSTRUCTION( F_PMINSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMINSW), FCML_IA_INSTRUCTION( F_VPMINSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMINSW), FCML_IA_INSTRUCTION( F_PMINUW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMINUW), FCML_IA_INSTRUCTION( F_VPMINUW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMINUW), FCML_IA_INSTRUCTION( F_PMINUB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMINUB), FCML_IA_INSTRUCTION( F_VPMINUB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMINUB), FCML_IA_INSTRUCTION( F_PMINUD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMINUD), FCML_IA_INSTRUCTION( F_VPMINUD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMINUD), FCML_IA_INSTRUCTION( F_PMOVMSKB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMOVMSKB), FCML_IA_INSTRUCTION( F_VPMOVMSKB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMOVMSKB), FCML_IA_INSTRUCTION( F_VPMOVSXBQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMOVSXBQ), FCML_IA_INSTRUCTION( F_PMOVSXBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMOVSXBW), FCML_IA_INSTRUCTION( F_PMOVSXWQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMOVSXWQ), FCML_IA_INSTRUCTION( F_VPMOVSXWQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMOVSXWQ), FCML_IA_INSTRUCTION( F_PMOVSXWD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMOVSXWD), FCML_IA_INSTRUCTION( F_PMOVSXBD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMOVSXBD), FCML_IA_INSTRUCTION( F_VPMOVSXDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMOVSXDQ), FCML_IA_INSTRUCTION( F_VPMOVSXWD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMOVSXWD), FCML_IA_INSTRUCTION( F_PMOVSXBQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMOVSXBQ), FCML_IA_INSTRUCTION( F_VPMOVSXBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMOVSXBW), FCML_IA_INSTRUCTION( F_PMOVSXDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMOVSXDQ), FCML_IA_INSTRUCTION( F_VPMOVSXBD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMOVSXBD), FCML_IA_INSTRUCTION( F_PMOVZXWD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMOVZXWD), FCML_IA_INSTRUCTION( F_PMOVZXDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMOVZXDQ), FCML_IA_INSTRUCTION( F_VPMOVZXDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMOVZXDQ), FCML_IA_INSTRUCTION( F_PMOVZXWQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMOVZXWQ), FCML_IA_INSTRUCTION( F_VPMOVZXBQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMOVZXBQ), FCML_IA_INSTRUCTION( F_PMOVZXBQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMOVZXBQ), FCML_IA_INSTRUCTION( F_VPMOVZXWD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMOVZXWD), FCML_IA_INSTRUCTION( F_VPMOVZXBD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMOVZXBD), FCML_IA_INSTRUCTION( F_VPMOVZXWQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMOVZXWQ), FCML_IA_INSTRUCTION( F_PMOVZXBD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMOVZXBD), FCML_IA_INSTRUCTION( F_VPMOVZXBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMOVZXBW), FCML_IA_INSTRUCTION( F_PMOVZXBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMOVZXBW), FCML_IA_INSTRUCTION( F_PMULDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMULDQ), FCML_IA_INSTRUCTION( F_PMULHRSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMULHRSW), FCML_IA_INSTRUCTION( F_PMULHUW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMULHUW), FCML_IA_INSTRUCTION( F_VPMULDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMULDQ), FCML_IA_INSTRUCTION( F_VPMULHRSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMULHRSW), FCML_IA_INSTRUCTION( F_VPMULHUW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMULHUW), FCML_IA_INSTRUCTION( F_PMULHW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMULHW), FCML_IA_INSTRUCTION( F_VPMULHW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMULHW), FCML_IA_INSTRUCTION( F_PMULUDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMULUDQ), FCML_IA_INSTRUCTION( F_VPMULUDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMULUDQ), FCML_IA_INSTRUCTION( F_PMULLW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMULLW), FCML_IA_INSTRUCTION( F_PMULLD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PMULLD), FCML_IA_INSTRUCTION( F_VPMULLD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMULLD), FCML_IA_INSTRUCTION( F_VPMULLW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMULLW), FCML_IA_INSTRUCTION( F_POP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_POP), FCML_IA_INSTRUCTION( F_POPA, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_POPA), FCML_IA_INSTRUCTION( F_POPAD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_POPAD), FCML_IA_INSTRUCTION( F_POPF, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_POPF), FCML_IA_INSTRUCTION( F_POPFQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_POPFQ), FCML_IA_INSTRUCTION( F_POPFD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_POPFD), FCML_IA_INSTRUCTION( F_POPCNT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_POPCNT), FCML_IA_INSTRUCTION( F_POR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_POR), FCML_IA_INSTRUCTION( F_VPOR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPOR), FCML_IA_INSTRUCTION( F_PREFETCHT2, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PREFETCHT2), FCML_IA_INSTRUCTION( F_PREFETCHW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PREFETCHW), FCML_IA_INSTRUCTION( F_PREFETCHT1, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PREFETCHT1), FCML_IA_INSTRUCTION( F_PREFETCHNTA, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PREFETCHNTA), FCML_IA_INSTRUCTION( F_PREFETCHT0, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PREFETCHT0), FCML_IA_INSTRUCTION( F_PSADBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSADBW), FCML_IA_INSTRUCTION( F_VPSADBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSADBW), FCML_IA_INSTRUCTION( F_PSHUFB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSHUFB), FCML_IA_INSTRUCTION( F_PSHUFD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSHUFD), FCML_IA_INSTRUCTION( F_PSHUFHW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSHUFHW), FCML_IA_INSTRUCTION( F_VPSHUFD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSHUFD), FCML_IA_INSTRUCTION( F_VPSHUFB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSHUFB), FCML_IA_INSTRUCTION( F_PSHUFLW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSHUFLW), FCML_IA_INSTRUCTION( F_PSHUFW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSHUFW), FCML_IA_INSTRUCTION( F_VPSHUFLW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSHUFLW), FCML_IA_INSTRUCTION( F_VPSHUFHW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSHUFHW), FCML_IA_INSTRUCTION( F_VPSIGNB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSIGNB), FCML_IA_INSTRUCTION( F_VPSIGND, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSIGND), FCML_IA_INSTRUCTION( F_PSIGNW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSIGNW), FCML_IA_INSTRUCTION( F_PSIGNB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSIGNB), FCML_IA_INSTRUCTION( F_VPSIGNW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSIGNW), FCML_IA_INSTRUCTION( F_PSIGND, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSIGND), FCML_IA_INSTRUCTION( F_PSLLDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSLLDQ), FCML_IA_INSTRUCTION( F_VPSLLDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSLLDQ), FCML_IA_INSTRUCTION( F_PSLLQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSLLQ), FCML_IA_INSTRUCTION( F_PSLLD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSLLD), FCML_IA_INSTRUCTION( F_VPSLLW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSLLW), FCML_IA_INSTRUCTION( F_VPSLLQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSLLQ), FCML_IA_INSTRUCTION( F_PSLLW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSLLW), FCML_IA_INSTRUCTION( F_VPSLLD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSLLD), FCML_IA_INSTRUCTION( F_VPSRAW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSRAW), FCML_IA_INSTRUCTION( F_PSRAD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSRAD), FCML_IA_INSTRUCTION( F_PSRAW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSRAW), FCML_IA_INSTRUCTION( F_VPSRAD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSRAD), FCML_IA_INSTRUCTION( F_PSRLDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSRLDQ), FCML_IA_INSTRUCTION( F_VPSRLDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSRLDQ), FCML_IA_INSTRUCTION( F_VPSRLQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSRLQ), FCML_IA_INSTRUCTION( F_PSRLQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSRLQ), FCML_IA_INSTRUCTION( F_PSRLD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSRLD), FCML_IA_INSTRUCTION( F_PSRLW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSRLW), FCML_IA_INSTRUCTION( F_VPSRLD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSRLD), FCML_IA_INSTRUCTION( F_VPSRLW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSRLW), FCML_IA_INSTRUCTION( F_VPSUBD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSUBD), FCML_IA_INSTRUCTION( F_PSUBD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSUBD), FCML_IA_INSTRUCTION( F_PSUBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSUBW), FCML_IA_INSTRUCTION( F_VPSUBB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSUBB), FCML_IA_INSTRUCTION( F_VPSUBQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSUBQ), FCML_IA_INSTRUCTION( F_PSUBB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSUBB), FCML_IA_INSTRUCTION( F_VPSUBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSUBW), FCML_IA_INSTRUCTION( F_PSUBQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSUBQ), FCML_IA_INSTRUCTION( F_PSUBSB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSUBSB), FCML_IA_INSTRUCTION( F_VPSUBSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSUBSW), FCML_IA_INSTRUCTION( F_VPSUBSB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSUBSB), FCML_IA_INSTRUCTION( F_PSUBSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSUBSW), FCML_IA_INSTRUCTION( F_VPSUBUSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSUBUSW), FCML_IA_INSTRUCTION( F_VPSUBUSB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSUBUSB), FCML_IA_INSTRUCTION( F_PSUBUSB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSUBUSB), FCML_IA_INSTRUCTION( F_PSUBUSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PSUBUSW), FCML_IA_INSTRUCTION( F_VPTEST, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPTEST), FCML_IA_INSTRUCTION( F_PTEST, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PTEST), FCML_IA_INSTRUCTION( F_PUNPCKLBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PUNPCKLBW), FCML_IA_INSTRUCTION( F_PUNPCKLQDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PUNPCKLQDQ), FCML_IA_INSTRUCTION( F_VPUNPCKLWD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPUNPCKLWD), FCML_IA_INSTRUCTION( F_VPUNPCKLQDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPUNPCKLQDQ), FCML_IA_INSTRUCTION( F_VPUNPCKLBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPUNPCKLBW), FCML_IA_INSTRUCTION( F_PUNPCKLWD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PUNPCKLWD), FCML_IA_INSTRUCTION( F_PUNPCKLDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PUNPCKLDQ), FCML_IA_INSTRUCTION( F_VPUNPCKLDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPUNPCKLDQ), FCML_IA_INSTRUCTION( F_VPUNPCKHWD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPUNPCKHWD), FCML_IA_INSTRUCTION( F_PUNPCKHDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PUNPCKHDQ), FCML_IA_INSTRUCTION( F_PUNPCKHWD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PUNPCKHWD), FCML_IA_INSTRUCTION( F_PUNPCKHQDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PUNPCKHQDQ), FCML_IA_INSTRUCTION( F_VPUNPCKHQDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPUNPCKHQDQ), FCML_IA_INSTRUCTION( F_VPUNPCKHBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPUNPCKHBW), FCML_IA_INSTRUCTION( F_PUNPCKHBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PUNPCKHBW), FCML_IA_INSTRUCTION( F_VPUNPCKHDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPUNPCKHDQ), FCML_IA_INSTRUCTION( F_PUSH, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PUSH), FCML_IA_INSTRUCTION( F_PUSHA, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PUSHA), FCML_IA_INSTRUCTION( F_PUSHF, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PUSHF), FCML_IA_INSTRUCTION( F_PUSHAD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PUSHAD), FCML_IA_INSTRUCTION( F_PUSHFQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PUSHFQ), FCML_IA_INSTRUCTION( F_PUSHFD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PUSHFD), FCML_IA_INSTRUCTION( F_PXOR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PXOR), FCML_IA_INSTRUCTION( F_VPXOR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPXOR), FCML_IA_INSTRUCTION( F_RCL, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_RCL), FCML_IA_INSTRUCTION( F_RCR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_RCR), FCML_IA_INSTRUCTION( F_ROL, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ROL), FCML_IA_INSTRUCTION( F_ROR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ROR), FCML_IA_INSTRUCTION( F_RCPPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_RCPPS), FCML_IA_INSTRUCTION( F_VRCPPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VRCPPS), FCML_IA_INSTRUCTION( F_RCPSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_RCPSS), FCML_IA_INSTRUCTION( F_VRCPSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VRCPSS), FCML_IA_INSTRUCTION( F_RDFSBASE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_RDFSBASE), FCML_IA_INSTRUCTION( F_RDGSBASE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_RDGSBASE), FCML_IA_INSTRUCTION( F_RDRAND, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_RDRAND), FCML_IA_INSTRUCTION( F_RDTSCP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_RDTSCP), FCML_IA_INSTRUCTION( F_RDTSC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_RDTSC), FCML_IA_INSTRUCTION( F_RDPMC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_RDPMC), FCML_IA_INSTRUCTION( F_RDMSR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_RDMSR), FCML_IA_INSTRUCTION( F_RET, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_RET), FCML_IA_INSTRUCTION( F_RETF, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_RETF), FCML_IA_INSTRUCTION( F_ROUNDPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ROUNDPD), FCML_IA_INSTRUCTION( F_VROUNDPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VROUNDPD), FCML_IA_INSTRUCTION( F_ROUNDPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ROUNDPS), FCML_IA_INSTRUCTION( F_VROUNDPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VROUNDPS), FCML_IA_INSTRUCTION( F_ROUNDSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ROUNDSD), FCML_IA_INSTRUCTION( F_VROUNDSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VROUNDSD), FCML_IA_INSTRUCTION( F_ROUNDSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ROUNDSS), FCML_IA_INSTRUCTION( F_VROUNDSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VROUNDSS), FCML_IA_INSTRUCTION( F_RSM, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_RSM), FCML_IA_INSTRUCTION( F_RSQRTPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_RSQRTPS), FCML_IA_INSTRUCTION( F_VRSQRTPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VRSQRTPS), FCML_IA_INSTRUCTION( F_RSQRTSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_RSQRTSS), FCML_IA_INSTRUCTION( F_VRSQRTSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VRSQRTSS), FCML_IA_INSTRUCTION( F_SAHF, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SAHF), FCML_IA_INSTRUCTION( F_SAR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SAR), FCML_IA_INSTRUCTION( F_SHL, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SHL_SAL), FCML_IA_INSTRUCTION( F_SHR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SHR), FCML_IA_INSTRUCTION( F_SBB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SBB), FCML_IA_INSTRUCTION( F_SCAS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SCAS ), FCML_IA_INSTRUCTION( F_SET, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SETCC), FCML_IA_INSTRUCTION( F_SFENCE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SFENCE), FCML_IA_INSTRUCTION( F_SGDT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SGDT), FCML_IA_INSTRUCTION( F_SHLD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SHLD), FCML_IA_INSTRUCTION( F_SHRD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SHRD), FCML_IA_INSTRUCTION( F_SKINIT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SKINIT), FCML_IA_INSTRUCTION( F_SLWPCB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SLWPCB), FCML_IA_INSTRUCTION( F_SHUFPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SHUFPD), FCML_IA_INSTRUCTION( F_VSHUFPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VSHUFPD), FCML_IA_INSTRUCTION( F_SHUFPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SHUFPS), FCML_IA_INSTRUCTION( F_VSHUFPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VSHUFPS), FCML_IA_INSTRUCTION( F_SIDT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SIDT), FCML_IA_INSTRUCTION( F_SLDT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SLDT), FCML_IA_INSTRUCTION( F_SMSW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SMSW), FCML_IA_INSTRUCTION( F_SQRTPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SQRTPD), FCML_IA_INSTRUCTION( F_VSQRTPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VSQRTPD), FCML_IA_INSTRUCTION( F_SQRTPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SQRTPS), FCML_IA_INSTRUCTION( F_VSQRTPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VSQRTPS), FCML_IA_INSTRUCTION( F_SQRTSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SQRTSD), FCML_IA_INSTRUCTION( F_VSQRTSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VSQRTSD), FCML_IA_INSTRUCTION( F_SQRTSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SQRTSS), FCML_IA_INSTRUCTION( F_VSQRTSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VSQRTSS), FCML_IA_INSTRUCTION( F_STC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_STC), FCML_IA_INSTRUCTION( F_STD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_STD), FCML_IA_INSTRUCTION( F_STGI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_STGI), FCML_IA_INSTRUCTION( F_STI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_STI), FCML_IA_INSTRUCTION( F_STMXCSR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_STMXCSR), FCML_IA_INSTRUCTION( F_VSTMXCSR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VSTMXCSR), FCML_IA_INSTRUCTION( F_STOS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_STOS ), FCML_IA_INSTRUCTION( F_STR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_STR), FCML_IA_INSTRUCTION( F_SUB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SUB), FCML_IA_INSTRUCTION( F_SUBPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SUBPD), FCML_IA_INSTRUCTION( F_VSUBPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VSUBPD), FCML_IA_INSTRUCTION( F_SUBPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SUBPS), FCML_IA_INSTRUCTION( F_VSUBPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VSUBPS), FCML_IA_INSTRUCTION( F_SUBSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SUBSD), FCML_IA_INSTRUCTION( F_VSUBSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VSUBSD), FCML_IA_INSTRUCTION( F_SUBSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SUBSS), FCML_IA_INSTRUCTION( F_VSUBSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VSUBSS), FCML_IA_INSTRUCTION( F_SWAPGS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SWAPGS), FCML_IA_INSTRUCTION( F_SYSCALL, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SYSCALL), FCML_IA_INSTRUCTION( F_SYSENTER, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SYSENTER), FCML_IA_INSTRUCTION( F_SYSEXIT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SYSEXIT), FCML_IA_INSTRUCTION( F_SYSRET, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SYSRET), FCML_IA_INSTRUCTION( F_TEST, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_TEST), FCML_IA_INSTRUCTION( F_T1MSKC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_T1MSKC), FCML_IA_INSTRUCTION( F_UCOMISD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_UCOMISD), FCML_IA_INSTRUCTION( F_VUCOMISD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VUCOMISD), FCML_IA_INSTRUCTION( F_UCOMISS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_UCOMISS), FCML_IA_INSTRUCTION( F_VUCOMISS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VUCOMISS), FCML_IA_INSTRUCTION( F_UD2, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_UD2), FCML_IA_INSTRUCTION( F_UNPCKHPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_UNPCKHPD), FCML_IA_INSTRUCTION( F_VUNPCKHPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VUNPCKHPD), FCML_IA_INSTRUCTION( F_UNPCKHPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_UNPCKHPS), FCML_IA_INSTRUCTION( F_VUNPCKHPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VUNPCKHPS), FCML_IA_INSTRUCTION( F_UNPCKLPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_UNPCKLPD), FCML_IA_INSTRUCTION( F_VUNPCKLPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VUNPCKLPD), FCML_IA_INSTRUCTION( F_UNPCKLPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_UNPCKLPS), FCML_IA_INSTRUCTION( F_VUNPCKLPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VUNPCKLPS), FCML_IA_INSTRUCTION( F_VPBROADCASTW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPBROADCASTW), FCML_IA_INSTRUCTION( F_VPBROADCASTB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPBROADCASTB), FCML_IA_INSTRUCTION( F_VPBROADCASTD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPBROADCASTD), FCML_IA_INSTRUCTION( F_VPBROADCASTQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPBROADCASTQ), FCML_IA_INSTRUCTION( F_VMPTRLD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMPTRLD), FCML_IA_INSTRUCTION( F_VMPTRST, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMPTRST), FCML_IA_INSTRUCTION( F_VMCLEAR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMCLEAR), FCML_IA_INSTRUCTION( F_VMREAD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMREAD), FCML_IA_INSTRUCTION( F_VMWRITE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMWRITE), FCML_IA_INSTRUCTION( F_VMLAUNCH, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMLAUNCH), FCML_IA_INSTRUCTION( F_VMRESUME, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMRESUME), FCML_IA_INSTRUCTION( F_VMXOFF, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMXOFF), FCML_IA_INSTRUCTION( F_VMXON, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMXON), FCML_IA_INSTRUCTION( F_VMCALL, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMCALL), FCML_IA_INSTRUCTION( F_VMFUNC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMFUNC), FCML_IA_INSTRUCTION( F_VBROADCASTSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VBROADCASTSD), FCML_IA_INSTRUCTION( F_VBROADCASTSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VBROADCASTSS), FCML_IA_INSTRUCTION( F_VBROADCASTI128, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VBROADCASTI128), FCML_IA_INSTRUCTION( F_VBROADCASTF128, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VBROADCASTF128), FCML_IA_INSTRUCTION( F_VCVTPH2PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCVTPH2PS), FCML_IA_INSTRUCTION( F_VCVTPS2PH, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VCVTPS2PH), FCML_IA_INSTRUCTION( F_VERR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VERR), FCML_IA_INSTRUCTION( F_VERW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VERW), FCML_IA_INSTRUCTION( F_VEXTRACTF128, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VEXTRACTF128 ), FCML_IA_INSTRUCTION( F_VMLOAD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMLOAD), FCML_IA_INSTRUCTION( F_VMMCALL, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMMCALL), FCML_IA_INSTRUCTION( F_VMRUN, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMRUN), FCML_IA_INSTRUCTION( F_VMSAVE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VMSAVE), FCML_IA_INSTRUCTION( F_VPERMILPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPERMILPD), FCML_IA_INSTRUCTION( F_VPERMILPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPERMILPS), FCML_IA_INSTRUCTION( F_VPSLLVQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSLLVQ), FCML_IA_INSTRUCTION( F_VPERM2F128, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPERM2F128), FCML_IA_INSTRUCTION( F_VPERM2I128, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPERM2I128), FCML_IA_INSTRUCTION( F_VEXTRACTI128, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VEXTRACTI128), FCML_IA_INSTRUCTION( F_VINSERTI128, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VINSERTI128), FCML_IA_INSTRUCTION( F_VPSRAVD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSRAVD), FCML_IA_INSTRUCTION( F_VPERMD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPERMD), FCML_IA_INSTRUCTION( F_VPSLLVD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSLLVD), FCML_IA_INSTRUCTION( F_VPSRLVD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSRLVD), FCML_IA_INSTRUCTION( F_VPSRLVQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSRLVQ), FCML_IA_INSTRUCTION( F_VPERMPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPERMPD), FCML_IA_INSTRUCTION( F_VPERMQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPERMQ), FCML_IA_INSTRUCTION( F_VPERMPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPERMPS), FCML_IA_INSTRUCTION( F_VTESTPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VTESTPS), FCML_IA_INSTRUCTION( F_VTESTPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VTESTPD), FCML_IA_INSTRUCTION( F_VGATHERDPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VGATHERDPD), FCML_IA_INSTRUCTION( F_VGATHERQPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VGATHERQPD), FCML_IA_INSTRUCTION( F_VGATHERDPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VGATHERDPS), FCML_IA_INSTRUCTION( F_VGATHERQPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VGATHERQPS), FCML_IA_INSTRUCTION( F_VPGATHERDD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPGATHERDD), FCML_IA_INSTRUCTION( F_VPGATHERQD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPGATHERQD), FCML_IA_INSTRUCTION( F_VPGATHERDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPGATHERDQ), FCML_IA_INSTRUCTION( F_VPGATHERQQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPGATHERQQ), FCML_IA_INSTRUCTION( F_VZEROALL, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VZEROALL), FCML_IA_INSTRUCTION( F_VZEROUPPER, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VZEROUPPER), FCML_IA_INSTRUCTION( F_WAIT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_WAIT), FCML_IA_INSTRUCTION( F_WBINVD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_WBINVD), FCML_IA_INSTRUCTION( F_WRFSBASE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_WRFSBASE), FCML_IA_INSTRUCTION( F_WRGSBASE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_WRGSBASE), FCML_IA_INSTRUCTION( F_WRMSR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_WRMSR), FCML_IA_INSTRUCTION( F_XADD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_XADD), FCML_IA_INSTRUCTION( F_XCHG, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_XCHG), FCML_IA_INSTRUCTION( F_XGETBV, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_XGETBV), FCML_IA_INSTRUCTION( F_XLAT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_XLAT ), FCML_IA_INSTRUCTION( F_XOR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_XOR), FCML_IA_INSTRUCTION( F_XORPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_XORPD), FCML_IA_INSTRUCTION( F_VXORPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VXORPD), FCML_IA_INSTRUCTION( F_XORPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_XORPS), FCML_IA_INSTRUCTION( F_VXORPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VXORPS), FCML_IA_INSTRUCTION( F_XRSTOR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_XRSTOR), FCML_IA_INSTRUCTION( F_XRSTOR64, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_XRSTOR64), FCML_IA_INSTRUCTION( F_XSAVE, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_XSAVE), FCML_IA_INSTRUCTION( F_XSAVE64, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_XSAVE64), FCML_IA_INSTRUCTION( F_XSAVEOPT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_XSAVEOPT), FCML_IA_INSTRUCTION( F_XSAVEOPT64, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_XSAVEOPT64), FCML_IA_INSTRUCTION( F_XSETBV, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_XSETBV), FCML_IA_INSTRUCTION( F_FEMMS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_FEMMS ), FCML_IA_MULTI_INSTRUCTION( FCML_MI_AMD3DNOW, fcml_st_def_instruction_code_def_AMD3DNOW, fcml_st_def_addr_mode_desc_MI_AMD3DNOW ), FCML_IA_INSTRUCTION( F_PREFETCH, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PREFETCH), FCML_IA_INSTRUCTION( F_VFMADD213PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADD213PD), FCML_IA_INSTRUCTION( F_VFMADDPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADDPD), FCML_IA_INSTRUCTION( F_VFMADD132PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADD132PD), FCML_IA_INSTRUCTION( F_VFMADD231PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADD231PD), FCML_IA_INSTRUCTION( F_VFMADDPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADDPS), FCML_IA_INSTRUCTION( F_VFMADD231PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADD231PS), FCML_IA_INSTRUCTION( F_VFMADD132PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADD132PS), FCML_IA_INSTRUCTION( F_VFMADD213PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADD213PS), FCML_IA_INSTRUCTION( F_VFMADD132SD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADD132SD), FCML_IA_INSTRUCTION( F_VFMADD213SD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADD213SD), FCML_IA_INSTRUCTION( F_VFMADDSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADDSD), FCML_IA_INSTRUCTION( F_VFMADD231SD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADD231SD), FCML_IA_INSTRUCTION( F_VFMADD132SS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADD132SS), FCML_IA_INSTRUCTION( F_VFMADD213SS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADD213SS), FCML_IA_INSTRUCTION( F_VFMADDSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADDSS), FCML_IA_INSTRUCTION( F_VFMADD231SS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADD231SS), FCML_IA_INSTRUCTION( F_VFMADDSUB132PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADDSUB132PD), FCML_IA_INSTRUCTION( F_VFMADDSUB213PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADDSUB213PD), FCML_IA_INSTRUCTION( F_VFMADDSUBPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADDSUBPD), FCML_IA_INSTRUCTION( F_VFMADDSUB231PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADDSUB231PD), FCML_IA_INSTRUCTION( F_VFMADDSUB231PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADDSUB231PS), FCML_IA_INSTRUCTION( F_VFMADDSUBPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADDSUBPS), FCML_IA_INSTRUCTION( F_VFMADDSUB132PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADDSUB132PS), FCML_IA_INSTRUCTION( F_VFMADDSUB213PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMADDSUB213PS), FCML_IA_INSTRUCTION( F_VFMSUBADDPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUBADDPD), FCML_IA_INSTRUCTION( F_VFMSUBADD213PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUBADD213PD), FCML_IA_INSTRUCTION( F_VFMSUBADD132PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUBADD132PD), FCML_IA_INSTRUCTION( F_VFMSUBADD231PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUBADD231PD), FCML_IA_INSTRUCTION( F_VFMSUBADDPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUBADDPS), FCML_IA_INSTRUCTION( F_VFMSUBADD213PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUBADD213PS), FCML_IA_INSTRUCTION( F_VFMSUBADD132PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUBADD132PS), FCML_IA_INSTRUCTION( F_VFMSUBADD231PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUBADD231PS), FCML_IA_INSTRUCTION( F_VFMSUB213PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUB213PD), FCML_IA_INSTRUCTION( F_VFMSUBPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUBPD), FCML_IA_INSTRUCTION( F_VFMSUB132PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUB132PD), FCML_IA_INSTRUCTION( F_VFMSUB231PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUB231PD), FCML_IA_INSTRUCTION( F_VFMSUB213PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUB213PS), FCML_IA_INSTRUCTION( F_VFMSUBPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUBPS), FCML_IA_INSTRUCTION( F_VFMSUB132PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUB132PS), FCML_IA_INSTRUCTION( F_VFMSUB231PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUB231PS), FCML_IA_INSTRUCTION( F_VFMSUBSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUBSD), FCML_IA_INSTRUCTION( F_VFMSUB231SD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUB231SD), FCML_IA_INSTRUCTION( F_VFMSUB132SD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUB132SD), FCML_IA_INSTRUCTION( F_VFMSUB213SD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUB213SD), FCML_IA_INSTRUCTION( F_VFMSUB231SS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUB231SS), FCML_IA_INSTRUCTION( F_VFMSUB213SS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUB213SS), FCML_IA_INSTRUCTION( F_VFMSUB132SS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUB132SS), FCML_IA_INSTRUCTION( F_VFMSUBSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFMSUBSS), FCML_IA_INSTRUCTION( F_VFNMADD231PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMADD231PD), FCML_IA_INSTRUCTION( F_VFNMADDPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMADDPD), FCML_IA_INSTRUCTION( F_VFNMADD132PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMADD132PD), FCML_IA_INSTRUCTION( F_VFNMADD213PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMADD213PD), FCML_IA_INSTRUCTION( F_VFNMADD231PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMADD231PS), FCML_IA_INSTRUCTION( F_VFNMADD132PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMADD132PS), FCML_IA_INSTRUCTION( F_VFNMADD213PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMADD213PS), FCML_IA_INSTRUCTION( F_VFNMADDPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMADDPS), FCML_IA_INSTRUCTION( F_VFNMADD213SD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMADD213SD), FCML_IA_INSTRUCTION( F_VFNMADDSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMADDSD), FCML_IA_INSTRUCTION( F_VFNMADD231SD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMADD231SD), FCML_IA_INSTRUCTION( F_VFNMADD132SD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMADD132SD), FCML_IA_INSTRUCTION( F_VFNMADD213SS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMADD213SS), FCML_IA_INSTRUCTION( F_VFNMADDSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMADDSS), FCML_IA_INSTRUCTION( F_VFNMADD231SS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMADD231SS), FCML_IA_INSTRUCTION( F_VFNMADD132SS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMADD132SS), FCML_IA_INSTRUCTION( F_VFNMSUB132PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMSUB132PD), FCML_IA_INSTRUCTION( F_VFNMSUB213PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMSUB213PD), FCML_IA_INSTRUCTION( F_VFNMSUB231PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMSUB231PD), FCML_IA_INSTRUCTION( F_VFNMSUBPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMSUBPD), FCML_IA_INSTRUCTION( F_VFNMSUBPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMSUBPS), FCML_IA_INSTRUCTION( F_VFNMSUB213PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMSUB213PS), FCML_IA_INSTRUCTION( F_VFNMSUB132PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMSUB132PS), FCML_IA_INSTRUCTION( F_VFNMSUB231PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMSUB231PS), FCML_IA_INSTRUCTION( F_VFNMSUBSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMSUBSD), FCML_IA_INSTRUCTION( F_VFNMSUB231SD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMSUB231SD), FCML_IA_INSTRUCTION( F_VFNMSUB213SD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMSUB213SD), FCML_IA_INSTRUCTION( F_VFNMSUB132SD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMSUB132SD), FCML_IA_INSTRUCTION( F_VFNMSUBSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMSUBSS), FCML_IA_INSTRUCTION( F_VFNMSUB132SS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMSUB132SS), FCML_IA_INSTRUCTION( F_VFNMSUB213SS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMSUB213SS), FCML_IA_INSTRUCTION( F_VFNMSUB231SS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFNMSUB231SS), FCML_IA_INSTRUCTION( F_BEXTR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BEXTR), FCML_IA_INSTRUCTION( F_BLCFILL, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BLCFILL ), FCML_IA_INSTRUCTION( F_BLCI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BLCI ), FCML_IA_INSTRUCTION( F_BLCIC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BLCIC ), FCML_IA_INSTRUCTION( F_BLCMSK, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BLCMSK ), FCML_IA_INSTRUCTION( F_BLCS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BLCS ), FCML_IA_INSTRUCTION( F_BLSFILL, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BLSFILL ), FCML_IA_INSTRUCTION( F_BLSIC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BLSIC ), FCML_IA_INSTRUCTION( F_ANDN, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ANDN ), FCML_IA_INSTRUCTION( F_BEXR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BEXR ), FCML_IA_INSTRUCTION( F_BLSI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BLSI ), FCML_IA_INSTRUCTION( F_BLSMSK, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BLSMSK ), FCML_IA_INSTRUCTION( F_BLSR, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BLSR ), FCML_IA_INSTRUCTION( F_BZHI, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_BZHI ), FCML_IA_INSTRUCTION( F_LZCNT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_LZCNT ), FCML_IA_INSTRUCTION( F_MULX, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_MULX), FCML_IA_INSTRUCTION( F_PDEP, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PDEP), FCML_IA_INSTRUCTION( F_PEXT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_PEXT), FCML_IA_INSTRUCTION( F_RORX, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_RORX), FCML_IA_INSTRUCTION( F_SHLX, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SHLX), FCML_IA_INSTRUCTION( F_SHRX, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SHRX), FCML_IA_INSTRUCTION( F_SARX, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_SARX), FCML_IA_INSTRUCTION( F_TZCNT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_TZCNT), FCML_IA_INSTRUCTION( F_TZMSK, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_TZMSK), FCML_IA_INSTRUCTION( F_XABORT, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_XABORT), FCML_IA_INSTRUCTION( F_XBEGIN, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_XBEGIN), FCML_IA_INSTRUCTION( F_XEND, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_XEND), FCML_IA_INSTRUCTION( F_XTEST, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_XTEST), FCML_IA_INSTRUCTION( F_ADCX, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ADCX ), FCML_IA_INSTRUCTION( F_ADOX, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_ADOX ), FCML_IA_INSTRUCTION( F_RDSEED, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_RDSEED), FCML_IA_INSTRUCTION( F_CLAC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_CLAC), FCML_IA_INSTRUCTION( F_STAC, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_STAC), FCML_IA_INSTRUCTION( F_VFRCZPD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFRCZPD), FCML_IA_INSTRUCTION( F_VFRCZPS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFRCZPS), FCML_IA_INSTRUCTION( F_VFRCZSD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFRCZSD), FCML_IA_INSTRUCTION( F_VFRCZSS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VFRCZSS), FCML_IA_INSTRUCTION( F_VPCMOV, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCMOV), FCML_IA_INSTRUCTION( F_VPCOMB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCOMB ), FCML_IA_INSTRUCTION( F_VPCOMW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCOMW ), FCML_IA_INSTRUCTION( F_VPCOMD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCOMD ), FCML_IA_INSTRUCTION( F_VPCOMQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCOMQ ), FCML_IA_INSTRUCTION( F_VPCOMUB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCOMUB ), FCML_IA_INSTRUCTION( F_VPCOMUW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCOMUW ), FCML_IA_INSTRUCTION( F_VPCOMUD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCOMUD ), FCML_IA_INSTRUCTION( F_VPCOMUQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPCOMUQ ), FCML_IA_INSTRUCTION( F_VPERMIL2PD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPERMIL2PD), FCML_IA_INSTRUCTION( F_VPERMIL2PS, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPERMIL2PS), FCML_IA_INSTRUCTION( F_VPHADDBD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHADDBD), FCML_IA_INSTRUCTION( F_VPHADDBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHADDBW), FCML_IA_INSTRUCTION( F_VPHADDBQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHADDBQ), FCML_IA_INSTRUCTION( F_VPHADDDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHADDDQ), FCML_IA_INSTRUCTION( F_VPHADDUBD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHADDUBD), FCML_IA_INSTRUCTION( F_VPHADDUBQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHADDUBQ), FCML_IA_INSTRUCTION( F_VPHADDUBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHADDUBW), FCML_IA_INSTRUCTION( F_VPHADDUDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHADDUDQ), FCML_IA_INSTRUCTION( F_VPHADDUWD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHADDUWD), FCML_IA_INSTRUCTION( F_VPHADDUWQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHADDUWQ), FCML_IA_INSTRUCTION( F_VPHADDWD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHADDWD), FCML_IA_INSTRUCTION( F_VPHADDWQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHADDWQ), FCML_IA_INSTRUCTION( F_VPHSUBBW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHSUBBW), FCML_IA_INSTRUCTION( F_VPHSUBDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHSUBDQ), FCML_IA_INSTRUCTION( F_VPHSUBDQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHSUBDQ), FCML_IA_INSTRUCTION( F_VPHSUBWD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPHSUBWD), FCML_IA_INSTRUCTION( F_VPMACSDD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMACSDD), FCML_IA_INSTRUCTION( F_VPMACSDQH, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMACSDQH), FCML_IA_INSTRUCTION( F_VPMACSDQL, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMACSDQL), FCML_IA_INSTRUCTION( F_VPMACSSDD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMACSSDD), FCML_IA_INSTRUCTION( F_VPMACSSDQH, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMACSSDQH), FCML_IA_INSTRUCTION( F_VPMACSSDQL, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMACSSDQL), FCML_IA_INSTRUCTION( F_VPMACSSWD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMACSSWD), FCML_IA_INSTRUCTION( F_VPMACSSWW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMACSSWW), FCML_IA_INSTRUCTION( F_VPMACSWD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMACSWD), FCML_IA_INSTRUCTION( F_VPMACSWW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMACSWW), FCML_IA_INSTRUCTION( F_VPMADCSSWD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMADCSSWD), FCML_IA_INSTRUCTION( F_VPMADCSWD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPMADCSWD), FCML_IA_INSTRUCTION( F_VPPERM, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPPERM), FCML_IA_INSTRUCTION( F_VPROTD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPROTD), FCML_IA_INSTRUCTION( F_VPROTB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPROTB), FCML_IA_INSTRUCTION( F_VPROTQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPROTQ), FCML_IA_INSTRUCTION( F_VPROTW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPROTW), FCML_IA_INSTRUCTION( F_VPSHAB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSHAB), FCML_IA_INSTRUCTION( F_VPSHAD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSHAD), FCML_IA_INSTRUCTION( F_VPSHAQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSHAQ), FCML_IA_INSTRUCTION( F_VPSHAW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSHAW), FCML_IA_INSTRUCTION( F_VPSHLB, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSHLB), FCML_IA_INSTRUCTION( F_VPSHLD, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSHLD), FCML_IA_INSTRUCTION( F_VPSHLQ, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSHLQ), FCML_IA_INSTRUCTION( F_VPSHLW, FCML_EMPTY_MNEMONIC, fcml_st_def_addr_mode_desc_VPSHLW), FCML_IA_INSTRUCTION( F_UNKNOWN, NULL, NULL ) }; fcml-1.1.1/src/fcml_gas_parser_def.y0000644000175000017500000002014712560745216014316 00000000000000 /* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ %define api.pure %parse-param { struct fcml_st_parser_data *pd } %name-prefix="gas_" %{ #include #include "fcml_parser_utils.h" void gas_error( struct fcml_st_parser_data *pd, const char *error ); /* Macro responsible for handling 'Out of memory' errors. */ #define HANDLE_ERRORS(x) if( !x ) { yyerror(pd, "Out of memory."); YYERROR; } /* Macro responsible for adding error messages to result. */ #define ADD_ERROR_MSG(x) { yyerror( pd, x ); } %} /* Uncomment it in order to enable debugging */ /* %debug */ /*Terminal symbols.*/ /* Uexpected tokeens goes here. */ %token FCML_TK_UNEXPECTED /* Registers. */ %token FCML_TK_REG_GPR %token FCML_TK_REG_SIMD %token FCML_TK_REG_FPU %token FCML_TK_REG_SEG %token FCML_TK_REG_CR %token FCML_TK_REG_DR %token FCML_TK_REG_RIP /* Integer values. Encoding doesn't matters. */ %token FCML_TK_INTEGER /* Literal symbol. It's used mainly for mnemonics.*/ %token FCML_TK_SYMBOL /* Prefixes */ %token FCML_TK_PREFIX /* Pseudo operations */ %token FCML_TK_PO_BYTE /*Non-terminal symbols.*/ %type reg %type segment_selector %type operand %type operand_list %type instruction %type exp %type effective_address %type effective_address_components_without_dis %type effective_address_components %type pseudo_operation %type mnemonic %type inst_prefixes /* Precedence levels and associativity. */ %left '-' '+' %left '*' '/' %left FCML_OP_UMINUS /* Destructor for leafs of AST. */ %destructor { fcml_fn_ast_free_node($$); } /* Printers goes here. */ %printer { YYFPRINTF(yyoutput, "Integer: %ld Overflow: %d", $$.value, $$.overflow); } %printer { YYFPRINTF(yyoutput, "Float: %f Overflow: %d", $$.value, $$.overflow); } %printer { YYFPRINTF(yyoutput, "AST-Type: %d", $$->type); } %printer { YYFPRINTF(yyoutput, "Type: %s Size: %d Reg: %d x64_exp: %d", fcml_fn_pu_reg_type_to_string( $$.type ), $$.size, $$.reg, $$.x64_exp); } %union { /*Complex values.*/ fcml_st_ast_val_integer integer_value; fcml_st_register reg_value; fcml_st_ast_node *ast; struct { fcml_string text; int length; } symbol; fcml_hints hints; fcml_prefixes prefixes; } %{ #include "fcml_gas_lexer.h" #define YYLEX_PARAM ((yyscan_t)pd->scannerInfo) %} %initial-action { /* Uncomment it in order to enable debugging */ /* gas_debug = 1; */ } %% start: | instruction { pd->tree = $1; pd->symbol = NULL; } | pseudo_operation { pd->tree = $1; pd->symbol = NULL; } | FCML_TK_SYMBOL ':' { pd->tree = NULL; pd->symbol = fcml_fn_ast_alloc_node_define_symbol( pd->ip, $1.text, $1.length ); HANDLE_ERRORS( pd->symbol ); } | FCML_TK_SYMBOL ':' instruction { pd->tree = $3; pd->symbol = fcml_fn_ast_alloc_node_define_symbol( pd->ip, $1.text, $1.length ); HANDLE_ERRORS( pd->symbol ); } | FCML_TK_SYMBOL ':' pseudo_operation { pd->tree = $3; pd->symbol = fcml_fn_ast_alloc_node_define_symbol( pd->ip, $1.text, $1.length ); HANDLE_ERRORS( pd->symbol ); } ; instruction: mnemonic { $$ = fcml_fn_ast_alloc_node_instruction( 0, $1.text, $1.length, 0, NULL ); HANDLE_ERRORS($$); } | mnemonic operand_list { $$ = fcml_fn_ast_alloc_node_instruction( 0, $1.text, $1.length, 0, $2 ); HANDLE_ERRORS($$); } | inst_prefixes mnemonic { $$ = fcml_fn_ast_alloc_node_instruction( $1, $2.text, $2.length, 0, NULL ); HANDLE_ERRORS($$); } | inst_prefixes mnemonic operand_list { $$ = fcml_fn_ast_alloc_node_instruction( $1, $2.text, $2.length, 0, $3 ); HANDLE_ERRORS($$); } ; inst_prefixes: FCML_TK_PREFIX | inst_prefixes FCML_TK_PREFIX { if( $1 & $2 ) { ADD_ERROR_MSG( "Doubled prefixes." ); YYERROR; } else { $$ = $1 | $2; } } ; mnemonic: FCML_TK_SYMBOL ; operand_list: operand { $$ = fcml_fn_ast_alloc_node_operand_list( $1, NULL ); HANDLE_ERRORS($$); } | operand_list ',' operand { $$ = fcml_fn_ast_alloc_node_operand_list( $1, $3 ); HANDLE_ERRORS($$); } ; operand: '$' exp { $$ = $2; } | effective_address | '*' effective_address { $$ = fcml_fn_ast_set_effective_address_hins( $2, FCML_HINT_INDIRECT_POINTER ); } | reg { $$ = fcml_fn_ast_alloc_node_register( &$1 ); HANDLE_ERRORS($$); } ; effective_address: effective_address_components | segment_selector effective_address_components { $$ = fcml_fn_ast_set_effective_address_details( &$1, FCML_OS_UNDEFINED, $2 ); } ; effective_address_components: effective_address_components_without_dis | exp effective_address_components_without_dis { $$ = fcml_fn_ast_set_displacemnt( $1, $2 ); } | exp { $$ = fcml_fn_ast_alloc_node_effective_address( NULL, NULL, NULL, $1, FCML_FALSE, 0); } ; effective_address_components_without_dis: '(' FCML_TK_REG_RIP ')' { $$ = fcml_fn_ast_alloc_node_effective_address( &$2, NULL, NULL, NULL, FCML_FALSE, 0 ); } | '(' reg ')' { $$ = fcml_fn_ast_alloc_node_effective_address( &$2, NULL, NULL, NULL, FCML_FALSE, 0 ); } | '(' reg ',' reg ')' { $$ = fcml_fn_ast_alloc_node_effective_address( &$2, &$4, NULL, NULL, FCML_FALSE, 0 ); } | '(' ',' reg ')' { $$ = fcml_fn_ast_alloc_node_effective_address( NULL, &$3, NULL, NULL, FCML_FALSE, 0 ); } | '(' reg ',' reg ',' FCML_TK_INTEGER ')' { $$ = fcml_fn_ast_alloc_node_effective_address( &$2, &$4, &$6, NULL, FCML_FALSE, 0 ); } | '(' ',' reg ',' FCML_TK_INTEGER ')' { $$ = fcml_fn_ast_alloc_node_effective_address( NULL, &$3, &$5, NULL, FCML_FALSE, 0 ); } ; segment_selector: FCML_TK_REG_SEG ':' { $$ = $1; } ; exp: FCML_TK_INTEGER { $$ = fcml_fn_ast_alloc_node_integer( &$1 ); HANDLE_ERRORS($$); } | exp '-' exp { $$ = fcml_fn_ast_alloc_node_exp( FCML_EN_EXN_SUB, $1, $3 ); HANDLE_ERRORS($$); } | exp '+' exp { $$ = fcml_fn_ast_alloc_node_exp( FCML_EN_EXN_ADD, $1, $3 ); HANDLE_ERRORS($$); } | exp '/' exp { $$ = fcml_fn_ast_alloc_node_exp( FCML_EN_EXN_DIV, $1, $3 ); HANDLE_ERRORS($$); } | exp '*' exp { $$ = fcml_fn_ast_alloc_node_exp( FCML_EN_EXN_MUL, $1, $3 ); HANDLE_ERRORS($$); } | FCML_TK_SYMBOL { $$ = fcml_fn_ast_alloc_node_use_symbol( $1.text, $1.length ); HANDLE_ERRORS($$); } | '-' exp %prec FCML_OP_UMINUS { $$ = fcml_fn_ast_alloc_node_uminus( $2 ); HANDLE_ERRORS($$); } | '(' exp ')' { $$ = $2; } ; /* Every register possible. */ reg: FCML_TK_REG_GPR | FCML_TK_REG_SIMD | FCML_TK_REG_FPU | FCML_TK_REG_SEG | FCML_TK_REG_CR | FCML_TK_REG_DR ; /* Pseudo operations. */ pseudo_operation: FCML_TK_PO_BYTE exp { $$ = fcml_fn_ast_alloc_node_pseudo_operation( $1.text, $1.length, $2 ); HANDLE_ERRORS($$); } ; %% fcml-1.1.1/src/fcml_gas_rend.h0000644000175000017500000000242612560745216013113 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_GAS_REND_H_ #define FCML_GAS_REND_H_ #include #include #include #include #include #include "fcml_stream.h" fcml_ceh_error fcml_fn_rend_render_instruction_gas( const fcml_st_dialect *dialect_context, const fcml_st_render_config *config, fcml_st_memory_stream *output_stream, const fcml_st_disassembler_result *result ); #endif /* FCML_GAS_REND_H_ */ fcml-1.1.1/src/fcml_modrm_encoder.h0000644000175000017500000000645712560745216014156 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_MODRM_ENCODER_H_ #define FCML_MODRM_ENCODER_H_ #include #include #include "fcml_ceh.h" #include "fcml_modrm.h" #include "fcml_stream.h" /* Some macros that might be also useful outside encoder.*/ #define FCML_MODRM_ENC_MOD(x) ( x << 6 ) #define FCML_MODRM_ENC_REG_OPCODE(x) ( x << 3 ) #define FCML_MODRM_ENC_RM(x) ( x ) #define FCML_MODRM_ENC(mod,reg,rm) ( FCML_MODRM_ENC_MOD( mod ) | FCML_MODRM_ENC_REG_OPCODE( reg ) | FCML_MODRM_ENC_RM( rm ) ) #define FCML_MODRM_ENC_SIB_SS(x) ( x << 6 ) #define FCML_MODRM_ENC_SIB_INDEX(x) ( x << 3 ) #define FCML_MODRM_ENC_SIB_BASE(x) ( x ) #define FCML_MODRM_SIB_ENC(ss,index,base) ( FCML_MODRM_ENC_SIB_SS( ss ) | FCML_MODRM_ENC_SIB_INDEX( index ) | FCML_MODRM_ENC_SIB_BASE( base ) ) typedef struct fcml_st_encoded_modrm { fcml_uint8_t modrm; fcml_nuint8_t sib; fcml_uint8_t ext_r; fcml_uint8_t ext_x; fcml_uint8_t ext_b; fcml_uint8_t displacement[4]; fcml_uint8_t displacement_size; fcml_bool is_rip; fcml_bool is_rip_encoded; fcml_int64_t rip_address; } fcml_st_encoded_modrm; typedef struct fcml_st_modrm_encoder_context { /* Sets 32 or 64 bit addressing mode.*/ fcml_en_operating_mode op_mode; /* Preferred effective address size that should be used to encode ModR/M.*/ fcml_usize effective_address_size; /* Effective address size ModR/M was encoded for. For example "effective_address_size" might*/ /* be set to 32 bits, but [BX+SI] encoding forces 16 bit encoding.*/ fcml_usize chosen_effective_address_size; /* This flag is set by encoder if there is alternative SIB encoding available,*/ /* but user chooses ModR/M only encoding.*/ fcml_bool is_sib_alternative; /* If set to true, encoder chooses SIB encoding instead on ModR/M only alternative.*/ fcml_bool choose_sib_encoding; /* If there is alternative, use RIP encoding instead of SIB alternative.*/ fcml_bool choose_rip_encoding; } fcml_st_modrm_encoder_context; fcml_ceh_error fcml_fn_modrm_encode( fcml_st_modrm_encoder_context *context, const fcml_st_modrm *decoded_modrm, fcml_st_encoded_modrm *encoded_modrm ); fcml_ceh_error fcml_fn_modrm_encode_rip_offset( fcml_st_memory_stream *stream, fcml_int64_t rip, fcml_uint8_t instruction_size, const fcml_st_encoded_modrm *encoded_modrm ); fcml_ceh_error fcml_fn_modrm_calculate_effective_address_size( const fcml_st_modrm *decoded_modrm, fcml_flags *effective_address_size ); #endif /* FCML_MODRM_ENCODER_H_ */ fcml-1.1.1/src/fcml_optimizers.c0000644000175000017500000002015312560745216013526 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_optimizers.h" #include #include #include #include "fcml_trace.h" typedef struct fcml_ist_asm_opt_optimization_path_element { fcml_flags flags; fcml_usize attribute_size; } fcml_ist_asm_opt_optimization_path_element; fcml_ist_asm_opt_optimization_path_element fcml_iarr_asm_opt_16_32_bit_optimization_path_16[] = { { FCML_EN_ASF_16, FCML_DS_16 }, { FCML_EN_ASF_32, FCML_DS_32 } }; fcml_ist_asm_opt_optimization_path_element fcml_iarr_asm_opt_16_32_bit_optimization_path_32[] = { { FCML_EN_ASF_32, FCML_DS_32 }, { FCML_EN_ASF_16, FCML_DS_16 } }; fcml_ist_asm_opt_optimization_path_element fcml_iarr_asm_opt_64_bit_optimization_path_for_asa_64[] = { { FCML_EN_ASF_64, FCML_DS_64 }, { FCML_EN_ASF_32, FCML_DS_32 } }; fcml_ist_asm_opt_optimization_path_element fcml_iarr_asm_opt_64_bit_optimization_path_for_asa_32[] = { { FCML_EN_ASF_32, FCML_DS_32 }, { FCML_EN_ASF_64, FCML_DS_64 } }; fcml_ist_asm_opt_optimization_path_element fcml_iarr_asm_opt_64_bit_optimization_path_for_osa_16[] = { { FCML_EN_ASF_16, FCML_DS_16 }, { FCML_EN_ASF_64, FCML_DS_64 }, { FCML_EN_ASF_32, FCML_DS_32 } }; fcml_ist_asm_opt_optimization_path_element fcml_iarr_asm_opt_64_bit_optimization_path_for_osa_32[] = { { FCML_EN_ASF_32, FCML_DS_32 }, { FCML_EN_ASF_64, FCML_DS_64 }, { FCML_EN_ASF_16, FCML_DS_16 } }; fcml_ist_asm_opt_optimization_path_element fcml_iarr_asm_opt_64_bit_optimization_path_for_osa_64[] = { { FCML_EN_ASF_64, FCML_DS_64 }, { FCML_EN_ASF_32, FCML_DS_32 }, { FCML_EN_ASF_16, FCML_DS_16 } }; fcml_int fcml_ifn_asm_opt_go_through_the_optimization_path( fcml_flags flags, fcml_int path_length, fcml_ist_asm_opt_optimization_path_element *path, fcml_usize *attribute_dest ) { int i, count = 0; for ( i = 0; i < path_length; i++ ) { fcml_ist_asm_opt_optimization_path_element *element = &( path[i] ); if ( ( flags & element->flags ) || ( flags == FCML_EN_ASF_ANY ) ) { attribute_dest[count++] = element->attribute_size; } } return count; } fcml_int fcml_ifn_asm_opt_try_setting_attribute_size( fcml_flags flags, fcml_uint16_t opt_flags, fcml_usize attribute_size, fcml_usize *attribute_dest ) { if ( ( flags & opt_flags ) || ( flags == FCML_EN_ASF_ANY ) ) { *attribute_dest = attribute_size; return 1; } return 0; } fcml_ceh_error LIB_CALL fcml_fn_asm_default_optimizer( fcml_st_asm_optimizer_context *context, fcml_st_asm_optimizer_processing_details *ds_flags, fcml_fnp_asm_optimizer_callback callback, fcml_ptr callback_args ) { fcml_ceh_error error = FCML_CEH_GEC_INVALID_ADDRESS_SIZE; fcml_usize easa[2]; fcml_usize eosa[3]; fcml_int easa_count = 0; fcml_int eosa_count = 0; fcml_ist_asm_opt_optimization_path_element *path; fcml_uint16_t opt_flags = context->optimizer_flags; // Just in case. if ( ds_flags == NULL ) { FCML_TRACE_MSG("Optimizer details flags haven't been set."); return FCML_CEH_GEC_INTERNAL_ERROR; } /* ASA*/ if ( ds_flags->easa ) { /* Effective address size has been already chosen and cannot be changed.*/ easa[easa_count++] = ds_flags->easa; } else { /* Maybe user has already forced any address size attribute to be chosen? */ fcml_usize attr_size = 0; fcml_flags attr_size_flag = 0; switch ( opt_flags & 0x000F ) { case FCML_OPTF_ASA_16: attr_size = FCML_DS_16; attr_size_flag = FCML_EN_ASF_16; break; case FCML_OPTF_ASA_32: attr_size = FCML_DS_32; attr_size_flag = FCML_EN_ASF_32; break; case FCML_OPTF_ASA_64: attr_size = FCML_DS_64; attr_size_flag = FCML_EN_ASF_64; break; } if ( attr_size ) { easa_count = fcml_ifn_asm_opt_try_setting_attribute_size( ds_flags->allowed_easa.flags, attr_size_flag, attr_size, &( easa[easa_count] ) ); } } /* OSA*/ if ( ds_flags->eosa ) { /* Effective address size has been already chosen and cannot be changed.*/ eosa[eosa_count++] = ds_flags->eosa; } else { /* Maybe user has already forced any address size attribute to be chosen?*/ fcml_usize attr_size = 0; fcml_flags attr_size_flag = 0; switch ( opt_flags & 0x00F0 ) { case FCML_OPTF_OSA_16: attr_size = FCML_DS_16; attr_size_flag = FCML_EN_ASF_16; break; case FCML_OPTF_OSA_32: attr_size = FCML_DS_32; attr_size_flag = FCML_EN_ASF_32; break; case FCML_OPTF_OSA_64: attr_size = FCML_DS_64; attr_size_flag = FCML_EN_ASF_64; break; } if ( attr_size ) { eosa_count = fcml_ifn_asm_opt_try_setting_attribute_size( ds_flags->allowed_eosa.flags, attr_size_flag, attr_size, &( eosa[eosa_count] ) ); } } /* Choosing the best optimization path for ASA.*/ if ( !easa_count ) { switch ( context->op_mode ) { case FCML_OM_16_BIT: case FCML_OM_32_BIT: path = ( context->asa == FCML_DS_16 ) ? fcml_iarr_asm_opt_16_32_bit_optimization_path_16 : fcml_iarr_asm_opt_16_32_bit_optimization_path_32; easa_count = fcml_ifn_asm_opt_go_through_the_optimization_path( ds_flags->allowed_easa.flags, 2, path, easa ); break; case FCML_OM_64_BIT: path = ( context->asa == FCML_DS_32 ) ? fcml_iarr_asm_opt_64_bit_optimization_path_for_asa_32 : fcml_iarr_asm_opt_64_bit_optimization_path_for_asa_64; easa_count = fcml_ifn_asm_opt_go_through_the_optimization_path( ds_flags->allowed_easa.flags, 2, path, easa ); break; } } /* Choosing the best optimization path for OSA.*/ if ( !eosa_count ) { switch ( context->op_mode ) { case FCML_OM_16_BIT: case FCML_OM_32_BIT: path = ( context->osa == FCML_DS_16 ) ? fcml_iarr_asm_opt_16_32_bit_optimization_path_16 : fcml_iarr_asm_opt_16_32_bit_optimization_path_32; eosa_count = fcml_ifn_asm_opt_go_through_the_optimization_path( ds_flags->allowed_eosa.flags, 2, path, eosa ); break; case FCML_OM_64_BIT: switch ( context->osa ) { case FCML_DS_16: path = &fcml_iarr_asm_opt_64_bit_optimization_path_for_osa_16[0]; break; case FCML_DS_32: path = &fcml_iarr_asm_opt_64_bit_optimization_path_for_osa_32[0]; break; case FCML_DS_64: path = &fcml_iarr_asm_opt_64_bit_optimization_path_for_osa_64[0]; break; } eosa_count = fcml_ifn_asm_opt_go_through_the_optimization_path( ds_flags->allowed_eosa.flags, 3, path, eosa ); break; } } ds_flags->break_optimization = FCML_FALSE; int i, j; for ( i = 0; i < easa_count && ( ( opt_flags == FCML_OPTF_ALL_FORMS ) || error ) && !ds_flags->break_optimization; i++ ) { ds_flags->easa = easa[i]; for ( j = 0; j < eosa_count && ( ( opt_flags == FCML_OPTF_ALL_FORMS ) || error ) && !ds_flags->break_optimization; j++ ) { ds_flags->eosa = eosa[j]; error = callback( callback_args ); } } return error; } fcml-1.1.1/src/fcml_assembler_int.h0000644000175000017500000000225612560745216014161 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_ASSEMBLER_INT_H_ #define FCML_ASSEMBLER_INT_H_ #include /** * Extracts dialect from assembler instance. * * @param assembler Assembler dialect should be extracted from. * @return Extracted dialect. */ fcml_st_dialect *fcml_fn_assembler_extract_dialect( fcml_st_assembler *assembler ); #endif /* FCML_ASSEMBLER_INT_H_ */ fcml-1.1.1/src/fcml_coll.h0000644000175000017500000001106112560745216012255 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_COLL_H_ #define FCML_COLL_H_ #include #include "fcml_ceh.h" /***********************/ /* Bidirectional List. */ /***********************/ typedef struct fcml_st_coll_list_element { struct fcml_st_coll_list_element *prev; struct fcml_st_coll_list_element *next; fcml_ptr item; } fcml_st_coll_list_element; typedef struct fcml_st_coll_list { struct fcml_st_coll_list_element *head; struct fcml_st_coll_list_element *tail; fcml_int32_t size; } fcml_st_coll_list; typedef void (*fcml_fp_coll_list_action)( fcml_ptr item_value, fcml_ptr args ); fcml_st_coll_list *fcml_fn_coll_list_alloc_with_args( fcml_ptr handler_args ); fcml_st_coll_list *fcml_fn_coll_list_alloc(); fcml_st_coll_list_element *fcml_fn_coll_list_add_front( fcml_st_coll_list *list, const fcml_ptr item ); fcml_st_coll_list_element *fcml_fn_coll_list_add_back( fcml_st_coll_list *list, const fcml_ptr item ); fcml_st_coll_list_element *fcml_fn_coll_list_insert( fcml_st_coll_list *list, fcml_st_coll_list_element *prev_element, const fcml_ptr item ); void fcml_fn_coll_list_traverse( const fcml_st_coll_list *list, fcml_fp_coll_list_action item_handler, fcml_ptr item_handler_args ); void fcml_fn_coll_list_remove( fcml_st_coll_list *list, fcml_st_coll_list_element *element ); void fcml_fn_coll_list_free( fcml_st_coll_list *list, fcml_fp_coll_list_action item_handler, const fcml_ptr item_handler_args ); /*************/ /* Hash Map. */ /*************/ #define FCML_COLL_ERROR_NO_ERROR 0x0000 #define FCML_COLL_ERROR_OUT_OF_MEMORY 0x0001 #define FCML_COLL_ERROR_MAP_FULL 0x0002 #define FCML_COLL_ERROR_BAD_ARGS 0x0003 #define FCML_COLL_MAP_DEFAULT_FACTOR 0.75 /* Hash & Equals for strings.*/ typedef void (*fcml_fnp_coll_map_entry_handler)( fcml_ptr key, fcml_ptr value, fcml_ptr args ); typedef fcml_bool (*fcml_fnp_coll_map_entry_handler_if)( fcml_ptr key, fcml_ptr value, fcml_ptr args ); typedef fcml_uint32_t (*fcml_fnp_coll_map_key_hash)( fcml_ptr key ); typedef fcml_bool (*fcml_fnp_coll_map_key_equals)( fcml_ptr key1, fcml_ptr key2 ); typedef struct fcml_st_coll_map_descriptor { fcml_fnp_coll_map_key_hash hash_function; fcml_fnp_coll_map_key_equals equals_function; fcml_fnp_coll_map_entry_handler entry_free_function; fcml_ptr entry_free_args; } fcml_st_coll_map_descriptor; typedef fcml_ptr fcml_coll_map; fcml_coll_map fcml_fn_coll_map_alloc( const fcml_st_coll_map_descriptor *descriptor, fcml_uint32_t capacity, fcml_int *error ); fcml_coll_map fcml_fn_coll_map_alloc_factor( const fcml_st_coll_map_descriptor *descriptor, fcml_uint32_t capacity, float load_factor, fcml_int *error ); void fcml_fn_coll_map_put( fcml_coll_map map, const fcml_ptr key, const fcml_ptr value, fcml_int *error ); fcml_ptr fcml_fn_coll_map_get( fcml_coll_map map, const fcml_ptr key ); fcml_uint32_t fcml_fn_coll_map_size( const fcml_coll_map map ); void fcml_fn_coll_map_iterate( const fcml_coll_map map, fcml_fnp_coll_map_entry_handler item_handler ); void fcml_fn_coll_map_clear( fcml_coll_map map ); void fcml_fn_coll_map_remove( fcml_coll_map map, const fcml_ptr key ); void fcml_fn_coll_map_remove_if( fcml_coll_map map, fcml_fnp_coll_map_entry_handler_if item_handler, const fcml_ptr item_handler_args ); void fcml_fn_coll_map_free( fcml_coll_map map ); /* Built-in hash code and equals implementations.*/ fcml_uint32_t fcml_fnp_coll_map_key_hash_string( fcml_ptr key ); fcml_bool fcml_fnp_coll_map_key_equals_string( fcml_ptr key1, fcml_ptr key2 ); fcml_uint32_t fcml_fnp_coll_map_key_hash_uint32( fcml_ptr key ); fcml_bool fcml_fnp_coll_map_key_equals_uint32( fcml_ptr key1, fcml_ptr key2 ); extern fcml_st_coll_map_descriptor fcml_coll_map_descriptor_string; extern fcml_st_coll_map_descriptor fcml_coll_map_descriptor_uint32; #endif /* FCML_COLL_H_ */ fcml-1.1.1/src/fcml_common_dialect.c0000644000175000017500000003012612560745216014277 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_common_dialect.h" #include #include #include #include "fcml_ceh.h" #include "fcml_dialect_int.h" #include "fcml_env_int.h" #define FCML_CMN_DIALECT_CND_GROUPS 3 fcml_string fcml_ar_asm_conditional_suffixes[3][16] = { { FCML_TEXT("o"), FCML_TEXT("no"), FCML_TEXT("b"), FCML_TEXT("nb"), FCML_TEXT("e"), FCML_TEXT("ne"), FCML_TEXT("be"), FCML_TEXT("nbe"), FCML_TEXT("s"), FCML_TEXT("ns"), FCML_TEXT("p"), FCML_TEXT("np"), FCML_TEXT("l"), FCML_TEXT("nl"), FCML_TEXT("le"), FCML_TEXT("nle") }, { NULL, NULL, FCML_TEXT("nae"), FCML_TEXT("ae"), FCML_TEXT("z"), FCML_TEXT("nz"), FCML_TEXT("na"), FCML_TEXT("a"), NULL, NULL, FCML_TEXT("pe"), FCML_TEXT("po"), FCML_TEXT("nge"), FCML_TEXT("ge"), FCML_TEXT("ng"), FCML_TEXT("g") }, { NULL, NULL, FCML_TEXT("c"), FCML_TEXT("nc"), NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL } }; fcml_string fcml_ar_asm_conditional_suffixes_render[2][16] = { { FCML_TEXT("o"), FCML_TEXT("no"), FCML_TEXT("b"), FCML_TEXT("nb"), FCML_TEXT("e"), FCML_TEXT("ne"), FCML_TEXT("be"), FCML_TEXT("nbe"), FCML_TEXT("s"), FCML_TEXT("ns"), FCML_TEXT("p"), FCML_TEXT("np"), FCML_TEXT("l"), FCML_TEXT("nl"), FCML_TEXT("le"), FCML_TEXT("nle") }, { FCML_TEXT("o"), FCML_TEXT("no"), FCML_TEXT("nae"), FCML_TEXT("ae"), FCML_TEXT("z"), FCML_TEXT("nz"), FCML_TEXT("na"), FCML_TEXT("a"), FCML_TEXT("s"), FCML_TEXT("ns"), FCML_TEXT("pe"), FCML_TEXT("po"), FCML_TEXT("nge"), FCML_TEXT("ge"), FCML_TEXT("ng"), FCML_TEXT("g") } }; fcml_string fcml_ar_asm_dialect_reg_symbol_table[7][16] = { { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "st(0)", "st(1)", "st(2)", "st(3)", "st(4)", "st(5)", "st(6)", "st(7)", "", "", "", "", "", "", "", "" }, { "es", "cs", "ss", "ds", "fs", "gs", "", "", "", "", "", "", "", "", "", "" }, { "cr0", "", "cr2", "cr3", "cr4", "", "", "", "cr8", "", "", "", "", "", "", "" }, { "dr0", "dr1", "dr2", "dr3", "dr4", "dr5", "dr6", "dr7", "", "", "", "", "", "", "", "" } }; fcml_string fcml_ar_asm_dialect_reg_gpr_symbol_table[4][16] = { { "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh", "r8l", "r9l", "r10l", "r11l", "r12l", "r13l", "r14l", "r15l" }, { "ax", "cx", "dx", "bx", "sp", "bp", "si", "di", "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w" }, { "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi", "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d" }, { "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15" } }; fcml_string fcml_ar_asm_dialect_reg_symbol_table_rex[7][16] = { { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "st(0)", "st(1)", "st(2)", "st(3)", "st(4)", "st(5)", "st(6)", "st(7)", "", "", "", "", "", "", "", "" }, { "es", "cs", "ss", "ds", "fs", "gs", "", "", "", "", "", "", "", "", "", "" }, { "cr0", "", "cr2", "cr3", "cr4", "", "", "", "cr8", "", "", "", "", "", "", "" }, { "dr0", "dr1", "dr2", "dr3", "dr4", "dr5", "dr6", "dr7", "", "", "", "", "", "", "", "" } }; fcml_string fcml_ar_asm_dialect_reg_gpr_symbol_table_ip[4] = { "", "ip", "eip", "rip" }; fcml_string fcml_ar_asm_dialect_reg_gpr_symbol_table_rex[4][16] = { { "al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil", "r8l", "r9l", "r10l", "r11l", "r12l", "r13l", "r14l", "r15l" }, { "ax", "cx", "dx", "bx", "sp", "bp", "si", "di", "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w" }, { "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi", "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d" }, { "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15" } }; fcml_string fcml_ar_asm_dialect_reg_sidm_symbol_table[3][16] = { { "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7", "", "", "", "", "", "", "", "" }, { "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15" }, { "ymm0", "ymm1", "ymm2", "ymm3", "ymm4", "ymm5", "ymm6", "ymm7", "ymm8", "ymm9", "ymm10", "ymm11", "ymm12", "ymm13", "ymm14", "ymm15" } }; fcml_string fcml_fn_cmn_dialect_render_mnemonic( fcml_string mnemonic, fcml_st_condition *condition, fcml_uint8_t conditional_group, fcml_bool show_carry ) { fcml_string rendered_mnemonic = NULL; if (condition) { fcml_string suffix = NULL; fcml_int cond = ( condition->condition_type << 1 ) | ( ( condition->is_negation ) ? 1 : 0 ); if (show_carry) { if (cond == 2) { suffix = FCML_TEXT( "c" ); } else if (cond == 3) { suffix = FCML_TEXT( "nc" ); } } if (!suffix) { suffix = fcml_ar_asm_conditional_suffixes_render[conditional_group][cond]; } fcml_usize mnemonic_len = fcml_fn_env_str_strlen( mnemonic ); fcml_usize len = mnemonic_len + fcml_fn_env_str_strlen( suffix ); rendered_mnemonic = fcml_fn_env_str_stralloc( len + 1 ); if (rendered_mnemonic) { fcml_fn_env_str_strcpy( rendered_mnemonic, mnemonic ); fcml_fn_env_str_strcpy( rendered_mnemonic + mnemonic_len, suffix ); } } else { rendered_mnemonic = fcml_fn_env_str_strdup( mnemonic ); } return rendered_mnemonic; } fcml_ceh_error fcml_fn_cmn_dialect_get_mnemonic( const fcml_st_dialect *dialect, fcml_st_mp_mnemonic_set *mnemonic_set, fcml_st_mp_mnemonic **mnemonics, fcml_st_condition *condition, int *mnemonics_counter ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_int counter = 0; fcml_st_coll_list_element *element = mnemonic_set->mnemonics->head; while ( element ) { fcml_st_mp_mnemonic *mnemonic_def = (fcml_st_mp_mnemonic*) element->item; if (condition != NULL) { /* Conditional instructions.*/ fcml_uint32_t suffix_nr = condition->condition_type * 2 + ( condition->is_negation ? 1 : 0 ); int i; for ( i = 0; i < FCML_CMN_DIALECT_CND_GROUPS; i++ ) { fcml_string suffix = fcml_ar_asm_conditional_suffixes[i][suffix_nr]; if (suffix) { mnemonics[counter] = fcml_fn_asm_dialect_alloc_mnemonic_with_suffix( mnemonic_def, suffix ); if (!mnemonics[counter]) { /* Out of memory.*/ error = FCML_CEH_GEC_OUT_OF_MEMORY; break; } counter++; } } } else { /* Allocate new instance of mnemonic.*/ mnemonics[counter] = fcml_fn_asm_dialect_alloc_mnemonic( mnemonic_def ); if (mnemonics[counter]) { counter++; } else { error = FCML_CEH_GEC_OUT_OF_MEMORY; } } element = element->next; } if (error) { /* Free all prepared mnemonics.*/ int i; for ( i = 0; i < counter; i++ ) { fcml_fn_asm_dialect_free_mnemonic( mnemonics[i] ); } } *mnemonics_counter = counter; return error; } fcml_ceh_error fcml_fn_cmn_dialect_get_register( const fcml_st_register *reg, fcml_string *printable_reg, fcml_bool is_rex ) { fcml_int rs = 0; if (reg->type != FCML_REG_SIMD) { switch ( reg->size ) { case 8: rs = 0; break; case 16: rs = 1; break; case 32: rs = 2; break; case 64: rs = 3; break; } if (reg->type == FCML_REG_IP) { *printable_reg = fcml_ar_asm_dialect_reg_gpr_symbol_table_ip[rs]; } else { if (is_rex) { if (reg->type == FCML_REG_GPR) { *printable_reg = fcml_ar_asm_dialect_reg_gpr_symbol_table_rex[rs][reg->reg]; } else { *printable_reg = fcml_ar_asm_dialect_reg_symbol_table_rex[reg->type][reg->reg]; } } else { if (reg->type == FCML_REG_GPR) { *printable_reg = fcml_ar_asm_dialect_reg_gpr_symbol_table[rs][reg->reg]; } else { *printable_reg = fcml_ar_asm_dialect_reg_symbol_table[reg->type][reg->reg]; } } } } else { switch ( reg->size ) { case 64: rs = 0; break; case 128: rs = 1; break; case 256: rs = 2; break; default: return FCML_CEH_GEC_INVALID_INPUT; } *printable_reg = fcml_ar_asm_dialect_reg_sidm_symbol_table[rs][reg->reg]; } return FCML_CEH_GEC_NO_ERROR; } void fcml_fn_cmn_dialect_free( fcml_st_dialect *dialect ) { if (dialect) { fcml_st_dialect_context_int *dialect_context = (fcml_st_dialect_context_int*) dialect; fcml_fn_asm_dialect_free_mnemonic_lookup( dialect_context ); fcml_fn_env_memory_free( dialect_context ); } } fcml-1.1.1/src/fcml_intel_lexer.l0000644000175000017500000003376112560745216013655 00000000000000 /* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include #include "fcml_common_lex.h" #include "fcml_intel_parser_def.h" %} %option noyywrap %option nounput %option noinput %option noyyalloc %option noyyrealloc %option noyyfree %option batch %option nodefault %option never-interactive %option case-insensitive %option 8bit %option reentrant %option bison-bridge %option outfile="fcml_intel_lexer.c" %option header-file="fcml_intel_lexer.h" %option nounistd %option prefix="intel_" %option extra-type="struct fcml_st_parser_data *" %{ #define FCML_FM_SIZE_OPERAND(x) { yylval->size_operator.size = x; yylval->size_operator.multimedia = FCML_FALSE; return FCML_TK_SIZE_OPERATOR; } #define FCML_FM_MULTIMEDIA_SIZE_OPERAND(x) { yylval->size_operator.size = x; yylval->size_operator.multimedia = FCML_TRUE; return FCML_TK_SIZE_OPERATOR; } %} /*White spaces.*/ WS [ \t]* PTR (" ptr")? %% /* Decimal integers. */ [0-9]+d? { fcml_fn_pu_parse_integer( yytext, &(yylval->integer_value), 10 ); return FCML_TK_INTEGER; } /* HEX integers. */ 0x[0-9a-f]+ | 0[a-f][0-9a-f]+h | [0-9][0-9a-f]*h { fcml_fn_pu_parse_integer( yytext, &(yylval->integer_value), 16 ); return FCML_TK_INTEGER; } /* Floating-points in IEEE 754. Floats are not supported yet. ([0-9]*\.[0-9]+|[0-9]+\.)(e[-+]?[0-9]+)?f? | [0-9]+(e[-+]?[0-9]+)f? { fcml_fn_pu_parse_float( yytext, &(yylval->float_value) ); return FCML_TK_FLOAT; } */ /* GPR. */ "al" FCML_FM_GPRS_8_REG(FCML_REG_AL) "cl" FCML_FM_GPRS_8_REG(FCML_REG_CL) "dl" FCML_FM_GPRS_8_REG(FCML_REG_DL) "bl" FCML_FM_GPRS_8_REG(FCML_REG_BL) "ah" FCML_FM_GPRS_8_REG(FCML_REG_AH) "ch" FCML_FM_GPRS_8_REG(FCML_REG_CH) "dh" FCML_FM_GPRS_8_REG(FCML_REG_DH) "bh" FCML_FM_GPRS_8_REG(FCML_REG_BH) "r8l" FCML_FM_GPRS_8_REG(FCML_REG_R8L) "r9l" FCML_FM_GPRS_8_REG(FCML_REG_R9L) "r10l" FCML_FM_GPRS_8_REG(FCML_REG_R10L) "r11l" FCML_FM_GPRS_8_REG(FCML_REG_R11L) "r12l" FCML_FM_GPRS_8_REG(FCML_REG_R12L) "r13l" FCML_FM_GPRS_8_REG(FCML_REG_R13L) "r14l" FCML_FM_GPRS_8_REG(FCML_REG_R14L) "r15l" FCML_FM_GPRS_8_REG(FCML_REG_R15L) "spl" FCML_FM_GPRS_8_X_REG(FCML_REG_SPL) "bpl" FCML_FM_GPRS_8_X_REG(FCML_REG_BPL) "sil" FCML_FM_GPRS_8_X_REG(FCML_REG_SIL) "dil" FCML_FM_GPRS_8_X_REG(FCML_REG_DIL) "ax" FCML_FM_GPRS_16_REG(FCML_REG_AX) "cx" FCML_FM_GPRS_16_REG(FCML_REG_CX) "dx" FCML_FM_GPRS_16_REG(FCML_REG_DX) "bx" FCML_FM_GPRS_16_REG(FCML_REG_BX) "sp" FCML_FM_GPRS_16_REG(FCML_REG_SP) "bp" FCML_FM_GPRS_16_REG(FCML_REG_BP) "si" FCML_FM_GPRS_16_REG(FCML_REG_SI) "di" FCML_FM_GPRS_16_REG(FCML_REG_DI) "r8w" FCML_FM_GPRS_16_REG(FCML_REG_R8W) "r9w" FCML_FM_GPRS_16_REG(FCML_REG_R9W) "r10w" FCML_FM_GPRS_16_REG(FCML_REG_R10W) "r11w" FCML_FM_GPRS_16_REG(FCML_REG_R11W) "r12w" FCML_FM_GPRS_16_REG(FCML_REG_R12W) "r13w" FCML_FM_GPRS_16_REG(FCML_REG_R13W) "r14w" FCML_FM_GPRS_16_REG(FCML_REG_R14W) "r15w" FCML_FM_GPRS_16_REG(FCML_REG_R15W) "eax" FCML_FM_GPRS_32_REG(FCML_REG_EAX) "ecx" FCML_FM_GPRS_32_REG(FCML_REG_ECX) "edx" FCML_FM_GPRS_32_REG(FCML_REG_EDX) "ebx" FCML_FM_GPRS_32_REG(FCML_REG_EBX) "esp" FCML_FM_GPRS_32_REG(FCML_REG_ESP) "ebp" FCML_FM_GPRS_32_REG(FCML_REG_EBP) "esi" FCML_FM_GPRS_32_REG(FCML_REG_ESI) "edi" FCML_FM_GPRS_32_REG(FCML_REG_EDI) "r8d" FCML_FM_GPRS_32_REG(FCML_REG_R8D) "r9d" FCML_FM_GPRS_32_REG(FCML_REG_R9D) "r10d" FCML_FM_GPRS_32_REG(FCML_REG_R10D) "r11d" FCML_FM_GPRS_32_REG(FCML_REG_R11D) "r12d" FCML_FM_GPRS_32_REG(FCML_REG_R12D) "r13d" FCML_FM_GPRS_32_REG(FCML_REG_R13D) "r14d" FCML_FM_GPRS_32_REG(FCML_REG_R14D) "r15d" FCML_FM_GPRS_32_REG(FCML_REG_R15D) "rax" FCML_FM_GPRS_64_REG(FCML_REG_RAX) "rcx" FCML_FM_GPRS_64_REG(FCML_REG_RCX) "rdx" FCML_FM_GPRS_64_REG(FCML_REG_RDX) "rbx" FCML_FM_GPRS_64_REG(FCML_REG_RBX) "rsp" FCML_FM_GPRS_64_REG(FCML_REG_RSP) "rbp" FCML_FM_GPRS_64_REG(FCML_REG_RBP) "rsi" FCML_FM_GPRS_64_REG(FCML_REG_RSI) "rdi" FCML_FM_GPRS_64_REG(FCML_REG_RDI) "r8" FCML_FM_GPRS_64_REG(FCML_REG_R8) "r9" FCML_FM_GPRS_64_REG(FCML_REG_R9) "r10" FCML_FM_GPRS_64_REG(FCML_REG_R10) "r11" FCML_FM_GPRS_64_REG(FCML_REG_R11) "r12" FCML_FM_GPRS_64_REG(FCML_REG_R12) "r13" FCML_FM_GPRS_64_REG(FCML_REG_R13) "r14" FCML_FM_GPRS_64_REG(FCML_REG_R14) "r15" FCML_FM_GPRS_64_REG(FCML_REG_R15) /* SIMD-MMX */ "mm0" FCML_FM_SIMD_64_REG(FCML_REG_MM0) "mm1" FCML_FM_SIMD_64_REG(FCML_REG_MM1) "mm2" FCML_FM_SIMD_64_REG(FCML_REG_MM2) "mm3" FCML_FM_SIMD_64_REG(FCML_REG_MM3) "mm4" FCML_FM_SIMD_64_REG(FCML_REG_MM4) "mm5" FCML_FM_SIMD_64_REG(FCML_REG_MM5) "mm6" FCML_FM_SIMD_64_REG(FCML_REG_MM6) "mm7" FCML_FM_SIMD_64_REG(FCML_REG_MM7) /* SIMD-XMM */ "xmm0" FCML_FM_SIMD_128_REG(FCML_REG_XMM0) "xmm1" FCML_FM_SIMD_128_REG(FCML_REG_XMM1) "xmm2" FCML_FM_SIMD_128_REG(FCML_REG_XMM2) "xmm3" FCML_FM_SIMD_128_REG(FCML_REG_XMM3) "xmm4" FCML_FM_SIMD_128_REG(FCML_REG_XMM4) "xmm5" FCML_FM_SIMD_128_REG(FCML_REG_XMM5) "xmm6" FCML_FM_SIMD_128_REG(FCML_REG_XMM6) "xmm7" FCML_FM_SIMD_128_REG(FCML_REG_XMM7) "xmm8" FCML_FM_SIMD_128_REG(FCML_REG_XMM8) "xmm9" FCML_FM_SIMD_128_REG(FCML_REG_XMM9) "xmm10" FCML_FM_SIMD_128_REG(FCML_REG_XMM10) "xmm11" FCML_FM_SIMD_128_REG(FCML_REG_XMM11) "xmm12" FCML_FM_SIMD_128_REG(FCML_REG_XMM12) "xmm13" FCML_FM_SIMD_128_REG(FCML_REG_XMM13) "xmm14" FCML_FM_SIMD_128_REG(FCML_REG_XMM14) "xmm15" FCML_FM_SIMD_128_REG(FCML_REG_XMM15) /* SIMD-YMM */ "ymm0" FCML_FM_SIMD_256_REG(FCML_REG_YMM0) "ymm1" FCML_FM_SIMD_256_REG(FCML_REG_YMM1) "ymm2" FCML_FM_SIMD_256_REG(FCML_REG_YMM2) "ymm3" FCML_FM_SIMD_256_REG(FCML_REG_YMM3) "ymm4" FCML_FM_SIMD_256_REG(FCML_REG_YMM4) "ymm5" FCML_FM_SIMD_256_REG(FCML_REG_YMM5) "ymm6" FCML_FM_SIMD_256_REG(FCML_REG_YMM6) "ymm7" FCML_FM_SIMD_256_REG(FCML_REG_YMM7) "ymm8" FCML_FM_SIMD_256_REG(FCML_REG_YMM8) "ymm9" FCML_FM_SIMD_256_REG(FCML_REG_YMM9) "ymm10" FCML_FM_SIMD_256_REG(FCML_REG_YMM10) "ymm11" FCML_FM_SIMD_256_REG(FCML_REG_YMM11) "ymm12" FCML_FM_SIMD_256_REG(FCML_REG_YMM12) "ymm13" FCML_FM_SIMD_256_REG(FCML_REG_YMM13) "ymm14" FCML_FM_SIMD_256_REG(FCML_REG_YMM14) "ymm15" FCML_FM_SIMD_256_REG(FCML_REG_YMM15) /* FPU */ st{WS}("("{WS}0{WS}")"|0) FCML_FM_FPU_REG(FCML_REG_ST0) st{WS}("("{WS}1{WS}")"|1) FCML_FM_FPU_REG(FCML_REG_ST1) st{WS}("("{WS}2{WS}")"|2) FCML_FM_FPU_REG(FCML_REG_ST2) st{WS}("("{WS}3{WS}")"|3) FCML_FM_FPU_REG(FCML_REG_ST3) st{WS}("("{WS}4{WS}")"|4) FCML_FM_FPU_REG(FCML_REG_ST4) st{WS}("("{WS}5{WS}")"|5) FCML_FM_FPU_REG(FCML_REG_ST5) st{WS}("("{WS}6{WS}")"|6) FCML_FM_FPU_REG(FCML_REG_ST6) st{WS}("("{WS}7{WS}")"|7) FCML_FM_FPU_REG(FCML_REG_ST7) /* Control registers. */ "cr0" FCML_FM_CR_REG(FCML_REG_CR0) "cr2" FCML_FM_CR_REG(FCML_REG_CR2) "cr3" FCML_FM_CR_REG(FCML_REG_CR3) "cr4" FCML_FM_CR_REG(FCML_REG_CR4) "cr8" FCML_FM_CR_REG(FCML_REG_CR8) /* Debug registers. */ "dr0" FCML_FM_DR_REG(FCML_REG_DR0) "dr1" FCML_FM_DR_REG(FCML_REG_DR1) "dr2" FCML_FM_DR_REG(FCML_REG_DR2) "dr3" FCML_FM_DR_REG(FCML_REG_DR3) "dr4" FCML_FM_DR_REG(FCML_REG_DR4) "dr5" FCML_FM_DR_REG(FCML_REG_DR5) "dr6" FCML_FM_DR_REG(FCML_REG_DR6) "dr7" FCML_FM_DR_REG(FCML_REG_DR7) /* Segment registers. */ "es" FCML_FM_SEG_REG(FCML_REG_ES) "cs" FCML_FM_SEG_REG(FCML_REG_CS) "ss" FCML_FM_SEG_REG(FCML_REG_SS) "ds" FCML_FM_SEG_REG(FCML_REG_DS) "fs" FCML_FM_SEG_REG(FCML_REG_FS) "gs" FCML_FM_SEG_REG(FCML_REG_GS) /* RIP */ "rip" FCML_FM_RIP /* Size operators. */ "byte"{PTR} FCML_FM_SIZE_OPERAND( 8 ) "word"{PTR} FCML_FM_SIZE_OPERAND( 16 ) "dword"{PTR} FCML_FM_SIZE_OPERAND( 32 ) ("fword"|"pword"){PTR} FCML_FM_SIZE_OPERAND( 48 ) "qword"{PTR} FCML_FM_SIZE_OPERAND( 64 ) ("tbyte"|"tword"){PTR} FCML_FM_SIZE_OPERAND( 80 ) ("dqword"|"oword"){PTR} FCML_FM_SIZE_OPERAND( 128 ) "qqword"{PTR} FCML_FM_SIZE_OPERAND( 256 ) "mmword"{PTR} FCML_FM_MULTIMEDIA_SIZE_OPERAND( 64 ) ("xword"|"xmmword"){PTR} FCML_FM_MULTIMEDIA_SIZE_OPERAND( 128 ) ("yword"|"ymmword"){PTR} FCML_FM_MULTIMEDIA_SIZE_OPERAND( 256 ) ("14byte"){PTR} FCML_FM_SIZE_OPERAND( 14 * 8 ) ("28byte"){PTR} FCML_FM_SIZE_OPERAND( 28 * 8 ) ("94byte"){PTR} FCML_FM_SIZE_OPERAND( 94 * 8 ) ("108byte"){PTR} FCML_FM_SIZE_OPERAND( 108 * 8 ) /* Prefixes */ "lock" { yylval->prefixes = FCML_PREFIX_LOCK; return FCML_TK_PREFIX; } "repne"|"repnz" { yylval->prefixes = FCML_PREFIX_REPNE; return FCML_TK_PREFIX; } "repe"|"repz"|"rep" { yylval->prefixes = FCML_PREFIX_REPE; return FCML_TK_PREFIX; } "xacquire" { yylval->prefixes = FCML_PREFIX_XACQUIRE; return FCML_TK_PREFIX; } "xrelease" { yylval->prefixes = FCML_PREFIX_XRELEASE; return FCML_TK_PREFIX; } "branch" { yylval->hints = FCML_PREFIX_BRANCH_HINT; return FCML_TK_PREFIX; } "nobranch" { yylval->hints = FCML_PREFIX_NOBRANCH_HINT; return FCML_TK_PREFIX; } /* Hints */ "far" { yylval->hints = FCML_HINT_FAR_POINTER; return FCML_TK_HINTS; } "near" { yylval->hints = FCML_HINT_NEAR_POINTER; return FCML_TK_HINTS; } "long_form" { yylval->hints = FCML_HINT_LONG_FORM_POINTER; return FCML_TK_HINTS; } "indirect" { yylval->hints = FCML_HINT_INDIRECT_POINTER; return FCML_TK_HINTS; } "direct" { yylval->hints = FCML_HINT_DIRECT_POINTER; return FCML_TK_HINTS; } "rel" { yylval->hints = FCML_OP_HINT_RELATIVE_ADDRESSING; return FCML_TK_EAO_HINTS; } "abs" { yylval->hints = FCML_OP_HINT_ABSOLUTE_ADDRESSING; return FCML_TK_EAO_HINTS; } "sib" { yylval->hints = FCML_OP_HINT_SIB_ENCODING; return FCML_TK_SIB_HINT; } /* Identifiers. */ [a-z_][0-9a-z_]* { yylval->symbol.text = (fcml_string)yytext; yylval->symbol.length = (fcml_usize)yyleng; return FCML_TK_SYMBOL; } /* Operators and parentheses. */ "," { return ','; } "+" { return '+'; } "-" { return '-'; } "*" { return '*'; } "/" { return '/'; } "[" { return '['; } "]" { return ']'; } "(" { return '('; } ")" { return ')'; } ":" { return ':'; } /* Ignore white spaces. */ {WS} /* Anything else is not expected. */ . { return FCML_TK_UNEXPECTED; } /* Ignore like white spaces. */ \n %% fcml-1.1.1/src/fcml_choosers.c0000644000175000017500000000344712560745216013155 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include #include #include "fcml_coll.h" fcml_ptr LIB_CALL fcml_fn_asm_no_instruction_chooser( fcml_st_chooser_context *context ) { return NULL; } fcml_ptr LIB_CALL fcml_fn_asm_default_instruction_chooser( fcml_st_chooser_context *context ) { fcml_st_instruction_code instruction_code; fcml_ptr instruction = context->instruction; fcml_ptr shortest = NULL; fcml_usize shortest_code_length = 0; while ( instruction ) { context->extract( instruction, &instruction_code ); if (!shortest) { shortest = instruction; shortest_code_length = instruction_code.code_length; } else { if (instruction_code.code_length < shortest_code_length) { shortest = instruction; shortest_code_length = instruction_code.code_length; } } instruction = context->next( instruction ); } return shortest; } fcml-1.1.1/src/fcml_common_utils.c0000644000175000017500000006315612560745216014043 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "fcml_env_int.h" fcml_st_register fcml_reg_AL = { FCML_REG_GPR, FCML_DS_8, FCML_REG_AL, FCML_FALSE }; fcml_st_register fcml_reg_AX = { FCML_REG_GPR, FCML_DS_16, FCML_REG_AX, FCML_FALSE }; fcml_st_register fcml_reg_EAX = { FCML_REG_GPR, FCML_DS_32, FCML_REG_EAX, FCML_FALSE }; fcml_st_register fcml_reg_RAX = { FCML_REG_GPR, FCML_DS_64, FCML_REG_RAX, FCML_FALSE }; fcml_st_register fcml_reg_MM0 = { FCML_REG_SIMD, FCML_DS_64, FCML_REG_MM0, FCML_FALSE }; fcml_st_register fcml_reg_XMM0 = { FCML_REG_SIMD, FCML_DS_128, FCML_REG_XMM0, FCML_FALSE }; fcml_st_register fcml_reg_YMM0 = { FCML_REG_SIMD, FCML_DS_256, FCML_REG_YMM0, FCML_FALSE }; fcml_st_register fcml_reg_CL = { FCML_REG_GPR, FCML_DS_8, FCML_REG_CL, FCML_FALSE }; fcml_st_register fcml_reg_CX = { FCML_REG_GPR, FCML_DS_16, FCML_REG_CX, FCML_FALSE }; fcml_st_register fcml_reg_ECX = { FCML_REG_GPR, FCML_DS_32, FCML_REG_ECX, FCML_FALSE }; fcml_st_register fcml_reg_RCX = { FCML_REG_GPR, FCML_DS_64, FCML_REG_RCX, FCML_FALSE }; fcml_st_register fcml_reg_MM1 = { FCML_REG_SIMD, FCML_DS_64, FCML_REG_MM1, FCML_FALSE }; fcml_st_register fcml_reg_XMM1 = { FCML_REG_SIMD, FCML_DS_128, FCML_REG_XMM1, FCML_FALSE }; fcml_st_register fcml_reg_YMM1 = { FCML_REG_SIMD, FCML_DS_256, FCML_REG_YMM1, FCML_FALSE }; fcml_st_register fcml_reg_DL = { FCML_REG_GPR, FCML_DS_8, FCML_REG_DL, FCML_FALSE }; fcml_st_register fcml_reg_DX = { FCML_REG_GPR, FCML_DS_16, FCML_REG_DX, FCML_FALSE }; fcml_st_register fcml_reg_EDX = { FCML_REG_GPR, FCML_DS_32, FCML_REG_EDX, FCML_FALSE }; fcml_st_register fcml_reg_RDX = { FCML_REG_GPR, FCML_DS_64, FCML_REG_RDX, FCML_FALSE }; fcml_st_register fcml_reg_MM2 = { FCML_REG_SIMD, FCML_DS_64, FCML_REG_MM2, FCML_FALSE }; fcml_st_register fcml_reg_XMM2 = { FCML_REG_SIMD, FCML_DS_128, FCML_REG_XMM2, FCML_FALSE }; fcml_st_register fcml_reg_YMM2 = { FCML_REG_SIMD, FCML_DS_256, FCML_REG_YMM2, FCML_FALSE }; fcml_st_register fcml_reg_BL = { FCML_REG_GPR, FCML_DS_8, FCML_REG_BL, FCML_FALSE }; fcml_st_register fcml_reg_BX = { FCML_REG_GPR, FCML_DS_16, FCML_REG_BX, FCML_FALSE }; fcml_st_register fcml_reg_EBX = { FCML_REG_GPR, FCML_DS_32, FCML_REG_EBX, FCML_FALSE }; fcml_st_register fcml_reg_RBX = { FCML_REG_GPR, FCML_DS_64, FCML_REG_RBX, FCML_FALSE }; fcml_st_register fcml_reg_MM3 = { FCML_REG_SIMD, FCML_DS_64, FCML_REG_MM3, FCML_FALSE }; fcml_st_register fcml_reg_XMM3 = { FCML_REG_SIMD, FCML_DS_128, FCML_REG_XMM3, FCML_FALSE }; fcml_st_register fcml_reg_YMM3 = { FCML_REG_SIMD, FCML_DS_256, FCML_REG_YMM3, FCML_FALSE }; fcml_st_register fcml_reg_AH = { FCML_REG_GPR, FCML_DS_8, FCML_REG_AH, FCML_FALSE }; fcml_st_register fcml_reg_SPL = { FCML_REG_GPR, FCML_DS_8, FCML_REG_SPL, FCML_TRUE }; fcml_st_register fcml_reg_SP = { FCML_REG_GPR, FCML_DS_16, FCML_REG_SP, FCML_FALSE }; fcml_st_register fcml_reg_ESP = { FCML_REG_GPR, FCML_DS_32, FCML_REG_ESP, FCML_FALSE }; fcml_st_register fcml_reg_RSP = { FCML_REG_GPR, FCML_DS_64, FCML_REG_RSP, FCML_FALSE }; fcml_st_register fcml_reg_MM4 = { FCML_REG_SIMD, FCML_DS_64, FCML_REG_MM4, FCML_FALSE }; fcml_st_register fcml_reg_XMM4 = { FCML_REG_SIMD, FCML_DS_128, FCML_REG_XMM4, FCML_FALSE }; fcml_st_register fcml_reg_YMM4 = { FCML_REG_SIMD, FCML_DS_256, FCML_REG_YMM4, FCML_FALSE }; fcml_st_register fcml_reg_CH = { FCML_REG_GPR, FCML_DS_8, FCML_REG_CH, FCML_FALSE }; fcml_st_register fcml_reg_BPL = { FCML_REG_GPR, FCML_DS_8, FCML_REG_BPL, FCML_TRUE }; fcml_st_register fcml_reg_BP = { FCML_REG_GPR, FCML_DS_16, FCML_REG_BP, FCML_FALSE }; fcml_st_register fcml_reg_EBP = { FCML_REG_GPR, FCML_DS_32, FCML_REG_EBP, FCML_FALSE }; fcml_st_register fcml_reg_RBP = { FCML_REG_GPR, FCML_DS_64, FCML_REG_RBP, FCML_FALSE }; fcml_st_register fcml_reg_MM5 = { FCML_REG_SIMD, FCML_DS_64, FCML_REG_MM5, FCML_FALSE }; fcml_st_register fcml_reg_XMM5 = { FCML_REG_SIMD, FCML_DS_128, FCML_REG_XMM5, FCML_FALSE }; fcml_st_register fcml_reg_YMM5 = { FCML_REG_SIMD, FCML_DS_256, FCML_REG_YMM5, FCML_FALSE }; fcml_st_register fcml_reg_DH = { FCML_REG_GPR, FCML_DS_8, FCML_REG_DH, FCML_FALSE }; fcml_st_register fcml_reg_SIL = { FCML_REG_GPR, FCML_DS_8, FCML_REG_SIL, FCML_TRUE }; fcml_st_register fcml_reg_SI = { FCML_REG_GPR, FCML_DS_16, FCML_REG_SI, FCML_FALSE }; fcml_st_register fcml_reg_ESI = { FCML_REG_GPR, FCML_DS_32, FCML_REG_ESI, FCML_FALSE }; fcml_st_register fcml_reg_RSI = { FCML_REG_GPR, FCML_DS_64, FCML_REG_RSI, FCML_FALSE }; fcml_st_register fcml_reg_MM6 = { FCML_REG_SIMD, FCML_DS_64, FCML_REG_MM6, FCML_FALSE }; fcml_st_register fcml_reg_XMM6 = { FCML_REG_SIMD, FCML_DS_128, FCML_REG_XMM6, FCML_FALSE }; fcml_st_register fcml_reg_YMM6 = { FCML_REG_SIMD, FCML_DS_256, FCML_REG_YMM6, FCML_FALSE }; fcml_st_register fcml_reg_BH = { FCML_REG_GPR, FCML_DS_8, FCML_REG_BH, FCML_FALSE }; fcml_st_register fcml_reg_DIL = { FCML_REG_GPR, FCML_DS_8, FCML_REG_DIL, FCML_TRUE }; fcml_st_register fcml_reg_DI = { FCML_REG_GPR, FCML_DS_16, FCML_REG_DI, FCML_FALSE }; fcml_st_register fcml_reg_EDI = { FCML_REG_GPR, FCML_DS_32, FCML_REG_EDI, FCML_FALSE }; fcml_st_register fcml_reg_RDI = { FCML_REG_GPR, FCML_DS_64, FCML_REG_RDI, FCML_FALSE }; fcml_st_register fcml_reg_MM7 = { FCML_REG_SIMD, FCML_DS_64, FCML_REG_MM7, FCML_FALSE }; fcml_st_register fcml_reg_XMM7 = { FCML_REG_SIMD, FCML_DS_128, FCML_REG_XMM7, FCML_FALSE }; fcml_st_register fcml_reg_YMM7 = { FCML_REG_SIMD, FCML_DS_256, FCML_REG_YMM7, FCML_FALSE }; fcml_st_register fcml_reg_R8L = { FCML_REG_GPR, FCML_DS_8, FCML_REG_R8L, FCML_FALSE }; fcml_st_register fcml_reg_R8W = { FCML_REG_GPR, FCML_DS_16, FCML_REG_R8W, FCML_FALSE }; fcml_st_register fcml_reg_R8D = { FCML_REG_GPR, FCML_DS_32, FCML_REG_R8D, FCML_FALSE }; fcml_st_register fcml_reg_R8 = { FCML_REG_GPR, FCML_DS_64, FCML_REG_R8, FCML_FALSE }; fcml_st_register fcml_reg_XMM8 = { FCML_REG_SIMD, FCML_DS_128, FCML_REG_XMM8, FCML_FALSE }; fcml_st_register fcml_reg_YMM8 = { FCML_REG_SIMD, FCML_DS_256, FCML_REG_YMM8, FCML_FALSE }; fcml_st_register fcml_reg_R9L = { FCML_REG_GPR, FCML_DS_8, FCML_REG_R9L, FCML_FALSE }; fcml_st_register fcml_reg_R9W = { FCML_REG_GPR, FCML_DS_16, FCML_REG_R9W, FCML_FALSE }; fcml_st_register fcml_reg_R9D = { FCML_REG_GPR, FCML_DS_32, FCML_REG_R9D, FCML_FALSE }; fcml_st_register fcml_reg_R9 = { FCML_REG_GPR, FCML_DS_64, FCML_REG_R9, FCML_FALSE }; fcml_st_register fcml_reg_XMM9 = { FCML_REG_SIMD, FCML_DS_128, FCML_REG_XMM9, FCML_FALSE }; fcml_st_register fcml_reg_YMM9 = { FCML_REG_SIMD, FCML_DS_256, FCML_REG_YMM9, FCML_FALSE }; fcml_st_register fcml_reg_R10L = { FCML_REG_GPR, FCML_DS_8, FCML_REG_R10L, FCML_FALSE }; fcml_st_register fcml_reg_R10W = { FCML_REG_GPR, FCML_DS_16, FCML_REG_R10W, FCML_FALSE }; fcml_st_register fcml_reg_R10D = { FCML_REG_GPR, FCML_DS_32, FCML_REG_R10D, FCML_FALSE }; fcml_st_register fcml_reg_R10 = { FCML_REG_GPR, FCML_DS_64, FCML_REG_R10, FCML_FALSE }; fcml_st_register fcml_reg_XMM10 = { FCML_REG_SIMD, FCML_DS_128, FCML_REG_XMM10, FCML_FALSE }; fcml_st_register fcml_reg_YMM10 = { FCML_REG_SIMD, FCML_DS_256, FCML_REG_YMM10, FCML_FALSE }; fcml_st_register fcml_reg_R11L = { FCML_REG_GPR, FCML_DS_8, FCML_REG_R11L, FCML_FALSE }; fcml_st_register fcml_reg_R11W = { FCML_REG_GPR, FCML_DS_16, FCML_REG_R11W, FCML_FALSE }; fcml_st_register fcml_reg_R11D = { FCML_REG_GPR, FCML_DS_32, FCML_REG_R11D, FCML_FALSE }; fcml_st_register fcml_reg_R11 = { FCML_REG_GPR, FCML_DS_64, FCML_REG_R11, FCML_FALSE }; fcml_st_register fcml_reg_XMM11 = { FCML_REG_SIMD, FCML_DS_128, FCML_REG_XMM11, FCML_FALSE }; fcml_st_register fcml_reg_YMM11 = { FCML_REG_SIMD, FCML_DS_256, FCML_REG_YMM11, FCML_FALSE }; fcml_st_register fcml_reg_R12L = { FCML_REG_GPR, FCML_DS_8, FCML_REG_R12L, FCML_FALSE }; fcml_st_register fcml_reg_R12W = { FCML_REG_GPR, FCML_DS_16, FCML_REG_R12W, FCML_FALSE }; fcml_st_register fcml_reg_R12D = { FCML_REG_GPR, FCML_DS_32, FCML_REG_R12D, FCML_FALSE }; fcml_st_register fcml_reg_R12 = { FCML_REG_GPR, FCML_DS_64, FCML_REG_R12, FCML_FALSE }; fcml_st_register fcml_reg_XMM12 = { FCML_REG_SIMD, FCML_DS_128, FCML_REG_XMM12, FCML_FALSE }; fcml_st_register fcml_reg_YMM12 = { FCML_REG_SIMD, FCML_DS_256, FCML_REG_YMM12, FCML_FALSE }; fcml_st_register fcml_reg_R13L = { FCML_REG_GPR, FCML_DS_8, FCML_REG_R13L, FCML_FALSE }; fcml_st_register fcml_reg_R13W = { FCML_REG_GPR, FCML_DS_16, FCML_REG_R13W, FCML_FALSE }; fcml_st_register fcml_reg_R13D = { FCML_REG_GPR, FCML_DS_32, FCML_REG_R13D, FCML_FALSE }; fcml_st_register fcml_reg_R13 = { FCML_REG_GPR, FCML_DS_64, FCML_REG_R13, FCML_FALSE }; fcml_st_register fcml_reg_XMM13 = { FCML_REG_SIMD, FCML_DS_128, FCML_REG_XMM13, FCML_FALSE }; fcml_st_register fcml_reg_YMM13 = { FCML_REG_SIMD, FCML_DS_256, FCML_REG_YMM13, FCML_FALSE }; fcml_st_register fcml_reg_R14L = { FCML_REG_GPR, FCML_DS_8, FCML_REG_R14L, FCML_FALSE }; fcml_st_register fcml_reg_R14W = { FCML_REG_GPR, FCML_DS_16, FCML_REG_R14W, FCML_FALSE }; fcml_st_register fcml_reg_R14D = { FCML_REG_GPR, FCML_DS_32, FCML_REG_R14D, FCML_FALSE }; fcml_st_register fcml_reg_R14 = { FCML_REG_GPR, FCML_DS_64, FCML_REG_R14, FCML_FALSE }; fcml_st_register fcml_reg_XMM14 = { FCML_REG_SIMD, FCML_DS_128, FCML_REG_XMM14, FCML_FALSE }; fcml_st_register fcml_reg_YMM14 = { FCML_REG_SIMD, FCML_DS_256, FCML_REG_YMM14, FCML_FALSE }; fcml_st_register fcml_reg_R15L = { FCML_REG_GPR, FCML_DS_8, FCML_REG_R15L, FCML_FALSE }; fcml_st_register fcml_reg_R15W = { FCML_REG_GPR, FCML_DS_16, FCML_REG_R15W, FCML_FALSE }; fcml_st_register fcml_reg_R15D = { FCML_REG_GPR, FCML_DS_32, FCML_REG_R15D, FCML_FALSE }; fcml_st_register fcml_reg_R15 = { FCML_REG_GPR, FCML_DS_64, FCML_REG_R15, FCML_FALSE }; fcml_st_register fcml_reg_XMM15 = { FCML_REG_SIMD, FCML_DS_128, FCML_REG_XMM15, FCML_FALSE }; fcml_st_register fcml_reg_YMM15 = { FCML_REG_SIMD, FCML_DS_256, FCML_REG_YMM15, FCML_FALSE }; fcml_st_register fcml_reg_ES = { FCML_REG_SEG, FCML_DS_16, FCML_REG_ES, FCML_FALSE }; fcml_st_register fcml_reg_CS = { FCML_REG_SEG, FCML_DS_16, FCML_REG_CS, FCML_FALSE }; fcml_st_register fcml_reg_SS = { FCML_REG_SEG, FCML_DS_16, FCML_REG_SS, FCML_FALSE }; fcml_st_register fcml_reg_DS = { FCML_REG_SEG, FCML_DS_16, FCML_REG_DS, FCML_FALSE }; fcml_st_register fcml_reg_FS = { FCML_REG_SEG, FCML_DS_16, FCML_REG_FS, FCML_FALSE }; fcml_st_register fcml_reg_GS = { FCML_REG_SEG, FCML_DS_16, FCML_REG_GS, FCML_FALSE }; fcml_st_register fcml_reg_ST0 = { FCML_REG_FPU, FCML_DS_UNDEF, FCML_REG_ST0, FCML_FALSE }; fcml_st_register fcml_reg_ST1 = { FCML_REG_FPU, FCML_DS_UNDEF, FCML_REG_ST1, FCML_FALSE }; fcml_st_register fcml_reg_ST2 = { FCML_REG_FPU, FCML_DS_UNDEF, FCML_REG_ST2, FCML_FALSE }; fcml_st_register fcml_reg_ST3 = { FCML_REG_FPU, FCML_DS_UNDEF, FCML_REG_ST3, FCML_FALSE }; fcml_st_register fcml_reg_ST4 = { FCML_REG_FPU, FCML_DS_UNDEF, FCML_REG_ST4, FCML_FALSE }; fcml_st_register fcml_reg_ST5 = { FCML_REG_FPU, FCML_DS_UNDEF, FCML_REG_ST5, FCML_FALSE }; fcml_st_register fcml_reg_ST6 = { FCML_REG_FPU, FCML_DS_UNDEF, FCML_REG_ST6, FCML_FALSE }; fcml_st_register fcml_reg_ST7 = { FCML_REG_FPU, FCML_DS_UNDEF, FCML_REG_ST7, FCML_FALSE }; fcml_st_register fcml_reg_CR0 = { FCML_REG_CR, FCML_DS_UNDEF, FCML_REG_CR0, FCML_FALSE }; fcml_st_register fcml_reg_CR2 = { FCML_REG_CR, FCML_DS_UNDEF, FCML_REG_CR2, FCML_FALSE }; fcml_st_register fcml_reg_CR3 = { FCML_REG_CR, FCML_DS_UNDEF, FCML_REG_CR3, FCML_FALSE }; fcml_st_register fcml_reg_CR4 = { FCML_REG_CR, FCML_DS_UNDEF, FCML_REG_CR4, FCML_FALSE }; fcml_st_register fcml_reg_CR8 = { FCML_REG_CR, FCML_DS_UNDEF, FCML_REG_CR8, FCML_FALSE }; fcml_st_register fcml_reg_DR0 = { FCML_REG_DR, FCML_DS_UNDEF, FCML_REG_DR0, FCML_FALSE }; fcml_st_register fcml_reg_DR1 = { FCML_REG_DR, FCML_DS_UNDEF, FCML_REG_DR1, FCML_FALSE }; fcml_st_register fcml_reg_DR2 = { FCML_REG_DR, FCML_DS_UNDEF, FCML_REG_DR2, FCML_FALSE }; fcml_st_register fcml_reg_DR3 = { FCML_REG_DR, FCML_DS_UNDEF, FCML_REG_DR3, FCML_FALSE }; fcml_st_register fcml_reg_DR4 = { FCML_REG_DR, FCML_DS_UNDEF, FCML_REG_DR4, FCML_FALSE }; fcml_st_register fcml_reg_DR5 = { FCML_REG_DR, FCML_DS_UNDEF, FCML_REG_DR5, FCML_FALSE }; fcml_st_register fcml_reg_DR6 = { FCML_REG_DR, FCML_DS_UNDEF, FCML_REG_DR6, FCML_FALSE }; fcml_st_register fcml_reg_DR7 = { FCML_REG_DR, FCML_DS_UNDEF, FCML_REG_DR7, FCML_FALSE }; fcml_st_register fcml_reg_IP = { FCML_REG_IP, FCML_DS_16, FCML_REG_UNDEFINED, FCML_FALSE }; fcml_st_register fcml_reg_EIP = { FCML_REG_IP, FCML_DS_32, FCML_REG_UNDEFINED, FCML_FALSE }; fcml_st_register fcml_reg_RIP = { FCML_REG_IP, FCML_DS_64, FCML_REG_UNDEFINED, FCML_FALSE }; fcml_st_operand LIB_CALL fcml_fn_cu_operand_unsigned_imm_8( fcml_uint8_t value ) { fcml_st_operand imm = { FCML_OT_NONE }; imm.type = FCML_OT_IMMEDIATE; imm.immediate.size = FCML_DS_8; imm.immediate.int8 = value; return imm; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_signed_imm_8( fcml_int8_t value ) { fcml_st_operand imm = { FCML_OT_NONE }; imm.type = FCML_OT_IMMEDIATE; imm.immediate.size = FCML_DS_8; imm.immediate.is_signed = FCML_TRUE; imm.immediate.int8 = value; return imm; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_unsigned_imm_16( fcml_uint16_t value ) { fcml_st_operand imm = { FCML_OT_NONE }; imm.type = FCML_OT_IMMEDIATE; imm.immediate.size = FCML_DS_16; imm.immediate.int16 = value; return imm; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_signed_imm_16( fcml_int16_t value ) { fcml_st_operand imm = { FCML_OT_NONE }; imm.type = FCML_OT_IMMEDIATE; imm.immediate.size = FCML_DS_16; imm.immediate.is_signed = FCML_TRUE; imm.immediate.int16 = value; return imm; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_unsigned_imm_32( fcml_uint32_t value ) { fcml_st_operand imm = { FCML_OT_NONE }; imm.type = FCML_OT_IMMEDIATE; imm.immediate.size = FCML_DS_32; imm.immediate.int32 = value; return imm; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_signed_imm_32( fcml_int32_t value ) { fcml_st_operand imm = { FCML_OT_NONE }; imm.type = FCML_OT_IMMEDIATE; imm.immediate.size = FCML_DS_32; imm.immediate.is_signed = FCML_TRUE; imm.immediate.int32 = value; return imm; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_unsigned_imm_64( fcml_uint64_t value ) { fcml_st_operand imm = { FCML_OT_NONE }; imm.type = FCML_OT_IMMEDIATE; imm.immediate.size = FCML_DS_64; imm.immediate.int64 = value; return imm; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_signed_imm_64( fcml_int64_t value ) { fcml_st_operand imm = { FCML_OT_NONE }; imm.type = FCML_OT_IMMEDIATE; imm.immediate.size = FCML_DS_64; imm.immediate.is_signed = FCML_TRUE; imm.immediate.int64 = value; return imm; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_reg( fcml_st_register *reg ) { fcml_st_operand reg_operand = { FCML_OT_NONE }; reg_operand.type = FCML_OT_REGISTER; reg_operand.reg = *reg; return reg_operand; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_far_pointer_offset16( fcml_int16_t seg, fcml_int16_t offset ) { fcml_st_operand operand = { FCML_OT_NONE }; operand.type = FCML_OT_FAR_POINTER; fcml_st_far_pointer *far_pointer = &( operand.far_pointer ); far_pointer->segment = seg; far_pointer->offset16 = offset; far_pointer->offset_size = FCML_DS_16; return operand; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_far_pointer_offset32( fcml_int16_t seg, fcml_int32_t offset ) { fcml_st_operand operand = { FCML_OT_NONE }; operand.type = FCML_OT_FAR_POINTER; fcml_st_far_pointer *far_pointer = &( operand.far_pointer ); far_pointer->segment = seg; far_pointer->offset32 = offset; far_pointer->offset_size = FCML_DS_32; return operand; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_offset_16( fcml_int16_t offset, fcml_usize size_operator ) { fcml_st_operand operand = { FCML_OT_NONE }; operand.type = FCML_OT_ADDRESS; fcml_st_address *address = &( operand.address ); address->address_form = FCML_AF_OFFSET; address->offset.off16 = offset; address->offset.size = FCML_DS_16; address->size_operator = size_operator; return operand; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_offset_32( fcml_int32_t offset, fcml_usize size_operator ) { fcml_st_operand operand = { FCML_OT_NONE }; operand.type = FCML_OT_ADDRESS; fcml_st_address *address = &( operand.address ); address->address_form = FCML_AF_OFFSET; address->offset.off32 = offset; address->offset.size = FCML_DS_32; address->size_operator = size_operator; return operand; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_offset_abs_64( fcml_int64_t offset, fcml_usize size_operator ) { fcml_st_operand operand = { FCML_OT_NONE }; operand.type = FCML_OT_ADDRESS; fcml_st_address *address = &( operand.address ); address->address_form = FCML_AF_OFFSET; address->offset.off64 = offset; address->offset.size = FCML_DS_64; address->size_operator = size_operator; operand.hints = FCML_OP_HINT_ABSOLUTE_ADDRESSING; return operand; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_offset_rel_64( fcml_int64_t offset, fcml_usize size_operator ) { fcml_st_operand operand = { FCML_OT_NONE }; operand.type = FCML_OT_ADDRESS; fcml_st_address *address = &( operand.address ); address->address_form = FCML_AF_OFFSET; address->offset.off64 = offset; address->offset.size = FCML_DS_64; address->size_operator = size_operator; operand.hints = FCML_OP_HINT_RELATIVE_ADDRESSING; return operand; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_disp_16( fcml_int16_t disp, fcml_usize size_operator ) { fcml_st_operand operand = { FCML_OT_NONE }; operand.type = FCML_OT_ADDRESS; fcml_st_address *address = &( operand.address ); fcml_st_effective_address *effective_address = &( address->effective_address ); address->address_form = FCML_AF_COMBINED; address->size_operator = size_operator; effective_address->displacement.int16 = disp; effective_address->displacement.size = FCML_DS_16; return operand; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_disp_32( fcml_int32_t disp, fcml_usize size_operator ) { fcml_st_operand operand = { FCML_OT_NONE }; operand.type = FCML_OT_ADDRESS; fcml_st_address *address = &( operand.address ); fcml_st_effective_address *effective_address = &( address->effective_address ); address->address_form = FCML_AF_COMBINED; address->size_operator = size_operator; effective_address->displacement.int32 = disp; effective_address->displacement.size = FCML_DS_32; return operand; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_disp_64( fcml_int64_t disp, fcml_usize size_operator ) { fcml_st_operand operand = { FCML_OT_NONE }; operand.type = FCML_OT_ADDRESS; fcml_st_address *address = &( operand.address ); fcml_st_effective_address *effective_address = &( address->effective_address ); address->address_form = FCML_AF_COMBINED; address->size_operator = size_operator; effective_address->displacement.int64 = disp; effective_address->displacement.size = FCML_DS_64; return operand; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_b_disp_8( fcml_st_register *base, fcml_int8_t disp, fcml_usize size_operator ) { fcml_st_operand operand = { FCML_OT_NONE }; operand.type = FCML_OT_ADDRESS; fcml_st_address *address = &( operand.address ); fcml_st_effective_address *effective_address = &( address->effective_address ); address->address_form = FCML_AF_COMBINED; address->size_operator = size_operator; effective_address->displacement.int8 = disp; effective_address->displacement.size = FCML_DS_8; effective_address->base = *base; return operand; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_b_disp_16( fcml_st_register *base, fcml_int16_t disp, fcml_usize size_operator ) { fcml_st_operand operand = fcml_fn_cu_operand_addr_disp_16( disp, size_operator ); operand.address.effective_address.base = *base; return operand; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_b_disp_32( fcml_st_register *base, fcml_int32_t disp, fcml_usize size_operator ) { fcml_st_operand operand = fcml_fn_cu_operand_addr_disp_32( disp, size_operator ); operand.address.effective_address.base = *base; return operand; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_b_disp_64( fcml_st_register *base, fcml_int64_t disp, fcml_usize size_operator ) { fcml_st_operand operand = fcml_fn_cu_operand_addr_disp_64( disp, size_operator ); operand.address.effective_address.base = *base; return operand; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_is_disp_8( fcml_st_register *index, fcml_uint8_t scale_factor, fcml_int8_t disp, fcml_usize size_operator ) { fcml_st_operand operand = { FCML_OT_NONE }; operand.type = FCML_OT_ADDRESS; fcml_st_address *address = &( operand.address ); fcml_st_effective_address *effective_address = &( address->effective_address ); address->address_form = FCML_AF_COMBINED; address->size_operator = size_operator; effective_address->displacement.int8 = disp; effective_address->displacement.size = FCML_DS_8; effective_address->index = *index; effective_address->scale_factor = scale_factor; return operand; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_is_disp_32( fcml_st_register *index, fcml_uint8_t scale_factor, fcml_int32_t disp, fcml_usize size_operator ) { fcml_st_operand operand = fcml_fn_cu_operand_addr_disp_32( disp, size_operator ); fcml_st_effective_address *effective_address = &( operand.address.effective_address ); effective_address->index = *index; effective_address->scale_factor = scale_factor; return operand; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_is_disp_64( fcml_st_register *index, fcml_uint8_t scale_factor, fcml_int64_t disp, fcml_usize size_operator ) { fcml_st_operand operand = fcml_fn_cu_operand_addr_disp_32( (fcml_int32_t) disp, size_operator ); fcml_st_effective_address *effective_address = &( operand.address.effective_address ); effective_address->index = *index; effective_address->scale_factor = scale_factor; return operand; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_bis_disp_8( fcml_st_register *base, fcml_st_register *index, fcml_uint8_t scale_factor, fcml_int8_t disp, fcml_usize size_operator ) { fcml_st_operand operand = { FCML_OT_NONE }; operand.type = FCML_OT_ADDRESS; fcml_st_address *address = &( operand.address ); fcml_st_effective_address *effective_address = &( address->effective_address ); address->address_form = FCML_AF_COMBINED; address->size_operator = size_operator; effective_address->displacement.int8 = disp; effective_address->displacement.size = FCML_DS_8; effective_address->base = *base; effective_address->index = *index; effective_address->scale_factor = scale_factor; return operand; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_bis_disp_32( fcml_st_register *base, fcml_st_register *index, fcml_uint8_t scale_factor, fcml_int32_t disp, fcml_usize size_operator ) { fcml_st_operand operand = fcml_fn_cu_operand_addr_disp_32( disp, size_operator ); fcml_st_effective_address *effective_address = &( operand.address.effective_address ); effective_address->base = *base; effective_address->index = *index; effective_address->scale_factor = scale_factor; return operand; } fcml_st_operand LIB_CALL fcml_fn_cu_operand_addr_bis_disp_64( fcml_st_register *base, fcml_st_register *index, fcml_uint8_t scale_factor, fcml_int64_t disp, fcml_usize size_operator ) { fcml_st_operand operand = fcml_fn_cu_operand_addr_disp_32( (fcml_int32_t) disp, size_operator ); fcml_st_effective_address *effective_address = &( operand.address.effective_address ); effective_address->base = *base; effective_address->index = *index; effective_address->scale_factor = scale_factor; return operand; } fcml_st_operand LIB_CALL fcml_fn_cu_add_operand_hints( fcml_st_operand operand, fcml_hints hints ) { operand.hints = hints; return operand; } fcml_st_instruction* LIB_CALL fcml_fn_cu_clone_instruction( fcml_st_instruction *instruction ) { if (!instruction) { return NULL; } fcml_st_instruction *new_inst = (fcml_st_instruction*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_instruction) ); if (!new_inst) { return NULL; } *new_inst = *instruction; new_inst->mnemonic = fcml_fn_env_str_strdup( instruction->mnemonic ); if (!new_inst->mnemonic) { fcml_fn_env_memory_free( new_inst ); return NULL; } return new_inst; } void LIB_CALL fcml_fn_cu_free_instruction( fcml_st_instruction *instruction ) { if (instruction) { if (instruction->mnemonic) { fcml_fn_env_str_strfree( instruction->mnemonic ); } fcml_fn_env_memory_free( instruction ); } } fcml_st_operand *fcml_fn_cu_find_operand( fcml_st_instruction *instruction, fcml_en_operand_type operand_type ) { fcml_int i; for ( i = 0; i < FCML_OPERANDS_COUNT; i++ ) { fcml_en_operand_type type = instruction->operands[i].type; if (type == operand_type) { return &( instruction->operands[i] ); } else if (type == FCML_OT_NONE) { break; } } return NULL; } fcml-1.1.1/src/libfcml.pc.in0000644000175000017500000000044412560745216012516 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ includedir=@includedir@ libdir=@libdir@ Name: fcml Description: A machine code manipulation library for Intel 64 and IA-32. URL: https://github.com/swojtasiak/fcml-lib.git Version: @PACKAGE_VERSION@ Cflags: -I${includedir} Libs: -L${libdir} -lfcml fcml-1.1.1/src/fcml_symbols.c0000644000175000017500000001030512560745216013007 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "fcml_coll.h" #include "fcml_env_int.h" void LIB_CALL fcml_fn_symbol_free( fcml_st_symbol *symbol ) { if ( symbol ) { if ( symbol->symbol ) { fcml_fn_env_str_strfree( symbol->symbol ); } fcml_fn_env_memory_free( symbol ); } } void fcml_itf_eff_free_symbol( fcml_ptr key, fcml_ptr value, fcml_ptr args ) { /* Key do not have to be freed, because it the same symbol as in symbol descriptor. */ if ( value ) { /* Free symbol structure. */ fcml_st_symbol *symbol = (fcml_st_symbol*) value; fcml_fn_symbol_free( symbol ); } } fcml_st_symbol_table LIB_CALL fcml_fn_symbol_table_alloc() { fcml_st_coll_map_descriptor desc = fcml_coll_map_descriptor_string; desc.entry_free_function = &fcml_itf_eff_free_symbol; fcml_int error; fcml_coll_map symbol_table = fcml_fn_coll_map_alloc( &desc, 1, &error ); return symbol_table; } fcml_st_symbol* LIB_CALL fcml_fn_symbol_alloc( const fcml_string symbol_name, fcml_int64_t value ) { fcml_st_symbol *symbol = (fcml_st_symbol*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_symbol) ); if ( symbol ) { symbol->symbol = fcml_fn_env_str_strdup( symbol_name ); if ( !symbol->symbol ) { fcml_fn_env_memory_free( symbol ); return NULL; } symbol->value = value; } return symbol; } fcml_ceh_error LIB_CALL fcml_fn_symbol_add( fcml_st_symbol_table symbol_table, const fcml_st_symbol *symbol ) { fcml_int error = FCML_COLL_ERROR_NO_ERROR; fcml_fn_coll_map_put( (fcml_coll_map) symbol_table, symbol->symbol, (fcml_ptr)symbol, &error ); if ( error ) { return FCML_CEH_GEC_OUT_OF_MEMORY; } return FCML_CEH_GEC_NO_ERROR; } fcml_ceh_error LIB_CALL fcml_fn_symbol_add_raw( fcml_st_symbol_table symbol_table, const fcml_string symbol, fcml_int64_t value ) { fcml_coll_map symbol_map = (fcml_coll_map) symbol_table; fcml_st_symbol *sym = fcml_fn_symbol_alloc( symbol, value ); if ( !sym ) { return FCML_CEH_GEC_OUT_OF_MEMORY; } fcml_int error = FCML_COLL_ERROR_NO_ERROR; fcml_fn_coll_map_put( symbol_map, sym->symbol, sym, &error ); if ( error ) { fcml_fn_env_str_strfree( sym->symbol ); fcml_fn_env_memory_free( sym ); return FCML_CEH_GEC_OUT_OF_MEMORY; } return FCML_CEH_GEC_NO_ERROR; } void LIB_CALL fcml_fn_symbol_remove( fcml_st_symbol_table symbol_table, const fcml_string symbol ) { fcml_coll_map symbol_map = (fcml_coll_map) symbol_table; if ( symbol_table && symbol ) { fcml_fn_coll_map_remove( symbol_map, (const fcml_ptr)symbol ); } } fcml_st_symbol* LIB_CALL fcml_fn_symbol_get( fcml_st_symbol_table symbol_table, const fcml_string symbol ) { fcml_coll_map symbol_map = (fcml_coll_map) symbol_table; if ( symbol_map && symbol ) { return (fcml_st_symbol*) fcml_fn_coll_map_get( symbol_map, (const fcml_ptr)symbol ); } return NULL; } void LIB_CALL fcml_fn_symbol_remove_all( fcml_st_symbol_table symbol_table ) { fcml_coll_map symbol_map = (fcml_coll_map) symbol_table; if ( symbol_map ) { fcml_fn_coll_map_clear( symbol_map ); } } void LIB_CALL fcml_fn_symbol_table_free( fcml_st_symbol_table symbol_table ) { fcml_coll_map symbol_map = (fcml_coll_map) symbol_table; if ( symbol_map ) { fcml_fn_coll_map_free( symbol_map ); } } fcml-1.1.1/src/fcml_intel_lexer.h0000644000175000017500000002054312560745216013643 00000000000000#ifndef intel_HEADER_H #define intel_HEADER_H 1 #define intel_IN_HEADER 1 #line 6 "fcml_intel_lexer.h" #line 8 "fcml_intel_lexer.h" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 39 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T #define YY_TYPEDEF_YY_SCANNER_T typedef void* yyscan_t; #endif /* For convenience, these vars (plus the bison vars far below) are macros in the reentrant scanner. */ #define yyin yyg->yyin_r #define yyout yyg->yyout_r #define yyextra yyg->yyextra_r #define yyleng yyg->yyleng_r #define yytext yyg->yytext_r #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) #define yy_flex_debug yyg->yy_flex_debug_r /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #define YY_BUF_SIZE 16384 #endif #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #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 { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ 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 * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ void intel_restart (FILE *input_file ,yyscan_t yyscanner ); void intel__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); YY_BUFFER_STATE intel__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); void intel__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void intel__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void intel_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void intel_pop_buffer_state (yyscan_t yyscanner ); YY_BUFFER_STATE intel__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE intel__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); YY_BUFFER_STATE intel__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); void *intel_alloc (yy_size_t ,yyscan_t yyscanner ); void *intel_realloc (void *,yy_size_t ,yyscan_t yyscanner ); void intel_free (void * ,yyscan_t yyscanner ); /* Begin user sect3 */ #define intel_wrap(yyscanner) 1 #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r #ifdef YY_HEADER_EXPORT_START_CONDITIONS #define INITIAL 0 #endif #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #define YY_EXTRA_TYPE struct fcml_st_parser_data * int intel_lex_init (yyscan_t* scanner); int intel_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int intel_lex_destroy (yyscan_t yyscanner ); int intel_get_debug (yyscan_t yyscanner ); void intel_set_debug (int debug_flag ,yyscan_t yyscanner ); YY_EXTRA_TYPE intel_get_extra (yyscan_t yyscanner ); void intel_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *intel_get_in (yyscan_t yyscanner ); void intel_set_in (FILE * in_str ,yyscan_t yyscanner ); FILE *intel_get_out (yyscan_t yyscanner ); void intel_set_out (FILE * out_str ,yyscan_t yyscanner ); yy_size_t intel_get_leng (yyscan_t yyscanner ); char *intel_get_text (yyscan_t yyscanner ); int intel_get_lineno (yyscan_t yyscanner ); void intel_set_lineno (int line_number ,yyscan_t yyscanner ); int intel_get_column (yyscan_t yyscanner ); void intel_set_column (int column_no ,yyscan_t yyscanner ); YYSTYPE * intel_get_lval (yyscan_t yyscanner ); void intel_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int intel_wrap (yyscan_t yyscanner ); #else extern int intel_wrap (yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int intel_lex \ (YYSTYPE * yylval_param ,yyscan_t yyscanner); #define YY_DECL int intel_lex \ (YYSTYPE * yylval_param , yyscan_t yyscanner) #endif /* !YY_DECL */ /* yy_get_previous_state - get the state just before the EOB char was reached */ #undef YY_NEW_FILE #undef YY_FLUSH_BUFFER #undef yy_set_bol #undef yy_new_buffer #undef yy_set_interactive #undef YY_DO_BEFORE_ACTION #ifdef YY_DECL_IS_OURS #undef YY_DECL_IS_OURS #undef YY_DECL #endif #line 355 "fcml_intel_lexer.l" #line 343 "fcml_intel_lexer.h" #undef intel_IN_HEADER #endif /* intel_HEADER_H */ fcml-1.1.1/src/fcml_messages.h0000644000175000017500000000504712560745216013142 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_MESSAGES_H_ #define FCML_MESSAGES_H_ #include #include #define FCML_MESSAGE_MAX 512 typedef enum fcml_en_msg_message_code { /* Global error codes. */ FCML_MC_CEH_GEC_NO_ERROR = 0, FCML_MC_CEH_GEC_OUT_OF_MEMORY = 1, FCML_MC_CEH_GEC_INVALID_INPUT = 2, FCML_MC_CEH_GEC_INTERNAL_ERROR = 3, FCML_MC_CEH_GEC_NOT_INITIALIZED = 4, FCML_MC_CEH_GEC_EOF = 5, FCML_MC_CEH_GEC_VALUE_OUT_OF_RANGE = 6, FCML_MC_CEH_GEC_FEATURE_NOT_SUPPORTED = 7, FCML_MC_CEH_GEC_INVALID_ADDRESSING_MODE = 8, FCML_MC_CEH_GEC_INVALID_ADDRESSING_FORM = 9, FCML_MC_CEH_GEC_INVALID_INSTRUCTION_FORM = 10, FCML_MC_CEH_GEC_INVALID_OPPERAND = 11, FCML_MC_CEH_GEC_UNKNOWN_MNEMONIC = 12, FCML_MC_CEH_GEC_INVALID_OPPERAND_SIZE = 13, FCML_MC_CEH_GEC_INVALID_ADDRESS_SIZE = 14, FCML_MC_CEH_GEC_UNKNOWN_INSTRUCTION = 15, FCML_MC_CEH_GEC_INVALID_PREFIX = 16, FCML_MC_CEH_GEC_INVALID_REGISTER_TYPE = 17, FCML_MC_CEH_GEC_INVALID_REGISTER = 18, FCML_MC_CEH_GEC_UNDEFINED_SYMBOL = 19, /* Message error codes. */ FCML_MC_SEGMENT_REGISTER_CAN_NOT_BE_OVERRIDDEN, FCML_MC_SEGMENT_INVALID_PSEUDO_OPCODE_IMM, FCML_MC_SEGMENT_HLE_PREFIXES_NOT_ALLOWED, FCML_MC_SEGMENT_HLE_MORE_THAN_ONE_PREFIX, FCML_MC_SEGMENT_WRONG_REGISTER_TYPE_SEG, FCML_MC_SEGMENT_SYMBOL_ALREADY_DEFINED, FCML_MC_SEGMENT_UNDEFINED_SYMBOL, FCML_MC_SEGMENT_PARSED_LINE_TO_LONG } fcml_en_msg_message_code; fcml_string fcml_fn_msg_get_message( fcml_en_msg_message_code code ); void fcml_fn_msg_add_error_message( fcml_st_ceh_error_container *errors, fcml_en_msg_message_code msg_code, fcml_ceh_error code, fcml_en_ceh_error_level level, ... ); #endif /* FCML_MESSAGES_H_ */ fcml-1.1.1/src/Makefile.in0000644000175000017500000022400212561443456012222 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # 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, # 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. @SET_MAKE@ VPATH = @srcdir@ 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 \ ?) ;; \ *) 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@ pkglibexecdir = $(libexecdir)/@PACKAGE@ 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 = @build@ host_triplet = @host@ subdir = src 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 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.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 = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libfcml_la_LIBADD = am_libfcml_la_OBJECTS = libfcml_la-fcml_intel_lexer.lo \ libfcml_la-fcml_gas_lexer.lo \ libfcml_la-fcml_intel_parser_def.lo \ libfcml_la-fcml_gas_parser_def.lo libfcml_la-fcml_apc_ast.lo \ libfcml_la-fcml_assembler.lo libfcml_la-fcml_ceh.lo \ libfcml_la-fcml_choosers.lo libfcml_la-fcml_coll.lo \ libfcml_la-fcml_common_dialect.lo \ libfcml_la-fcml_common_utils.lo \ libfcml_la-fcml_decoding_tree.lo libfcml_la-fcml_def.lo \ libfcml_la-fcml_def_enc.lo libfcml_la-fcml_dialect.lo \ libfcml_la-fcml_dialect_int.lo libfcml_la-fcml_disassembler.lo \ libfcml_la-fcml_encoding.lo libfcml_la-fcml_env_int.lo \ libfcml_la-fcml_gas_dialect.lo libfcml_la-fcml_gas_parser.lo \ libfcml_la-fcml_gas_rend.lo libfcml_la-fcml_hints.lo \ libfcml_la-fcml_intel_dialect.lo \ libfcml_la-fcml_intel_parser.lo libfcml_la-fcml_intel_rend.lo \ libfcml_la-fcml_messages.lo libfcml_la-fcml_mnemonic_parser.lo \ libfcml_la-fcml_modrm_decoder.lo \ libfcml_la-fcml_modrm_encoder.lo libfcml_la-fcml_optimizers.lo \ libfcml_la-fcml_parser.lo libfcml_la-fcml_parser_int.lo \ libfcml_la-fcml_parser_utils.lo libfcml_la-fcml_renderer.lo \ libfcml_la-fcml_rend_utils.lo libfcml_la-fcml_stream.lo \ libfcml_la-fcml_utils.lo libfcml_la-fcml_lag_assembler.lo \ libfcml_la-fcml_symbols.lo libfcml_la_OBJECTS = $(am_libfcml_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libfcml_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libfcml_la_LDFLAGS) $(LDFLAGS) -o $@ 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)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=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 = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=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 = LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) 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)/ylwrap 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) LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(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 = $(libfcml_la_SOURCES) DIST_SOURCES = $(libfcml_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(nodist_pkgconfig_DATA) 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 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/ylwrap fcml_gas_lexer.c fcml_gas_parser_def.c \ fcml_gas_parser_def.h fcml_intel_lexer.c \ fcml_intel_parser_def.c fcml_intel_parser_def.h DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FCML_IMPORT_LIB = @FCML_IMPORT_LIB@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ 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@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ 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@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ BUILT_SOURCES = fcml_intel_parser_def.h fcml_gas_parser_def.h fcml_intel_lexer.h fcml_gas_lexer.h AM_YFLAGS = -d lib_LTLIBRARIES = libfcml.la libfcml_la_SOURCES = fcml_intel_lexer.l \ fcml_intel_lexer.h \ fcml_gas_lexer.l \ fcml_gas_lexer.h \ fcml_intel_parser_def.y \ fcml_gas_parser_def.y \ fcml_apc_ast.c \ fcml_apc_ast.h \ fcml_assembler.c \ fcml_assembler_int.h \ fcml_ceh.c \ fcml_ceh.h \ fcml_choosers.c \ fcml_coll.c \ fcml_coll.h \ fcml_common_dialect.c \ fcml_common_dialect.h \ fcml_common_lex.h \ fcml_common_utils.c \ fcml_decoding_tree.c \ fcml_decoding_tree.h \ fcml_def.c \ fcml_def_enc.c \ fcml_def.h \ fcml_dialect.c \ fcml_dialect_int.c \ fcml_dialect_int.h \ fcml_disassembler.c \ fcml_encoding.c \ fcml_encoding.h \ fcml_env_int.c \ fcml_env_int.h \ fcml_gas_dialect.c \ fcml_gas_parser.c \ fcml_gas_parser.h \ fcml_gas_rend.c \ fcml_gas_rend.h \ fcml_hints.c \ fcml_hints.h \ fcml_intel_dialect.c \ fcml_intel_parser.c \ fcml_intel_parser.h \ fcml_intel_rend.c \ fcml_intel_rend.h \ fcml_messages.c \ fcml_messages.h \ fcml_mnemonic_parser.c \ fcml_mnemonic_parser.h \ fcml_modrm_decoder.c \ fcml_modrm_decoder.h \ fcml_modrm_encoder.c \ fcml_modrm_encoder.h \ fcml_modrm.h \ fcml_optimizers.c \ fcml_parser.c \ fcml_parser_int.c \ fcml_parser_int.h \ fcml_parser_utils.c \ fcml_parser_utils.h \ fcml_renderer.c \ fcml_rend_utils.c \ fcml_rend_utils.h \ fcml_stream.c \ fcml_trace.h \ fcml_utils.c \ fcml_utils.h \ fcml_stream.h \ fcml_lag_assembler.c \ fcml_symbols.c libfcml_la_CPPFLAGS = -I$(top_srcdir)/include libfcml_la_LDFLAGS = -no-undefined EXTRA_DIST = libfcml.pc.in pkgconfigdir = $(libdir)/pkgconfig nodist_pkgconfig_DATA = libfcml.pc CLEANFILES = *.pc all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .l .lo .o .obj .y $(srcdir)/Makefile.in: $(srcdir)/Makefile.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) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/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_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): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } fcml_intel_parser_def.h: fcml_intel_parser_def.c @if test ! -f $@; then rm -f fcml_intel_parser_def.c; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) fcml_intel_parser_def.c; else :; fi fcml_gas_parser_def.h: fcml_gas_parser_def.c @if test ! -f $@; then rm -f fcml_gas_parser_def.c; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) fcml_gas_parser_def.c; else :; fi libfcml.la: $(libfcml_la_OBJECTS) $(libfcml_la_DEPENDENCIES) $(EXTRA_libfcml_la_DEPENDENCIES) $(AM_V_CCLD)$(libfcml_la_LINK) -rpath $(libdir) $(libfcml_la_OBJECTS) $(libfcml_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_apc_ast.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_assembler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_ceh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_choosers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_coll.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_common_dialect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_common_utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_decoding_tree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_def.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_def_enc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_dialect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_dialect_int.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_disassembler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_encoding.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_env_int.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_gas_dialect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_gas_lexer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_gas_parser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_gas_parser_def.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_gas_rend.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_hints.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_intel_dialect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_intel_lexer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_intel_parser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_intel_parser_def.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_intel_rend.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_lag_assembler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_messages.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_mnemonic_parser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_modrm_decoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_modrm_encoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_optimizers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_parser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_parser_int.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_parser_utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_rend_utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_renderer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_symbols.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcml_la-fcml_utils.Plo@am__quote@ .c.o: @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@ $(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 -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libfcml_la-fcml_intel_lexer.lo: fcml_intel_lexer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_intel_lexer.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_intel_lexer.Tpo -c -o libfcml_la-fcml_intel_lexer.lo `test -f 'fcml_intel_lexer.c' || echo '$(srcdir)/'`fcml_intel_lexer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_intel_lexer.Tpo $(DEPDIR)/libfcml_la-fcml_intel_lexer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_intel_lexer.c' object='libfcml_la-fcml_intel_lexer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_intel_lexer.lo `test -f 'fcml_intel_lexer.c' || echo '$(srcdir)/'`fcml_intel_lexer.c libfcml_la-fcml_gas_lexer.lo: fcml_gas_lexer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_gas_lexer.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_gas_lexer.Tpo -c -o libfcml_la-fcml_gas_lexer.lo `test -f 'fcml_gas_lexer.c' || echo '$(srcdir)/'`fcml_gas_lexer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_gas_lexer.Tpo $(DEPDIR)/libfcml_la-fcml_gas_lexer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_gas_lexer.c' object='libfcml_la-fcml_gas_lexer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_gas_lexer.lo `test -f 'fcml_gas_lexer.c' || echo '$(srcdir)/'`fcml_gas_lexer.c libfcml_la-fcml_intel_parser_def.lo: fcml_intel_parser_def.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_intel_parser_def.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_intel_parser_def.Tpo -c -o libfcml_la-fcml_intel_parser_def.lo `test -f 'fcml_intel_parser_def.c' || echo '$(srcdir)/'`fcml_intel_parser_def.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_intel_parser_def.Tpo $(DEPDIR)/libfcml_la-fcml_intel_parser_def.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_intel_parser_def.c' object='libfcml_la-fcml_intel_parser_def.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_intel_parser_def.lo `test -f 'fcml_intel_parser_def.c' || echo '$(srcdir)/'`fcml_intel_parser_def.c libfcml_la-fcml_gas_parser_def.lo: fcml_gas_parser_def.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_gas_parser_def.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_gas_parser_def.Tpo -c -o libfcml_la-fcml_gas_parser_def.lo `test -f 'fcml_gas_parser_def.c' || echo '$(srcdir)/'`fcml_gas_parser_def.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_gas_parser_def.Tpo $(DEPDIR)/libfcml_la-fcml_gas_parser_def.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_gas_parser_def.c' object='libfcml_la-fcml_gas_parser_def.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_gas_parser_def.lo `test -f 'fcml_gas_parser_def.c' || echo '$(srcdir)/'`fcml_gas_parser_def.c libfcml_la-fcml_apc_ast.lo: fcml_apc_ast.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_apc_ast.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_apc_ast.Tpo -c -o libfcml_la-fcml_apc_ast.lo `test -f 'fcml_apc_ast.c' || echo '$(srcdir)/'`fcml_apc_ast.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_apc_ast.Tpo $(DEPDIR)/libfcml_la-fcml_apc_ast.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_apc_ast.c' object='libfcml_la-fcml_apc_ast.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_apc_ast.lo `test -f 'fcml_apc_ast.c' || echo '$(srcdir)/'`fcml_apc_ast.c libfcml_la-fcml_assembler.lo: fcml_assembler.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_assembler.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_assembler.Tpo -c -o libfcml_la-fcml_assembler.lo `test -f 'fcml_assembler.c' || echo '$(srcdir)/'`fcml_assembler.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_assembler.Tpo $(DEPDIR)/libfcml_la-fcml_assembler.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_assembler.c' object='libfcml_la-fcml_assembler.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_assembler.lo `test -f 'fcml_assembler.c' || echo '$(srcdir)/'`fcml_assembler.c libfcml_la-fcml_ceh.lo: fcml_ceh.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_ceh.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_ceh.Tpo -c -o libfcml_la-fcml_ceh.lo `test -f 'fcml_ceh.c' || echo '$(srcdir)/'`fcml_ceh.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_ceh.Tpo $(DEPDIR)/libfcml_la-fcml_ceh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_ceh.c' object='libfcml_la-fcml_ceh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_ceh.lo `test -f 'fcml_ceh.c' || echo '$(srcdir)/'`fcml_ceh.c libfcml_la-fcml_choosers.lo: fcml_choosers.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_choosers.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_choosers.Tpo -c -o libfcml_la-fcml_choosers.lo `test -f 'fcml_choosers.c' || echo '$(srcdir)/'`fcml_choosers.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_choosers.Tpo $(DEPDIR)/libfcml_la-fcml_choosers.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_choosers.c' object='libfcml_la-fcml_choosers.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_choosers.lo `test -f 'fcml_choosers.c' || echo '$(srcdir)/'`fcml_choosers.c libfcml_la-fcml_coll.lo: fcml_coll.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_coll.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_coll.Tpo -c -o libfcml_la-fcml_coll.lo `test -f 'fcml_coll.c' || echo '$(srcdir)/'`fcml_coll.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_coll.Tpo $(DEPDIR)/libfcml_la-fcml_coll.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_coll.c' object='libfcml_la-fcml_coll.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_coll.lo `test -f 'fcml_coll.c' || echo '$(srcdir)/'`fcml_coll.c libfcml_la-fcml_common_dialect.lo: fcml_common_dialect.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_common_dialect.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_common_dialect.Tpo -c -o libfcml_la-fcml_common_dialect.lo `test -f 'fcml_common_dialect.c' || echo '$(srcdir)/'`fcml_common_dialect.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_common_dialect.Tpo $(DEPDIR)/libfcml_la-fcml_common_dialect.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_common_dialect.c' object='libfcml_la-fcml_common_dialect.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_common_dialect.lo `test -f 'fcml_common_dialect.c' || echo '$(srcdir)/'`fcml_common_dialect.c libfcml_la-fcml_common_utils.lo: fcml_common_utils.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_common_utils.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_common_utils.Tpo -c -o libfcml_la-fcml_common_utils.lo `test -f 'fcml_common_utils.c' || echo '$(srcdir)/'`fcml_common_utils.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_common_utils.Tpo $(DEPDIR)/libfcml_la-fcml_common_utils.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_common_utils.c' object='libfcml_la-fcml_common_utils.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_common_utils.lo `test -f 'fcml_common_utils.c' || echo '$(srcdir)/'`fcml_common_utils.c libfcml_la-fcml_decoding_tree.lo: fcml_decoding_tree.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_decoding_tree.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_decoding_tree.Tpo -c -o libfcml_la-fcml_decoding_tree.lo `test -f 'fcml_decoding_tree.c' || echo '$(srcdir)/'`fcml_decoding_tree.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_decoding_tree.Tpo $(DEPDIR)/libfcml_la-fcml_decoding_tree.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_decoding_tree.c' object='libfcml_la-fcml_decoding_tree.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_decoding_tree.lo `test -f 'fcml_decoding_tree.c' || echo '$(srcdir)/'`fcml_decoding_tree.c libfcml_la-fcml_def.lo: fcml_def.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_def.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_def.Tpo -c -o libfcml_la-fcml_def.lo `test -f 'fcml_def.c' || echo '$(srcdir)/'`fcml_def.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_def.Tpo $(DEPDIR)/libfcml_la-fcml_def.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_def.c' object='libfcml_la-fcml_def.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_def.lo `test -f 'fcml_def.c' || echo '$(srcdir)/'`fcml_def.c libfcml_la-fcml_def_enc.lo: fcml_def_enc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_def_enc.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_def_enc.Tpo -c -o libfcml_la-fcml_def_enc.lo `test -f 'fcml_def_enc.c' || echo '$(srcdir)/'`fcml_def_enc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_def_enc.Tpo $(DEPDIR)/libfcml_la-fcml_def_enc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_def_enc.c' object='libfcml_la-fcml_def_enc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_def_enc.lo `test -f 'fcml_def_enc.c' || echo '$(srcdir)/'`fcml_def_enc.c libfcml_la-fcml_dialect.lo: fcml_dialect.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_dialect.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_dialect.Tpo -c -o libfcml_la-fcml_dialect.lo `test -f 'fcml_dialect.c' || echo '$(srcdir)/'`fcml_dialect.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_dialect.Tpo $(DEPDIR)/libfcml_la-fcml_dialect.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_dialect.c' object='libfcml_la-fcml_dialect.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_dialect.lo `test -f 'fcml_dialect.c' || echo '$(srcdir)/'`fcml_dialect.c libfcml_la-fcml_dialect_int.lo: fcml_dialect_int.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_dialect_int.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_dialect_int.Tpo -c -o libfcml_la-fcml_dialect_int.lo `test -f 'fcml_dialect_int.c' || echo '$(srcdir)/'`fcml_dialect_int.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_dialect_int.Tpo $(DEPDIR)/libfcml_la-fcml_dialect_int.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_dialect_int.c' object='libfcml_la-fcml_dialect_int.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_dialect_int.lo `test -f 'fcml_dialect_int.c' || echo '$(srcdir)/'`fcml_dialect_int.c libfcml_la-fcml_disassembler.lo: fcml_disassembler.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_disassembler.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_disassembler.Tpo -c -o libfcml_la-fcml_disassembler.lo `test -f 'fcml_disassembler.c' || echo '$(srcdir)/'`fcml_disassembler.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_disassembler.Tpo $(DEPDIR)/libfcml_la-fcml_disassembler.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_disassembler.c' object='libfcml_la-fcml_disassembler.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_disassembler.lo `test -f 'fcml_disassembler.c' || echo '$(srcdir)/'`fcml_disassembler.c libfcml_la-fcml_encoding.lo: fcml_encoding.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_encoding.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_encoding.Tpo -c -o libfcml_la-fcml_encoding.lo `test -f 'fcml_encoding.c' || echo '$(srcdir)/'`fcml_encoding.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_encoding.Tpo $(DEPDIR)/libfcml_la-fcml_encoding.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_encoding.c' object='libfcml_la-fcml_encoding.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_encoding.lo `test -f 'fcml_encoding.c' || echo '$(srcdir)/'`fcml_encoding.c libfcml_la-fcml_env_int.lo: fcml_env_int.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_env_int.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_env_int.Tpo -c -o libfcml_la-fcml_env_int.lo `test -f 'fcml_env_int.c' || echo '$(srcdir)/'`fcml_env_int.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_env_int.Tpo $(DEPDIR)/libfcml_la-fcml_env_int.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_env_int.c' object='libfcml_la-fcml_env_int.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_env_int.lo `test -f 'fcml_env_int.c' || echo '$(srcdir)/'`fcml_env_int.c libfcml_la-fcml_gas_dialect.lo: fcml_gas_dialect.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_gas_dialect.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_gas_dialect.Tpo -c -o libfcml_la-fcml_gas_dialect.lo `test -f 'fcml_gas_dialect.c' || echo '$(srcdir)/'`fcml_gas_dialect.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_gas_dialect.Tpo $(DEPDIR)/libfcml_la-fcml_gas_dialect.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_gas_dialect.c' object='libfcml_la-fcml_gas_dialect.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_gas_dialect.lo `test -f 'fcml_gas_dialect.c' || echo '$(srcdir)/'`fcml_gas_dialect.c libfcml_la-fcml_gas_parser.lo: fcml_gas_parser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_gas_parser.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_gas_parser.Tpo -c -o libfcml_la-fcml_gas_parser.lo `test -f 'fcml_gas_parser.c' || echo '$(srcdir)/'`fcml_gas_parser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_gas_parser.Tpo $(DEPDIR)/libfcml_la-fcml_gas_parser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_gas_parser.c' object='libfcml_la-fcml_gas_parser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_gas_parser.lo `test -f 'fcml_gas_parser.c' || echo '$(srcdir)/'`fcml_gas_parser.c libfcml_la-fcml_gas_rend.lo: fcml_gas_rend.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_gas_rend.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_gas_rend.Tpo -c -o libfcml_la-fcml_gas_rend.lo `test -f 'fcml_gas_rend.c' || echo '$(srcdir)/'`fcml_gas_rend.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_gas_rend.Tpo $(DEPDIR)/libfcml_la-fcml_gas_rend.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_gas_rend.c' object='libfcml_la-fcml_gas_rend.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_gas_rend.lo `test -f 'fcml_gas_rend.c' || echo '$(srcdir)/'`fcml_gas_rend.c libfcml_la-fcml_hints.lo: fcml_hints.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_hints.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_hints.Tpo -c -o libfcml_la-fcml_hints.lo `test -f 'fcml_hints.c' || echo '$(srcdir)/'`fcml_hints.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_hints.Tpo $(DEPDIR)/libfcml_la-fcml_hints.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_hints.c' object='libfcml_la-fcml_hints.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_hints.lo `test -f 'fcml_hints.c' || echo '$(srcdir)/'`fcml_hints.c libfcml_la-fcml_intel_dialect.lo: fcml_intel_dialect.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_intel_dialect.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_intel_dialect.Tpo -c -o libfcml_la-fcml_intel_dialect.lo `test -f 'fcml_intel_dialect.c' || echo '$(srcdir)/'`fcml_intel_dialect.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_intel_dialect.Tpo $(DEPDIR)/libfcml_la-fcml_intel_dialect.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_intel_dialect.c' object='libfcml_la-fcml_intel_dialect.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_intel_dialect.lo `test -f 'fcml_intel_dialect.c' || echo '$(srcdir)/'`fcml_intel_dialect.c libfcml_la-fcml_intel_parser.lo: fcml_intel_parser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_intel_parser.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_intel_parser.Tpo -c -o libfcml_la-fcml_intel_parser.lo `test -f 'fcml_intel_parser.c' || echo '$(srcdir)/'`fcml_intel_parser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_intel_parser.Tpo $(DEPDIR)/libfcml_la-fcml_intel_parser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_intel_parser.c' object='libfcml_la-fcml_intel_parser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_intel_parser.lo `test -f 'fcml_intel_parser.c' || echo '$(srcdir)/'`fcml_intel_parser.c libfcml_la-fcml_intel_rend.lo: fcml_intel_rend.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_intel_rend.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_intel_rend.Tpo -c -o libfcml_la-fcml_intel_rend.lo `test -f 'fcml_intel_rend.c' || echo '$(srcdir)/'`fcml_intel_rend.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_intel_rend.Tpo $(DEPDIR)/libfcml_la-fcml_intel_rend.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_intel_rend.c' object='libfcml_la-fcml_intel_rend.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_intel_rend.lo `test -f 'fcml_intel_rend.c' || echo '$(srcdir)/'`fcml_intel_rend.c libfcml_la-fcml_messages.lo: fcml_messages.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_messages.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_messages.Tpo -c -o libfcml_la-fcml_messages.lo `test -f 'fcml_messages.c' || echo '$(srcdir)/'`fcml_messages.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_messages.Tpo $(DEPDIR)/libfcml_la-fcml_messages.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_messages.c' object='libfcml_la-fcml_messages.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_messages.lo `test -f 'fcml_messages.c' || echo '$(srcdir)/'`fcml_messages.c libfcml_la-fcml_mnemonic_parser.lo: fcml_mnemonic_parser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_mnemonic_parser.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_mnemonic_parser.Tpo -c -o libfcml_la-fcml_mnemonic_parser.lo `test -f 'fcml_mnemonic_parser.c' || echo '$(srcdir)/'`fcml_mnemonic_parser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_mnemonic_parser.Tpo $(DEPDIR)/libfcml_la-fcml_mnemonic_parser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_mnemonic_parser.c' object='libfcml_la-fcml_mnemonic_parser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_mnemonic_parser.lo `test -f 'fcml_mnemonic_parser.c' || echo '$(srcdir)/'`fcml_mnemonic_parser.c libfcml_la-fcml_modrm_decoder.lo: fcml_modrm_decoder.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_modrm_decoder.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_modrm_decoder.Tpo -c -o libfcml_la-fcml_modrm_decoder.lo `test -f 'fcml_modrm_decoder.c' || echo '$(srcdir)/'`fcml_modrm_decoder.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_modrm_decoder.Tpo $(DEPDIR)/libfcml_la-fcml_modrm_decoder.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_modrm_decoder.c' object='libfcml_la-fcml_modrm_decoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_modrm_decoder.lo `test -f 'fcml_modrm_decoder.c' || echo '$(srcdir)/'`fcml_modrm_decoder.c libfcml_la-fcml_modrm_encoder.lo: fcml_modrm_encoder.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_modrm_encoder.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_modrm_encoder.Tpo -c -o libfcml_la-fcml_modrm_encoder.lo `test -f 'fcml_modrm_encoder.c' || echo '$(srcdir)/'`fcml_modrm_encoder.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_modrm_encoder.Tpo $(DEPDIR)/libfcml_la-fcml_modrm_encoder.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_modrm_encoder.c' object='libfcml_la-fcml_modrm_encoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_modrm_encoder.lo `test -f 'fcml_modrm_encoder.c' || echo '$(srcdir)/'`fcml_modrm_encoder.c libfcml_la-fcml_optimizers.lo: fcml_optimizers.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_optimizers.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_optimizers.Tpo -c -o libfcml_la-fcml_optimizers.lo `test -f 'fcml_optimizers.c' || echo '$(srcdir)/'`fcml_optimizers.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_optimizers.Tpo $(DEPDIR)/libfcml_la-fcml_optimizers.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_optimizers.c' object='libfcml_la-fcml_optimizers.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_optimizers.lo `test -f 'fcml_optimizers.c' || echo '$(srcdir)/'`fcml_optimizers.c libfcml_la-fcml_parser.lo: fcml_parser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_parser.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_parser.Tpo -c -o libfcml_la-fcml_parser.lo `test -f 'fcml_parser.c' || echo '$(srcdir)/'`fcml_parser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_parser.Tpo $(DEPDIR)/libfcml_la-fcml_parser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_parser.c' object='libfcml_la-fcml_parser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_parser.lo `test -f 'fcml_parser.c' || echo '$(srcdir)/'`fcml_parser.c libfcml_la-fcml_parser_int.lo: fcml_parser_int.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_parser_int.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_parser_int.Tpo -c -o libfcml_la-fcml_parser_int.lo `test -f 'fcml_parser_int.c' || echo '$(srcdir)/'`fcml_parser_int.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_parser_int.Tpo $(DEPDIR)/libfcml_la-fcml_parser_int.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_parser_int.c' object='libfcml_la-fcml_parser_int.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_parser_int.lo `test -f 'fcml_parser_int.c' || echo '$(srcdir)/'`fcml_parser_int.c libfcml_la-fcml_parser_utils.lo: fcml_parser_utils.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_parser_utils.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_parser_utils.Tpo -c -o libfcml_la-fcml_parser_utils.lo `test -f 'fcml_parser_utils.c' || echo '$(srcdir)/'`fcml_parser_utils.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_parser_utils.Tpo $(DEPDIR)/libfcml_la-fcml_parser_utils.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_parser_utils.c' object='libfcml_la-fcml_parser_utils.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_parser_utils.lo `test -f 'fcml_parser_utils.c' || echo '$(srcdir)/'`fcml_parser_utils.c libfcml_la-fcml_renderer.lo: fcml_renderer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_renderer.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_renderer.Tpo -c -o libfcml_la-fcml_renderer.lo `test -f 'fcml_renderer.c' || echo '$(srcdir)/'`fcml_renderer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_renderer.Tpo $(DEPDIR)/libfcml_la-fcml_renderer.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_renderer.c' object='libfcml_la-fcml_renderer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_renderer.lo `test -f 'fcml_renderer.c' || echo '$(srcdir)/'`fcml_renderer.c libfcml_la-fcml_rend_utils.lo: fcml_rend_utils.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_rend_utils.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_rend_utils.Tpo -c -o libfcml_la-fcml_rend_utils.lo `test -f 'fcml_rend_utils.c' || echo '$(srcdir)/'`fcml_rend_utils.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_rend_utils.Tpo $(DEPDIR)/libfcml_la-fcml_rend_utils.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_rend_utils.c' object='libfcml_la-fcml_rend_utils.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_rend_utils.lo `test -f 'fcml_rend_utils.c' || echo '$(srcdir)/'`fcml_rend_utils.c libfcml_la-fcml_stream.lo: fcml_stream.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_stream.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_stream.Tpo -c -o libfcml_la-fcml_stream.lo `test -f 'fcml_stream.c' || echo '$(srcdir)/'`fcml_stream.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_stream.Tpo $(DEPDIR)/libfcml_la-fcml_stream.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_stream.c' object='libfcml_la-fcml_stream.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_stream.lo `test -f 'fcml_stream.c' || echo '$(srcdir)/'`fcml_stream.c libfcml_la-fcml_utils.lo: fcml_utils.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_utils.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_utils.Tpo -c -o libfcml_la-fcml_utils.lo `test -f 'fcml_utils.c' || echo '$(srcdir)/'`fcml_utils.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_utils.Tpo $(DEPDIR)/libfcml_la-fcml_utils.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_utils.c' object='libfcml_la-fcml_utils.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_utils.lo `test -f 'fcml_utils.c' || echo '$(srcdir)/'`fcml_utils.c libfcml_la-fcml_lag_assembler.lo: fcml_lag_assembler.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_lag_assembler.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_lag_assembler.Tpo -c -o libfcml_la-fcml_lag_assembler.lo `test -f 'fcml_lag_assembler.c' || echo '$(srcdir)/'`fcml_lag_assembler.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_lag_assembler.Tpo $(DEPDIR)/libfcml_la-fcml_lag_assembler.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_lag_assembler.c' object='libfcml_la-fcml_lag_assembler.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_lag_assembler.lo `test -f 'fcml_lag_assembler.c' || echo '$(srcdir)/'`fcml_lag_assembler.c libfcml_la-fcml_symbols.lo: fcml_symbols.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libfcml_la-fcml_symbols.lo -MD -MP -MF $(DEPDIR)/libfcml_la-fcml_symbols.Tpo -c -o libfcml_la-fcml_symbols.lo `test -f 'fcml_symbols.c' || echo '$(srcdir)/'`fcml_symbols.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfcml_la-fcml_symbols.Tpo $(DEPDIR)/libfcml_la-fcml_symbols.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_symbols.c' object='libfcml_la-fcml_symbols.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfcml_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libfcml_la-fcml_symbols.lo `test -f 'fcml_symbols.c' || echo '$(srcdir)/'`fcml_symbols.c .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) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-nodist_pkgconfigDATA: $(nodist_pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(nodist_pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-nodist_pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(nodist_pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) 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: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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 fcml_gas_lexer.c -rm -f fcml_gas_parser_def.c -rm -f fcml_gas_parser_def.h -rm -f fcml_intel_lexer.c -rm -f fcml_intel_parser_def.c -rm -f fcml_intel_parser_def.h -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ 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-nodist_pkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES 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 \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-nodist_pkgconfigDATA .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool 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-libLTLIBRARIES install-man \ install-nodist_pkgconfigDATA 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 mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES \ uninstall-nodist_pkgconfigDATA .PRECIOUS: Makefile @SET_MAKE@ fcml_intel_lexer.h: fcml_intel_lexer.c @if test ! -f $@; then rm -f fcml_intel_lexer.c; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) fcml_gas_lexer.c; else :; fi fcml_gas_lexer.h: fcml_gas_lexer.c @if test ! -f $@; then rm -f fcml_gas_lexer.c; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) fcml_gas_lexer.c; else :; fi libfcml.pc: libfcml.pc.in @sed -e 's![@]prefix[@]!$(prefix)!g' \ -e 's![@]exec_prefix[@]!$(exec_prefix)!g' \ -e 's![@]includedir[@]!$(includedir)!g' \ -e 's![@]libdir[@]!$(libdir)!g' \ -e 's![@]PACKAGE_VERSION[@]!$(PACKAGE_VERSION)!g' \ $(srcdir)/libfcml.pc.in > $@ # 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: fcml-1.1.1/src/fcml_dialect_int.c0000644000175000017500000001075612560745216013610 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include #include "fcml_dialect_int.h" #include "fcml_ceh.h" #include "fcml_coll.h" #include "fcml_env_int.h" #include "fcml_utils.h" fcml_st_mp_mnemonic *fcml_fn_asm_dialect_alloc_mnemonic_with_suffix( fcml_st_mp_mnemonic *mnemonic, fcml_string suffix ) { if (!suffix) { return fcml_fn_asm_dialect_alloc_mnemonic( mnemonic ); } fcml_st_mp_mnemonic *new_mnemonic = (fcml_st_mp_mnemonic*) fcml_fn_env_memory_alloc( sizeof(fcml_st_mp_mnemonic) ); if (!new_mnemonic) { /* Out of memory.*/ return NULL; } *new_mnemonic = *mnemonic; fcml_usize mnemonic_len = fcml_fn_env_str_strlen( mnemonic->mnemonic ); fcml_usize suffix_len = fcml_fn_env_str_strlen( suffix ); fcml_string dest_mnemonic = fcml_fn_env_str_stralloc( mnemonic_len + suffix_len + 1 ); if (dest_mnemonic) { fcml_fn_env_str_strncpy( dest_mnemonic, mnemonic->mnemonic, mnemonic_len ); fcml_fn_env_str_strncpy( dest_mnemonic + mnemonic_len, suffix, suffix_len ); new_mnemonic->mnemonic = dest_mnemonic; } else { /* Out of memory, free allocated mnemonic.*/ fcml_fn_env_memory_free( new_mnemonic ); new_mnemonic = NULL; } return new_mnemonic; } fcml_st_mp_mnemonic *fcml_fn_asm_dialect_alloc_mnemonic( fcml_st_mp_mnemonic *mnemonic ) { fcml_st_mp_mnemonic *new_mnemonic = (fcml_st_mp_mnemonic*) fcml_fn_env_memory_alloc( sizeof(fcml_st_mp_mnemonic) ); if (!new_mnemonic) { /* Out of memory.*/ return NULL; } *new_mnemonic = *mnemonic; fcml_string dest_mnemonic = fcml_fn_env_str_strdup( mnemonic->mnemonic ); if (dest_mnemonic) { new_mnemonic->mnemonic = dest_mnemonic; } else { /* Out of memory, free allocated mnemonic.*/ fcml_fn_env_memory_free( new_mnemonic ); new_mnemonic = NULL; } return new_mnemonic; } void fcml_fn_asm_dialect_free_mnemonic( fcml_st_mp_mnemonic *mnemonic ) { if (mnemonic) { if (mnemonic->mnemonic) { fcml_fn_env_str_strfree( mnemonic->mnemonic ); } fcml_fn_env_memory_free( mnemonic ); } } fcml_ceh_error fcml_fn_asm_dialect_alloc_mnemonic_lookup( fcml_st_dialect_context_int **out_dialect_context, fcml_st_dialect_mnemonic *mnemonic, fcml_usize capacity ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_dialect_context_int *dialect_context = (fcml_st_dialect_context_int*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_dialect_context_int) ); if (!dialect_context) { return FCML_CEH_GEC_OUT_OF_MEMORY; } /* Prepare mnemonic lookup.*/ fcml_int map_error; dialect_context->dialect_mnemonics_lookup = fcml_fn_coll_map_alloc( &fcml_coll_map_descriptor_uint32, capacity, &map_error ); if (map_error) { fcml_fn_env_memory_free( dialect_context ); return fcml_fn_utils_convert_map_error( map_error ); } fcml_st_dialect_mnemonic *current = mnemonic; while ( current->mnemonic ) { fcml_fn_coll_map_put( dialect_context->dialect_mnemonics_lookup, &( current->instruction ), current, &map_error ); if (map_error) { fcml_fn_coll_map_free( dialect_context->dialect_mnemonics_lookup ); fcml_fn_env_memory_free( dialect_context ); return fcml_fn_utils_convert_map_error( map_error ); } current++; } *out_dialect_context = dialect_context; return error; } void fcml_fn_asm_dialect_free_mnemonic_lookup( fcml_st_dialect_context_int *dialect_context ) { if (dialect_context && dialect_context->dialect_mnemonics_lookup) { fcml_fn_coll_map_free( dialect_context->dialect_mnemonics_lookup ); } } fcml-1.1.1/src/fcml_ceh.c0000644000175000017500000001044512560745216012063 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "fcml_env_int.h" #include "fcml_ceh.h" void fcml_fn_ceh_free_error_info( fcml_st_ceh_error_info *error_info ) { if (error_info) { if (error_info->message) { fcml_fn_env_str_strfree( error_info->message ); error_info->message = NULL; } fcml_fn_env_memory_free( error_info ); } } void fcml_fn_ceh_move_errors( fcml_st_ceh_error_container *destination, fcml_st_ceh_error_container *source ) { if (source != NULL && destination != NULL) { /* Clean destination if there are any errors. */ fcml_fn_ceh_free_errors_only( destination ); destination->errors = source->errors; destination->last_error = source->last_error; source->errors = NULL; source->last_error = NULL; } } void fcml_fn_ceh_free_errors_only( fcml_st_ceh_error_container *error_container ) { if (error_container) { fcml_st_ceh_error_info* next = error_container->errors; while ( next ) { fcml_st_ceh_error_info* curr = next; next = next->next_error; fcml_fn_ceh_free_error_info( curr ); } error_container->errors = NULL; error_container->last_error = NULL; } } void fcml_fn_ceh_free_errors_only_with_level( fcml_st_ceh_error_container *error_container, fcml_en_ceh_error_level level ) { if (error_container) { fcml_st_ceh_error_info **prev = &( error_container->errors ); fcml_st_ceh_error_info *next = error_container->errors; while ( next ) { fcml_st_ceh_error_info *curr = next; next = next->next_error; if (curr->level == level) { *prev = curr->next_error; fcml_fn_ceh_free_error_info( curr ); } else { prev = &( curr->next_error ); } } if (*prev == NULL) { error_container->last_error = NULL; } } } fcml_st_ceh_error_info *fcml_fn_ceh_alloc_error_info( const fcml_string message, fcml_ceh_error code, fcml_en_ceh_error_level level ) { fcml_st_ceh_error_info *error_info = (fcml_st_ceh_error_info*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_ceh_error_info) ); if (error_info) { error_info->message = fcml_fn_env_str_strdup( message ); if (!error_info->message) { fcml_fn_env_memory_free( error_info ); return NULL; } error_info->code = code; error_info->level = level; } return error_info; } fcml_st_ceh_error_info *fcml_fn_ceh_add_error( fcml_st_ceh_error_container *error_container, const fcml_string message, fcml_ceh_error code, fcml_en_ceh_error_level level ) { fcml_st_ceh_error_info *error_info; /* Container is null.*/ if (!error_container) { return NULL; } /* Checks if there is already such error reported. */ fcml_st_ceh_error_info *current = error_container->errors; while ( current ) { if (current->code == code) { // Already added. return current; } current = current->next_error; } error_info = fcml_fn_ceh_alloc_error_info( message, code, level ); if (!error_info) { return NULL; } fcml_st_ceh_error_info *last_error = error_container->last_error; if (last_error) { last_error->next_error = error_info; } else { error_container->errors = error_info; } error_container->last_error = error_info; return error_info; } fcml-1.1.1/src/fcml_mnemonic_parser.c0000644000175000017500000004016012560745216014502 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /* * mm - Mnemonic for addressing mode using memory addressing. * mr - Mnemonic for addressing mode without memory addressing. * sb - Sets memory data size to one byte. * sf - Sets memory data size to "supported_osa" which can be set using "oX" mnemonic attributes. * oX (X=dwq) - Sets supported operand size attribute to 16, 32 or 64 bits. * aX (X=dwq) - Sets supported address size attribute to 16, 32 or 64 bits. * ts - Sets "shortcut" flags for mnemonic. * tb - Sets "shortcut/classic" flag for mnemonic. * pXX - Sets pseudo opcode value for mnemonic. * dXX - Sets memory data size to specified number of bytes. It has greater priority than "sb" and "sf". * l0 - Mnemonic for L flag set to 0. * l1 - Mnemonic for L flag set to 1. * Sxx - One byte instruction suffix, used by AMD 3DNow for instance. * */ #include "fcml_mnemonic_parser.h" #include #include #include enum fcml_ien_mp_parser_state { FCML_MP_PS_MNEMONIC, FCML_MP_PS_BETWEEN_MNEMONICS, FCML_MP_PS_ATTRIBUTE_KEY, FCML_MP_PS_ATTRIBUTE_VALUE }; #define FCML_IDF_MP_BUFF_LEN 256 void fcml_ifn_mp_clean_mnemonic( fcml_st_mp_mnemonic *mnemonic ) { mnemonic->supported_osa = FCML_DS_UNDEF; mnemonic->supported_asa = FCML_DS_UNDEF; mnemonic->mnemonic = NULL; mnemonic->pseudo_op.is_not_null = FCML_FALSE; mnemonic->pseudo_op.value = 0x00; mnemonic->memory_data.is_not_null = FCML_FALSE; mnemonic->memory_data.value = 0x00; mnemonic->is_shortcut = FCML_FALSE; mnemonic->is_classic = FCML_TRUE; mnemonic->is_byte_ds = FCML_FALSE; mnemonic->is_full_ds = FCML_FALSE; mnemonic->is_mode_mem_only = FCML_FALSE; mnemonic->is_mode_reg_only = FCML_FALSE; mnemonic->is_default = FCML_TRUE; mnemonic->l.value = 0; mnemonic->l.is_not_null = FCML_FALSE; mnemonic->suffix.is_not_null = FCML_FALSE; mnemonic->suffix.value = 0x00; } fcml_ceh_error fcml_ifn_mp_dup_mnemonic( fcml_st_mp_mnemonic *parsed_mnemonic, fcml_st_coll_list *mnemonics, fcml_string mnemonic_buff, fcml_usize len ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; /* Allocate space for new mnemonic.*/ fcml_st_mp_mnemonic *new_mnemonic = (fcml_st_mp_mnemonic*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_mp_mnemonic) ); if ( new_mnemonic == NULL ) { return FCML_CEH_GEC_OUT_OF_MEMORY; } /* Prepare mnemonic string.*/ *new_mnemonic = *parsed_mnemonic; new_mnemonic->mnemonic = fcml_fn_env_str_stralloc( len + 1 ); if ( new_mnemonic->mnemonic == NULL ) { fcml_fn_env_memory_free( new_mnemonic ); return FCML_CEH_GEC_OUT_OF_MEMORY; } else { fcml_fn_env_str_strncpy( new_mnemonic->mnemonic, mnemonic_buff, len ); } /* Add mnemonic to list of already parsed mnemonics.*/ if ( !fcml_fn_coll_list_add_back( mnemonics, new_mnemonic ) ) { fcml_fn_env_str_strfree( new_mnemonic->mnemonic ); fcml_fn_env_memory_free( new_mnemonic ); error = FCML_CEH_GEC_OUT_OF_MEMORY; } return error; } fcml_ceh_error fcml_ifn_parse_attribute_size_flag( fcml_char flag_code, fcml_usize *flags ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; switch ( flag_code ) { case 'w': *flags = FCML_DS_16; break; case 'd': *flags = FCML_DS_32; break; case 'q': *flags = FCML_DS_64; break; case '*': *flags = FCML_DS_UNDEF; break; default: error = FCML_CEH_GEC_INVALID_INPUT; } return error; } fcml_ceh_error fcml_ifn_handle_attribute_value( fcml_char attr_key, fcml_char *attr_value, int attr_value_len, fcml_st_mp_mnemonic *mnemonic ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; /* Handle attributes. */ switch ( attr_key ) { case 'l': if ( attr_value[0] == '0' ) { mnemonic->l.value = 0; } else if ( attr_value[0] == '1' ) { mnemonic->l.value = 1; } mnemonic->l.is_not_null = FCML_TRUE; break; case 'm': if ( attr_value[0] == 'm' ) { mnemonic->is_mode_mem_only = FCML_TRUE; } else if ( attr_value[0] == 'r' ) { mnemonic->is_mode_reg_only = FCML_TRUE; } break; case 's': if ( attr_value[0] == 'b' ) { mnemonic->is_byte_ds = FCML_TRUE; } else if ( attr_value[0] == 'f' ) { mnemonic->is_full_ds = FCML_TRUE; } break; case 'S': if ( attr_value_len == 2 ) { unsigned long int val = strtoul( attr_value, NULL, 16 ); mnemonic->suffix.value = (fcml_uint8_t) val; mnemonic->suffix.is_not_null = FCML_TRUE; } else { error = FCML_CEH_GEC_INVALID_INPUT; } break; case 't': if ( attr_value[0] == 's' ) { mnemonic->is_shortcut = FCML_TRUE; mnemonic->is_classic = FCML_FALSE; } else if ( attr_value[0] == 'b' ) { mnemonic->is_shortcut = FCML_TRUE; mnemonic->is_classic = FCML_TRUE; } else { /* Currently this attribute can be set to 's' only.*/ error = FCML_CEH_GEC_INVALID_INPUT; } break; case 'o': error = fcml_ifn_parse_attribute_size_flag( attr_value[0], &mnemonic->supported_osa ); break; case 'a': error = fcml_ifn_parse_attribute_size_flag( attr_value[0], &mnemonic->supported_asa ); break; case 'd': if ( attr_value_len == 2 ) { unsigned long int val = strtoul( attr_value, NULL, 16 ); mnemonic->memory_data.value = (fcml_uint8_t) val; mnemonic->memory_data.is_not_null = FCML_TRUE; } else { error = FCML_CEH_GEC_INVALID_INPUT; } break; case 'p': if ( attr_value_len == 2 ) { unsigned long int val = strtoul( attr_value, NULL, 16 ); mnemonic->pseudo_op.value = (fcml_uint8_t) val; mnemonic->pseudo_op.is_not_null = FCML_TRUE; } else { error = FCML_CEH_GEC_INVALID_INPUT; } break; default: /* Unknown attribute key.*/ error = FCML_CEH_GEC_INVALID_INPUT; } return error; } fcml_ceh_error fcml_fn_mp_parse_mnemonics( fcml_string mnemonics_pattern, fcml_st_mp_mnemonic_set **mnemonics_set ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_char mnemonic_buff[FCML_IDF_MP_BUFF_LEN]; int mnemonic_index = 0; fcml_st_mp_mnemonic_set *mnemonics = (fcml_st_mp_mnemonic_set*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_mp_mnemonic_set) ); if ( !mnemonics ) { return FCML_CEH_GEC_OUT_OF_MEMORY; } mnemonics->mnemonics = fcml_fn_coll_list_alloc(); if ( !mnemonics->mnemonics ) { fcml_fn_env_memory_free( mnemonics ); return FCML_CEH_GEC_OUT_OF_MEMORY; } fcml_usize len = fcml_fn_env_str_strlen( mnemonics_pattern ); fcml_st_mp_mnemonic mnemonic; fcml_ifn_mp_clean_mnemonic( &mnemonic ); enum fcml_ien_mp_parser_state state = FCML_MP_PS_MNEMONIC; fcml_char attr_key; int attr_value_index = 0; fcml_char attr_value[6]; fcml_usize i; /* Main loop of simple finite-state machine parser.*/ for ( i = 0; i < len && !error; i++ ) { fcml_char c = mnemonics_pattern[i]; if ( state == FCML_MP_PS_MNEMONIC ) { switch ( c ) { case '[': if ( mnemonic_index > 0 ) { state = FCML_MP_PS_ATTRIBUTE_KEY; mnemonic.is_default = FCML_FALSE; } else { /* empty mnemonic.*/ error = FCML_CEH_GEC_INVALID_INPUT; } break; case ';': if ( mnemonic_index > 0 ) { error = fcml_ifn_mp_dup_mnemonic( &mnemonic, mnemonics->mnemonics, mnemonic_buff, mnemonic_index ); } else { /* empty mnemonic.*/ error = FCML_CEH_GEC_INVALID_INPUT; } fcml_ifn_mp_clean_mnemonic( &mnemonic ); mnemonic_index = 0; break; default: if ( mnemonic_index < FCML_IDF_MP_BUFF_LEN && ( fcml_fn_env_is_alpha( c ) || fcml_fn_env_is_digit( c ) || c == '_' ) ) { mnemonic_buff[mnemonic_index++] = c; } else { error = FCML_CEH_GEC_INVALID_INPUT; } break; } } else if ( state == FCML_MP_PS_BETWEEN_MNEMONICS ) { if ( c != ';' ) { error = FCML_CEH_GEC_INVALID_INPUT; break; } error = fcml_ifn_mp_dup_mnemonic( &mnemonic, mnemonics->mnemonics, mnemonic_buff, mnemonic_index ); fcml_ifn_mp_clean_mnemonic( &mnemonic ); mnemonic_index = 0; state = FCML_MP_PS_MNEMONIC; } else { switch ( c ) { case ']': if ( state != FCML_MP_PS_ATTRIBUTE_VALUE || attr_value_index == 0 ) { error = FCML_CEH_GEC_INVALID_INPUT; break; } /* Handle last mnemonic attribute.*/ error = fcml_ifn_handle_attribute_value( attr_key, attr_value, attr_value_index, &mnemonic ); attr_value_index = 0; state = FCML_MP_PS_BETWEEN_MNEMONICS; break; case ',': if ( state != FCML_MP_PS_ATTRIBUTE_VALUE || attr_value_index == 0 ) { error = FCML_CEH_GEC_INVALID_INPUT; break; } error = fcml_ifn_handle_attribute_value( attr_key, attr_value, attr_value_index, &mnemonic ); attr_value_index = 0; state = FCML_MP_PS_ATTRIBUTE_KEY; break; default: if ( state != FCML_MP_PS_ATTRIBUTE_KEY && state != FCML_MP_PS_ATTRIBUTE_VALUE ) { error = FCML_CEH_GEC_INVALID_INPUT; break; } if ( state == FCML_MP_PS_ATTRIBUTE_KEY ) { if ( fcml_fn_env_is_alpha( c ) ) { attr_key = c; state = FCML_MP_PS_ATTRIBUTE_VALUE; } else { error = FCML_CEH_GEC_INVALID_INPUT; } } else if ( state == FCML_MP_PS_ATTRIBUTE_VALUE ) { if ( ( fcml_fn_env_is_alpha( c ) || fcml_fn_env_is_digit( c ) || c == '*' ) && attr_value_index < 5 ) { attr_value[attr_value_index++] = c; attr_value[attr_value_index] = '\0'; } else { error = FCML_CEH_GEC_INVALID_INPUT; } } } } } if ( state != FCML_MP_PS_MNEMONIC && state != FCML_MP_PS_BETWEEN_MNEMONICS ) { error = FCML_CEH_GEC_INVALID_INPUT; } if ( !error && mnemonic_index ) { error = fcml_ifn_mp_dup_mnemonic( &mnemonic, mnemonics->mnemonics, mnemonic_buff, mnemonic_index ); } if ( error ) { fcml_fn_mp_free_mnemonics( mnemonics ); } else { if ( mnemonics->mnemonics->size ) { *mnemonics_set = mnemonics; } else { /* There is no mnemonic in the list.*/ fcml_fn_mp_free_mnemonics( mnemonics ); error = FCML_CEH_GEC_INVALID_INPUT; } } return error; } fcml_bool fcml_ifn_mp_is_attribute_size_supported( fcml_usize supported_attribute_size, fcml_usize attribute_size ) { if ( supported_attribute_size == FCML_DS_UNDEF ) { return FCML_TRUE; } return supported_attribute_size == attribute_size; } fcml_st_mp_mnemonic *fcml_fn_mp_choose_mnemonic( fcml_st_mp_mnemonic_set *mnemonics, fcml_st_mp_config *config ) { fcml_st_mp_mnemonic *chosen_mnemonic = NULL; if ( mnemonics->mnemonics ) { fcml_st_coll_list_element *next = mnemonics->mnemonics->head; while ( next ) { fcml_st_mp_mnemonic *mnemonic = (fcml_st_mp_mnemonic*) next->item; /* Set default mnemonic only if there is no mnemonic yet. Default mnemonics * can not have any attributes defined, so we do not need to check anything. */ if ( !chosen_mnemonic && !mnemonic->is_shortcut && mnemonic->is_default ) { chosen_mnemonic = mnemonic; } /* Size attributes.*/ if ( fcml_ifn_mp_is_attribute_size_supported( mnemonic->supported_asa, config->effective_asa ) && fcml_ifn_mp_is_attribute_size_supported( mnemonic->supported_osa, config->effective_osa ) ) { /* Memory data size.*/ if ( !mnemonic->memory_data.is_not_null || ( mnemonic->memory_data.value == ( config->memory_data_size / 8 ) ) ) { /* Suffix.*/ if ( ( mnemonic->suffix.is_not_null == config->suffix.is_not_null ) && ( !config->suffix.is_not_null || ( config->suffix.value == mnemonic->suffix.value ) ) ) { /* L flag.*/ if ( ( !config->l.is_not_null && !mnemonic->l.is_not_null ) || ( config->l.value == mnemonic->l.value ) ) { /* Shortcuts. Pseudo opcode mnemonic is also treated as a shortcut by disassembler.*/ if ( ( config->use_shortcut && ( ( mnemonic->pseudo_op.is_not_null && mnemonic->pseudo_op.value == config->pseudo_opcode.value ) || mnemonic->is_shortcut ) ) || ( !config->use_shortcut && !mnemonic->pseudo_op.is_not_null && ( !mnemonic->is_shortcut || mnemonic->is_classic ) ) ) { /* Addressing mode: See "mm","mr" mnemonic attribute. */ fcml_bool is_mode_ok = ( ( !mnemonic->is_mode_mem_only && !mnemonic->is_mode_reg_only ) || ( mnemonic->is_mode_mem_only && config->is_memory ) || ( mnemonic->is_mode_reg_only && !config->is_memory ) ); if ( is_mode_ok ) { /* Default mnemonic can not be overridden by another default.*/ if ( !chosen_mnemonic || !mnemonic->is_default ) { chosen_mnemonic = mnemonic; break; } } } } } } } next = next->next; } } return chosen_mnemonic; } void fcml_ifp_coll_list_action_free_mnemonic( fcml_ptr item_value, fcml_ptr args ) { if ( item_value ) { fcml_st_mp_mnemonic *parsed_mnemonic = (fcml_st_mp_mnemonic *) item_value; if ( parsed_mnemonic->mnemonic ) { fcml_fn_env_str_strfree( parsed_mnemonic->mnemonic ); } fcml_fn_env_memory_free( parsed_mnemonic ); } } void fcml_fn_mp_free_mnemonics( fcml_st_mp_mnemonic_set *mnemonics ) { if ( mnemonics ) { if ( mnemonics->mnemonics ) { fcml_fn_coll_list_free( mnemonics->mnemonics, &fcml_ifp_coll_list_action_free_mnemonic, NULL ); } fcml_fn_env_memory_free( mnemonics ); } } fcml-1.1.1/src/fcml_parser_int.c0000644000175000017500000001453712560745216013500 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "fcml_parser_int.h" #include "fcml_messages.h" #include "fcml_env_int.h" #include "fcml_dialect_int.h" fcml_ceh_error fcml_fn_parser_add_symbol_to_symbol_table( fcml_st_ceh_error_container *errors, fcml_st_symbol_table symbol_table, fcml_st_symbol *symbol, fcml_bool allow_override ) { fcml_ceh_error error = FCML_COLL_ERROR_NO_ERROR; if ( !allow_override ) { if ( fcml_fn_symbol_get( symbol_table, symbol->symbol ) ) { /* Symbol already defined. */ fcml_fn_msg_add_error_message( errors, FCML_MC_SEGMENT_SYMBOL_ALREADY_DEFINED, FCML_CEH_MEC_ERROR_SYMBOL_ALREADY_DEFINED, FCML_EN_CEH_EL_ERROR, symbol->symbol ); error = FCML_CEH_GEC_INVALID_INPUT; } } if ( !error ) { error = fcml_fn_symbol_add( symbol_table, symbol ); } return error; } fcml_ceh_error fcml_fn_parse_to_cif( fcml_st_parser_context *context, const fcml_string mnemonic, fcml_st_parser_result *result ) { if ( !result || !mnemonic || !context ) { return FCML_CEH_GEC_INVALID_INPUT; } fcml_st_parser_ast ast = { 0 }; /* Free previous parser results. */ fcml_fn_parser_result_free( result ); fcml_ceh_error error = fcml_fn_parse_to_ast( context, mnemonic, &ast ); /* Copy errors from parser.*/ result->errors = ast.errors; if ( error ) { /* Just in case. */ fcml_fn_symbol_free( ast.symbol ); ast.symbol = NULL; fcml_fn_ast_free_node( ast.tree ); ast.tree = NULL; return error; } fcml_bool new_symbol_table = FCML_FALSE; /* Symbol */ if ( ast.symbol ) { if ( !context->configuration.disable_symbols_declaration ) { if ( context->symbol_table || context->configuration.alloc_symbol_table_if_needed ) { /* If there is no symbol table yet, allocate it. */ if ( !context->symbol_table ) { context->symbol_table = fcml_fn_symbol_table_alloc(); if ( !context->symbol_table ) { fcml_fn_symbol_free( ast.symbol ); fcml_fn_ast_free_node( ast.tree ); return FCML_CEH_GEC_OUT_OF_MEMORY; } new_symbol_table = FCML_TRUE; } error = fcml_fn_parser_add_symbol_to_symbol_table( &( result->errors ), context->symbol_table, ast.symbol, context->configuration.override_labels ); if ( error ) { fcml_fn_symbol_free( ast.symbol ); fcml_fn_ast_free_node( ast.tree ); if ( new_symbol_table ) { fcml_fn_symbol_table_free( context->symbol_table ); context->symbol_table = NULL; } return error; } result->symbol = ast.symbol; } else { /* Free found symbol. */ fcml_fn_symbol_free( ast.symbol ); ast.symbol = NULL; } } else { /* We haven't expected any symbols so error has to be returned. */ fcml_fn_symbol_free( ast.symbol ); ast.symbol = NULL; fcml_fn_ast_free_node( ast.tree ); ast.tree = NULL; return FCML_CEH_GEC_UNSUPPORTED_LABEL_DECLARATION; } } /* Instruction. */ if ( !error && ast.tree ) { fcml_st_cif_converter_context cif_ctx; cif_ctx.errors = &( result->errors ); cif_ctx.symbol_table = context->symbol_table; cif_ctx.ignore_undefined_symbols = context->configuration.ignore_undefined_symbols; error = fcml_fn_ast_to_cif_converter( &cif_ctx, ast.tree, &( result->instruction ) ); if ( error ) { /* Free instruction, because it might haven't been fully parsed.*/ if ( result->instruction ) { fcml_fn_ast_free_converted_cif( result->instruction ); result->instruction = NULL; } /* Defined symbol should also be freed, because we can not leave * such symbols to be defined in the main symbols table. */ if ( result->symbol ) { fcml_fn_symbol_remove( context->symbol_table, result->symbol->symbol ); result->symbol = NULL; /* Free symbol table if it has been just allocated. */ if ( new_symbol_table ) { fcml_fn_symbol_table_free( context->symbol_table ); context->symbol_table = NULL; } } } } fcml_fn_ast_free_node( ast.tree ); return error; } fcml_ceh_error fcml_fn_parse_to_ast( fcml_st_parser_context *context, const fcml_string mnemonic, fcml_st_parser_ast *ast ) { fcml_st_dialect_context_int *dialect = (fcml_st_dialect_context_int*) context->dialect; return dialect->instruction_parser( context->ip, mnemonic, ast ); } void fcml_fn_parser_free_ast( fcml_st_parser_ast *ast ) { if ( ast ) { /* Free symbol. */ if ( ast->symbol ) { fcml_fn_env_str_strfree( ast->symbol->symbol ); fcml_fn_env_memory_free( ast->symbol ); ast->symbol = NULL; } /* Free errors and warnings. */ fcml_fn_ceh_free_errors_only( &( ast->errors ) ); /* Free AST tree. */ if ( ast->tree ) { fcml_fn_ast_free_node( ast->tree ); } ast->tree = NULL; } } fcml-1.1.1/src/fcml_intel_parser_def.h0000644000175000017500000000753312560745216014642 00000000000000/* A Bison parser, made by GNU Bison 2.7.12-4996. */ /* Bison interface for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2013 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 . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this 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 YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int intel_debug; #endif /* Tokens. */ #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 }; #endif /* Tokens. */ #define FCML_TK_UNEXPECTED 258 #define FCML_TK_REG_GPR 259 #define FCML_TK_REG_SIMD 260 #define FCML_TK_REG_FPU 261 #define FCML_TK_REG_SEG 262 #define FCML_TK_REG_CR 263 #define FCML_TK_REG_DR 264 #define FCML_TK_REG_RIP 265 #define FCML_TK_INTEGER 266 #define FCML_TK_FLOAT 267 #define FCML_TK_SIZE_OPERATOR 268 #define FCML_TK_SYMBOL 269 #define FCML_TK_HINTS 270 #define FCML_TK_EAO_HINTS 271 #define FCML_TK_SIB_HINT 272 #define FCML_TK_PREFIX 273 #define FCML_OP_UMINUS 274 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 2053 of yacc.c */ #line 104 "fcml_intel_parser_def.y" /*Complex values.*/ fcml_st_ast_val_integer integer_value; fcml_st_ast_val_float float_value; fcml_st_register reg_value; fcml_st_ast_node *ast; struct { fcml_string text; int length; } symbol; fcml_st_size_operator size_operator; fcml_hints hints; fcml_prefixes prefixes; /* Line 2053 of yacc.c */ #line 111 "fcml_intel_parser_def.h" } 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 intel_parse (void *YYPARSE_PARAM); #else int intel_parse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int intel_parse (struct fcml_st_parser_data *pd); #else int intel_parse (); #endif #endif /* ! YYPARSE_PARAM */ #endif /* !YY_INTEL_Y_TAB_H_INCLUDED */ fcml-1.1.1/src/fcml_decoding_tree.c0000644000175000017500000002527712560761201014120 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "fcml_env_int.h" #include "fcml_decoding_tree.h" #include "fcml_def.h" /********************************* * Disassembling tree support. * *********************************/ #define FCML_IDF_REG_FIELD_SIZE 3 #define FCML_IDF_CONDITION_FIELD_SIZE 4 #define FCML_IDF_REG_FIELD_POS 0 typedef struct fcml_ist_dt_dts_opcodes { fcml_uint8_t opcode_bytes[FCML_OPCODES_NUM]; } fcml_ist_dt_dts_opcodes; typedef fcml_ceh_error (*fcml_ifp_dt_dts_opcode_callback)( fcml_st_dt_decoding_tree *dec_tree, fcml_st_def_instruction_desc *instruction_desc, fcml_st_def_addr_mode_desc *opcode_desc, fcml_ist_dt_dts_opcodes *opcodes ); /* Sets opcode field into a opcode byte. */ fcml_uint8_t fcml_ifn_dt_dts_utils_set_opcode_byte_field( fcml_uint8_t opcode_byte, int opcode_field_pos, int field_size, fcml_uint8_t field_value ) { /* Mask for opcode field.*/ fcml_uint8_t bit_mask = 0x00; int i = 0; for ( i = 0; i < field_size; i++ ) { bit_mask <<= 1; bit_mask |= 0x01; } bit_mask = ~bit_mask; /* Preparing opcode with opcode_filed set.*/ return ( opcode_byte & bit_mask ) | ( field_value << opcode_field_pos ); } fcml_ceh_error fcml_ifn_dt_dts_default_opcode_callback( fcml_st_dt_decoding_tree *dec_tree, fcml_st_def_instruction_desc *instruction_desc, fcml_st_def_addr_mode_desc *opcode_desc, fcml_ist_dt_dts_opcodes *opcodes ) { fcml_st_dt_diss_tree_element **current_elements = &( dec_tree->opcode[0] ); fcml_st_dt_diss_tree_element *element = NULL; /* Looking for a node in the instruction tree where new * instruction should be placed. If there is no appropriate * node a new one is allocated. */ int i; int opcode_num = FCML_DEF_OPCODE_FLAGS_OPCODE_NUM( opcode_desc->opcode_flags ); for ( i = 0; i < opcode_num; i++ ) { fcml_uint8_t opcode = opcodes->opcode_bytes[i]; element = current_elements[opcode]; if (!element) { element = (fcml_st_dt_diss_tree_element*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_dt_diss_tree_element) ); if (!element) { return FCML_CEH_GEC_OUT_OF_MEMORY; } current_elements[opcode] = element; } /* Get next level of opcodes for the next loop.*/ current_elements = &( element->opcodes[0] ); } if (!element->instruction_decoding_defs) { element->instruction_decoding_defs = fcml_fn_coll_list_alloc(); if (!element->instruction_decoding_defs) { return FCML_CEH_GEC_OUT_OF_MEMORY; } } /* Prepare instruction decoding.*/ return dec_tree->prepare_callback( dec_tree->dialect_context, element, instruction_desc, opcode_desc ); } /* Function used to calculate all instruction opcode bytes using recursion. */ fcml_ceh_error fcml_ifn_dt_dts_handle_next_opcode_byte( fcml_st_dt_decoding_tree *dec_tree, fcml_st_def_instruction_desc *instruction_desc, fcml_st_def_addr_mode_desc *opcode_desc, fcml_ist_dt_dts_opcodes *opcodes, fcml_ifp_dt_dts_opcode_callback callback, int opcode_bytes_count, int opcode_byte_num, int primary_opcode_byte_num ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; /* Get next opcode byte from instruction.*/ if (opcode_byte_num == opcode_bytes_count) { /* There are no more opcode bytes available.*/ return callback( dec_tree, instruction_desc, opcode_desc, opcodes ); } fcml_uint8_t opcode_byte = opcode_desc->opcode[opcode_byte_num]; /* Check if this is an opcode with opcode fields.*/ if (opcode_byte_num == primary_opcode_byte_num) { fcml_uint32_t opcode_flags = opcode_desc->opcode_flags; int opcode_flags_pos = FCML_DEF_OPCODE_FLAGS_POS( opcode_flags ); /* Opcode field: REG and TTTN.*/ if ( FCML_DEF_OPCODE_FLAGS_OPCODE_FIELD_REG( opcode_flags ) || FCML_DEF_OPCODE_FLAGS_OPCODE_FIELD_TTTN( opcode_flags )) { int number_of_opcodes = 0; int field_size = 0; if (FCML_DEF_OPCODE_FLAGS_OPCODE_FIELD_REG( opcode_flags )) { number_of_opcodes = FCML_REG_FIELD_NUMBER_OF_REGISTERS; field_size = FCML_IDF_REG_FIELD_SIZE; } else if (FCML_DEF_OPCODE_FLAGS_OPCODE_FIELD_TTTN( opcode_flags )) { number_of_opcodes = FCML_REG_FIELD_NUMBER_OF_CONDITIONS; field_size = FCML_IDF_CONDITION_FIELD_SIZE; } int i; for ( i = 0; i < number_of_opcodes && !error; i++ ) { /* Prepare opcode byte with register/condition field.*/ fcml_uint8_t encoded_opcode_byte = fcml_ifn_dt_dts_utils_set_opcode_byte_field( opcode_byte, opcode_flags_pos, field_size, (fcml_uint8_t) i ); opcodes->opcode_bytes[opcode_byte_num] = encoded_opcode_byte; /* Handle next opcode byte.*/ error = fcml_ifn_dt_dts_handle_next_opcode_byte( dec_tree, instruction_desc, opcode_desc, opcodes, callback, opcode_bytes_count, opcode_byte_num + 1, primary_opcode_byte_num ); } return error; } } /* This is a plain opcode byte that shouldn't be modified in any way.*/ opcodes->opcode_bytes[opcode_byte_num] = opcode_byte; /* Handle next opcode byte.*/ return fcml_ifn_dt_dts_handle_next_opcode_byte( dec_tree, instruction_desc, opcode_desc, opcodes, callback, opcode_bytes_count, opcode_byte_num + 1, primary_opcode_byte_num ); } fcml_ceh_error fcml_ifn_dt_dts_iterate_through_all_opcodes( fcml_st_dt_decoding_tree *dec_tree, fcml_st_def_instruction_desc *instruction_desc, fcml_st_def_addr_mode_desc *opcode_desc, fcml_ifp_dt_dts_opcode_callback callback ) { /* Number of opcode bytes.*/ int opcode_bytes_count = FCML_DEF_OPCODE_FLAGS_OPCODE_NUM( opcode_desc->opcode_flags ); /* Opcode byte with potential flags.*/ int primary_opcode_byte_num = FCML_DEF_OPCODE_FLAGS_PRIMARY_OPCODE( opcode_desc->opcode_flags ); assert( primary_opcode_byte_num < opcode_bytes_count ); fcml_ist_dt_dts_opcodes opcode = { { 0 } }; /* Handle all opcode bytes.*/ return fcml_ifn_dt_dts_handle_next_opcode_byte( dec_tree, instruction_desc, opcode_desc, &opcode, callback, opcode_bytes_count, 0, primary_opcode_byte_num ); } int fcml_ifn_dt_dts_update_disassembling_tree( fcml_st_def_instruction_desc *instruction_desc_src, fcml_st_dt_decoding_tree *dec_tree ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; /* Get instruction description.*/ int instruction_index = 0; while ( instruction_desc_src[instruction_index].mnemonic != NULL && !error ) { struct fcml_st_def_instruction_desc *instruction_desc = &instruction_desc_src[instruction_index++]; /* Get description of the specific instruction form.*/ int opcode_index = 0; for ( opcode_index = 0; opcode_index < instruction_desc->opcode_desc_count; opcode_index++ ) { struct fcml_st_def_addr_mode_desc *opcode_desc = &( instruction_desc->addr_modes[opcode_index] ); /* Iterate through all opcode combinations for this instruction form.*/ int error = fcml_ifn_dt_dts_iterate_through_all_opcodes( dec_tree, instruction_desc, opcode_desc, &fcml_ifn_dt_dts_default_opcode_callback ); if (error) { break; } } } return error; } void fcml_ifn_dt_dts_free_instruction_decoding_element_handler( fcml_ptr item_value, fcml_ptr args ) { fcml_st_dt_decoding_tree *tree = (fcml_st_dt_decoding_tree *) args; if (tree->dispose_callback) { tree->dispose_callback( tree->dialect_context, item_value ); } } fcml_ceh_error fcml_fn_dt_dts_tree_init( fcml_st_dialect_context_int *dialect_context, fcml_st_dt_decoding_tree **tree, fcml_fp_dt_prepare_instruction_decoding_callback prepare_callback, fcml_fp_dt_dispose_instruction_decoding_callback dispose_callback ) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_dt_decoding_tree *dec_tree = (fcml_st_dt_decoding_tree*) fcml_fn_env_memory_alloc_clear( sizeof(fcml_st_dt_decoding_tree) ); if (dec_tree) { dec_tree->dialect_context = dialect_context; dec_tree->prepare_callback = prepare_callback; dec_tree->dispose_callback = dispose_callback; error = fcml_ifn_dt_dts_update_disassembling_tree( fcml_ext_instructions_def, dec_tree ); if (!error) { *tree = dec_tree; } else { fcml_fn_dt_dts_tree_free( dialect_context, dec_tree ); } } else { error = FCML_CEH_GEC_OUT_OF_MEMORY; } return error; } void fcml_fn_dt_dts_tree_element_free( fcml_st_dialect_context_int *dialect_context, fcml_st_dt_decoding_tree *tree, fcml_st_dt_diss_tree_element *element ) { int i = 0; /* Free all child elements.*/ for ( i = 0; i < FCML_DT_TREE_OPCODE_ARRAY_SIZE; i++ ) { fcml_st_dt_diss_tree_element *child_element = element->opcodes[i]; if (child_element) { fcml_fn_dt_dts_tree_element_free( dialect_context, tree, child_element ); } } /* Free element itself.*/ fcml_st_coll_list *instruction_decoding_defs = element->instruction_decoding_defs; if (instruction_decoding_defs) { fcml_fn_coll_list_free( instruction_decoding_defs, &fcml_ifn_dt_dts_free_instruction_decoding_element_handler, tree ); } fcml_fn_env_memory_free( element ); } void fcml_fn_dt_dts_tree_free( fcml_st_dialect_context_int *dialect_context, fcml_st_dt_decoding_tree *tree ) { int i = 0; /* Free all child elements.*/ for ( i = 0; i < FCML_DT_TREE_OPCODE_ARRAY_SIZE; i++ ) { fcml_st_dt_diss_tree_element *element = tree->opcode[i]; if (element) { fcml_fn_dt_dts_tree_element_free( dialect_context, tree, element ); } } /* Free tree.*/ fcml_fn_env_memory_free( tree ); } #undef FCML_IDF_REG_FIELD_SIZE #undef FCML_IDF_CONDITION_FIELD_SIZE #undef FCML_IDF_REG_FIELD_POS fcml-1.1.1/configure0000755000175000017500000234027612561443454011311 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for fcml 1.1.1. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and bugs@fcml-lib.com $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do $0: have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='fcml' PACKAGE_TARNAME='fcml' PACKAGE_VERSION='1.1.1' PACKAGE_STRING='fcml 1.1.1' PACKAGE_BUGREPORT='bugs@fcml-lib.com' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_unique_file="include/fcml_common.h" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS FCML_IMPORT_LIB HAVE_DOXYGEN_FALSE HAVE_DOXYGEN_TRUE ENABLE_INTERNAL_TESTS_FALSE ENABLE_INTERNAL_TESTS_TRUE CPP_WRAPPER_FALSE CPP_WRAPPER_TRUE DOXYGEN LIBOBJS ALLOCA YFLAGS YACC LEXLIB LEX_OUTPUT_ROOT LEX CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX CPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_shared enable_static with_pic enable_fast_install with_aix_soname enable_dependency_tracking with_gnu_ld with_sysroot enable_libtool_lock enable_debug enable_cpp_wrapper ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS LT_SYS_LIBRARY_PATH CPP CXX CXXFLAGS CCC CXXCPP YACC YFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # 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. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/fcml] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of fcml 1.1.1:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-libtool-lock avoid locking (might break parallel builds) --enable-debug enable debug code [default=no] --disable-cpp-wrapper disables c++ wrapper tests Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory LT_SYS_LIBRARY_PATH User-defined run-time library search path. CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor YACC The `Yet Another Compiler Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF fcml configure 1.1.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## -------------------------------- ## ## Report this to bugs@fcml-lib.com ## ## -------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_find_intX_t LINENO BITS VAR # ----------------------------------- # Finds a signed integer type with width BITS, setting cache variable VAR # accordingly. ac_fn_c_find_intX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 $as_echo_n "checking for int$2_t... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in int$2_t 'int' 'long int' \ 'long long int' 'short int' 'signed char'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int main () { static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int main () { static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1) < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else case $ac_type in #( int$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if eval test \"x\$"$3"\" = x"no"; then : else break fi done fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_intX_t # ac_fn_c_find_uintX_t LINENO BITS VAR # ------------------------------------ # Finds an unsigned integer type with width BITS, setting cache variable VAR # accordingly. ac_fn_c_find_uintX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 $as_echo_n "checking for uint$2_t... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ 'unsigned long long int' 'unsigned short int' 'unsigned char'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : case $ac_type in #( uint$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if eval test \"x\$"$3"\" = x"no"; then : else break fi done fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_uintX_t 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 generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.15' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='fcml' VERSION='1.1.1' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' ltmain=$ac_aux_dir/ltmain.sh # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 $as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else pic_mode=default fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi # Handle Gentoo/FreeBSD as it was Linux case $host_vendor in gentoo) version_type=linux ;; *) version_type=freebsd-$objformat ;; esac case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; linux) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' need_lib_prefix=no need_version=no ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC ac_config_commands="$ac_config_commands libtool" # Only expand once: win32-dll ac_config_headers="$ac_config_headers config.h" # Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi case $ac_cv_prog_cc_stdc in #( no) : ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( *) : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include // Check varargs macros. These examples are taken from C99 6.10.3.5. #define debug(...) fprintf (stderr, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK your preprocessor is broken; #endif #if BIG_OK #else your preprocessor is broken; #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\0'; ++i) continue; return 0; } // Check varargs and va_copy. static void test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str; int number; float fnumber; while (*format) { switch (*format++) { case 's': // string str = va_arg (args_copy, const char *); break; case 'd': // int number = va_arg (args_copy, int); break; case 'f': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); } int main () { // Check bool. _Bool success = false; // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. test_varargs ("s, d' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' || dynamic_array[ni.number - 1] != 543); ; return 0; } _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; esac if test "x$ac_cv_prog_cc_c99" != xno; then : ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 else ac_cv_prog_cc_stdc=no fi fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } if ${ac_cv_prog_cc_stdc+:} false; then : $as_echo_n "(cached) " >&6 fi case $ac_cv_prog_cc_stdc in #( no) : { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; #( '') : { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; #( *) : { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; esac ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi func_stripname_cnf () { case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;; esac } # func_stripname_cnf if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC func_cc_basename $compiler cc_basename=$func_cc_basename_result if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec_CXX='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. no_undefined_flag_CXX='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' $wl-bernotok' allow_undefined_flag_CXX=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='$wl--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" if test yes != "$lt_cv_apple_cc_single_mod"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi else ld_shlibs_CXX=no fi ;; os2*) hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_minus_L_CXX=yes allow_undefined_flag_CXX=unsupported shrext_cmds=.dll archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes_CXX=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='$wl-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='$wl-E' whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then no_undefined_flag_CXX=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='$wl-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='$wl-z,text' allow_undefined_flag_CXX='$wl-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no GCC_CXX=$GXX LD_CXX=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX=$prev$p else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX=$prev$p else postdeps_CXX="${postdeps_CXX} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$predep_objects_CXX"; then predep_objects_CXX=$p else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX=$p else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi lt_prog_compiler_pic_CXX='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static_CXX='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi # Handle Gentoo/FreeBSD as it was Linux case $host_vendor in gentoo) version_type=linux ;; *) version_type=freebsd-$objformat ;; esac case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; linux) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' need_lib_prefix=no need_version=no ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec_CXX='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test yes = "$hardcode_automatic_CXX"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct_CXX" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && test no != "$hardcode_minus_L_CXX"; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test relink = "$hardcode_action_CXX" || test yes = "$inherit_rpath_CXX"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LEX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 $as_echo "$LEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test "x$LEX" != "x:"; then cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ yyless ((input () != 0)); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int main (void) { return ! yylex () + ! yywrap (); } _ACEOF { { ac_try="$LEX conftest.l" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$LEX conftest.l") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 $as_echo_n "checking lex output file root... " >&6; } if ${ac_cv_prog_lex_root+:} false; then : $as_echo_n "(cached) " >&6 else if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 $as_echo "$ac_cv_prog_lex_root" >&6; } LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test -z "${LEXLIB+set}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 $as_echo_n "checking lex library... " >&6; } if ${ac_cv_lib_lex+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_LIBS=$LIBS ac_cv_lib_lex='none needed' for ac_lib in '' -lfl -ll; do LIBS="$ac_lib $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_lex=$ac_lib fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test "$ac_cv_lib_lex" != 'none needed' && break done LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 $as_echo "$ac_cv_lib_lex" >&6; } test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 $as_echo_n "checking whether yytext is a pointer... " >&6; } if ${ac_cv_prog_lex_yytext_pointer+:} false; then : $as_echo_n "(cached) " >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no ac_save_LIBS=$LIBS LIBS="$LEXLIB $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_prog_lex_yytext_pointer=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h fi rm -f conftest.l $LEX_OUTPUT_ROOT.c fi if test "$LEX" = :; then LEX=${am_missing_run}flex fi for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_YACC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 $as_echo "$YACC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # Configure options: --enable-debug[=no]. # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; debug="$withval" else debug=no fi # Configure options: --disable-cpp-wrapper[=no]. # Check whether --enable-cpp_wrapper was given. if test "${enable_cpp_wrapper+set}" = set; then : enableval=$enable_cpp_wrapper; else cpp_wrapper=yes fi # Checks for libraries. # Checks for header files. ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes else ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes else ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then : ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_header in inttypes.h libintl.h malloc.h stddef.h stdint.h stdlib.h string.h unistd.h limits.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t" case $ac_cv_c_int16_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int16_t $ac_cv_c_int16_t _ACEOF ;; esac ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t" case $ac_cv_c_int32_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int32_t $ac_cv_c_int32_t _ACEOF ;; esac ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" case $ac_cv_c_int64_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int64_t $ac_cv_c_int64_t _ACEOF ;; esac ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t" case $ac_cv_c_int8_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int8_t $ac_cv_c_int8_t _ACEOF ;; esac ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t" case $ac_cv_c_uint16_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define uint16_t $ac_cv_c_uint16_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" case $ac_cv_c_uint32_t in #( no|yes) ;; #( *) $as_echo "#define _UINT32_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint32_t $ac_cv_c_uint32_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t" case $ac_cv_c_uint64_t in #( no|yes) ;; #( *) $as_echo "#define _UINT64_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint64_t $ac_cv_c_uint64_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" case $ac_cv_c_uint8_t in #( no|yes) ;; #( *) $as_echo "#define _UINT8_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint8_t $ac_cv_c_uint8_t _ACEOF ;; esac # Checks for library functions. for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_malloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then : $as_echo "#define HAVE_MALLOC 1" >>confdefs.h else $as_echo "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac $as_echo "#define malloc rpl_malloc" >>confdefs.h fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 $as_echo_n "checking for GNU libc compatible realloc... " >&6; } if ${ac_cv_func_realloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_realloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { return ! realloc (0, 0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_realloc_0_nonnull=yes else ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } if test $ac_cv_func_realloc_0_nonnull = yes; then : $as_echo "#define HAVE_REALLOC 1" >>confdefs.h else $as_echo "#define HAVE_REALLOC 0" >>confdefs.h case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;; esac $as_echo "#define realloc rpl_realloc" >>confdefs.h fi for ac_func in memset strtoul strtoull vsnprintf memcpy strchr strtol do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # Configure DEBUG source code, if requested. if test "x$debug" = xyes; then : $as_echo "#define FCML_DEBUG 1" >>confdefs.h fi # Doxygen # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DOXYGEN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DOXYGEN"; then ac_cv_prog_DOXYGEN="$DOXYGEN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DOXYGEN="doxygen" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DOXYGEN=$ac_cv_prog_DOXYGEN if test -n "$DOXYGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 $as_echo "$DOXYGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$DOXYGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Doxygen not found - continuing without Doxygen support" >&5 $as_echo "$as_me: WARNING: Doxygen not found - continuing without Doxygen support" >&2;} fi # Disable the internal part of unit tests for cygwin and mingw, # due to the way Windows exports symbols in shared libraries. case $host_os in #( cygwin*|mingw*) : internal_test=no # Maybe not the most beatiful way to write it, but as least it doesn't have # to be written in one line and Eclipse's parser doesn't complain. internal_test_msg="(Don't be afraid of disabled internal unit tests for" internal_test_msg="$internal_test_msg"$'\n'" this configuration. Integration tests which are" internal_test_msg="$internal_test_msg"$'\n'" built on top of the public API are still executed.)" ;; #( *) : internal_test=yes ;; esac if test -n "$CXX" && test "x$cpp_wrapper" = xyes ; then CPP_WRAPPER_TRUE= CPP_WRAPPER_FALSE='#' else CPP_WRAPPER_TRUE='#' CPP_WRAPPER_FALSE= fi if test "x$internal_test" = xyes; then ENABLE_INTERNAL_TESTS_TRUE= ENABLE_INTERNAL_TESTS_FALSE='#' else ENABLE_INTERNAL_TESTS_TRUE='#' ENABLE_INTERNAL_TESTS_FALSE= fi if test -n "$DOXYGEN"; then HAVE_DOXYGEN_TRUE= HAVE_DOXYGEN_FALSE='#' else HAVE_DOXYGEN_TRUE='#' HAVE_DOXYGEN_FALSE= fi if test -z "$HAVE_DOXYGEN_TRUE"; then : ac_config_files="$ac_config_files docs/doxygen/doxyfile" fi # Configuration files. ac_config_files="$ac_config_files Makefile src/Makefile check/Makefile check/stf/Makefile check/internal-tests/Makefile check/public-tests/Makefile check/cpp-tests/Makefile example/Makefile example/fcml-disasm/Makefile example/fcml-asm/Makefile example/hsdis/Makefile include/Makefile docs/doxygen/Makefile" # Enable __declspec(dllimport) for linking public tests with shared DLL. case $enable_shared in #( yes) : case $host_os in #( cygwin*|mingw*) : FCML_IMPORT_LIB="-DLIBFCML_DLL_IMPORT" ;; #( *) : ;; esac ;; #( *) : ;; esac cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CPP_WRAPPER_TRUE}" && test -z "${CPP_WRAPPER_FALSE}"; then as_fn_error $? "conditional \"CPP_WRAPPER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_INTERNAL_TESTS_TRUE}" && test -z "${ENABLE_INTERNAL_TESTS_FALSE}"; then as_fn_error $? "conditional \"ENABLE_INTERNAL_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_DOXYGEN_TRUE}" && test -z "${HAVE_DOXYGEN_FALSE}"; then as_fn_error $? "conditional \"HAVE_DOXYGEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # 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 generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _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 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "docs/doxygen/doxyfile") CONFIG_FILES="$CONFIG_FILES docs/doxygen/doxyfile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "check/Makefile") CONFIG_FILES="$CONFIG_FILES check/Makefile" ;; "check/stf/Makefile") CONFIG_FILES="$CONFIG_FILES check/stf/Makefile" ;; "check/internal-tests/Makefile") CONFIG_FILES="$CONFIG_FILES check/internal-tests/Makefile" ;; "check/public-tests/Makefile") CONFIG_FILES="$CONFIG_FILES check/public-tests/Makefile" ;; "check/cpp-tests/Makefile") CONFIG_FILES="$CONFIG_FILES check/cpp-tests/Makefile" ;; "example/Makefile") CONFIG_FILES="$CONFIG_FILES example/Makefile" ;; "example/fcml-disasm/Makefile") CONFIG_FILES="$CONFIG_FILES example/fcml-disasm/Makefile" ;; "example/fcml-asm/Makefile") CONFIG_FILES="$CONFIG_FILES example/fcml-asm/Makefile" ;; "example/hsdis/Makefile") CONFIG_FILES="$CONFIG_FILES example/hsdis/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "docs/doxygen/Makefile") CONFIG_FILES="$CONFIG_FILES docs/doxygen/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool 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 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool 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 . # The names of the tagged configurations supported by this script. available_tags='CXX ' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi echo "*************************************************** ${PACKAGE_NAME} version ${PACKAGE_VERSION} Host CPU.............: $host_cpu Host OS:.............: $host_os Prefix:..............: ${prefix} Debug Build..........: $debug C++ wrapper tests....: ${cpp_wrapper:-no} Internal unit tests..: ${internal_test} ${internal_test_msg} Shared Library.......: $enable_shared C Compiler...........: ${CC} ${CFLAGS} ${CPPFLAGS} C++ Compiler.........: ${CXX} ${CXXFLAGS} Linker...............: $LD $LDFLAGS $LIBS Doxygen..............: ${DOXYGEN:-NONE} *************************************************** " fcml-1.1.1/missing0000755000175000017500000001533012560745327010770 00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # 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, 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 . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: fcml-1.1.1/check/0000755000175000017500000000000012561462632010520 500000000000000fcml-1.1.1/check/public-tests/0000755000175000017500000000000012561462632013136 500000000000000fcml-1.1.1/check/public-tests/instructions_g_t.h0000644000175000017500000000171412560745216016630 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_G_H_ #define INS_G_H_ #include extern fcml_stf_test_suite fctl_si_instructions_g; #endif /* INS_G_H_ */ fcml-1.1.1/check/public-tests/instructions_l_t.h0000644000175000017500000000171412560745216016635 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_L_H_ #define INS_L_H_ #include extern fcml_stf_test_suite fctl_si_instructions_l; #endif /* INS_L_H_ */ fcml-1.1.1/check/public-tests/instructions_i_t.h0000644000175000017500000000171312560745216016631 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_I_H_ #define INS_I_H_ #include extern fcml_stf_test_suite fctl_si_instructions_i; #endif /* INS_I_H_ */ fcml-1.1.1/check/public-tests/instructions_e_t.h0000644000175000017500000000171412560745216016626 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_E_H_ #define INS_E_H_ #include extern fcml_stf_test_suite fctl_si_instructions_e; #endif /* INS_E_H_ */ fcml-1.1.1/check/public-tests/general_usage_t.h0000644000175000017500000000036212560745216016355 00000000000000/* * general_usage_t.h * * Created on: May 25, 2014 * Author: tas */ #ifndef GENERAL_USAGE_T_H_ #define GENERAL_USAGE_T_H_ #include extern fcml_stf_test_suite fcml_si_general_usage; #endif /* GENERAL_USAGE_T_H_ */ fcml-1.1.1/check/public-tests/instructions_n_t.h0000644000175000017500000000171412560745216016637 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_N_H_ #define INS_N_H_ #include extern fcml_stf_test_suite fctl_si_instructions_n; #endif /* INS_N_H_ */ fcml-1.1.1/check/public-tests/instructions_x_t.c0000644000175000017500000003170512560745216016647 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "instructions_x_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_x_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_x_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_XADD(void) { FCML_I64_D( "xadd byte ptr [rax],dl", 0x48, 0x0F, 0xC0, 0x10 ); FCML_I32( "xadd byte ptr [eax],dl", 0x0F, 0xC0, 0x10 ); FCML_I32( "lock xadd byte ptr [eax],dl", 0xF0, 0x0F, 0xC0, 0x10 ); FCML_I32( "xacquire lock xadd byte ptr [eax],dl", 0xF2, 0xF0, 0x0F, 0xC0, 0x10 ); FCML_I32( "xrelease lock xadd byte ptr [eax],dl", 0xF3, 0xF0, 0x0F, 0xC0, 0x10 ); FCML_A64( "xadd %dl,(%rax)", 0x0f, 0xc0, 0x10 ); FCML_A64( "lock xadd %dl,(%rax)", 0xf0, 0x0f, 0xc0, 0x10 ); FCML_A64( "xacquire lock xadd %dl,(%rax)", 0xf2, 0xf0, 0x0f, 0xc0, 0x10 ); FCML_A64( "add %cl,(%rdi)", 0x00, 0x0f ); FCML_I64( "xadd qword ptr [rax],rdx", 0x48, 0x0F, 0xC1, 0x10 ); FCML_I32( "xadd dword ptr [eax],edx", 0x0F, 0xC1, 0x10 ); FCML_I32( "lock xadd word ptr [eax],dx", 0xF0, 0x66, 0x0F, 0xC1, 0x10 ); FCML_I32( "xacquire lock xadd word ptr [eax],dx", 0xF2, 0xF0, 0x66, 0x0F, 0xC1, 0x10 ); FCML_I32( "xrelease lock xadd word ptr [eax],dx", 0xF3, 0xF0, 0x66, 0x0F, 0xC1, 0x10 ); FCML_A64( "xadd %dl,(%rax)", 0x0f, 0xc0, 0x10 ); FCML_A64( "lock xadd %dl,(%rax)", 0xf0, 0x0f, 0xc0, 0x10 ); FCML_A64( "xacquire lock xadd %dl,(%rax)", 0xf2, 0xf0, 0x0f, 0xc0, 0x10 ); FCML_A64( "xadd %rdx,(%rax)", 0x48, 0x0f, 0xc1, 0x10 ); FCML_A64( "xadd %edx,(%rax)", 0x0f, 0xc1, 0x10 ); FCML_A64( "lock xadd %dx,(%rax)", 0xf0, 0x66, 0x0f, 0xc1, 0x10 ); FCML_A64( "xacquire lock xadd %dx,(%rax)", 0xf2, 0xf0, 0x66, 0x0f, 0xc1, 0x10 ); } void fcml_tf_instruction_XCHG(void) { FCML_I3264_M( "xchg eax,ecx", 3, FCML_MI( 0x87, 0xc8 ), FCML_MI( 0x87, 0xc1 ), FCML_MI( 0x91 ) ); FCML_I64_M( "xchg ax,cx", 3, FCML_MI( 0x66, 0x87, 0xc8 ), FCML_MI( 0x66, 0x87, 0xc1 ), FCML_MI( 0x66, 0x91 ) ); FCML_I64_M( "xchg rax,rcx", 3, FCML_MI( 0x48, 0x87, 0xc8 ), FCML_MI( 0x48, 0x87, 0xc1 ), FCML_MI( 0x48, 0x91 ) ); FCML_A64_M( "xchg %ecx,%eax", 3, FCML_MI( 0x87, 0xc8 ), FCML_MI( 0x87, 0xc1 ), FCML_MI( 0x91 ) ); FCML_I32( "xacquire xchg byte ptr [eax],al", 0xF2, 0x86, 0x00 ); FCML_I32( "xacquire lock xchg byte ptr [eax],al", 0xF2, 0xF0, 0x86, 0x00 ); FCML_I32( "lock xchg byte ptr [eax],al", 0xF0, 0x86, 0x00 ); FCML_I32( "xchg al,al", 0x86, 0xc0 ); FCML_I32_M( "xchg bl,al", 2, FCML_MI( 0x86, 0xc3 ), FCML_MI( 0x86, 0xd8 ) ); FCML_A64( "lock xchg %al,(%rax)", 0xf0, 0x86, 0x00 ); FCML_I32( "lock xchg dword ptr [eax],eax", 0xF0, 0x87, 0x00 ); FCML_I32_M( "xchg eax,ecx", 3, FCML_MI( 0x87, 0xc8 ), FCML_MI( 0x87, 0xc1 ), FCML_MI( 0x91 ) ); FCML_I32_M( "xchg eax,eax", 2, FCML_MI( 0x87, 0xc0 ), FCML_MI( 0x90 ) ); FCML_I32_M( "xchg ax,ax", 2, FCML_MI( 0x66, 0x87, 0xc0 ), FCML_MI( 0x66, 0x90 ) ); FCML_A32_M( "xchg %ecx,%eax", 3, FCML_MI( 0x87, 0xc8 ), FCML_MI( 0x87, 0xc1 ), FCML_MI( 0x91 ) ); } void fcml_tf_instruction_XGETBV(void) { FCML_I32( "xgetbv", 0x0F, 0x01, 0xD0 ); FCML_I64( "xgetbv", 0x0F, 0x01, 0xD0 ); FCML_A64( "xgetbv", 0x0f, 0x01, 0xd0 ); FCML_A64( "xgetbv", 0x0f, 0x01, 0xd0 ); } void fcml_tf_instruction_XLAT(void) { FCML_I32( "xlat byte ptr [ebx]", 0xD7 ); FCML_I32( "xlat byte ptr [bx]", 0x67, 0xD7 ); FCML_I32_A( "xlatb", 0xD7 ); FCML_A64( "xlat (%rbx)", 0xd7 ); FCML_A64_A( "xlatb (%rbx)", 0xd7 ); FCML_A64_A( "xlatb", 0xd7 ); FCML_A64_A( "xlat", 0xd7 ); } void fcml_tf_instruction_XOR(void) { FCML_I32_M( "xor al,0ffh", 2, FCML_MI( 0x80, 0xf0, 0xff ), FCML_MI( 0x34, 0xff ) ); FCML_I32_A_FAILED( "xor al,0ffh", 0xF0, 0x80, 0xf0, 0xff ); FCML_I32_M( "xor ax,11ffh", 2, FCML_MI( 0x66, 0x81, 0xf0, 0xff, 0x11 ), FCML_MI( 0x66, 0x35, 0xff, 0x11 ) ); FCML_I64_M( "xor rax,00000000227711ffh", 2, FCML_MI( 0x48, 0x81, 0xf0, 0xff, 0x11, 0x77, 0x22 ), FCML_MI( 0x48, 0x35, 0xff, 0x11, 0x77, 0x22 ) ); FCML_I32( "lock xor byte ptr [eax],11h", 0xF0, 0x80, 0x30, 0x11 ); FCML_I32( "xacquire lock xor byte ptr [eax],11h", 0xF2, 0xF0, 0x80, 0x30, 0x11 ); FCML_I32( "xrelease lock xor byte ptr [eax],11h", 0xF3, 0xF0, 0x80, 0x30, 0x11 ); FCML_I64( "xor byte ptr [rax],30h", 0x80, 0x30, 0x30 ); FCML_I64( "lock xor dword ptr [rax],22ffff30h", 0xF0, 0x81, 0x30, 0x30, 0xff, 0xff, 0x22 ); FCML_I64( "xacquire lock xor dword ptr [rax],22ffff30h", 0xF2, 0xF0, 0x81, 0x30, 0x30, 0xff, 0xff, 0x22 ); FCML_I64( "xrelease lock xor dword ptr [rax],22ffff30h", 0xF3, 0xF0, 0x81, 0x30, 0x30, 0xff, 0xff, 0x22 ); FCML_I64( "xor qword ptr [rax],0ffffffffffffff30h", 0x48, 0x81, 0x30, 0x30, 0xff, 0xff, 0xff ); FCML_I64_M( "lock xor dword ptr [rax],00000030h", 2, FCML_MI( 0xF0, 0x83, 0x30, 0x30 ), FCML_MI( 0xF0, 0x81, 0x30, 0x30, 0x00, 0x00, 0x00 ) ); FCML_I64_M( "xacquire lock xor dword ptr [rax],00000030h", 2, FCML_MI( 0xF2, 0xF0, 0x83, 0x30, 0x30 ), FCML_MI( 0xF2, 0xF0, 0x81, 0x30, 0x30, 0x00, 0x00, 0x00 ) ); FCML_I64_M( "xrelease lock xor dword ptr [rax],00000030h", 2, FCML_MI( 0xF3, 0xF0, 0x83, 0x30, 0x30 ), FCML_MI( 0xF3, 0xF0, 0x81, 0x30, 0x30, 0x00, 0x00, 0x00 ) ); FCML_I64_M( "xor word ptr [rax],0030h", 2, FCML_MI( 0x66, 0x83, 0x30, 0x30 ), FCML_MI( 0x66, 0x81, 0x30, 0x30, 0x00 ) ); FCML_I64_M( "xor qword ptr [rax],0000000000000030h", 2, FCML_MI( 0x48, 0x83, 0x30, 0x30 ), FCML_MI( 0x48, 0x81, 0x30, 0x30, 0x00, 0x00, 0x00 ) ); FCML_I64( "lock xor byte ptr [rax],dh", 0xF0, 0x30, 0x30 ); FCML_I64( "xacquire lock xor byte ptr [rax],dh", 0xF2, 0xF0, 0x30, 0x30 ); FCML_I64( "xrelease lock xor byte ptr [rax],dh", 0xF3, 0xF0, 0x30, 0x30 ); FCML_I64( "xor byte ptr [rax],sil", 0x40, 0x30, 0x30 ); FCML_I64( "lock xor dword ptr [rax],esi", 0xF0, 0x31, 0x30 ); FCML_I64( "xacquire lock xor dword ptr [rax],esi", 0xF2, 0xF0, 0x31, 0x30 ); FCML_I64( "xrelease lock xor dword ptr [rax],esi", 0xF3, 0xF0, 0x31, 0x30 ); FCML_I64( "xor word ptr [rax],si", 0x66, 0x31, 0x30 ); FCML_I64( "xor qword ptr [rax],rsi", 0x48, 0x31, 0x30 ); FCML_I64( "xor dh,byte ptr [rax]", 0x32, 0x30 ); FCML_I64( "xor dh,byte ptr [rax]", 0x66, 0x32, 0x30 ); FCML_I64( "xor sil,byte ptr [rax]", 0x40, 0x32, 0x30 ); FCML_I64( "xor esi,dword ptr [rax]", 0x33, 0x30 ); FCML_I64( "xor si,word ptr [rax]", 0x66, 0x33, 0x30 ); FCML_I64( "xor rsi,qword ptr [rax]", 0x48, 0x33, 0x30 ); FCML_A64( "lock xorl $0x22ffff30,(%rax)", 0xf0, 0x81, 0x30, 0x30, 0xff, 0xff, 0x22 ); FCML_A64( "xacquire lock xorl $0x22ffff30,(%rax)", 0xf2, 0xf0, 0x81, 0x30, 0x30, 0xff, 0xff, 0x22 ); FCML_A64( "xrelease lock xorl $0x22ffff30,(%rax)", 0xf3, 0xf0, 0x81, 0x30, 0x30, 0xff, 0xff, 0x22 ); FCML_A64( "xorq $0xffffffffffffff30,(%rax)", 0x48, 0x81, 0x30, 0x30, 0xff, 0xff, 0xff ); FCML_A64( "xor (%rax),%dh", 0x32, 0x30 ); } void fcml_tf_instruction_XORPD(void) { FCML_I64( "xorpd xmm0,xmmword ptr [rax+0000000000000020h]", 0x66, 0x0F, 0x57, 0x40, 0x20 ); FCML_I32( "xorpd xmm0,xmmword ptr [eax+00000020h]", 0x66, 0x0F, 0x57, 0x40, 0x20 ); FCML_I64( "vxorpd ymm10,ymm14,ymmword ptr [r9+rax]", 0xC4, 0x41, 0x0D, 0x57, 0x14, 0x01 ); FCML_I32( "vxorpd xmm2,xmm7,xmmword ptr [ecx+eax]", 0xc5, 0xc1, 0x57, 0x14, 0x01 ); FCML_I32( "vxorpd xmm2,xmm2,xmmword ptr [ecx+eax]", 0xc5, 0xe9, 0x57, 0x14, 0x01 ); FCML_A64( "xorpd 0x0000000000000020(%rax),%xmm0", 0x66, 0x0f, 0x57, 0x40, 0x20 ); FCML_A64( "xorpd 0x0000000000000020(%rax),%xmm0", 0x66, 0x0f, 0x57, 0x40, 0x20 ); FCML_A64( "vxorpd (%r9,%rax),%ymm14,%ymm10", 0xc4, 0x41, 0x0d, 0x57, 0x14, 0x01 ); FCML_A64( "vxorpd (%rcx,%rax),%xmm7,%xmm2", 0xc5, 0xc1, 0x57, 0x14, 0x01 ); FCML_A64( "vxorpd (%rcx,%rax),%xmm2,%xmm2", 0xc5, 0xe9, 0x57, 0x14, 0x01 ); } void fcml_tf_instruction_XORPS(void) { FCML_I64( "xorps xmm0,xmmword ptr [rax+0000000000000020h]", 0x0F, 0x57, 0x40, 0x20 ); FCML_I32( "xorps xmm0,xmmword ptr [eax+00000020h]", 0x0F, 0x57, 0x40, 0x20 ); FCML_I64( "vxorps ymm10,ymm14,ymmword ptr [r9+rax]", 0xC4, 0x41, 0x0C, 0x57, 0x14, 0x01 ); FCML_I32( "vxorps xmm2,xmm7,xmmword ptr [ecx+eax]", 0xc5, 0xc0, 0x57, 0x14, 0x01 ); FCML_I32( "vxorps xmm2,xmm2,xmmword ptr [ecx+eax]", 0xc5, 0xe8, 0x57, 0x14, 0x01 ); FCML_A64( "xorps 0x0000000000000020(%rax),%xmm0", 0x0f, 0x57, 0x40, 0x20 ); FCML_A64( "vxorps (%r9,%rax),%ymm14,%ymm10", 0xc4, 0x41, 0x0c, 0x57, 0x14, 0x01 ); FCML_A64( "vxorps (%rcx,%rax),%xmm7,%xmm2", 0xc5, 0xc0, 0x57, 0x14, 0x01 ); FCML_A64( "vxorps (%rcx,%rax),%xmm2,%xmm2", 0xc5, 0xe8, 0x57, 0x14, 0x01 ); } void fcml_tf_instruction_XRSTOR(void) { FCML_I64( "xrstor [rax]", 0x0F, 0xAE, 0x28 ); FCML_I32( "xrstor [eax]", 0x0F, 0xAE, 0x28 ); FCML_I64( "xrstor [rax]", 0x66, 0x0F, 0xAE, 0x28 ); FCML_I32( "xrstor [eax]", 0x66, 0x0F, 0xAE, 0x28 ); FCML_I64( "xrstor64 [rax]", 0x48, 0x0F, 0xAE, 0x28 ); FCML_A64( "xrstor (%rax)", 0x0f, 0xae, 0x28 ); FCML_A64( "xrstor64 (%rax)", 0x48, 0x0f, 0xae, 0x28 ); } void fcml_tf_instruction_XSAVE(void) { FCML_I64( "xsave [rax]", 0x0F, 0xAE, 0x20 ); FCML_I32( "xsave [eax]", 0x0F, 0xAE, 0x20 ); FCML_I64( "xsave [rax]", 0x66, 0x0F, 0xAE, 0x20 ); FCML_I32( "xsave [eax]", 0x66, 0x0F, 0xAE, 0x20 ); FCML_I64( "xsave64 [rax]", 0x48, 0x0F, 0xAE, 0x20 ); FCML_A64( "xsave (%rax)", 0x0f, 0xae, 0x20 ); FCML_A64( "xsave64 (%rax)", 0x48, 0x0f, 0xae, 0x20 ); } void fcml_tf_instruction_XSAVEOPT(void) { FCML_I64( "xsaveopt [rax]", 0x0F, 0xAE, 0x30 ); FCML_I32( "xsaveopt [eax]", 0x0F, 0xAE, 0x30 ); FCML_I64( "xsaveopt [rax]", 0x66, 0x0F, 0xAE, 0x30 ); FCML_I32( "xsaveopt [eax]", 0x66, 0x0F, 0xAE, 0x30 ); FCML_I64( "xsaveopt64 [rax]", 0x48, 0x0F, 0xAE, 0x30 ); FCML_A64( "xsaveopt (%rax)", 0x0f, 0xae, 0x30 ); FCML_A64( "xsaveopt64 (%rax)", 0x48, 0x0f, 0xae, 0x30 ); } void fcml_tf_instruction_XSETBV(void) { FCML_I64( "xsetbv", 0x0F, 0x01, 0xD1 ); FCML_I32( "xsetbv", 0x0F, 0x01, 0xD1 ); FCML_A64( "xsetbv", 0x0f, 0x01, 0xd1 ); } void fcml_tf_instruction_XABORT(void) { FCML_I3264( "xabort 20h", 0xC6, 0xF8, 0x20 ); FCML_A64( "xabort $0x20", 0xc6, 0xf8, 0x20 ); } void fcml_tf_instruction_XBEGIN(void) { FCML_I32( "xbegin 1045h", 0x66, 0xC7, 0xF8, 0x40, 0x00 ); FCML_I32( "xbegin 0ff701006h", 0xC7, 0xF8, 0x00, 0x00, 0x30, 0xFF ); FCML_I32( "xbegin 00401005h", 0xC7, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF ); FCML_I64_A_FAILED( "xbegin 0000800500401006h", 0xC7, 0xF8, 0x00, 0x00, 0x00, 0x00 ); FCML_I64( "xbegin 0000800000401005h", 0xC7, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF ); FCML_A64( "xbegin 0x0000800000401005", 0xc7, 0xf8, 0xff, 0xff, 0xff, 0xff ); } void fcml_tf_instruction_XEND(void) { FCML_I32( "xend", 0x0F, 0x01, 0xD5 ); FCML_I64( "xend", 0x0F, 0x01, 0xD5 ); FCML_A64( "xend", 0x0f, 0x01, 0xd5 ); FCML_A64( "xend", 0x0f, 0x01, 0xd5 ); } void fcml_tf_instruction_XTEST(void) { FCML_I32( "xtest", 0x0F, 0x01, 0xD6 ); FCML_I64( "xtest", 0x0F, 0x01, 0xD6 ); FCML_A64( "xtest", 0x0f, 0x01, 0xd6 ); FCML_A64( "xtest", 0x0f, 0x01, 0xd6 ); } fcml_stf_test_case fctl_ti_instructions_x[] = { { "fcml_tf_instruction_XADD", fcml_tf_instruction_XADD }, { "fcml_tf_instruction_XCHG", fcml_tf_instruction_XCHG }, { "fcml_tf_instruction_XGETBV", fcml_tf_instruction_XGETBV }, { "fcml_tf_instruction_XLAT", fcml_tf_instruction_XLAT }, { "fcml_tf_instruction_XOR", fcml_tf_instruction_XOR }, { "fcml_tf_instruction_XORPD", fcml_tf_instruction_XORPD }, { "fcml_tf_instruction_XORPS", fcml_tf_instruction_XORPS }, { "fcml_tf_instruction_XRSTOR", fcml_tf_instruction_XRSTOR }, { "fcml_tf_instruction_XSAVE", fcml_tf_instruction_XSAVE }, { "fcml_tf_instruction_XSAVEOPT", fcml_tf_instruction_XSAVEOPT }, { "fcml_tf_instruction_XSETBV", fcml_tf_instruction_XSETBV }, { "fcml_tf_instruction_XABORT", fcml_tf_instruction_XABORT }, { "fcml_tf_instruction_XBEGIN", fcml_tf_instruction_XBEGIN }, { "fcml_tf_instruction_XEND", fcml_tf_instruction_XEND }, { "fcml_tf_instruction_XTEST", fcml_tf_instruction_XTEST }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_x = { "suite-fctl_ti_instructions_x", fcml_tf_instructions_x_suite_init, fcml_tf_instructions_x_suite_cleanup, fctl_ti_instructions_x }; fcml-1.1.1/check/public-tests/instructions_t_t.h0000644000175000017500000000171412560745216016645 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_T_H_ #define INS_T_H_ #include extern fcml_stf_test_suite fctl_si_instructions_t; #endif /* INS_T_H_ */ fcml-1.1.1/check/public-tests/instructions_j_t.h0000644000175000017500000000171412560745216016633 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_J_H_ #define INS_J_H_ #include extern fcml_stf_test_suite fctl_si_instructions_j; #endif /* INS_J_H_ */ fcml-1.1.1/check/public-tests/error_handling_t.h0000644000175000017500000000174712560745216016561 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 ERROR_HANDLING_H_ #define ERROR_HANDLING_H_ #include extern fcml_stf_test_suite fcml_si_error_handling; #endif /* ERROR_HANDLING_H_ */ fcml-1.1.1/check/public-tests/instructions_g_t.c0000644000175000017500000000275612560745216016632 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "instructions_g_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_g_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_g_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_GETSEC(void) { FCML_I3264( "getsec", 0x0F, 0x37 ); FCML_A64( "getsec", 0x0f, 0x37 ); } fcml_stf_test_case fctl_ti_instructions_g[] = { { "fcml_tf_instruction_GETSEC", fcml_tf_instruction_GETSEC }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_g = { "suite-fctl_ti_instructions_g", fcml_tf_instructions_g_suite_init, fcml_tf_instructions_g_suite_cleanup, fctl_ti_instructions_g }; fcml-1.1.1/check/public-tests/instructions_r_t.c0000644000175000017500000004756312560745216016652 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "instructions_r_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_r_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_r_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_RCL(void) { FCML_I32_M( "rcl byte ptr [eax],01h", 2, FCML_MI( 0xc0, 0x10, 0x01 ), FCML_MI( 0xd0, 0x10 ) ); FCML_I3264_M( "rcl al,01h", 2, FCML_MI( 0xc0, 0xd0, 0x01 ), FCML_MI( 0xd0, 0xd0 ) ); FCML_A32_M( "rclb $0x01,(%eax)", 2, FCML_MI( 0xc0, 0x10, 0x01 ), FCML_MI( 0xd0, 0x10 ) ); FCML_A3264_M( "rcl $0x01,%al", 2, FCML_MI( 0xc0, 0xd0, 0x01 ), FCML_MI( 0xd0, 0xd0 ) ); FCML_I32( "rcl byte ptr [eax],cl", 0xD2, 0x10 ); FCML_I32( "rcl al,cl", 0xD2, 0xD0 ); FCML_A64( "rclb %cl,(%rax)", 0xd2, 0x10 ); FCML_I64_D( "rcl al,cl", 0x48, 0xD2, 0xD0 ); FCML_I32( "rcl byte ptr [eax],0ffh", 0xc0, 0x10, 0xff ); FCML_I32( "rcl byte ptr [eax],0ffh", 0xc0, 0x10, 0xff ); FCML_A64( "rclb $0xff,(%rax)", 0xc0, 0x10, 0xff ); FCML_I32( "rcl al,0ffh", 0xC0, 0xD0, 0xFF ); FCML_I64_D( "rcl al,0ffh", 0x48, 0xC0, 0xD0, 0xFF ); FCML_A64( "rcl $0xff,%al", 0xc0, 0xd0, 0xff ); FCML_I32_M( "rcl dword ptr [eax],01h", 2, FCML_MI( 0xc1, 0x10, 0x01 ), FCML_MI( 0xd1, 0x10 ) ); FCML_I32_M( "rcl eax,01h", 2, FCML_MI( 0xc1, 0xd0, 0x01 ), FCML_MI( 0xd1, 0xd0 ) ); FCML_I64_D( "rcl rax,01h", 0x48, 0xD1, 0xD0 ); FCML_A64_M( "rcll $0x01,(%rax)", 2, FCML_MI( 0xc1, 0x10, 0x01 ), FCML_MI( 0xd1, 0x10 ) ); FCML_A64_M( "rcl $0x01,%eax", 2, FCML_MI( 0xc1, 0xd0, 0x01 ), FCML_MI( 0xd1, 0xd0 ) ); FCML_I32( "rcl dword ptr [eax],cl", 0xD3, 0x10 ); FCML_I32( "rcl eax,cl", 0xD3, 0xD0 ); FCML_I64_D( "rcl rax,cl", 0x48, 0xD3, 0xD0 ); FCML_A64( "rcl %cl,%eax", 0xd3, 0xd0 ); FCML_A64( "rcl %cl,%rax", 0x48, 0xd3, 0xd0 ); FCML_I32( "rcl dword ptr [eax],0ffh", 0xC1, 0x10, 0xff ); FCML_I32( "rcl eax,0ffh", 0xC1, 0xD0, 0xff ); FCML_I64_D( "rcl rax,0ffh", 0x48, 0xC1, 0xD0, 0xff ); FCML_A64( "rcl $0xff,%eax", 0xc1, 0xd0, 0xff ); FCML_A64( "rcl $0xff,%rax", 0x48, 0xc1, 0xd0, 0xff ); } void fcml_tf_instruction_RCR(void) { FCML_I32_M( "rcr byte ptr [eax],01h", 2, FCML_MI( 0xc0, 0x18, 0x01 ), FCML_MI( 0xd0, 0x18 ) ); FCML_I32_M( "rcr al,01h", 2, FCML_MI( 0xc0, 0xd8, 0x01 ), FCML_MI( 0xd0, 0xd8 ) ); FCML_I64_M( "rcr al,01h", 2, FCML_MI( 0xc0, 0xd8, 0x01 ), FCML_MI( 0xd0, 0xd8 ) ); FCML_A64( "rcr $0x00,%al", 0xc0, 0xd8, 0x00 ); FCML_A64_M( "rcrb $0x01,(%rax)", 2, FCML_MI( 0xc0, 0x18, 0x01 ), FCML_MI( 0xd0, 0x18 ) ); FCML_I32( "rcr byte ptr [eax],cl", 0xD2, 0x18 ); FCML_I32( "rcr al,cl", 0xD2, 0xD8 ); FCML_I64_D( "rcr al,cl", 0x48, 0xD2, 0xD8 ); FCML_A64( "rcr %cl,%al", 0xd2, 0xd8 ); FCML_A64( "rcrb %cl,(%rax)", 0xd2, 0x18 ); FCML_I32( "rcr byte ptr [eax],0ffh", 0xC0, 0x18, 0xFF ); FCML_I32( "rcr al,0ffh", 0xC0, 0xD8, 0xFF ); FCML_I64_D( "rcr al,0ffh", 0x48, 0xC0, 0xD8, 0xFF ); FCML_A64( "rcrb $0xff,(%rax)", 0xc0, 0x18, 0xff ); FCML_A64( "rcr $0xff,%al", 0xc0, 0xd8, 0xff ); FCML_I32_M( "rcr dword ptr [eax],01h", 2, FCML_MI( 0xc1, 0x18, 0x01 ), FCML_MI( 0xd1, 0x18 ) ); FCML_I32_M( "rcr eax,01h", 2, FCML_MI( 0xc1, 0xd8, 0x01 ), FCML_MI( 0xd1, 0xd8 ) ); FCML_I64_D( "rcr rax,01h", 0x48, 0xD1, 0xD8 ); FCML_A64_M( "rcrl $0x01,(%rax)", 2, FCML_MI( 0xc1, 0x18, 0x01 ), FCML_MI( 0xd1, 0x18 ) ); FCML_A64_M( "rcr $0x01,%eax", 2, FCML_MI( 0xc1, 0xd8, 0x01 ), FCML_MI( 0xd1, 0xd8 ) ); FCML_I32( "rcr dword ptr [eax],cl", 0xD3, 0x18 ); FCML_I32( "rcr eax,cl", 0xD3, 0xD8 ); FCML_I64_D( "rcr rax,cl", 0x48, 0xD3, 0xD8 ); FCML_A64( "rcrl %cl,(%rax)", 0xd3, 0x18 ); FCML_A64( "rcr %cl,%eax", 0xd3, 0xd8 ); FCML_I32( "rcr dword ptr [eax],0ffh", 0xC1, 0x18, 0xff ); FCML_I32( "rcr eax,0ffh", 0xC1, 0xD8, 0xff ); FCML_I64( "rcr rax,0ffh", 0x48, 0xC1, 0xD8, 0xff ); FCML_A64( "rcr $0xff,%eax", 0xc1, 0xd8, 0xff ); FCML_A64( "rcrl $0xff,(%rax)", 0xc1, 0x18, 0xff ); } void fcml_tf_instruction_ROL(void) { FCML_I32_M( "rol byte ptr [eax],01h", 2, FCML_MI( 0xc0, 0x00, 0x01 ), FCML_MI( 0xd0, 0x00 ) ); FCML_I32_M( "rol al,01h", 2, FCML_MI( 0xc0, 0xc0, 0x01 ), FCML_MI( 0xd0, 0xc0 ) ); FCML_I64_D( "rol al,01h", 0x48, 0xD0, 0xC0 ); FCML_A64_M( "rolb $0x01,(%rax)", 2, FCML_MI( 0xc0, 0x00, 0x01 ), FCML_MI( 0xd0, 0x00 ) ); FCML_A64_M( "rol $0x01,%al", 2, FCML_MI( 0xc0, 0xc0, 0x01 ), FCML_MI( 0xd0, 0xc0 ) ); FCML_I32( "rol byte ptr [eax],cl", 0xD2, 0x00 ); FCML_I32( "rol al,cl", 0xD2, 0xC0 ); FCML_I64_D( "rol al,cl", 0x48, 0xD2, 0xC0 ); FCML_A64( "rolb %cl,(%rax)", 0xd2, 0x00 ); FCML_I32( "rol byte ptr [eax],0ffh", 0xC0, 0x00, 0xFF ); FCML_I32( "rol al,0ffh", 0xC0, 0xC0, 0xFF ); FCML_I64_D( "rol al,0ffh", 0x48, 0xC0, 0xC0, 0xFF ); FCML_A64( "rolb $0xff,(%rax)", 0xc0, 0x00, 0xff ); FCML_A64( "rol $0xff,%al", 0xc0, 0xc0, 0xff ); FCML_I32_M( "rol dword ptr [eax],01h", 2, FCML_MI( 0xc1, 0x00, 0x01 ), FCML_MI( 0xd1, 0x00 ) ); FCML_I32_M( "rol eax,01h", 2, FCML_MI( 0xc1, 0xc0, 0x01 ), FCML_MI( 0xd1, 0xc0 ) ); FCML_I64_D( "rol rax,01h", 0x48, 0xD1, 0xC0 ); FCML_A64_M( "rol $0x01,%eax", 2, FCML_MI( 0xc1, 0xc0, 0x01 ), FCML_MI( 0xd1, 0xc0 ) ); FCML_I32( "rol dword ptr [eax],cl", 0xD3, 0x00 ); FCML_I32( "rol eax,cl", 0xD3, 0xC0 ); FCML_I64_D( "rol rax,cl", 0x48, 0xD3, 0xC0 ); FCML_A64( "rol %cl,%eax", 0xd3, 0xc0 ); FCML_A64( "roll %cl,(%rax)", 0xd3, 0x00 ); FCML_I32( "rol dword ptr [eax],0ffh", 0xC1, 0x00, 0xff ); FCML_I32( "rol eax,0ffh", 0xC1, 0xC0, 0xff ); FCML_I64( "rol rax,0ffh", 0x48, 0xC1, 0xC0, 0xff ); FCML_A64( "roll $0xff,(%rax)", 0xc1, 0x00, 0xff ); FCML_A64( "rol $0xff,%eax", 0xc1, 0xc0, 0xff ); } void fcml_tf_instruction_ROR(void) { FCML_I32_M( "ror byte ptr [eax],01h", 2, FCML_MI( 0xc0, 0x08, 0x01 ), FCML_MI( 0xd0, 0x08 ) ); FCML_I32_M( "ror al,01h", 2, FCML_MI( 0xc0, 0xc8, 0x01 ), FCML_MI( 0xd0, 0xc8 ) ); FCML_I64_D( "ror al,01h", 0x48, 0xD0, 0xC8 ); FCML_A64_M( "rorb $0x01,(%rax)", 2, FCML_MI( 0xc0, 0x08, 0x01 ), FCML_MI( 0xd0, 0x08 ) ); FCML_A64_M( "ror $0x01,%al", 2, FCML_MI( 0xc0, 0xc8, 0x01 ), FCML_MI( 0xd0, 0xc8 ) ); FCML_I32( "ror byte ptr [eax],cl", 0xD2, 0x08 ); FCML_I32( "ror al,cl", 0xD2, 0xC8 ); FCML_I64_D( "ror al,cl", 0x48, 0xD2, 0xC8 ); FCML_A64( "rorb %cl,(%rax)", 0xd2, 0x08 ); FCML_A64( "ror %cl,%al", 0xd2, 0xc8 ); FCML_I32( "ror byte ptr [eax],0ffh", 0xC0, 0x08, 0xFF ); FCML_I32( "ror al,0ffh", 0xC0, 0xC8, 0xFF ); FCML_I64_D( "ror al,0ffh", 0x48, 0xC0, 0xC8, 0xFF ); FCML_A64( "rorb $0xff,(%rax)", 0xc0, 0x08, 0xff ); FCML_A64( "ror $0xff,%al", 0xc0, 0xc8, 0xff ); FCML_I32_M( "ror dword ptr [eax],01h", 2, FCML_MI( 0xc1, 0x08, 0x01 ), FCML_MI( 0xd1, 0x08 ) ); FCML_I32_M( "ror eax,01h", 2, FCML_MI( 0xc1, 0xc8, 0x01 ), FCML_MI( 0xd1, 0xc8 ) ); FCML_I64_M( "ror rax,01h", 2, FCML_MI( 0x48, 0xc1, 0xc8, 0x01 ), FCML_MI( 0x48, 0xd1, 0xc8 ) ); FCML_A32_M( "rorl $0x01,(%eax)", 2, FCML_MI( 0xc1, 0x08, 0x01 ), FCML_MI( 0xd1, 0x08 ) ); FCML_A32_M( "rorw $0x01,(%eax)", 2, FCML_MI( 0x66, 0xc1, 0x08, 0x01 ), FCML_MI( 0x66, 0xd1, 0x08 ) ); FCML_A64_M( "rorq $0x01,(%rax)", 2, FCML_MI( 0x48, 0xc1, 0x08, 0x01 ), FCML_MI( 0x48, 0xd1, 0x08 ) ); FCML_I32( "ror dword ptr [eax],cl", 0xD3, 0x08 ); FCML_I32( "ror eax,cl", 0xD3, 0xC8 ); FCML_I64( "ror rax,cl", 0x48, 0xD3, 0xC8 ); FCML_A64( "rorl %cl,(%rax)", 0xd3, 0x08 ); FCML_I32( "ror dword ptr [eax],0ffh", 0xC1, 0x08, 0xff ); FCML_I32( "ror eax,0ffh", 0xC1, 0xC8, 0xff ); FCML_I64( "ror rax,0ffh", 0x48, 0xC1, 0xC8, 0xff ); FCML_A64( "rorl $0xff,(%rax)", 0xc1, 0x08, 0xff ); FCML_A64( "ror $0xff,%eax", 0xc1, 0xc8, 0xff ); } void fcml_tf_instruction_RCPPS(void) { FCML_I64( "rcpps xmm0,xmmword ptr [rax]", 0x0F, 0x53, 0x00 ); FCML_I32( "rcpps xmm0,xmm1", 0x0F, 0x53, 0xC1 ); FCML_I32( "vrcpps xmm2,xmmword ptr [eax]", 0xc5, 0xf8, 0x53, 0x10 ); FCML_I32_A( "vrcpps long_form xmm2,xmmword ptr [eax]", 0xc4, 0xe1, 0x78, 0x53, 0x10 ); FCML_I64( "vrcpps ymm2,ymmword ptr [rax]", 0xc5, 0xfc, 0x53, 0x10 ); FCML_A64( "rcpps (%rax),%xmm0", 0x0f, 0x53, 0x00 ); FCML_A64( "rcpps %xmm1,%xmm0", 0x0f, 0x53, 0xc1 ); FCML_A64( "vrcpps (%rax),%xmm2", 0xc5, 0xf8, 0x53, 0x10 ); FCML_A64( "vrcpps (%rax),%ymm2", 0xc5, 0xfc, 0x53, 0x10 ); } void fcml_tf_instruction_RCPSS(void) { FCML_I32( "rcpss xmm2,dword ptr [eax]", 0xF3, 0x0F, 0x53, 0x10 ); FCML_I32( "rcpss xmm3,xmm0", 0xF3, 0x0F, 0x53, 0xD8 ); FCML_I64( "rcpss xmm2,dword ptr [rax]", 0xF3, 0x0F, 0x53, 0x10 ); FCML_I64( "vrcpss xmm3,xmm3,xmm0", 0xc5, 0xe2, 0x53, 0xd8 ); FCML_I32( "vrcpss xmm3,xmm7,xmm0", 0xc5, 0xc2, 0x53, 0xd8 ); FCML_I32( "vrcpss xmm3,xmm0,dword ptr [eax]", 0xc5, 0xfa, 0x53, 0x18 ); FCML_A64( "rcpss (%rax),%xmm2", 0xf3, 0x0f, 0x53, 0x10 ); FCML_A64( "rcpss %xmm0,%xmm3", 0xf3, 0x0f, 0x53, 0xd8 ); FCML_A64( "rcpss (%rax),%xmm2", 0xf3, 0x0f, 0x53, 0x10 ); FCML_A64( "vrcpss %xmm0,%xmm3,%xmm3", 0xc5, 0xe2, 0x53, 0xd8 ); FCML_A64( "vrcpss %xmm0,%xmm7,%xmm3", 0xc5, 0xc2, 0x53, 0xd8 ); FCML_A64( "vrcpss (%rax),%xmm0,%xmm3", 0xc5, 0xfa, 0x53, 0x18 ); } void fcml_tf_instruction_RDFSBASE(void) { FCML_I32_FAILED( "rdfsbase eax", 0x66, 0xF3, 0x0F, 0xAE, 0xC0 ); FCML_I64( "rdfsbase eax", 0xF3, 0x0F, 0xAE, 0xC0 ); FCML_I64_D( "rdfsbase eax", 0x66, 0xF3, 0x0F, 0xAE, 0xC0 ); FCML_I64( "rdfsbase rax", 0xF3, 0x48, 0x0F, 0xAE, 0xC0 ); FCML_I32_FAILED( "rdgsbase eax", 0xF3, 0x0F, 0xAE, 0xC8 ); FCML_I64( "rdgsbase eax", 0xF3, 0x0F, 0xAE, 0xC8 ); FCML_I64_D( "rdgsbase eax", 0x66, 0xF3, 0x0F, 0xAE, 0xC8 ); FCML_I64( "rdgsbase rax", 0xF3, 0x48, 0x0F, 0xAE, 0xC8 ); FCML_A64( "rdfsbase %eax", 0xf3, 0x0f, 0xae, 0xc0 ); FCML_A64( "rdfsbase %rax", 0xf3, 0x48, 0x0f, 0xae, 0xc0 ); FCML_A64( "rdgsbase %eax", 0xf3, 0x0f, 0xae, 0xc8 ); FCML_A64( "rdgsbase %rax", 0xf3, 0x48, 0x0f, 0xae, 0xc8 ); } void fcml_tf_instruction_RDRAND(void) { FCML_I32( "rdrand ax", 0x66, 0x0F, 0xC7, 0xF0 ); FCML_I64( "rdrand ax", 0x66, 0x0F, 0xC7, 0xF0 ); FCML_I32( "rdrand eax", 0x0F, 0xC7, 0xF0 ); FCML_I64( "rdrand eax", 0x0F, 0xC7, 0xF0 ); FCML_I64( "rdrand rax", 0x48, 0x0F, 0xC7, 0xF0 ); FCML_A64( "rdrand %ax", 0x66, 0x0f, 0xc7, 0xf0 ); FCML_A64( "rdrand %eax", 0x0f, 0xc7, 0xf0 ); FCML_A64( "rdrand %rax", 0x48, 0x0f, 0xc7, 0xf0 ); } void fcml_tf_instruction_RDTSCP(void) { FCML_I32( "rdtscp", 0x0f, 0x01, 0xf9 ); FCML_I64( "rdtscp", 0x0f, 0x01, 0xf9 ); FCML_A64( "rdtscp", 0x0f, 0x01, 0xf9 ); } void fcml_tf_instruction_RDTSC(void) { FCML_I3264( "rdtsc", 0x0F, 0x31 ); FCML_A3264( "rdtsc", 0x0F, 0x31 ); } void fcml_tf_instruction_RDPMC(void) { FCML_I3264( "rdpmc", 0x0F, 0x33 ); FCML_A64( "rdpmc", 0x0f, 0x33 ); } void fcml_tf_instruction_RDMSR(void) { FCML_I3264( "rdmsr", 0x0F, 0x32 ); FCML_A64( "rdmsr", 0x0f, 0x32 ); } void fcml_tf_instruction_RET(void) { FCML_I3264( "ret", 0xC3 ); FCML_I3264( "retf", 0xCB ); FCML_I3264( "ret 0ffffh", 0xC2, 0xFF, 0xFF ); FCML_I3264( "retf 0ffffh", 0xCA, 0xFF, 0xFF ); FCML_A64( "retq", 0xc3 ); FCML_A32( "ret", 0xc3 ); FCML_A64( "retw", 0x66, 0xc3 ); FCML_A32( "ret $0xffff", 0xc2, 0xff, 0xff ); FCML_A64( "retq $0xffff", 0xc2, 0xff, 0xff ); FCML_A64( "retw $0xffff", 0x66, 0xc2, 0xff, 0xff ); FCML_A64( "lretw", 0x66, 0xcb ); FCML_A64( "lret", 0xcb ); FCML_A64( "lretq", 0x48, 0xcb ); FCML_A64( "lretq $0xffff", 0x48, 0xca, 0xff, 0xff ); FCML_A32( "lret $0xffff", 0xca, 0xff, 0xff ); FCML_A64( "lretw $0xffff", 0x66, 0xca, 0xff, 0xff ); } void fcml_tf_instruction_ROUNDPD(void) { FCML_I64( "roundpd xmm0,xmmword ptr [rax],0ffh", 0x66, 0x0F, 0x3A, 0x09, 0x00, 0xFF ); FCML_I32( "roundpd xmm0,xmm1,0ffh", 0x66, 0x0F, 0x3A, 0x09, 0xC1, 0xFF ); FCML_I64( "vroundpd xmm3,xmm0,0ffh", 0xC4, 0xE3, 0x79, 0x09, 0xD8, 0xFF ); FCML_I32( "vroundpd xmm3,xmm0,0ffh", 0xC4, 0xE3, 0x79, 0x09, 0xD8, 0xFF ); FCML_I32( "vroundpd ymm0,ymmword ptr [eax],0ffh", 0xC4, 0xE3, 0x7D, 0x09, 0x00, 0xFF ); FCML_A64( "roundpd $0xff,(%rax),%xmm0", 0x66, 0x0f, 0x3a, 0x09, 0x00, 0xff ); FCML_A64( "roundpd $0xff,%xmm1,%xmm0", 0x66, 0x0f, 0x3a, 0x09, 0xc1, 0xff ); FCML_A64( "vroundpd $0xff,%xmm0,%xmm3", 0xc4, 0xe3, 0x79, 0x09, 0xd8, 0xff ); FCML_A64( "vroundpd $0xff,%xmm0,%xmm3", 0xc4, 0xe3, 0x79, 0x09, 0xd8, 0xff ); FCML_A64( "vroundpd $0xff,(%rax),%ymm0", 0xc4, 0xe3, 0x7d, 0x09, 0x00, 0xff ); } void fcml_tf_instruction_ROUNDPS(void) { FCML_I64( "roundps xmm0,xmmword ptr [rax],0ffh", 0x66, 0x0F, 0x3A, 0x08, 0x00, 0xFF ); FCML_I32( "roundps xmm0,xmm1,0ffh", 0x66, 0x0F, 0x3A, 0x08, 0xC1, 0xFF ); FCML_I64( "vroundps xmm3,xmm0,0ffh", 0xC4, 0xE3, 0x79, 0x08, 0xD8, 0xFF ); FCML_I32( "vroundps xmm3,xmm0,0ffh", 0xC4, 0xE3, 0x79, 0x08, 0xD8, 0xFF ); FCML_I32( "vroundps ymm0,ymmword ptr [eax],0ffh", 0xC4, 0xE3, 0x7D, 0x08, 0x00, 0xFF ); FCML_A64( "roundps $0xff,(%rax),%xmm0", 0x66, 0x0f, 0x3a, 0x08, 0x00, 0xff ); FCML_A64( "roundps $0xff,%xmm1,%xmm0", 0x66, 0x0f, 0x3a, 0x08, 0xc1, 0xff ); FCML_A64( "vroundps $0xff,%xmm0,%xmm3", 0xc4, 0xe3, 0x79, 0x08, 0xd8, 0xff ); FCML_A64( "vroundps $0xff,%xmm0,%xmm3", 0xc4, 0xe3, 0x79, 0x08, 0xd8, 0xff ); FCML_A64( "vroundps $0xff,(%rax),%ymm0", 0xc4, 0xe3, 0x7d, 0x08, 0x00, 0xff ); } void fcml_tf_instruction_ROUNDSD(void) { FCML_I64( "roundsd xmm0,mmword ptr [rax],0ffh", 0x66, 0x0F, 0x3A, 0x0B, 0x00, 0xFF ); FCML_I32( "roundsd xmm0,xmm1,0ffh", 0x66, 0x0F, 0x3A, 0x0B, 0xC1, 0xFF ); FCML_I64( "vroundsd xmm3,xmm0,xmm0,0ffh", 0xC4, 0xE3, 0x79, 0x0B, 0xD8, 0xFF ); FCML_I32( "vroundsd xmm3,xmm3,xmm0,0ffh", 0xC4, 0xE3, 0x61, 0x0B, 0xD8, 0xFF ); FCML_A64( "roundsd $0xff,(%rax),%xmm0", 0x66, 0x0f, 0x3a, 0x0b, 0x00, 0xff ); FCML_A64( "roundsd $0xff,%xmm1,%xmm0", 0x66, 0x0f, 0x3a, 0x0b, 0xc1, 0xff ); FCML_A64( "vroundsd $0xff,%xmm0,%xmm0,%xmm3", 0xc4, 0xe3, 0x79, 0x0b, 0xd8, 0xff ); FCML_A64( "vroundsd $0xff,%xmm0,%xmm3,%xmm3", 0xc4, 0xe3, 0x61, 0x0b, 0xd8, 0xff ); } void fcml_tf_instruction_ROUNDSS(void) { FCML_I64( "roundss xmm0,dword ptr [rax],0ffh", 0x66, 0x0F, 0x3A, 0x0A, 0x00, 0xFF ); FCML_I32( "roundss xmm0,xmm1,0ffh", 0x66, 0x0F, 0x3A, 0x0A, 0xC1, 0xFF ); FCML_I64( "vroundss xmm3,xmm0,xmm0,0ffh", 0xC4, 0xE3, 0x79, 0x0A, 0xD8, 0xFF ); FCML_I32( "vroundss xmm3,xmm6,xmm0,0ffh", 0xC4, 0xE3, 0x49, 0x0A, 0xD8, 0xFF ); FCML_A64( "roundss $0xff,(%rax),%xmm0", 0x66, 0x0f, 0x3a, 0x0a, 0x00, 0xff ); FCML_A64( "roundss $0xff,%xmm1,%xmm0", 0x66, 0x0f, 0x3a, 0x0a, 0xc1, 0xff ); FCML_A64( "vroundss $0xff,%xmm0,%xmm0,%xmm3", 0xc4, 0xe3, 0x79, 0x0a, 0xd8, 0xff ); FCML_A64( "vroundss $0xff,%xmm0,%xmm6,%xmm3", 0xc4, 0xe3, 0x49, 0x0a, 0xd8, 0xff ); } void fcml_tf_instruction_RSM(void) { FCML_I32( "rsm", 0x0F, 0xAA ); FCML_I64_FAILED( "rsm", 0x0F, 0xAA ); FCML_A32( "rsm", 0x0f, 0xaa ); } void fcml_tf_instruction_RSQRTPS(void) { FCML_I64( "rsqrtps xmm0,xmmword ptr [rax]", 0x0F, 0x52, 0x00 ); FCML_I32( "rsqrtps xmm0,xmm1", 0x0F, 0x52, 0xC1 ); FCML_I3264( "vrsqrtps xmm3,xmm0", 0xc5, 0xf8, 0x52, 0xd8 ); FCML_I32( "vrsqrtps ymm0,ymmword ptr [eax]", 0xc5, 0xfc, 0x52, 0x00 ); FCML_A64( "rsqrtps (%rax),%xmm0", 0x0f, 0x52, 0x00 ); FCML_A64( "rsqrtps %xmm1,%xmm0", 0x0f, 0x52, 0xc1 ); FCML_A64( "vrsqrtps %xmm0,%xmm3", 0xc5, 0xf8, 0x52, 0xd8 ); FCML_A64( "vrsqrtps (%rax),%ymm0", 0xc5, 0xfc, 0x52, 0x00 ); } void fcml_tf_instruction_RSQRTSS(void) { FCML_I64( "rsqrtss xmm0,dword ptr [rax]", 0xF3, 0x0F, 0x52, 0x00 ); FCML_I32( "rsqrtss xmm0,xmm1", 0xF3, 0x0F, 0x52, 0xC1 ); FCML_I64( "vrsqrtss xmm0,xmm6,dword ptr [rax]", 0xc5, 0xca, 0x52, 0x00 ); FCML_I32( "vrsqrtss xmm3,xmm6,xmm0", 0xc5, 0xca, 0x52, 0xd8 ); FCML_A64( "rsqrtss (%rax),%xmm0", 0xf3, 0x0f, 0x52, 0x00 ); FCML_A64( "rsqrtss %xmm1,%xmm0", 0xf3, 0x0f, 0x52, 0xc1 ); FCML_A64( "vrsqrtss (%rax),%xmm6,%xmm0", 0xc5, 0xca, 0x52, 0x00 ); FCML_A64( "vrsqrtss %xmm0,%xmm6,%xmm3", 0xc5, 0xca, 0x52, 0xd8 ); } void fcml_tf_instruction_RORX(void) { FCML_I32_D( "rorx eax,dword ptr [eax],01h", 0xC4, 0xE3, 0x43, 0xF0, 0x00, 0x01 ); FCML_I32( "rorx eax,dword ptr [eax],01h", 0xc4, 0xe3, 0x7b, 0xf0, 0x00, 0x01 ); FCML_I32_D( "rorx eax,eax,01h", 0xC4, 0xE3, 0x43, 0xF0, 0xC0, 0x01 ); FCML_I32( "rorx eax,eax,01h", 0xc4, 0xe3, 0x7b, 0xf0, 0xc0, 0x01 ); FCML_I64_D( "rorx rax,qword ptr [rax],01h", 0xC4, 0xE3, 0xC3, 0xF0, 0x00, 0x01 ); FCML_I64( "rorx rax,qword ptr [rax],01h", 0xc4, 0xe3, 0xfb, 0xf0, 0x00, 0x01 ); FCML_I64_D( "rorx rax,rax,01h", 0xC4, 0xE3, 0xC3, 0xF0, 0xC0, 0x01 ); FCML_I64( "rorx rax,rax,01h", 0xc4, 0xe3, 0xfb, 0xf0, 0xc0, 0x01 ); FCML_A64( "rorx $0x01,(%rax),%eax", 0xc4, 0xe3, 0x7b, 0xf0, 0x00, 0x01 ); FCML_A64( "rorx $0x01,%eax,%eax", 0xc4, 0xe3, 0x7b, 0xf0, 0xc0, 0x01 ); FCML_A64( "rorx $0x01,(%rax),%rax", 0xc4, 0xe3, 0xfb, 0xf0, 0x00, 0x01 ); FCML_A64( "rorx $0x01,%rax,%rax", 0xc4, 0xe3, 0xfb, 0xf0, 0xc0, 0x01 ); } void fcml_tf_instruction_RDSEED(void) { FCML_I32( "rdseed ax", 0x66, 0x0F, 0xC7, 0xF8 ); FCML_I64( "rdseed ax", 0x66, 0x0F, 0xC7, 0xF8 ); FCML_I32( "rdseed eax", 0x0F, 0xC7, 0xF8 ); FCML_I64( "rdseed eax", 0x0F, 0xC7, 0xF8 ); FCML_I64( "rdseed rax", 0x48, 0x0F, 0xC7, 0xF8 ); FCML_A64( "rdseed %ax", 0x66, 0x0f, 0xc7, 0xf8 ); FCML_A64( "rdseed %ax", 0x66, 0x0f, 0xc7, 0xf8 ); FCML_A64( "rdseed %eax", 0x0f, 0xc7, 0xf8 ); FCML_A64( "rdseed %eax", 0x0f, 0xc7, 0xf8 ); FCML_A64( "rdseed %rax", 0x48, 0x0f, 0xc7, 0xf8 ); } fcml_stf_test_case fctl_ti_instructions_r[] = { { "fcml_tf_instruction_RCL", fcml_tf_instruction_RCL }, { "fcml_tf_instruction_RCR", fcml_tf_instruction_RCR }, { "fcml_tf_instruction_ROL", fcml_tf_instruction_ROL }, { "fcml_tf_instruction_ROR", fcml_tf_instruction_ROR }, { "fcml_tf_instruction_RCPPS", fcml_tf_instruction_RCPPS }, { "fcml_tf_instruction_RCPSS", fcml_tf_instruction_RCPSS }, { "fcml_tf_instruction_RDFSBASE", fcml_tf_instruction_RDFSBASE }, { "fcml_tf_instruction_RDRAND", fcml_tf_instruction_RDRAND }, { "fcml_tf_instruction_RDTSCP", fcml_tf_instruction_RDTSCP }, { "fcml_tf_instruction_RDTSC", fcml_tf_instruction_RDTSC }, { "fcml_tf_instruction_RDPMC", fcml_tf_instruction_RDPMC }, { "fcml_tf_instruction_RDMSR", fcml_tf_instruction_RDMSR }, { "fcml_tf_instruction_RET", fcml_tf_instruction_RET }, { "fcml_tf_instruction_ROUNDPD", fcml_tf_instruction_ROUNDPD }, { "fcml_tf_instruction_ROUNDPS", fcml_tf_instruction_ROUNDPS }, { "fcml_tf_instruction_ROUNDSD", fcml_tf_instruction_ROUNDSD }, { "fcml_tf_instruction_ROUNDSS", fcml_tf_instruction_ROUNDSS }, { "fcml_tf_instruction_RSM", fcml_tf_instruction_RSM }, { "fcml_tf_instruction_RSQRTPS", fcml_tf_instruction_RSQRTPS }, { "fcml_tf_instruction_RSQRTSS", fcml_tf_instruction_RSQRTSS }, { "fcml_tf_instruction_RORX", fcml_tf_instruction_RORX }, { "fcml_tf_instruction_RDSEED", fcml_tf_instruction_RDSEED }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_r = { "suite-fctl_ti_instructions_r", fcml_tf_instructions_r_suite_init, fcml_tf_instructions_r_suite_cleanup, fctl_ti_instructions_r }; fcml-1.1.1/check/public-tests/instructions_p_t.c0000644000175000017500000046014512560745216016643 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "instructions_p_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_p_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_p_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_PABS(void) { FCML_I64( "pabsb mm0,mmword ptr [rax]", 0x0F, 0x38, 0x1C, 0x00 ); FCML_I32( "pabsb mm0,mm1", 0x0F, 0x38, 0x1C, 0xC1 ); FCML_I64( "pabsw mm0,mmword ptr [rax]", 0x0F, 0x38, 0x1D, 0x00 ); FCML_I32( "pabsw mm0,mm1", 0x0F, 0x38, 0x1D, 0xC1 ); FCML_I64( "pabsd mm0,mmword ptr [rax]", 0x0F, 0x38, 0x1E, 0x00 ); FCML_I32( "pabsd mm0,mm1", 0x0F, 0x38, 0x1E, 0xC1 ); FCML_I64( "pabsb xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x1C, 0x00 ); FCML_I32( "pabsb xmm0,xmm1", 0x66, 0x0F, 0x38, 0x1C, 0xC1 ); FCML_I64( "pabsw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x1D, 0x00 ); FCML_I32( "pabsw xmm0,xmm1", 0x66, 0x0F, 0x38, 0x1D, 0xC1 ); FCML_I64( "pabsd xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x1E, 0x00 ); FCML_I32( "pabsd xmm0,xmm1", 0x66, 0x0F, 0x38, 0x1E, 0xC1 ); FCML_I64( "vpabsb xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x1C, 0x00 ); FCML_I32( "vpabsb xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x1C, 0xC1 ); FCML_I64( "vpabsw xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x1D, 0x00 ); FCML_I32( "vpabsw xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x1D, 0xC1 ); FCML_I64( "vpabsd xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x1E, 0x00 ); FCML_I32( "vpabsd xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x1E, 0xC1 ); FCML_I64( "vpabsb ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x1C, 0x00 ); FCML_I32( "vpabsb ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x1C, 0xC1 ); FCML_I64( "vpabsw ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x1D, 0x00 ); FCML_I32( "vpabsw ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x1D, 0xC1 ); FCML_I64( "vpabsd ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x1E, 0x00 ); FCML_I32( "vpabsd ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x1E, 0xC1 ); FCML_A64( "pabsb (%rax),%mm0", 0x0f, 0x38, 0x1c, 0x00 ); FCML_A64( "pabsb %mm1,%mm0", 0x0f, 0x38, 0x1c, 0xc1 ); FCML_A64( "pabsw (%rax),%mm0", 0x0f, 0x38, 0x1d, 0x00 ); FCML_A64( "pabsw %mm1,%mm0", 0x0f, 0x38, 0x1d, 0xc1 ); FCML_A64( "pabsd (%rax),%mm0", 0x0f, 0x38, 0x1e, 0x00 ); FCML_A64( "pabsd %mm1,%mm0", 0x0f, 0x38, 0x1e, 0xc1 ); FCML_A64( "pabsb (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x1c, 0x00 ); FCML_A64( "pabsb %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x1c, 0xc1 ); FCML_A64( "pabsw (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x1d, 0x00 ); FCML_A64( "pabsw %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x1d, 0xc1 ); FCML_A64( "pabsd (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x1e, 0x00 ); FCML_A64( "pabsd %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x1e, 0xc1 ); FCML_A64( "vpabsb (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x1c, 0x00 ); FCML_A64( "vpabsb %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x1c, 0xc1 ); FCML_A64( "vpabsw (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x1d, 0x00 ); FCML_A64( "vpabsw %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x1d, 0xc1 ); FCML_A64( "vpabsd (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x1e, 0x00 ); FCML_A64( "vpabsd %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x1e, 0xc1 ); FCML_A64( "vpabsb (%rax),%ymm0", 0xc4, 0xe2, 0x7d, 0x1c, 0x00 ); FCML_A64( "vpabsb %ymm1,%ymm0", 0xc4, 0xe2, 0x7d, 0x1c, 0xc1 ); FCML_A64( "vpabsw (%rax),%ymm0", 0xc4, 0xe2, 0x7d, 0x1d, 0x00 ); FCML_A64( "vpabsw %ymm1,%ymm0", 0xc4, 0xe2, 0x7d, 0x1d, 0xc1 ); FCML_A64( "vpabsd (%rax),%ymm0", 0xc4, 0xe2, 0x7d, 0x1e, 0x00 ); FCML_A64( "vpabsd %ymm1,%ymm0", 0xc4, 0xe2, 0x7d, 0x1e, 0xc1 ); FCML_A64( "pabsb (%rax),%mm0", 0x0f, 0x38, 0x1c, 0x00 ); FCML_A64( "pabsb %mm1,%mm0", 0x0f, 0x38, 0x1c, 0xc1 ); FCML_A64( "pabsb (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x1c, 0x00 ); FCML_A64( "pabsb %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x1c, 0xc1 ); FCML_A64( "vpabsb (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x1c, 0x00 ); FCML_A64( "vpabsb %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x1c, 0xc1 ); FCML_A64( "vpabsb (%rax),%ymm0", 0xc4, 0xe2, 0x7d, 0x1c, 0x00 ); FCML_A64( "vpabsb %ymm1,%ymm0", 0xc4, 0xe2, 0x7d, 0x1c, 0xc1 ); } void fcml_tf_instruction_PACKSS(void) { FCML_I64( "packsswb mm0,mmword ptr [rax]", 0x0F, 0x63, 0x00 ); FCML_I32( "packsswb mm0,mm1", 0x0F, 0x63, 0xC1 ); FCML_I64( "packssdw mm0,mmword ptr [rax]", 0x0F, 0x6B, 0x00 ); FCML_I32( "packssdw mm0,mm1", 0x0F, 0x6B, 0xC1 ); FCML_I64( "packsswb xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x63, 0x00 ); FCML_I32( "packsswb xmm0,xmm1", 0x66, 0x0F, 0x63, 0xC1 ); FCML_I64( "packssdw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x6b, 0x00 ); FCML_I32( "packssdw xmm0,xmm1", 0x66, 0x0F, 0x6b, 0xC1 ); FCML_I64( "vpacksswb xmm0,xmm3,xmmword ptr [rax]", 0xc5, 0xe1, 0x63, 0x00 ); FCML_I32( "vpacksswb xmm0,xmm3,xmm1", 0xc5, 0xe1, 0x63, 0xc1 ); FCML_I64( "vpackssdw xmm0,xmm3,xmmword ptr [rax]", 0xc5, 0xe1, 0x6b, 0x00 ); FCML_I32( "vpackssdw xmm0,xmm3,xmm1", 0xc5, 0xe1, 0x6b, 0xc1 ); FCML_I64( "vpacksswb ymm0,ymm3,ymmword ptr [rax]", 0xc5, 0xe5, 0x63, 0x00 ); FCML_I64( "vpackssdw ymm0,ymm3,ymmword ptr [rax]", 0xc5, 0xe5, 0x6b, 0x00 ); FCML_I32( "vpacksswb ymm0,ymm3,ymm1", 0xc5, 0xe5, 0x63, 0xc1 ); FCML_I32( "vpackssdw ymm0,ymm3,ymm1", 0xc5, 0xe5, 0x6b, 0xc1 ); FCML_A64( "packsswb (%rax),%mm0", 0x0f, 0x63, 0x00 ); FCML_A64( "packsswb %mm1,%mm0", 0x0f, 0x63, 0xc1 ); FCML_A64( "packssdw (%rax),%mm0", 0x0f, 0x6b, 0x00 ); FCML_A64( "packssdw %mm1,%mm0", 0x0f, 0x6b, 0xc1 ); FCML_A64( "packsswb (%rax),%xmm0", 0x66, 0x0f, 0x63, 0x00 ); FCML_A64( "packsswb %xmm1,%xmm0", 0x66, 0x0f, 0x63, 0xc1 ); FCML_A64( "vpacksswb (%rax),%xmm3,%xmm0", 0xc5, 0xe1, 0x63, 0x00 ); FCML_A64( "vpacksswb %xmm1,%xmm3,%xmm0", 0xc5, 0xe1, 0x63, 0xc1 ); FCML_A64( "vpacksswb (%rax),%ymm3,%ymm0", 0xc5, 0xe5, 0x63, 0x00 ); FCML_A64( "vpackssdw %ymm1,%ymm3,%ymm0", 0xc5, 0xe5, 0x6b, 0xc1 ); } void fcml_tf_instruction_PACKUSD(void) { FCML_I64( "packusdw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x2B, 0x00 ); FCML_I32( "packusdw xmm0,xmm1", 0x66, 0x0F, 0x38, 0x2B, 0xC1 ); FCML_I64( "vpackusdw xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0x61, 0x2B, 0x00 ); FCML_I32( "vpackusdw xmm0,xmm3,xmm1", 0xC4, 0xE2, 0x61, 0x2B, 0xC1 ); FCML_I64( "vpackusdw ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0x65, 0x2B, 0x00 ); FCML_I32( "vpackusdw ymm0,ymm3,ymm1", 0xC4, 0xE2, 0x65, 0x2B, 0xC1 ); FCML_A64( "packusdw (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x2b, 0x00 ); FCML_A64( "packusdw %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x2b, 0xc1 ); FCML_A64( "vpackusdw (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0x2b, 0x00 ); FCML_A64( "vpackusdw %xmm1,%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0x2b, 0xc1 ); FCML_A64( "vpackusdw (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0x2b, 0x00 ); FCML_A64( "vpackusdw %ymm1,%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0x2b, 0xc1 ); } void fcml_tf_instruction_PACKUSW(void) { FCML_I64( "packuswb mm0,mmword ptr [rax]", 0x0F, 0x67, 0x00 ); FCML_I32( "packuswb mm0,mm1", 0x0F, 0x67, 0xC1 ); FCML_I64( "packuswb xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x67, 0x00 ); FCML_I32( "packuswb xmm0,xmm1", 0x66, 0x0F, 0x67, 0xC1 ); FCML_I64( "vpackuswb xmm0,xmm3,xmmword ptr [rax]", 0xc5, 0xe1, 0x67, 0x00 ); FCML_I32( "vpackuswb xmm0,xmm3,xmm1", 0xc5, 0xe1, 0x67, 0xc1 ); FCML_I64( "vpackuswb ymm0,ymm3,ymmword ptr [rax]", 0xc5, 0xe5, 0x67, 0x00 ); FCML_I32( "vpackuswb ymm0,ymm3,ymm1", 0xc5, 0xe5, 0x67, 0xc1 ); FCML_A64( "packuswb (%rax),%mm0", 0x0f, 0x67, 0x00 ); FCML_A64( "packuswb %mm1,%mm0", 0x0f, 0x67, 0xc1 ); FCML_A64( "packuswb (%rax),%xmm0", 0x66, 0x0f, 0x67, 0x00 ); FCML_A64( "packuswb %xmm1,%xmm0", 0x66, 0x0f, 0x67, 0xc1 ); FCML_A64( "vpackuswb (%rax),%xmm3,%xmm0", 0xc5, 0xe1, 0x67, 0x00 ); FCML_A64( "vpackuswb %xmm1,%xmm3,%xmm0", 0xc5, 0xe1, 0x67, 0xc1 ); FCML_A64( "vpackuswb (%rax),%ymm3,%ymm0", 0xc5, 0xe5, 0x67, 0x00 ); FCML_A64( "vpackuswb %ymm1,%ymm3,%ymm0", 0xc5, 0xe5, 0x67, 0xc1 ); } void fcml_tf_instruction_PADD(void) { FCML_I64( "paddb mm0,mmword ptr [rax]", 0x0F, 0xFC, 0x00 ); FCML_I32( "paddb mm0,mm1", 0x0F, 0xFC, 0xC1 ); FCML_I64( "paddw mm0,mmword ptr [rax]", 0x0F, 0xFD, 0x00 ); FCML_I32( "paddw mm0,mm1", 0x0F, 0xFD, 0xC1 ); FCML_I64( "paddd mm0,mmword ptr [rax]", 0x0F, 0xFE, 0x00 ); FCML_I32( "paddd mm0,mm1", 0x0F, 0xFE, 0xC1 ); FCML_I64( "paddb xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xFC, 0x00 ); FCML_I32( "paddb xmm0,xmm1", 0x66, 0x0F, 0xFC, 0xC1 ); FCML_I64( "paddw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xFD, 0x00 ); FCML_I32( "paddw xmm0,xmm1", 0x66, 0x0F, 0xFD, 0xC1 ); FCML_I64( "paddd xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xFE, 0x00 ); FCML_I32( "paddd xmm0,xmm1", 0x66, 0x0F, 0xFE, 0xC1 ); FCML_I64( "vpaddb xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xfc, 0x00 ); FCML_I32( "vpaddb xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xfc, 0xc1 ); FCML_I64( "vpaddw xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xfd, 0x00 ); FCML_I32( "vpaddw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xfd, 0xc1 ); FCML_I64( "vpaddd xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xfe, 0x00 ); FCML_I32( "vpaddd xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xfe, 0xc1 ); FCML_I64( "vpaddb ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xfc, 0x00 ); FCML_I32( "vpaddb ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xfc, 0xc1 ); FCML_I64( "vpaddw ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xfd, 0x00 ); FCML_I32( "vpaddw ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xfd, 0xc1 ); FCML_I64( "vpaddd ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xfe, 0x00 ); FCML_I32( "vpaddd ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xfe, 0xc1 ); FCML_I64( "vpaddq ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xd4, 0x00 ); FCML_I32( "vpaddq ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xd4, 0xc1 ); FCML_A64( "paddb (%rax),%mm0", 0x0f, 0xfc, 0x00 ); FCML_A64( "paddb %mm1,%mm0", 0x0f, 0xfc, 0xc1 ); FCML_A64( "paddw (%rax),%mm0", 0x0f, 0xfd, 0x00 ); FCML_A64( "paddw %mm1,%mm0", 0x0f, 0xfd, 0xc1 ); FCML_A64( "paddd (%rax),%mm0", 0x0f, 0xfe, 0x00 ); FCML_A64( "paddd %mm1,%mm0", 0x0f, 0xfe, 0xc1 ); FCML_A64( "paddb (%rax),%xmm0", 0x66, 0x0f, 0xfc, 0x00 ); FCML_A64( "paddb %xmm1,%xmm0", 0x66, 0x0f, 0xfc, 0xc1 ); FCML_A64( "paddw (%rax),%xmm0", 0x66, 0x0f, 0xfd, 0x00 ); FCML_A64( "paddw %xmm1,%xmm0", 0x66, 0x0f, 0xfd, 0xc1 ); FCML_A64( "paddd (%rax),%xmm0", 0x66, 0x0f, 0xfe, 0x00 ); FCML_A64( "paddd %xmm1,%xmm0", 0x66, 0x0f, 0xfe, 0xc1 ); FCML_A64( "vpaddb (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xfc, 0x00 ); FCML_A64( "vpaddb %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xfc, 0xc1 ); FCML_A64( "vpaddw (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xfd, 0x00 ); FCML_A64( "vpaddw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xfd, 0xc1 ); FCML_A64( "vpaddd (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xfe, 0x00 ); FCML_A64( "vpaddd %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xfe, 0xc1 ); FCML_A64( "vpaddb (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xfc, 0x00 ); FCML_A64( "vpaddb %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xfc, 0xc1 ); FCML_A64( "vpaddw (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xfd, 0x00 ); FCML_A64( "vpaddw %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xfd, 0xc1 ); FCML_A64( "vpaddd (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xfe, 0x00 ); FCML_A64( "vpaddd %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xfe, 0xc1 ); FCML_A64( "vpaddq (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xd4, 0x00 ); FCML_A64( "vpaddq %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xd4, 0xc1 ); } void fcml_tf_instruction_PADDS(void) { FCML_I64( "paddsb mm0,mmword ptr [rax]", 0x0F, 0xEC, 0x00 ); FCML_I32( "paddsb mm0,mm1", 0x0F, 0xEC, 0xC1 ); FCML_I64( "paddsw mm0,mmword ptr [rax]", 0x0F, 0xED, 0x00 ); FCML_I32( "paddsw mm0,mm1", 0x0F, 0xED, 0xC1 ); FCML_I64( "paddsb xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xEC, 0x00 ); FCML_I32( "paddsb xmm0,xmm1", 0x66, 0x0F, 0xEC, 0xC1 ); FCML_I64( "paddsw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xED, 0x00 ); FCML_I32( "paddsw xmm0,xmm1", 0x66, 0x0F, 0xED, 0xC1 ); FCML_I64( "vpaddsb xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xec, 0x00 ); FCML_I32( "vpaddsb xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xec, 0xc1 ); FCML_I64( "vpaddsw xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xed, 0x00 ); FCML_I32( "vpaddsw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xed, 0xc1 ); FCML_I64( "vpaddsb ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xec, 0x00 ); FCML_I32( "vpaddsb ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xec, 0xc1 ); FCML_I64( "vpaddsw ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xed, 0x00 ); FCML_I32( "vpaddsw ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xed, 0xc1 ); FCML_A64( "paddsb (%rax),%mm0", 0x0f, 0xec, 0x00 ); FCML_A64( "paddsb %mm1,%mm0", 0x0f, 0xec, 0xc1 ); FCML_A64( "paddsw (%rax),%mm0", 0x0f, 0xed, 0x00 ); FCML_A64( "paddsw %mm1,%mm0", 0x0f, 0xed, 0xc1 ); FCML_A64( "paddsb (%rax),%xmm0", 0x66, 0x0f, 0xec, 0x00 ); FCML_A64( "paddsb %xmm1,%xmm0", 0x66, 0x0f, 0xec, 0xc1 ); FCML_A64( "paddsw (%rax),%xmm0", 0x66, 0x0f, 0xed, 0x00 ); FCML_A64( "paddsw %xmm1,%xmm0", 0x66, 0x0f, 0xed, 0xc1 ); FCML_A64( "vpaddsb (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xec, 0x00 ); FCML_A64( "vpaddsb %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xec, 0xc1 ); FCML_A64( "vpaddsw (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xed, 0x00 ); FCML_A64( "vpaddsw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xed, 0xc1 ); FCML_A64( "vpaddsb (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xec, 0x00 ); FCML_A64( "vpaddsb %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xec, 0xc1 ); FCML_A64( "vpaddsw (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xed, 0x00 ); FCML_A64( "vpaddsw %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xed, 0xc1 ); } void fcml_tf_instruction_PADDUS(void) { FCML_I64( "paddusb mm0,mmword ptr [rax]", 0x0F, 0xDC, 0x00 ); FCML_I32( "paddusb mm0,mm1", 0x0F, 0xDC, 0xC1 ); FCML_I64( "paddusw mm0,mmword ptr [rax]", 0x0F, 0xDD, 0x00 ); FCML_I32( "paddusw mm0,mm1", 0x0F, 0xDD, 0xC1 ); FCML_I64( "paddusb xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xDC, 0x00 ); FCML_I32( "paddusb xmm0,xmm1", 0x66, 0x0F, 0xDC, 0xC1 ); FCML_I64( "paddusw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xDD, 0x00 ); FCML_I32( "paddusw xmm0,xmm1", 0x66, 0x0F, 0xDD, 0xC1 ); FCML_I64( "vpaddusb xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xdc, 0x00 ); FCML_I32( "vpaddusb xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xdc, 0xc1 ); FCML_I64( "vpaddusw xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xdd, 0x00 ); FCML_I32( "vpaddusw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xdd, 0xc1 ); FCML_I64( "vpaddusb ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xdc, 0x00 ); FCML_I32( "vpaddusb ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xdc, 0xc1 ); FCML_I64( "vpaddusw ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xdd, 0x00 ); FCML_I32( "vpaddusw ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xdd, 0xc1 ); FCML_A64( "paddusb (%rax),%mm0", 0x0f, 0xdc, 0x00 ); FCML_A64( "paddusb %mm1,%mm0", 0x0f, 0xdc, 0xc1 ); FCML_A64( "paddusw (%rax),%mm0", 0x0f, 0xdd, 0x00 ); FCML_A64( "paddusw %mm1,%mm0", 0x0f, 0xdd, 0xc1 ); FCML_A64( "paddusb (%rax),%xmm0", 0x66, 0x0f, 0xdc, 0x00 ); FCML_A64( "paddusb %xmm1,%xmm0", 0x66, 0x0f, 0xdc, 0xc1 ); FCML_A64( "paddusw (%rax),%xmm0", 0x66, 0x0f, 0xdd, 0x00 ); FCML_A64( "paddusw %xmm1,%xmm0", 0x66, 0x0f, 0xdd, 0xc1 ); FCML_A64( "vpaddusb (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xdc, 0x00 ); FCML_A64( "vpaddusb %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xdc, 0xc1 ); FCML_A64( "vpaddusw (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xdd, 0x00 ); FCML_A64( "vpaddusw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xdd, 0xc1 ); FCML_A64( "vpaddusb (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xdc, 0x00 ); FCML_A64( "vpaddusb %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xdc, 0xc1 ); FCML_A64( "vpaddusw (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xdd, 0x00 ); FCML_A64( "vpaddusw %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xdd, 0xc1 ); } void fcml_tf_instruction_PADDQ(void) { FCML_I64( "paddq mm0,mmword ptr [rax]", 0x0F, 0xD4, 0x00 ); FCML_I32( "paddq mm0,mm1", 0x0F, 0xD4, 0xC1 ); FCML_I64( "paddq xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xD4, 0x00 ); FCML_I32( "paddq xmm0,xmm1", 0x66, 0x0F, 0xD4, 0xC1 ); FCML_I64_D( "vpaddq xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE1, 0x79, 0xD4, 0x00 ); FCML_I32_D( "vpaddq xmm0,xmm0,xmm1", 0xC4, 0xE1, 0x79, 0xD4, 0xC1 ); FCML_I64( "vpaddq xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xd4, 0x00 ); FCML_I32( "vpaddq xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xd4, 0xc1 ); FCML_A64( "paddq (%rax),%mm0", 0x0f, 0xd4, 0x00 ); FCML_A64( "paddq %mm1,%mm0", 0x0f, 0xd4, 0xc1 ); FCML_A64( "paddq (%rax),%xmm0", 0x66, 0x0f, 0xd4, 0x00 ); FCML_A64( "paddq %xmm1,%xmm0", 0x66, 0x0f, 0xd4, 0xc1 ); FCML_A64( "vpaddq (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xd4, 0x00 ); FCML_A64( "vpaddq %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xd4, 0xc1 ); FCML_A64( "vpaddq (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xd4, 0x00 ); FCML_A64( "vpaddq %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xd4, 0xc1 ); } void fcml_tf_instruction_PALIGNR(void) { FCML_I64( "palignr mm0,mmword ptr [rax],0ffh", 0x0F, 0x3A, 0x0F, 0x00, 0xFF ); FCML_I32( "palignr mm0,mm1,0ffh", 0x0F, 0x3A, 0x0F, 0xC1, 0xFF ); FCML_I64( "palignr xmm0,xmmword ptr [rax],0ffh", 0x66, 0x0F, 0x3A, 0x0F, 0x00, 0xFF ); FCML_I32( "palignr xmm0,xmm1,0ffh", 0x66, 0x0F, 0x3A, 0x0F, 0xC1, 0xFF ); FCML_I64( "vpalignr xmm0,xmm0,xmmword ptr [rax],0ffh", 0xC4, 0xE3, 0x79, 0x0F, 0x00, 0xFF ); FCML_I32( "vpalignr xmm0,xmm0,xmm1,0ffh", 0xC4, 0xE3, 0x79, 0x0F, 0xC1, 0xFF ); FCML_I64( "vpalignr ymm0,ymm0,ymmword ptr [rax],0ffh", 0xC4, 0xE3, 0x7D, 0x0F, 0x00, 0xFF ); FCML_I32( "vpalignr ymm0,ymm0,ymm1,0ffh", 0xC4, 0xE3, 0x7D, 0x0F, 0xC1, 0xFF ); FCML_A64( "palignr $0xff,(%rax),%mm0", 0x0f, 0x3a, 0x0f, 0x00, 0xff ); FCML_A64( "palignr $0xff,%mm1,%mm0", 0x0f, 0x3a, 0x0f, 0xc1, 0xff ); FCML_A64( "palignr $0xff,(%rax),%xmm0", 0x66, 0x0f, 0x3a, 0x0f, 0x00, 0xff ); FCML_A64( "palignr $0xff,%xmm1,%xmm0", 0x66, 0x0f, 0x3a, 0x0f, 0xc1, 0xff ); FCML_A64( "vpalignr $0xff,(%rax),%xmm0,%xmm0", 0xc4, 0xe3, 0x79, 0x0f, 0x00, 0xff ); FCML_A64( "vpalignr $0xff,%xmm1,%xmm0,%xmm0", 0xc4, 0xe3, 0x79, 0x0f, 0xc1, 0xff ); FCML_A64( "vpalignr $0xff,(%rax),%ymm0,%ymm0", 0xc4, 0xe3, 0x7d, 0x0f, 0x00, 0xff ); FCML_A64( "vpalignr $0xff,%ymm1,%ymm0,%ymm0", 0xc4, 0xe3, 0x7d, 0x0f, 0xc1, 0xff ); } void fcml_tf_instruction_PAND(void) { FCML_I64( "pand mm0,mmword ptr [rax]", 0x0F, 0xDB, 0x00 ); FCML_I32( "pand mm0,mm1", 0x0F, 0xDB, 0xC1 ); FCML_I64( "pand xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xDB, 0x00 ); FCML_I32( "pand xmm0,xmm1", 0x66, 0x0F, 0xDB, 0xC1 ); FCML_I64( "vpand xmm0,xmm2,xmmword ptr [rax]", 0xc5, 0xe9, 0xdb, 0x00 ); FCML_I32( "vpand xmm0,xmm2,xmm1", 0xc5, 0xe9, 0xdb, 0xc1 ); FCML_I64( "vpand ymm0,ymm2,ymmword ptr [rax]", 0xc5, 0xed, 0xdb, 0x00 ); FCML_I32( "vpand ymm0,ymm2,ymm1", 0xc5, 0xed, 0xdb, 0xc1 ); FCML_A64( "pand (%rax),%mm0", 0x0f, 0xdb, 0x00 ); FCML_A64( "pand %mm1,%mm0", 0x0f, 0xdb, 0xc1 ); FCML_A64( "pand (%rax),%xmm0", 0x66, 0x0f, 0xdb, 0x00 ); FCML_A64( "pand %xmm1,%xmm0", 0x66, 0x0f, 0xdb, 0xc1 ); FCML_A64( "vpand (%rax),%xmm2,%xmm0", 0xc5, 0xe9, 0xdb, 0x00 ); FCML_A64( "vpand %xmm1,%xmm2,%xmm0", 0xc5, 0xe9, 0xdb, 0xc1 ); FCML_A64( "vpand (%rax),%ymm2,%ymm0", 0xc5, 0xed, 0xdb, 0x00 ); FCML_A64( "vpand %ymm1,%ymm2,%ymm0", 0xc5, 0xed, 0xdb, 0xc1 ); } void fcml_tf_instruction_PANDN(void) { FCML_I64( "pandn mm0,mmword ptr [rax]", 0x0F, 0xDF, 0x00 ); FCML_I32( "pandn mm0,mm1", 0x0F, 0xDF, 0xC1 ); FCML_I64( "pandn xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xDF, 0x00 ); FCML_I32( "pandn xmm0,xmm1", 0x66, 0x0F, 0xDF, 0xC1 ); FCML_I64( "vpandn xmm0,xmm2,xmmword ptr [rax]", 0xc5, 0xe9, 0xdf, 0x00 ); FCML_I32( "vpandn xmm0,xmm2,xmm1", 0xc5, 0xe9, 0xdf, 0xc1 ); FCML_I64( "vpandn ymm0,ymm2,ymmword ptr [rax]", 0xc5, 0xed, 0xdf, 0x00 ); FCML_I32( "vpandn ymm0,ymm2,ymm1", 0xc5, 0xed, 0xdf, 0xc1 ); FCML_A64( "pandn (%rax),%mm0", 0x0f, 0xdf, 0x00 ); FCML_A64( "pandn %mm1,%mm0", 0x0f, 0xdf, 0xc1 ); FCML_A64( "pandn (%rax),%xmm0", 0x66, 0x0f, 0xdf, 0x00 ); FCML_A64( "pandn %xmm1,%xmm0", 0x66, 0x0f, 0xdf, 0xc1 ); FCML_A64( "vpandn (%rax),%xmm2,%xmm0", 0xc5, 0xe9, 0xdf, 0x00 ); FCML_A64( "vpandn %xmm1,%xmm2,%xmm0", 0xc5, 0xe9, 0xdf, 0xc1 ); FCML_A64( "vpandn (%rax),%ymm2,%ymm0", 0xc5, 0xed, 0xdf, 0x00 ); FCML_A64( "vpandn %ymm1,%ymm2,%ymm0", 0xc5, 0xed, 0xdf, 0xc1 ); } void fcml_tf_instruction_PAUSE(void) { FCML_I3264( "pause", 0xF3, 0x90 ); FCML_A64( "pause", 0xf3, 0x90 ); } void fcml_tf_instruction_PAVGB(void) { FCML_I64( "pavgb mm0,mmword ptr [rax]", 0x0F, 0xE0, 0x00 ); FCML_I32( "pavgb mm0,mm1", 0x0F, 0xE0, 0xC1 ); FCML_I64( "pavgw mm0,mmword ptr [rax]", 0x0F, 0xE3, 0x00 ); FCML_I32( "pavgw mm0,mm1", 0x0F, 0xE3, 0xC1 ); FCML_I64( "pavgb xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xE0, 0x00 ); FCML_I32( "pavgb xmm0,xmm1", 0x66, 0x0F, 0xE0, 0xC1 ); FCML_I64( "pavgw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xE3, 0x00 ); FCML_I32( "pavgw xmm0,xmm1", 0x66, 0x0F, 0xE3, 0xC1 ); FCML_I64( "vpavgb xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xe0, 0x00 ); FCML_I32( "vpavgb xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xe0, 0xc1 ); FCML_I64( "vpavgw xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xe3, 0x00 ); FCML_I32( "vpavgw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xe3, 0xc1 ); FCML_A64( "pavgb (%rax),%mm0", 0x0f, 0xe0, 0x00 ); FCML_A64( "pavgb %mm1,%mm0", 0x0f, 0xe0, 0xc1 ); FCML_A64( "pavgw (%rax),%mm0", 0x0f, 0xe3, 0x00 ); FCML_A64( "pavgw %mm1,%mm0", 0x0f, 0xe3, 0xc1 ); FCML_A64( "pavgb (%rax),%xmm0", 0x66, 0x0f, 0xe0, 0x00 ); FCML_A64( "pavgb %xmm1,%xmm0", 0x66, 0x0f, 0xe0, 0xc1 ); FCML_A64( "pavgw (%rax),%xmm0", 0x66, 0x0f, 0xe3, 0x00 ); FCML_A64( "pavgw %xmm1,%xmm0", 0x66, 0x0f, 0xe3, 0xc1 ); FCML_A64( "vpavgb (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xe0, 0x00 ); FCML_A64( "vpavgb %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xe0, 0xc1 ); FCML_A64( "vpavgw (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xe3, 0x00 ); FCML_A64( "vpavgw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xe3, 0xc1 ); } void fcml_tf_instruction_PBLENDVB(void) { FCML_I32( "pblendvb xmm2,xmmword ptr [ecx+eax],xmm0", 0x66, 0x0f, 0x38, 0x10, 0x14, 0x01 ); FCML_I64( "pblendvb xmm2,xmmword ptr [rcx+rax],xmm0", 0x66, 0x0F, 0x38, 0x10, 0x14, 0x01 ); FCML_I32( "vpblendvb xmm2,xmm7,xmmword ptr [ecx+eax],xmm2", 0xc4, 0xe3, 0x41, 0x4c, 0x14, 0x01, 0x20 ); FCML_I32( "vpblendvb xmm2,xmm2,xmmword ptr [ecx+eax],xmm2", 0xc4, 0xe3, 0x69, 0x4c, 0x14, 0x01, 0x20 ); FCML_I64( "vpblendvb xmm2,xmm2,xmmword ptr [r9+rax],xmm10", 0xC4, 0xC3, 0x69, 0x4C, 0x14, 0x01, 0xA0 ); FCML_I32( "vpblendvb ymm2,ymm7,ymmword ptr [ecx+eax],ymm2", 0xc4, 0xe3, 0x45, 0x4c, 0x14, 0x01, 0x20 ); FCML_I64( "vpblendvb ymm2,ymm2,ymmword ptr [r9+rax],ymm10", 0xC4, 0xC3, 0x6D, 0x4C, 0x14, 0x01, 0xA0 ); FCML_A64( "pblendvb %xmm0,(%rcx,%rax),%xmm2", 0x66, 0x0f, 0x38, 0x10, 0x14, 0x01 ); FCML_A64( "pblendvb %xmm0,(%rcx,%rax),%xmm2", 0x66, 0x0f, 0x38, 0x10, 0x14, 0x01 ); FCML_A64( "vpblendvb %xmm2,(%rcx,%rax),%xmm7,%xmm2", 0xc4, 0xe3, 0x41, 0x4c, 0x14, 0x01, 0x20 ); FCML_A64( "vpblendvb %xmm2,(%rcx,%rax),%xmm2,%xmm2", 0xc4, 0xe3, 0x69, 0x4c, 0x14, 0x01, 0x20 ); FCML_A64( "vpblendvb %xmm10,(%r9,%rax),%xmm2,%xmm2", 0xc4, 0xc3, 0x69, 0x4c, 0x14, 0x01, 0xa0 ); FCML_A64( "vpblendvb %ymm2,(%rcx,%rax),%ymm7,%ymm2", 0xc4, 0xe3, 0x45, 0x4c, 0x14, 0x01, 0x20 ); FCML_A64( "vpblendvb %ymm10,(%r9,%rax),%ymm2,%ymm2", 0xc4, 0xc3, 0x6d, 0x4c, 0x14, 0x01, 0xa0 ); } void fcml_tf_instruction_PBLENDW(void) { FCML_I64( "pblendw xmm0,xmmword ptr [rax],0ffh", 0x66, 0x0F, 0x3A, 0x0E, 0x00, 0xFF ); FCML_I32( "pblendw xmm0,xmm1,0ffh", 0x66, 0x0F, 0x3A, 0x0E, 0xC1, 0xFF ); FCML_I64( "vpblendw xmm0,xmm0,xmmword ptr [rax],0ffh", 0xC4, 0xE3, 0x79, 0x0E, 0x00, 0xFF ); FCML_I32( "vpblendw xmm0,xmm0,xmm1,0ffh", 0xC4, 0xE3, 0x79, 0x0E, 0xC1, 0xFF ); FCML_I64( "vpblendw ymm0,ymm0,ymmword ptr [rax],0ffh", 0xC4, 0xE3, 0x7D, 0x0E, 0x00, 0xFF ); FCML_I32( "vpblendw ymm0,ymm0,ymm1,0ffh", 0xC4, 0xE3, 0x7D, 0x0E, 0xC1, 0xFF ); FCML_A64( "pblendw $0xff,(%rax),%xmm0", 0x66, 0x0f, 0x3a, 0x0e, 0x00, 0xff ); FCML_A64( "pblendw $0xff,%xmm1,%xmm0", 0x66, 0x0f, 0x3a, 0x0e, 0xc1, 0xff ); FCML_A64( "vpblendw $0xff,(%rax),%xmm0,%xmm0", 0xc4, 0xe3, 0x79, 0x0e, 0x00, 0xff ); FCML_A64( "vpblendw $0xff,%xmm1,%xmm0,%xmm0", 0xc4, 0xe3, 0x79, 0x0e, 0xc1, 0xff ); FCML_A64( "vpblendw $0xff,(%rax),%ymm0,%ymm0", 0xc4, 0xe3, 0x7d, 0x0e, 0x00, 0xff ); FCML_A64( "vpblendw $0xff,%ymm1,%ymm0,%ymm0", 0xc4, 0xe3, 0x7d, 0x0e, 0xc1, 0xff ); } void fcml_tf_instruction_PCLMULQDQ(void) { FCML_I64( "pclmulqdq xmm0,xmmword ptr [rax],0ffh", 0x66, 0x0F, 0x3A, 0x44, 0x00, 0xFF ); FCML_I32( "pclmulqdq xmm0,xmm1,0ffh", 0x66, 0x0F, 0x3A, 0x44, 0xC1, 0xFF ); FCML_I64( "vpclmulqdq xmm0,xmm0,xmmword ptr [rax],0ffh", 0xC4, 0xE3, 0x79, 0x44, 0x00, 0xFF ); FCML_I32( "vpclmulqdq xmm0,xmm0,xmm1,0ffh", 0xC4, 0xE3, 0x79, 0x44, 0xC1, 0xFF ); FCML_A64( "pclmulqdq $0xff,(%rax),%xmm0", 0x66, 0x0f, 0x3a, 0x44, 0x00, 0xff ); FCML_A64( "pclmulqdq $0xff,%xmm1,%xmm0", 0x66, 0x0f, 0x3a, 0x44, 0xc1, 0xff ); FCML_A64( "vpclmulqdq $0xff,(%rax),%xmm0,%xmm0", 0xc4, 0xe3, 0x79, 0x44, 0x00, 0xff ); FCML_A64( "vpclmulqdq $0xff,%xmm1,%xmm0,%xmm0", 0xc4, 0xe3, 0x79, 0x44, 0xc1, 0xff ); } void fcml_tf_instruction_PCMPEQ(void) { FCML_I64( "pcmpeqb mm0,mmword ptr [rax]", 0x0F, 0x74, 0x00 ); FCML_I32( "pcmpeqb mm0,mm1", 0x0F, 0x74, 0xC1 ); FCML_I64( "pcmpeqw mm0,mmword ptr [rax]", 0x0F, 0x75, 0x00 ); FCML_I32( "pcmpeqw mm0,mm1", 0x0F, 0x75, 0xC1 ); FCML_I64( "pcmpeqd mm0,mmword ptr [rax]", 0x0F, 0x76, 0x00 ); FCML_I32( "pcmpeqd mm0,mm1", 0x0F, 0x76, 0xC1 ); FCML_I64( "pcmpeqb xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x74, 0x00 ); FCML_I32( "pcmpeqb xmm0,xmm1", 0x66, 0x0F, 0x74, 0xC1 ); FCML_I64( "pcmpeqw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x75, 0x00 ); FCML_I32( "pcmpeqw xmm0,xmm1", 0x66, 0x0F, 0x75, 0xC1 ); FCML_I64( "pcmpeqd xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x76, 0x00 ); FCML_I32( "pcmpeqd xmm0,xmm1", 0x66, 0x0F, 0x76, 0xC1 ); FCML_I64( "vpcmpeqb xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0x74, 0x00 ); FCML_I32( "vpcmpeqb xmm0,xmm0,xmm1", 0xc5, 0xf9, 0x74, 0xc1 ); FCML_I64( "vpcmpeqw xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0x75, 0x00 ); FCML_I32( "vpcmpeqw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0x75, 0xc1 ); FCML_I64( "vpcmpeqd xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0x76, 0x00 ); FCML_I32( "vpcmpeqd xmm0,xmm0,xmm1", 0xc5, 0xf9, 0x76, 0xc1 ); FCML_I64( "vpcmpeqb ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0x74, 0x00 ); FCML_I32( "vpcmpeqb ymm0,ymm0,ymm1", 0xc5, 0xfd, 0x74, 0xc1 ); FCML_I64( "vpcmpeqw ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0x75, 0x00 ); FCML_I32( "vpcmpeqw ymm0,ymm0,ymm1", 0xc5, 0xfd, 0x75, 0xc1 ); FCML_I64( "vpcmpeqd ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0x76, 0x00 ); FCML_I32( "vpcmpeqd ymm0,ymm0,ymm1", 0xc5, 0xfd, 0x76, 0xc1 ); FCML_A64( "pcmpeqb (%rax),%mm0", 0x0f, 0x74, 0x00 ); FCML_A64( "pcmpeqb %mm1,%mm0", 0x0f, 0x74, 0xc1 ); FCML_A64( "pcmpeqw (%rax),%mm0", 0x0f, 0x75, 0x00 ); FCML_A64( "pcmpeqw %mm1,%mm0", 0x0f, 0x75, 0xc1 ); FCML_A64( "pcmpeqd (%rax),%mm0", 0x0f, 0x76, 0x00 ); FCML_A64( "pcmpeqd %mm1,%mm0", 0x0f, 0x76, 0xc1 ); FCML_A64( "pcmpeqb (%rax),%xmm0", 0x66, 0x0f, 0x74, 0x00 ); FCML_A64( "pcmpeqb %xmm1,%xmm0", 0x66, 0x0f, 0x74, 0xc1 ); FCML_A64( "pcmpeqw (%rax),%xmm0", 0x66, 0x0f, 0x75, 0x00 ); FCML_A64( "pcmpeqw %xmm1,%xmm0", 0x66, 0x0f, 0x75, 0xc1 ); FCML_A64( "pcmpeqd (%rax),%xmm0", 0x66, 0x0f, 0x76, 0x00 ); FCML_A64( "pcmpeqd %xmm1,%xmm0", 0x66, 0x0f, 0x76, 0xc1 ); FCML_A64( "vpcmpeqb (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0x74, 0x00 ); FCML_A64( "vpcmpeqb %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0x74, 0xc1 ); FCML_A64( "vpcmpeqw (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0x75, 0x00 ); FCML_A64( "vpcmpeqw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0x75, 0xc1 ); FCML_A64( "vpcmpeqd (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0x76, 0x00 ); FCML_A64( "vpcmpeqd %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0x76, 0xc1 ); FCML_A64( "vpcmpeqb (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0x74, 0x00 ); FCML_A64( "vpcmpeqb %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0x74, 0xc1 ); FCML_A64( "vpcmpeqw (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0x75, 0x00 ); FCML_A64( "vpcmpeqw %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0x75, 0xc1 ); FCML_A64( "vpcmpeqd (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0x76, 0x00 ); FCML_A64( "vpcmpeqd %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0x76, 0xc1 ); } void fcml_tf_instruction_PCMPEQQ(void) { FCML_I64( "pcmpeqq xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x29, 0x00 ); FCML_I32( "pcmpeqq xmm0,xmm1", 0x66, 0x0F, 0x38, 0x29, 0xC1 ); FCML_I64( "vpcmpeqq xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x29, 0x00 ); FCML_I32( "vpcmpeqq xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x29, 0xC1 ); FCML_I64( "vpcmpeqq ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x29, 0x00 ); FCML_I32( "vpcmpeqq ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x29, 0xC1 ); FCML_A64( "pcmpeqq (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x29, 0x00 ); FCML_A64( "pcmpeqq %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x29, 0xc1 ); FCML_A64( "vpcmpeqq (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x29, 0x00 ); FCML_A64( "vpcmpeqq %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x29, 0xc1 ); FCML_A64( "vpcmpeqq (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x29, 0x00 ); FCML_A64( "vpcmpeqq %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x29, 0xc1 ); } void fcml_tf_instruction_PCMPESTRI(void) { FCML_I64( "pcmpestri xmm0,xmmword ptr [rax],0ffh", 0x66, 0x0F, 0x3A, 0x61, 0x00, 0xFF ); FCML_I32( "pcmpestri xmm0,xmm1,0ffh", 0x66, 0x0F, 0x3A, 0x61, 0xC1, 0xFF ); FCML_I64( "vpcmpestri xmm0,xmmword ptr [rax],0ffh", 0xC4, 0xE3, 0x79, 0x61, 0x00, 0xFF ); FCML_I32( "vpcmpestri xmm0,xmm1,0ffh", 0xC4, 0xE3, 0x79, 0x61, 0xC1, 0xFF ); FCML_A64( "pcmpestri $0xff,(%rax),%xmm0", 0x66, 0x0f, 0x3a, 0x61, 0x00, 0xff ); FCML_A64( "pcmpestri $0xff,%xmm1,%xmm0", 0x66, 0x0f, 0x3a, 0x61, 0xc1, 0xff ); FCML_A64( "vpcmpestri $0xff,(%rax),%xmm0", 0xc4, 0xe3, 0x79, 0x61, 0x00, 0xff ); FCML_A64( "vpcmpestri $0xff,%xmm1,%xmm0", 0xc4, 0xe3, 0x79, 0x61, 0xc1, 0xff ); } void fcml_tf_instruction_PCMPESTRM(void) { FCML_I64( "pcmpestrm xmm0,xmmword ptr [rax],0ffh", 0x66, 0x0F, 0x3A, 0x60, 0x00, 0xFF ); FCML_I32( "pcmpestrm xmm0,xmm1,0ffh", 0x66, 0x0F, 0x3A, 0x60, 0xC1, 0xFF ); FCML_I64( "vpcmpestrm xmm0,xmmword ptr [rax],0ffh", 0xC4, 0xE3, 0x79, 0x60, 0x00, 0xFF ); FCML_I32( "vpcmpestrm xmm0,xmm1,0ffh", 0xC4, 0xE3, 0x79, 0x60, 0xC1, 0xFF ); FCML_A64( "pcmpestrm $0xff,(%rax),%xmm0", 0x66, 0x0f, 0x3a, 0x60, 0x00, 0xff ); FCML_A64( "pcmpestrm $0xff,%xmm1,%xmm0", 0x66, 0x0f, 0x3a, 0x60, 0xc1, 0xff ); FCML_A64( "vpcmpestrm $0xff,(%rax),%xmm0", 0xc4, 0xe3, 0x79, 0x60, 0x00, 0xff ); FCML_A64( "vpcmpestrm $0xff,%xmm1,%xmm0", 0xc4, 0xe3, 0x79, 0x60, 0xc1, 0xff ); } void fcml_tf_instruction_PCMPGT(void) { FCML_I64( "pcmpgtb mm0,mmword ptr [rax]", 0x0F, 0x64, 0x00 ); FCML_I32( "pcmpgtb mm0,mm1", 0x0F, 0x64, 0xC1 ); FCML_I64( "pcmpgtw mm0,mmword ptr [rax]", 0x0F, 0x65, 0x00 ); FCML_I32( "pcmpgtw mm0,mm1", 0x0F, 0x65, 0xC1 ); FCML_I64( "pcmpgtd mm0,mmword ptr [rax]", 0x0F, 0x66, 0x00 ); FCML_I32( "pcmpgtd mm0,mm1", 0x0F, 0x66, 0xC1 ); FCML_I64( "pcmpgtb xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x64, 0x00 ); FCML_I32( "pcmpgtb xmm0,xmm1", 0x66, 0x0F, 0x64, 0xC1 ); FCML_I64( "pcmpgtw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x65, 0x00 ); FCML_I32( "pcmpgtw xmm0,xmm1", 0x66, 0x0F, 0x65, 0xC1 ); FCML_I64( "pcmpgtd xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x66, 0x00 ); FCML_I32( "pcmpgtd xmm0,xmm1", 0x66, 0x0F, 0x66, 0xC1 ); FCML_I64( "vpcmpgtb xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0x64, 0x00 ); FCML_I32( "vpcmpgtb xmm0,xmm0,xmm1", 0xc5, 0xf9, 0x64, 0xc1 ); FCML_I64( "vpcmpgtw xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0x65, 0x00 ); FCML_I32( "vpcmpgtw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0x65, 0xc1 ); FCML_I64( "vpcmpgtd xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0x66, 0x00 ); FCML_I32( "vpcmpgtd xmm0,xmm0,xmm1", 0xc5, 0xf9, 0x66, 0xc1 ); FCML_I64( "vpcmpgtb ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0x64, 0x00 ); FCML_I32( "vpcmpgtb ymm0,ymm0,ymm1", 0xc5, 0xfd, 0x64, 0xc1 ); FCML_I64( "vpcmpgtw ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0x65, 0x00 ); FCML_I32( "vpcmpgtw ymm0,ymm0,ymm1", 0xc5, 0xfd, 0x65, 0xc1 ); FCML_I64( "vpcmpgtd ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0x66, 0x00 ); FCML_I32( "vpcmpgtd ymm0,ymm0,ymm1", 0xc5, 0xfd, 0x66, 0xc1 ); FCML_A64( "pcmpgtb (%rax),%mm0", 0x0f, 0x64, 0x00 ); FCML_A64( "pcmpgtb %mm1,%mm0", 0x0f, 0x64, 0xc1 ); FCML_A64( "pcmpgtw (%rax),%mm0", 0x0f, 0x65, 0x00 ); FCML_A64( "pcmpgtw %mm1,%mm0", 0x0f, 0x65, 0xc1 ); FCML_A64( "pcmpgtd (%rax),%mm0", 0x0f, 0x66, 0x00 ); FCML_A64( "pcmpgtd %mm1,%mm0", 0x0f, 0x66, 0xc1 ); FCML_A64( "pcmpgtb (%rax),%xmm0", 0x66, 0x0f, 0x64, 0x00 ); FCML_A64( "pcmpgtb %xmm1,%xmm0", 0x66, 0x0f, 0x64, 0xc1 ); FCML_A64( "pcmpgtw (%rax),%xmm0", 0x66, 0x0f, 0x65, 0x00 ); FCML_A64( "pcmpgtw %xmm1,%xmm0", 0x66, 0x0f, 0x65, 0xc1 ); FCML_A64( "pcmpgtd (%rax),%xmm0", 0x66, 0x0f, 0x66, 0x00 ); FCML_A64( "pcmpgtd %xmm1,%xmm0", 0x66, 0x0f, 0x66, 0xc1 ); FCML_A64( "vpcmpgtb (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0x64, 0x00 ); FCML_A64( "vpcmpgtb %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0x64, 0xc1 ); FCML_A64( "vpcmpgtw (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0x65, 0x00 ); FCML_A64( "vpcmpgtw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0x65, 0xc1 ); FCML_A64( "vpcmpgtd (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0x66, 0x00 ); FCML_A64( "vpcmpgtd %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0x66, 0xc1 ); FCML_A64( "vpcmpgtb (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0x64, 0x00 ); FCML_A64( "vpcmpgtb %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0x64, 0xc1 ); FCML_A64( "vpcmpgtw (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0x65, 0x00 ); FCML_A64( "vpcmpgtw %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0x65, 0xc1 ); FCML_A64( "vpcmpgtd (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0x66, 0x00 ); FCML_A64( "vpcmpgtd %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0x66, 0xc1 ); } void fcml_tf_instruction_PCMPGTQ(void) { FCML_I64( "pcmpgtq xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x37, 0x00 ); FCML_I32( "pcmpgtq xmm0,xmm1", 0x66, 0x0F, 0x38, 0x37, 0xC1 ); FCML_I64( "vpcmpgtq xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x37, 0x00 ); FCML_I32( "vpcmpgtq xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x37, 0xC1 ); FCML_I64( "vpcmpgtq ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x37, 0x00 ); FCML_I32( "vpcmpgtq ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x37, 0xC1 ); FCML_A64( "pcmpgtq (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x37, 0x00 ); FCML_A64( "pcmpgtq %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x37, 0xc1 ); FCML_A64( "vpcmpgtq (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x37, 0x00 ); FCML_A64( "vpcmpgtq %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x37, 0xc1 ); FCML_A64( "vpcmpgtq (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x37, 0x00 ); FCML_A64( "vpcmpgtq %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x37, 0xc1 ); } void fcml_tf_instruction_PCMPISTRI(void) { FCML_I64( "pcmpistri xmm0,xmmword ptr [rax],0ffh", 0x66, 0x0F, 0x3A, 0x63, 0x00, 0xFF ); FCML_I32( "pcmpistri xmm0,xmm1,0ffh", 0x66, 0x0F, 0x3A, 0x63, 0xC1, 0xFF ); FCML_I64( "vpcmpistri xmm0,xmmword ptr [rax],0ffh", 0xC4, 0xE3, 0x79, 0x63, 0x00, 0xFF ); FCML_I32( "vpcmpistri xmm0,xmm1,0ffh", 0xC4, 0xE3, 0x79, 0x63, 0xC1, 0xFF ); FCML_A64( "pcmpistri $0xff,(%rax),%xmm0", 0x66, 0x0f, 0x3a, 0x63, 0x00, 0xff ); FCML_A64( "pcmpistri $0xff,%xmm1,%xmm0", 0x66, 0x0f, 0x3a, 0x63, 0xc1, 0xff ); FCML_A64( "vpcmpistri $0xff,(%rax),%xmm0", 0xc4, 0xe3, 0x79, 0x63, 0x00, 0xff ); FCML_A64( "vpcmpistri $0xff,%xmm1,%xmm0", 0xc4, 0xe3, 0x79, 0x63, 0xc1, 0xff ); } void fcml_tf_instruction_PCMPISTRM(void) { FCML_I64( "pcmpistrm xmm0,xmmword ptr [rax],0ffh", 0x66, 0x0F, 0x3A, 0x62, 0x00, 0xFF ); FCML_I32( "pcmpistrm xmm0,xmm1,0ffh", 0x66, 0x0F, 0x3A, 0x62, 0xC1, 0xFF ); FCML_I64( "vpcmpistrm xmm0,xmmword ptr [rax],0ffh", 0xC4, 0xE3, 0x79, 0x62, 0x00, 0xFF ); FCML_I32( "vpcmpistrm xmm0,xmm1,0ffh", 0xC4, 0xE3, 0x79, 0x62, 0xC1, 0xFF ); FCML_A64( "pcmpistrm $0xff,(%rax),%xmm0", 0x66, 0x0f, 0x3a, 0x62, 0x00, 0xff ); FCML_A64( "pcmpistrm $0xff,%xmm1,%xmm0", 0x66, 0x0f, 0x3a, 0x62, 0xc1, 0xff ); FCML_A64( "vpcmpistrm $0xff,(%rax),%xmm0", 0xc4, 0xe3, 0x79, 0x62, 0x00, 0xff ); FCML_A64( "vpcmpistrm $0xff,%xmm1,%xmm0", 0xc4, 0xe3, 0x79, 0x62, 0xc1, 0xff ); } void fcml_tf_instruction_PEXTRB(void) { FCML_I64( "pextrb byte ptr [rax],xmm0,0ffh", 0x66, 0x0F, 0x3A, 0x14, 0x00, 0xFF ); FCML_I64( "pextrb rcx,xmm0,0ffh", 0x66, 0x0F, 0x3A, 0x14, 0xC1, 0xFF ); FCML_I32( "pextrb byte ptr [eax],xmm0,0ffh", 0x66, 0x0F, 0x3A, 0x14, 0x00, 0xFF ); FCML_I32( "pextrb ecx,xmm0,0ffh", 0x66, 0x0F, 0x3A, 0x14, 0xC1, 0xFF ); FCML_I64( "pextrd dword ptr [rax],xmm0,0ffh", 0x66, 0x0F, 0x3A, 0x16, 0x00, 0xFF ); FCML_I64( "pextrd rcx,xmm0,0ffh", 0x66, 0x0F, 0x3A, 0x16, 0xC1, 0xFF ); FCML_I32( "pextrd dword ptr [eax],xmm0,0ffh", 0x66, 0x0F, 0x3A, 0x16, 0x00, 0xFF ); FCML_I32( "pextrd ecx,xmm0,0ffh", 0x66, 0x0F, 0x3A, 0x16, 0xC1, 0xFF ); FCML_I64( "pextrq qword ptr [rax],xmm0,0ffh", 0x66, 0x48, 0x0F, 0x3A, 0x16, 0x00, 0xFF ); FCML_I64( "pextrq rcx,xmm0,0ffh", 0x66, 0x48, 0x0F, 0x3A, 0x16, 0xC1, 0xFF ); FCML_I64( "vpextrb byte ptr [rax],xmm0,0ffh", 0xC4, 0xE3, 0x79, 0x14, 0x00, 0xFF ); FCML_I64( "vpextrb rcx,xmm0,0ffh", 0xC4, 0xE3, 0x79, 0x14, 0xC1, 0xFF ); FCML_I32( "vpextrb byte ptr [eax],xmm0,0ffh", 0xC4, 0xE3, 0x79, 0x14, 0x00, 0xFF ); FCML_I32( "vpextrb ecx,xmm0,0ffh", 0xC4, 0xE3, 0x79, 0x14, 0xC1, 0xFF ); FCML_I64( "vpextrd dword ptr [rax],xmm0,0ffh", 0xC4, 0xE3, 0x79, 0x16, 0x00, 0xFF ); FCML_I64( "vpextrd rcx,xmm0,0ffh", 0xC4, 0xE3, 0x79, 0x16, 0xC1, 0xFF ); FCML_I32( "vpextrd dword ptr [eax],xmm0,0ffh", 0xC4, 0xE3, 0x79, 0x16, 0x00, 0xFF ); FCML_I32( "vpextrd ecx,xmm0,0ffh", 0xC4, 0xE3, 0x79, 0x16, 0xC1, 0xFF ); FCML_I64( "vpextrq qword ptr [rax],xmm0,0ffh", 0xC4, 0xE3, 0xF9, 0x16, 0x00, 0xFF ); FCML_I64( "vpextrq rcx,xmm0,0ffh", 0xC4, 0xE3, 0xF9, 0x16, 0xC1, 0xFF ); FCML_A64( "pextrb $0xff,%xmm0,(%rax)", 0x66, 0x0f, 0x3a, 0x14, 0x00, 0xff ); FCML_A64( "pextrb $0xff,%xmm0,%rcx", 0x66, 0x0f, 0x3a, 0x14, 0xc1, 0xff ); FCML_A64( "pextrd $0xff,%xmm0,(%rax)", 0x66, 0x0f, 0x3a, 0x16, 0x00, 0xff ); FCML_A64( "pextrd $0xff,%xmm0,%rcx", 0x66, 0x0f, 0x3a, 0x16, 0xc1, 0xff ); FCML_A64( "pextrq $0xff,%xmm0,(%rax)", 0x66, 0x48, 0x0f, 0x3a, 0x16, 0x00, 0xff ); FCML_A64( "pextrq $0xff,%xmm0,%rcx", 0x66, 0x48, 0x0f, 0x3a, 0x16, 0xc1, 0xff ); FCML_A64( "vpextrb $0xff,%xmm0,(%rax)", 0xc4, 0xe3, 0x79, 0x14, 0x00, 0xff ); FCML_A64( "vpextrb $0xff,%xmm0,%rcx", 0xc4, 0xe3, 0x79, 0x14, 0xc1, 0xff ); FCML_A64( "vpextrd $0xff,%xmm0,(%rax)", 0xc4, 0xe3, 0x79, 0x16, 0x00, 0xff ); FCML_A64( "vpextrd $0xff,%xmm0,%rcx", 0xc4, 0xe3, 0x79, 0x16, 0xc1, 0xff ); FCML_A64( "vpextrq $0xff,%xmm0,(%rax)", 0xc4, 0xe3, 0xf9, 0x16, 0x00, 0xff ); FCML_A64( "vpextrq $0xff,%xmm0,%rcx", 0xc4, 0xe3, 0xf9, 0x16, 0xc1, 0xff ); } void fcml_tf_instruction_PEXTRW(void) { FCML_I64( "pextrw rax,mm1,0ffh", 0x0F, 0xC5, 0xC1, 0xFF ); FCML_I32( "pextrw eax,mm1,0ffh", 0x0F, 0xC5, 0xC1, 0xFF ); FCML_I64_M( "pextrw rax,xmm1,0ffh", 2, FCML_MI( 0x66, 0x0f, 0x3a, 0x15, 0xc8, 0xff ), FCML_MI( 0x66, 0x0f, 0xc5, 0xc1, 0xff ) ); FCML_I32_M( "pextrw eax,xmm1,0ffh", 2, FCML_MI( 0x66, 0x0f, 0x3a, 0x15, 0xc8, 0xff ), FCML_MI( 0x66, 0x0f, 0xc5, 0xc1, 0xff ) ); FCML_I64( "pextrw word ptr [rax],xmm0,0ffh", 0x66, 0x0F, 0x3A, 0x15, 0x00, 0xFF ); FCML_I64_M( "pextrw rcx,xmm0,0ffh", 2, FCML_MI( 0x66, 0x0f, 0x3a, 0x15, 0xc1, 0xff ), FCML_MI( 0x66, 0x0f, 0xc5, 0xc8, 0xff ) ); FCML_I32( "pextrw word ptr [eax],xmm0,0ffh", 0x66, 0x0F, 0x3A, 0x15, 0x00, 0xFF ); FCML_I32_M( "pextrw ecx,xmm0,0ffh", 2, FCML_MI( 0x66, 0x0f, 0x3a, 0x15, 0xc1, 0xff ), FCML_MI( 0x66, 0x0f, 0xc5, 0xc8, 0xff ) ); FCML_I64_M( "vpextrw rax,xmm1,0ffh", 2, FCML_MI( 0xc4, 0xe3, 0x79, 0x15, 0xc8, 0xff ), FCML_MI( 0xc5, 0xf9, 0xc5, 0xc1, 0xff ) ); FCML_I32_M( "vpextrw eax,xmm1,0ffh", 2, FCML_MI( 0xc4, 0xe3, 0x79, 0x15, 0xc8, 0xff ), FCML_MI( 0xc5, 0xf9, 0xc5, 0xc1, 0xff ) ); FCML_I64( "vpextrw word ptr [rax],xmm0,0ffh", 0xC4, 0xE3, 0x79, 0x15, 0x00, 0xFF ); FCML_I64_M( "vpextrw rcx,xmm0,0ffh", 2, FCML_MI( 0xc4, 0xe3, 0x79, 0x15, 0xc1, 0xff ), FCML_MI( 0xc5, 0xf9, 0xc5, 0xc8, 0xff ) ); FCML_I32( "vpextrw word ptr [eax],xmm0,0ffh", 0xC4, 0xE3, 0x79, 0x15, 0x00, 0xFF ); FCML_I32_M( "vpextrw ecx,xmm0,0ffh", 2, FCML_MI( 0xc4, 0xe3, 0x79, 0x15, 0xc1, 0xff ), FCML_MI( 0xc5, 0xf9, 0xc5, 0xc8, 0xff ) ); FCML_A64( "pextrw $0xff,%mm1,%rax", 0x0f, 0xc5, 0xc1, 0xff ); FCML_A64( "pextrw $0xff,%mm1,%rax", 0x0f, 0xc5, 0xc1, 0xff ); FCML_A64( "pextrw $0xff,%xmm0,(%rax)", 0x66, 0x0f, 0x3a, 0x15, 0x00, 0xff ); FCML_A64( "vpextrw $0xff,%xmm0,(%rax)", 0xc4, 0xe3, 0x79, 0x15, 0x00, 0xff ); FCML_A64_M( "pextrw $0xff,%xmm1,%rax", 2, FCML_MI( 0x66, 0x0f, 0x3a, 0x15, 0xc8, 0xff ), FCML_MI( 0x66, 0x0f, 0xc5, 0xc1, 0xff ) ); FCML_A64_M( "pextrw $0xff,%xmm1,%rax", 2, FCML_MI( 0x66, 0x0f, 0x3a, 0x15, 0xc8, 0xff ), FCML_MI( 0x66, 0x0f, 0xc5, 0xc1, 0xff ) ); FCML_A64_M( "pextrw $0xff,%xmm0,%rcx", 2, FCML_MI( 0x66, 0x0f, 0x3a, 0x15, 0xc1, 0xff ), FCML_MI( 0x66, 0x0f, 0xc5, 0xc8, 0xff ) ); FCML_A64_M( "pextrw $0xff,%xmm0,%rcx", 2, FCML_MI( 0x66, 0x0f, 0x3a, 0x15, 0xc1, 0xff ), FCML_MI( 0x66, 0x0f, 0xc5, 0xc8, 0xff ) ); FCML_A64_M( "vpextrw $0xff,%xmm1,%rax", 2, FCML_MI( 0xc4, 0xe3, 0x79, 0x15, 0xc8, 0xff ), FCML_MI( 0xc5, 0xf9, 0xc5, 0xc1, 0xff ) ); FCML_A64_M( "vpextrw $0xff,%xmm1,%rax", 2, FCML_MI( 0xc4, 0xe3, 0x79, 0x15, 0xc8, 0xff ), FCML_MI( 0xc5, 0xf9, 0xc5, 0xc1, 0xff ) ); FCML_A64_M( "vpextrw $0xff,%xmm0,%rcx", 2, FCML_MI( 0xc4, 0xe3, 0x79, 0x15, 0xc1, 0xff ), FCML_MI( 0xc5, 0xf9, 0xc5, 0xc8, 0xff ) ); } void fcml_tf_instruction_PHADDW(void) { FCML_I64( "phaddw mm0,mmword ptr [rax]", 0x0F, 0x38, 0x01, 0x00 ); FCML_I32( "phaddw mm0,mm1", 0x0F, 0x38, 0x01, 0xC1 ); FCML_I64( "phaddd mm0,mmword ptr [rax]", 0x0F, 0x38, 0x02, 0x00 ); FCML_I32( "phaddd mm0,mm1", 0x0F, 0x38, 0x02, 0xC1 ); FCML_I64( "phaddw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x01, 0x00 ); FCML_I32( "phaddw xmm0,xmm1", 0x66, 0x0F, 0x38, 0x01, 0xC1 ); FCML_I64( "phaddd xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x02, 0x00 ); FCML_I32( "phaddd xmm0,xmm1", 0x66, 0x0F, 0x38, 0x02, 0xC1 ); FCML_I64( "vphaddw xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x01, 0x00 ); FCML_I32( "vphaddw xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x01, 0xC1 ); FCML_I64( "vphaddd xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x02, 0x00 ); FCML_I32( "vphaddd xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x02, 0xC1 ); FCML_I64( "vphaddw ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x01, 0x00 ); FCML_I32( "vphaddw ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x01, 0xC1 ); FCML_I64( "vphaddd ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x02, 0x00 ); FCML_I32( "vphaddd ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x02, 0xC1 ); FCML_A64( "phaddw (%rax),%mm0", 0x0f, 0x38, 0x01, 0x00 ); FCML_A64( "phaddw %mm1,%mm0", 0x0f, 0x38, 0x01, 0xc1 ); FCML_A64( "phaddd (%rax),%mm0", 0x0f, 0x38, 0x02, 0x00 ); FCML_A64( "phaddd %mm1,%mm0", 0x0f, 0x38, 0x02, 0xc1 ); FCML_A64( "phaddw (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x01, 0x00 ); FCML_A64( "phaddw %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x01, 0xc1 ); FCML_A64( "phaddd (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x02, 0x00 ); FCML_A64( "phaddd %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x02, 0xc1 ); FCML_A64( "vphaddw (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x01, 0x00 ); FCML_A64( "vphaddw %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x01, 0xc1 ); FCML_A64( "vphaddd (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x02, 0x00 ); FCML_A64( "vphaddd %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x02, 0xc1 ); FCML_A64( "vphaddw (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x01, 0x00 ); FCML_A64( "vphaddw %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x01, 0xc1 ); FCML_A64( "vphaddd (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x02, 0x00 ); FCML_A64( "vphaddd %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x02, 0xc1 ); } void fcml_tf_instruction_PHADDSW(void) { FCML_I64( "phaddsw mm0,mmword ptr [rax]", 0x0F, 0x38, 0x03, 0x00 ); FCML_I32( "phaddsw mm0,mm1", 0x0F, 0x38, 0x03, 0xC1 ); FCML_I64( "phaddsw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x03, 0x00 ); FCML_I32( "phaddsw xmm0,xmm1", 0x66, 0x0F, 0x38, 0x03, 0xC1 ); FCML_I64( "vphaddsw xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x03, 0x00 ); FCML_I32( "vphaddsw xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x03, 0xC1 ); FCML_I64( "vphaddsw ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x03, 0x00 ); FCML_I32( "vphaddsw ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x03, 0xC1 ); FCML_A64( "phaddsw (%rax),%mm0", 0x0f, 0x38, 0x03, 0x00 ); FCML_A64( "phaddsw %mm1,%mm0", 0x0f, 0x38, 0x03, 0xc1 ); FCML_A64( "phaddsw (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x03, 0x00 ); FCML_A64( "phaddsw %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x03, 0xc1 ); FCML_A64( "vphaddsw (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x03, 0x00 ); FCML_A64( "vphaddsw %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x03, 0xc1 ); FCML_A64( "vphaddsw (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x03, 0x00 ); FCML_A64( "vphaddsw %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x03, 0xc1 ); } void fcml_tf_instruction_PHMINPOSUW(void) { FCML_I64( "phminposuw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x41, 0x00 ); FCML_I32( "phminposuw xmm0,xmm1", 0x66, 0x0F, 0x38, 0x41, 0xC1 ); FCML_I64( "vphminposuw xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x41, 0x00 ); FCML_I32( "vphminposuw xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x41, 0xC1 ); FCML_A64( "phminposuw (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x41, 0x00 ); FCML_A64( "phminposuw %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x41, 0xc1 ); FCML_A64( "vphminposuw (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x41, 0x00 ); FCML_A64( "vphminposuw %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x41, 0xc1 ); } void fcml_tf_instruction_PHSUBW(void) { FCML_I64( "phsubw mm0,mmword ptr [rax]", 0x0F, 0x38, 0x05, 0x00 ); FCML_I32( "phsubw mm0,mm1", 0x0F, 0x38, 0x05, 0xC1 ); FCML_I64( "phsubd mm0,mmword ptr [rax]", 0x0F, 0x38, 0x06, 0x00 ); FCML_I32( "phsubd mm0,mm1", 0x0F, 0x38, 0x06, 0xC1 ); FCML_I64( "phsubw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x05, 0x00 ); FCML_I32( "phsubw xmm0,xmm1", 0x66, 0x0F, 0x38, 0x05, 0xC1 ); FCML_I64( "phsubd xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x06, 0x00 ); FCML_I32( "phsubd xmm0,xmm1", 0x66, 0x0F, 0x38, 0x06, 0xC1 ); FCML_I64( "vphsubw xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x05, 0x00 ); FCML_I32( "vphsubw xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x05, 0xC1 ); FCML_I64( "vphsubd xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x06, 0x00 ); FCML_I32( "vphsubd xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x06, 0xC1 ); FCML_I64( "vphsubw ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x05, 0x00 ); FCML_I32( "vphsubw ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x05, 0xC1 ); FCML_I64( "vphsubd ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x06, 0x00 ); FCML_I32( "vphsubd ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x06, 0xC1 ); FCML_A64( "phsubw (%rax),%mm0", 0x0f, 0x38, 0x05, 0x00 ); FCML_A64( "phsubw %mm1,%mm0", 0x0f, 0x38, 0x05, 0xc1 ); FCML_A64( "phsubd (%rax),%mm0", 0x0f, 0x38, 0x06, 0x00 ); FCML_A64( "phsubd %mm1,%mm0", 0x0f, 0x38, 0x06, 0xc1 ); FCML_A64( "phsubw (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x05, 0x00 ); FCML_A64( "phsubw %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x05, 0xc1 ); FCML_A64( "phsubd (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x06, 0x00 ); FCML_A64( "phsubd %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x06, 0xc1 ); FCML_A64( "vphsubw (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x05, 0x00 ); FCML_A64( "vphsubw %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x05, 0xc1 ); FCML_A64( "vphsubd (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x06, 0x00 ); FCML_A64( "vphsubd %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x06, 0xc1 ); FCML_A64( "vphsubw (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x05, 0x00 ); FCML_A64( "vphsubw %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x05, 0xc1 ); FCML_A64( "vphsubd (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x06, 0x00 ); FCML_A64( "vphsubd %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x06, 0xc1 ); } void fcml_tf_instruction_PHSUBSW(void) { FCML_I64( "phsubsw mm0,mmword ptr [rax]", 0x0F, 0x38, 0x07, 0x00 ); FCML_I32( "phsubsw mm0,mm1", 0x0F, 0x38, 0x07, 0xC1 ); FCML_I64( "phsubsw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x07, 0x00 ); FCML_I32( "phsubsw xmm0,xmm1", 0x66, 0x0F, 0x38, 0x07, 0xC1 ); FCML_I64( "vphsubsw xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x07, 0x00 ); FCML_I32( "vphsubsw xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x07, 0xC1 ); FCML_I64( "vphsubsw ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x07, 0x00 ); FCML_I32( "vphsubsw ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x07, 0xC1 ); FCML_A64( "phsubsw (%rax),%mm0", 0x0f, 0x38, 0x07, 0x00 ); FCML_A64( "phsubsw %mm1,%mm0", 0x0f, 0x38, 0x07, 0xc1 ); FCML_A64( "phsubsw (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x07, 0x00 ); FCML_A64( "phsubsw %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x07, 0xc1 ); FCML_A64( "vphsubsw (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x07, 0x00 ); FCML_A64( "vphsubsw %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x07, 0xc1 ); FCML_A64( "vphsubsw (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x07, 0x00 ); FCML_A64( "vphsubsw %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x07, 0xc1 ); } void fcml_tf_instruction_PINSR(void) { FCML_I64( "pinsrb xmm0,byte ptr [rax],0ffh", 0x66, 0x0F, 0x3A, 0x20, 0x00, 0xFF ); FCML_I32( "pinsrb xmm0,ecx,0ffh", 0x66, 0x0F, 0x3A, 0x20, 0xC1, 0xFF ); FCML_I64( "pinsrd xmm0,dword ptr [rax],0ffh", 0x66, 0x0F, 0x3A, 0x22, 0x00, 0xFF ); FCML_I32( "pinsrd xmm0,ecx,0ffh", 0x66, 0x0F, 0x3A, 0x22, 0xC1, 0xFF ); FCML_I64( "pinsrq xmm0,qword ptr [rax],0ffh", 0x66, 0x48, 0x0F, 0x3A, 0x22, 0x00, 0xFF ); FCML_I64( "vpinsrb xmm0,xmm0,byte ptr [rax],0ffh", 0xC4, 0xE3, 0x79, 0x20, 0x00, 0xFF ); FCML_I32( "vpinsrb xmm0,xmm0,ecx,0ffh", 0xC4, 0xE3, 0x79, 0x20, 0xC1, 0xFF ); FCML_I64( "vpinsrd xmm0,xmm0,dword ptr [rax],0ffh", 0xC4, 0xE3, 0x79, 0x22, 0x00, 0xFF ); FCML_I32( "vpinsrd xmm0,xmm0,ecx,0ffh", 0xC4, 0xE3, 0x79, 0x22, 0xC1, 0xFF ); FCML_I64( "vpinsrq xmm0,xmm0,qword ptr [rax],0ffh", 0xC4, 0xE3, 0xF9, 0x22, 0x00, 0xFF ); FCML_A64( "pinsrb $0xff,(%rax),%xmm0", 0x66, 0x0f, 0x3a, 0x20, 0x00, 0xff ); FCML_A64( "pinsrb $0xff,%ecx,%xmm0", 0x66, 0x0f, 0x3a, 0x20, 0xc1, 0xff ); FCML_A64( "pinsrd $0xff,(%rax),%xmm0", 0x66, 0x0f, 0x3a, 0x22, 0x00, 0xff ); FCML_A64( "pinsrd $0xff,%ecx,%xmm0", 0x66, 0x0f, 0x3a, 0x22, 0xc1, 0xff ); FCML_A64( "pinsrq $0xff,(%rax),%xmm0", 0x66, 0x48, 0x0f, 0x3a, 0x22, 0x00, 0xff ); FCML_A64( "vpinsrb $0xff,(%rax),%xmm0,%xmm0", 0xc4, 0xe3, 0x79, 0x20, 0x00, 0xff ); FCML_A64( "vpinsrb $0xff,%ecx,%xmm0,%xmm0", 0xc4, 0xe3, 0x79, 0x20, 0xc1, 0xff ); FCML_A64( "vpinsrd $0xff,(%rax),%xmm0,%xmm0", 0xc4, 0xe3, 0x79, 0x22, 0x00, 0xff ); FCML_A64( "vpinsrd $0xff,%ecx,%xmm0,%xmm0", 0xc4, 0xe3, 0x79, 0x22, 0xc1, 0xff ); FCML_A64( "vpinsrq $0xff,(%rax),%xmm0,%xmm0", 0xc4, 0xe3, 0xf9, 0x22, 0x00, 0xff ); } void fcml_tf_instruction_PINSRW(void) { FCML_I64( "pinsrw mm0,word ptr [rax],0ffh", 0x0F, 0xC4, 0x00, 0xFF ); FCML_I32( "pinsrw mm0,ecx,0ffh", 0x0F, 0xC4, 0xC1, 0xFF ); FCML_I64( "pinsrw xmm0,word ptr [rax],0ffh", 0x66, 0x0F, 0xC4, 0x00, 0xFF ); FCML_I32( "pinsrw xmm0,ecx,0ffh", 0x66, 0x0F, 0xC4, 0xC1, 0xFF ); FCML_I64_D( "vpinsrw xmm0,xmm0,word ptr [rax],0ffh", 0xC4, 0xE1, 0x79, 0xC4, 0x00, 0xFF ); FCML_I64( "vpinsrw xmm0,xmm0,word ptr [rax],0ffh", 0xc5, 0xf9, 0xc4, 0x00, 0xff ); FCML_I32_D( "vpinsrw xmm0,xmm0,ecx,0ffh", 0xC4, 0xE1, 0x79, 0xC4, 0xC1, 0xFF ); FCML_I32( "vpinsrw xmm0,xmm0,ecx,0ffh", 0xc5, 0xf9, 0xc4, 0xc1, 0xff ); FCML_A64( "pinsrw $0xff,(%rax),%mm0", 0x0f, 0xc4, 0x00, 0xff ); FCML_A64( "pinsrw $0xff,%ecx,%mm0", 0x0f, 0xc4, 0xc1, 0xff ); FCML_A64( "pinsrw $0xff,(%rax),%xmm0", 0x66, 0x0f, 0xc4, 0x00, 0xff ); FCML_A64( "pinsrw $0xff,%ecx,%xmm0", 0x66, 0x0f, 0xc4, 0xc1, 0xff ); FCML_A64( "vpinsrw $0xff,(%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xc4, 0x00, 0xff ); FCML_A64( "vpinsrw $0xff,%ecx,%xmm0,%xmm0", 0xc5, 0xf9, 0xc4, 0xc1, 0xff ); } void fcml_tf_instruction_PMADDUBSW(void) { FCML_I64( "pmaddubsw mm0,mmword ptr [rax]", 0x0F, 0x38, 0x04, 0x00 ); FCML_I32( "pmaddubsw mm0,mm1", 0x0F, 0x38, 0x04, 0xC1 ); FCML_I64( "pmaddubsw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x04, 0x00 ); FCML_I32( "pmaddubsw xmm0,xmm1", 0x66, 0x0F, 0x38, 0x04, 0xC1 ); FCML_I64( "vpmaddubsw xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x04, 0x00 ); FCML_I32( "vpmaddubsw xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x04, 0xC1 ); FCML_I64( "vpmaddubsw ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x04, 0x00 ); FCML_I32( "vpmaddubsw ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x04, 0xC1 ); FCML_A64( "pmaddubsw (%rax),%mm0", 0x0f, 0x38, 0x04, 0x00 ); FCML_A64( "pmaddubsw %mm1,%mm0", 0x0f, 0x38, 0x04, 0xc1 ); FCML_A64( "pmaddubsw (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x04, 0x00 ); FCML_A64( "pmaddubsw %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x04, 0xc1 ); FCML_A64( "vpmaddubsw (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x04, 0x00 ); FCML_A64( "vpmaddubsw %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x04, 0xc1 ); FCML_A64( "vpmaddubsw (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x04, 0x00 ); FCML_A64( "vpmaddubsw %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x04, 0xc1 ); } void fcml_tf_instruction_PMADDWD(void) { FCML_I64( "pmaddwd mm0,mmword ptr [rax]", 0x0F, 0xF5, 0x00 ); FCML_I32( "pmaddwd mm0,mm1", 0x0F, 0xF5, 0xC1 ); FCML_I64( "pmaddwd xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xF5, 0x00 ); FCML_I32( "pmaddwd xmm0,xmm1", 0x66, 0x0F, 0xF5, 0xC1 ); FCML_I64( "vpmaddwd xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xf5, 0x00 ); FCML_I32( "vpmaddwd xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xf5, 0xc1 ); FCML_I64( "vpmaddwd ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xf5, 0x00 ); FCML_I32( "vpmaddwd ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xf5, 0xc1 ); FCML_A64( "pmaddwd (%rax),%mm0", 0x0f, 0xf5, 0x00 ); FCML_A64( "pmaddwd %mm1,%mm0", 0x0f, 0xf5, 0xc1 ); FCML_A64( "pmaddwd (%rax),%xmm0", 0x66, 0x0f, 0xf5, 0x00 ); FCML_A64( "pmaddwd %xmm1,%xmm0", 0x66, 0x0f, 0xf5, 0xc1 ); FCML_A64( "vpmaddwd (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xf5, 0x00 ); FCML_A64( "vpmaddwd %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xf5, 0xc1 ); FCML_A64( "vpmaddwd (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xf5, 0x00 ); FCML_A64( "vpmaddwd %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xf5, 0xc1 ); } void fcml_tf_instruction_PMAXSB(void) { FCML_I64( "pmaxsb xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x3C, 0x00 ); FCML_I32( "pmaxsb xmm0,xmm1", 0x66, 0x0F, 0x38, 0x3C, 0xC1 ); FCML_I64( "vpmaxsb xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x3C, 0x00 ); FCML_I32( "vpmaxsb xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x3C, 0xC1 ); FCML_I64( "vpmaxsb ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x3C, 0x00 ); FCML_I32( "vpmaxsb ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x3C, 0xC1 ); FCML_A64( "pmaxsb (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x3c, 0x00 ); FCML_A64( "pmaxsb %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x3c, 0xc1 ); FCML_A64( "vpmaxsb (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x3c, 0x00 ); FCML_A64( "vpmaxsb %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x3c, 0xc1 ); FCML_A64( "vpmaxsb (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x3c, 0x00 ); FCML_A64( "vpmaxsb %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x3c, 0xc1 ); } void fcml_tf_instruction_PMAXSD(void) { FCML_I64( "pmaxsd xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x3D, 0x00 ); FCML_I32( "pmaxsd xmm0,xmm1", 0x66, 0x0F, 0x38, 0x3D, 0xC1 ); FCML_I64( "vpmaxsd xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x3D, 0x00 ); FCML_I32( "vpmaxsd xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x3D, 0xC1 ); FCML_I64( "vpmaxsd ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x3D, 0x00 ); FCML_I32( "vpmaxsd ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x3D, 0xC1 ); FCML_A64( "pmaxsd (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x3d, 0x00 ); FCML_A64( "pmaxsd %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x3d, 0xc1 ); FCML_A64( "vpmaxsd (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x3d, 0x00 ); FCML_A64( "vpmaxsd %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x3d, 0xc1 ); FCML_A64( "vpmaxsd (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x3d, 0x00 ); FCML_A64( "vpmaxsd %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x3d, 0xc1 ); } void fcml_tf_instruction_PMAXSW(void) { FCML_I64( "pmaxsw mm0,mmword ptr [rax]", 0x0F, 0xEE, 0x00 ); FCML_I32( "pmaxsw mm0,mm1", 0x0F, 0xEE, 0xC1 ); FCML_I64( "pmaxsw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xEE, 0x00 ); FCML_I32( "pmaxsw xmm0,xmm1", 0x66, 0x0F, 0xEE, 0xC1 ); FCML_I64( "vpmaxsw xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xee, 0x00 ); FCML_I32( "vpmaxsw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xee, 0xc1 ); FCML_I64( "vpmaxsw ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xee, 0x00 ); FCML_I32( "vpmaxsw ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xee, 0xc1 ); FCML_A64( "pmaxsw (%rax),%mm0", 0x0f, 0xee, 0x00 ); FCML_A64( "pmaxsw %mm1,%mm0", 0x0f, 0xee, 0xc1 ); FCML_A64( "pmaxsw (%rax),%xmm0", 0x66, 0x0f, 0xee, 0x00 ); FCML_A64( "pmaxsw %xmm1,%xmm0", 0x66, 0x0f, 0xee, 0xc1 ); FCML_A64( "vpmaxsw (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xee, 0x00 ); FCML_A64( "vpmaxsw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xee, 0xc1 ); FCML_A64( "vpmaxsw (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xee, 0x00 ); FCML_A64( "vpmaxsw %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xee, 0xc1 ); } void fcml_tf_instruction_PMAXUB(void) { FCML_I64( "pmaxub mm0,mmword ptr [rax]", 0x0F, 0xDE, 0x00 ); FCML_I32( "pmaxub mm0,mm1", 0x0F, 0xDE, 0xC1 ); FCML_I64( "pmaxub xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xDE, 0x00 ); FCML_I32( "pmaxub xmm0,xmm1", 0x66, 0x0F, 0xDE, 0xC1 ); FCML_I64( "vpmaxub xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xde, 0x00 ); FCML_I32( "vpmaxub xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xde, 0xc1 ); FCML_I64( "vpmaxub ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xde, 0x00 ); FCML_I32( "vpmaxub ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xde, 0xc1 ); FCML_A64( "pmaxub (%rax),%mm0", 0x0f, 0xde, 0x00 ); FCML_A64( "pmaxub %mm1,%mm0", 0x0f, 0xde, 0xc1 ); FCML_A64( "pmaxub (%rax),%xmm0", 0x66, 0x0f, 0xde, 0x00 ); FCML_A64( "pmaxub %xmm1,%xmm0", 0x66, 0x0f, 0xde, 0xc1 ); FCML_A64( "vpmaxub (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xde, 0x00 ); FCML_A64( "vpmaxub %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xde, 0xc1 ); FCML_A64( "vpmaxub (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xde, 0x00 ); FCML_A64( "vpmaxub %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xde, 0xc1 ); } void fcml_tf_instruction_PMAXUD(void) { FCML_I64( "pmaxud xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x3F, 0x00 ); FCML_I32( "pmaxud xmm0,xmm1", 0x66, 0x0F, 0x38, 0x3F, 0xC1 ); FCML_I64( "vpmaxud xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x3F, 0x00 ); FCML_I32( "vpmaxud xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x3F, 0xC1 ); FCML_I64( "vpmaxud ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x3F, 0x00 ); FCML_I32( "vpmaxud ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x3F, 0xC1 ); FCML_A64( "pmaxud (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x3f, 0x00 ); FCML_A64( "pmaxud %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x3f, 0xc1 ); FCML_A64( "vpmaxud (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x3f, 0x00 ); FCML_A64( "vpmaxud %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x3f, 0xc1 ); FCML_A64( "vpmaxud (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x3f, 0x00 ); FCML_A64( "vpmaxud %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x3f, 0xc1 ); } void fcml_tf_instruction_PMAXUW(void) { FCML_I64( "pmaxuw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x3E, 0x00 ); FCML_I32( "pmaxuw xmm0,xmm1", 0x66, 0x0F, 0x38, 0x3E, 0xC1 ); FCML_I64( "vpmaxuw xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x3E, 0x00 ); FCML_I32( "vpmaxuw xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x3E, 0xC1 ); FCML_I64( "vpmaxuw ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x3E, 0x00 ); FCML_I32( "vpmaxuw ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x3E, 0xC1 ); FCML_A64( "pmaxuw (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x3e, 0x00 ); FCML_A64( "pmaxuw %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x3e, 0xc1 ); FCML_A64( "vpmaxuw (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x3e, 0x00 ); FCML_A64( "vpmaxuw %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x3e, 0xc1 ); FCML_A64( "vpmaxuw (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x3e, 0x00 ); FCML_A64( "vpmaxuw %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x3e, 0xc1 ); } void fcml_tf_instruction_PMINSB(void) { FCML_I64( "pminsb xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x38, 0x00 ); FCML_I32( "pminsb xmm0,xmm1", 0x66, 0x0F, 0x38, 0x38, 0xC1 ); FCML_I64( "vpminsb xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x38, 0x00 ); FCML_I32( "vpminsb xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x38, 0xC1 ); FCML_I64( "vpminsb ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x38, 0x00 ); FCML_I32( "vpminsb ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x38, 0xC1 ); FCML_A64( "pminsb (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x38, 0x00 ); FCML_A64( "pminsb %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x38, 0xc1 ); FCML_A64( "vpminsb (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x38, 0x00 ); FCML_A64( "vpminsb %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x38, 0xc1 ); FCML_A64( "vpminsb (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x38, 0x00 ); FCML_A64( "vpminsb %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x38, 0xc1 ); } void fcml_tf_instruction_PMINSD(void) { FCML_I64( "pminsd xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x39, 0x00 ); FCML_I32( "pminsd xmm0,xmm1", 0x66, 0x0F, 0x38, 0x39, 0xC1 ); FCML_I64( "vpminsd xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x39, 0x00 ); FCML_I32( "vpminsd xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x39, 0xC1 ); FCML_I64( "vpminsd ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x39, 0x00 ); FCML_I32( "vpminsd ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x39, 0xC1 ); FCML_A64( "pminsd (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x39, 0x00 ); FCML_A64( "pminsd %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x39, 0xc1 ); FCML_A64( "vpminsd (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x39, 0x00 ); FCML_A64( "vpminsd %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x39, 0xc1 ); FCML_A64( "vpminsd (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x39, 0x00 ); FCML_A64( "vpminsd %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x39, 0xc1 ); } void fcml_tf_instruction_PMINSW(void) { FCML_I64( "pminsw mm0,mmword ptr [rax]", 0x0F, 0xEA, 0x00 ); FCML_I32( "pminsw mm0,mm1", 0x0F, 0xEA, 0xC1 ); FCML_I64( "pminsw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xEA, 0x00 ); FCML_I32( "pminsw xmm0,xmm1", 0x66, 0x0F, 0xEA, 0xC1 ); FCML_I64( "vpminsw xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xea, 0x00 ); FCML_I32( "vpminsw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xea, 0xc1 ); FCML_I64( "vpminsw ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xea, 0x00 ); FCML_I32( "vpminsw ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xea, 0xc1 ); FCML_A64( "pminsw (%rax),%mm0", 0x0f, 0xea, 0x00 ); FCML_A64( "pminsw %mm1,%mm0", 0x0f, 0xea, 0xc1 ); FCML_A64( "pminsw (%rax),%xmm0", 0x66, 0x0f, 0xea, 0x00 ); FCML_A64( "pminsw %xmm1,%xmm0", 0x66, 0x0f, 0xea, 0xc1 ); FCML_A64( "vpminsw (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xea, 0x00 ); FCML_A64( "vpminsw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xea, 0xc1 ); FCML_A64( "vpminsw (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xea, 0x00 ); FCML_A64( "vpminsw %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xea, 0xc1 ); } void fcml_tf_instruction_PMINUB(void) { FCML_I64( "pminub mm0,mmword ptr [rax]", 0x0F, 0xDA, 0x00 ); FCML_I32( "pminub mm0,mm1", 0x0F, 0xDA, 0xC1 ); FCML_I64( "pminub xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xDA, 0x00 ); FCML_I32( "pminub xmm0,xmm1", 0x66, 0x0F, 0xDA, 0xC1 ); FCML_I64( "vpminub xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xda, 0x00 ); FCML_I32( "vpminub xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xda, 0xc1 ); FCML_I64( "vpminub ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xda, 0x00 ); FCML_I32( "vpminub ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xda, 0xc1 ); FCML_A64( "pminub (%rax),%mm0", 0x0f, 0xda, 0x00 ); FCML_A64( "pminub %mm1,%mm0", 0x0f, 0xda, 0xc1 ); FCML_A64( "pminub (%rax),%xmm0", 0x66, 0x0f, 0xda, 0x00 ); FCML_A64( "pminub %xmm1,%xmm0", 0x66, 0x0f, 0xda, 0xc1 ); FCML_A64( "vpminub (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xda, 0x00 ); FCML_A64( "vpminub %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xda, 0xc1 ); FCML_A64( "vpminub (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xda, 0x00 ); FCML_A64( "vpminub %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xda, 0xc1 ); } void fcml_tf_instruction_PMINUW(void) { FCML_I64( "pminuw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x3A, 0x00 ); FCML_I32( "pminuw xmm0,xmm1", 0x66, 0x0F, 0x38, 0x3A, 0xC1 ); FCML_I64( "vpminuw xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x3A, 0x00 ); FCML_I32( "vpminuw xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x3A, 0xC1 ); FCML_I64( "vpminuw ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x3A, 0x00 ); FCML_I32( "vpminuw ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x3A, 0xC1 ); FCML_A64( "pminuw (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x3a, 0x00 ); FCML_A64( "pminuw %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x3a, 0xc1 ); FCML_A64( "vpminuw (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x3a, 0x00 ); FCML_A64( "vpminuw %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x3a, 0xc1 ); FCML_A64( "vpminuw (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x3a, 0x00 ); FCML_A64( "vpminuw %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x3a, 0xc1 ); } void fcml_tf_instruction_PMINUD(void) { FCML_I64( "pminud xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x3B, 0x00 ); FCML_I32( "pminud xmm0,xmm1", 0x66, 0x0F, 0x38, 0x3B, 0xC1 ); FCML_I64( "vpminud xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x3B, 0x00 ); FCML_I32( "vpminud xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x3B, 0xC1 ); FCML_I64( "vpminud ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x3B, 0x00 ); FCML_I32( "vpminud ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x3B, 0xC1 ); FCML_A64( "pminud (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x3b, 0x00 ); FCML_A64( "pminud %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x3b, 0xc1 ); FCML_A64( "vpminud (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x3b, 0x00 ); FCML_A64( "vpminud %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x3b, 0xc1 ); FCML_A64( "vpminud (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x3b, 0x00 ); FCML_A64( "vpminud %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x3b, 0xc1 ); } void fcml_tf_instruction_PMOVMSKB(void) { FCML_I32( "pmovmskb eax,mm1", 0x0F, 0xD7, 0xC1 ); FCML_I64( "pmovmskb rax,mm1", 0x0F, 0xD7, 0xC1 ); FCML_I32( "pmovmskb eax,xmm1", 0x66, 0x0F, 0xD7, 0xC1 ); FCML_I64( "pmovmskb rax,xmm1", 0x66, 0x0F, 0xD7, 0xC1 ); FCML_I32( "vpmovmskb eax,xmm0", 0xc5, 0xf9, 0xd7, 0xc0 ); FCML_I64( "vpmovmskb rcx,xmm0", 0xc5, 0xf9, 0xd7, 0xc8 ); FCML_I32( "vpmovmskb ecx,ymm0", 0xc5, 0xfd, 0xd7, 0xc8 ); FCML_I64( "vpmovmskb rax,ymm0", 0xc5, 0xfd, 0xd7, 0xc0 ); FCML_A64( "pmovmskb %mm1,%rax", 0x0f, 0xd7, 0xc1 ); FCML_A64( "pmovmskb %mm1,%rax", 0x0f, 0xd7, 0xc1 ); FCML_A64( "pmovmskb %xmm1,%rax", 0x66, 0x0f, 0xd7, 0xc1 ); FCML_A64( "pmovmskb %xmm1,%rax", 0x66, 0x0f, 0xd7, 0xc1 ); FCML_A64( "vpmovmskb %xmm0,%rax", 0xc5, 0xf9, 0xd7, 0xc0 ); FCML_A64( "vpmovmskb %xmm0,%rcx", 0xc5, 0xf9, 0xd7, 0xc8 ); FCML_A64( "vpmovmskb %ymm0,%rcx", 0xc5, 0xfd, 0xd7, 0xc8 ); FCML_A64( "vpmovmskb %ymm0,%rax", 0xc5, 0xfd, 0xd7, 0xc0 ); } void fcml_tf_instruction_PMOVSX(void) { FCML_I64( "pmovsxbw xmm0,mmword ptr [rax]", 0x66, 0x0F, 0x38, 0x20, 0x00 ); FCML_I32( "pmovsxbw xmm0,xmm1", 0x66, 0x0F, 0x38, 0x20, 0xC1 ); FCML_I64( "pmovsxbd xmm0,dword ptr [rax]", 0x66, 0x0F, 0x38, 0x21, 0x00 ); FCML_I32( "pmovsxbd xmm0,xmm1", 0x66, 0x0F, 0x38, 0x21, 0xC1 ); FCML_I64( "pmovsxbq xmm0,word ptr [rax]", 0x66, 0x0F, 0x38, 0x22, 0x00 ); FCML_I32( "pmovsxbq xmm0,xmm1", 0x66, 0x0F, 0x38, 0x22, 0xC1 ); FCML_I64( "pmovsxwd xmm0,mmword ptr [rax]", 0x66, 0x0F, 0x38, 0x23, 0x00 ); FCML_I32( "pmovsxwd xmm0,xmm1", 0x66, 0x0F, 0x38, 0x23, 0xC1 ); FCML_I64( "pmovsxwq xmm0,dword ptr [rax]", 0x66, 0x0F, 0x38, 0x24, 0x00 ); FCML_I32( "pmovsxwq xmm0,xmm1", 0x66, 0x0F, 0x38, 0x24, 0xC1 ); FCML_I64( "pmovsxdq xmm0,mmword ptr [rax]", 0x66, 0x0F, 0x38, 0x25, 0x00 ); FCML_I32( "pmovsxdq xmm0,xmm1", 0x66, 0x0F, 0x38, 0x25, 0xC1 ); FCML_I32( "vpmovsxbw xmm0,mmword ptr [eax]", 0xC4, 0xE2, 0x79, 0x20, 0x00 ); FCML_I64( "vpmovsxbw xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x20, 0xC1 ); FCML_I32( "vpmovsxbd xmm0,dword ptr [eax]", 0xC4, 0xE2, 0x79, 0x21, 0x00 ); FCML_I64( "vpmovsxbd xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x21, 0xC1 ); FCML_I32( "vpmovsxbq xmm0,word ptr [eax]", 0xC4, 0xE2, 0x79, 0x22, 0x00 ); FCML_I64( "vpmovsxbq xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x22, 0xC1 ); FCML_I32( "vpmovsxwd xmm0,mmword ptr [eax]", 0xC4, 0xE2, 0x79, 0x23, 0x00 ); FCML_I64( "vpmovsxwd xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x23, 0xC1 ); FCML_I32( "vpmovsxwq xmm0,dword ptr [eax]", 0xC4, 0xE2, 0x79, 0x24, 0x00 ); FCML_I64( "vpmovsxwq xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x24, 0xC1 ); FCML_I32( "vpmovsxdq xmm0,mmword ptr [eax]", 0xC4, 0xE2, 0x79, 0x25, 0x00 ); FCML_I64( "vpmovsxdq xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x25, 0xC1 ); FCML_I32( "vpmovsxbw ymm0,xmmword ptr [eax]", 0xC4, 0xE2, 0x7D, 0x20, 0x00 ); FCML_I64( "vpmovsxbw ymm0,xmm1", 0xC4, 0xE2, 0x7D, 0x20, 0xC1 ); FCML_I32( "vpmovsxbd ymm0,mmword ptr [eax]", 0xC4, 0xE2, 0x7D, 0x21, 0x00 ); FCML_I64( "vpmovsxbd ymm0,xmm1", 0xC4, 0xE2, 0x7D, 0x21, 0xC1 ); FCML_I32( "vpmovsxbq ymm0,dword ptr [eax]", 0xC4, 0xE2, 0x7D, 0x22, 0x00 ); FCML_I64( "vpmovsxbq ymm0,xmm1", 0xC4, 0xE2, 0x7D, 0x22, 0xC1 ); FCML_A64( "pmovsxbw (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x20, 0x00 ); FCML_A64( "pmovsxbw %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x20, 0xc1 ); FCML_A64( "pmovsxbd (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x21, 0x00 ); FCML_A64( "pmovsxbd %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x21, 0xc1 ); FCML_A64( "pmovsxbq (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x22, 0x00 ); FCML_A64( "pmovsxbq %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x22, 0xc1 ); FCML_A64( "pmovsxwd (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x23, 0x00 ); FCML_A64( "pmovsxwd %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x23, 0xc1 ); FCML_A64( "pmovsxwq (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x24, 0x00 ); FCML_A64( "pmovsxwq %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x24, 0xc1 ); FCML_A64( "pmovsxdq (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x25, 0x00 ); FCML_A64( "pmovsxdq %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x25, 0xc1 ); FCML_A64( "vpmovsxbw (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x20, 0x00 ); FCML_A64( "vpmovsxbw %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x20, 0xc1 ); FCML_A64( "vpmovsxbd (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x21, 0x00 ); FCML_A64( "vpmovsxbd %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x21, 0xc1 ); FCML_A64( "vpmovsxbq (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x22, 0x00 ); FCML_A64( "vpmovsxbq %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x22, 0xc1 ); FCML_A64( "vpmovsxwd (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x23, 0x00 ); FCML_A64( "vpmovsxwd %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x23, 0xc1 ); FCML_A64( "vpmovsxwq (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x24, 0x00 ); FCML_A64( "vpmovsxwq %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x24, 0xc1 ); FCML_A64( "vpmovsxdq (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x25, 0x00 ); FCML_A64( "vpmovsxdq %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x25, 0xc1 ); FCML_A64( "vpmovsxbw (%rax),%ymm0", 0xc4, 0xe2, 0x7d, 0x20, 0x00 ); FCML_A64( "vpmovsxbw %xmm1,%ymm0", 0xc4, 0xe2, 0x7d, 0x20, 0xc1 ); FCML_A64( "vpmovsxbd (%rax),%ymm0", 0xc4, 0xe2, 0x7d, 0x21, 0x00 ); FCML_A64( "vpmovsxbd %xmm1,%ymm0", 0xc4, 0xe2, 0x7d, 0x21, 0xc1 ); FCML_A64( "vpmovsxbq (%rax),%ymm0", 0xc4, 0xe2, 0x7d, 0x22, 0x00 ); FCML_A64( "vpmovsxbq %xmm1,%ymm0", 0xc4, 0xe2, 0x7d, 0x22, 0xc1 ); } void fcml_tf_instruction_PMOVZX(void) { FCML_I64( "pmovzxbw xmm0,mmword ptr [rax]", 0x66, 0x0F, 0x38, 0x30, 0x00 ); FCML_I32( "pmovzxbw xmm0,xmm1", 0x66, 0x0F, 0x38, 0x30, 0xC1 ); FCML_I64( "pmovzxbd xmm0,dword ptr [rax]", 0x66, 0x0F, 0x38, 0x31, 0x00 ); FCML_I32( "pmovzxbd xmm0,xmm1", 0x66, 0x0F, 0x38, 0x31, 0xC1 ); FCML_I64( "pmovzxbq xmm0,word ptr [rax]", 0x66, 0x0F, 0x38, 0x32, 0x00 ); FCML_I32( "pmovzxbq xmm0,xmm1", 0x66, 0x0F, 0x38, 0x32, 0xC1 ); FCML_I64( "pmovzxwd xmm0,mmword ptr [rax]", 0x66, 0x0F, 0x38, 0x33, 0x00 ); FCML_I32( "pmovzxwd xmm0,xmm1", 0x66, 0x0F, 0x38, 0x33, 0xC1 ); FCML_I64( "pmovzxwq xmm0,dword ptr [rax]", 0x66, 0x0F, 0x38, 0x34, 0x00 ); FCML_I32( "pmovzxwq xmm0,xmm1", 0x66, 0x0F, 0x38, 0x34, 0xC1 ); FCML_I64( "pmovzxdq xmm0,mmword ptr [rax]", 0x66, 0x0F, 0x38, 0x35, 0x00 ); FCML_I32( "pmovzxdq xmm0,xmm1", 0x66, 0x0F, 0x38, 0x35, 0xC1 ); FCML_I32( "vpmovzxbw xmm0,mmword ptr [eax]", 0xC4, 0xE2, 0x79, 0x30, 0x00 ); FCML_I64( "vpmovzxbw xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x30, 0xC1 ); FCML_I32( "vpmovzxbd xmm0,dword ptr [eax]", 0xC4, 0xE2, 0x79, 0x31, 0x00 ); FCML_I64( "vpmovzxbd xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x31, 0xC1 ); FCML_I32( "vpmovzxbq xmm0,word ptr [eax]", 0xC4, 0xE2, 0x79, 0x32, 0x00 ); FCML_I64( "vpmovzxbq xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x32, 0xC1 ); FCML_I32( "vpmovzxwd xmm0,mmword ptr [eax]", 0xC4, 0xE2, 0x79, 0x33, 0x00 ); FCML_I64( "vpmovzxwd xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x33, 0xC1 ); FCML_I32( "vpmovzxwq xmm0,dword ptr [eax]", 0xC4, 0xE2, 0x79, 0x34, 0x00 ); FCML_I64( "vpmovzxwq xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x34, 0xC1 ); FCML_I32( "vpmovzxdq xmm0,mmword ptr [eax]", 0xC4, 0xE2, 0x79, 0x35, 0x00 ); FCML_I64( "vpmovzxdq xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x35, 0xC1 ); FCML_I32( "vpmovzxbw ymm0,xmmword ptr [eax]", 0xC4, 0xE2, 0x7D, 0x30, 0x00 ); FCML_I64( "vpmovzxbw ymm0,xmm1", 0xC4, 0xE2, 0x7D, 0x30, 0xC1 ); FCML_I32( "vpmovzxbd ymm0,mmword ptr [eax]", 0xC4, 0xE2, 0x7D, 0x31, 0x00 ); FCML_I64( "vpmovzxbd ymm0,xmm1", 0xC4, 0xE2, 0x7D, 0x31, 0xC1 ); FCML_I32( "vpmovzxbq ymm0,dword ptr [eax]", 0xC4, 0xE2, 0x7D, 0x32, 0x00 ); FCML_I64( "vpmovzxbq ymm0,xmm1", 0xC4, 0xE2, 0x7D, 0x32, 0xC1 ); FCML_I32( "vpmovzxwd ymm0,xmmword ptr [eax]", 0xC4, 0xE2, 0x7D, 0x33, 0x00 ); FCML_I64( "vpmovzxwd ymm0,xmm1", 0xC4, 0xE2, 0x7D, 0x33, 0xC1 ); FCML_A64( "pmovzxbw (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x30, 0x00 ); FCML_A64( "pmovzxbw %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x30, 0xc1 ); FCML_A64( "pmovzxbd (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x31, 0x00 ); FCML_A64( "pmovzxbd %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x31, 0xc1 ); FCML_A64( "pmovzxbq (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x32, 0x00 ); FCML_A64( "pmovzxbq %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x32, 0xc1 ); FCML_A64( "pmovzxwd (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x33, 0x00 ); FCML_A64( "pmovzxwd %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x33, 0xc1 ); FCML_A64( "pmovzxwq (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x34, 0x00 ); FCML_A64( "pmovzxwq %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x34, 0xc1 ); FCML_A64( "pmovzxdq (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x35, 0x00 ); FCML_A64( "pmovzxdq %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x35, 0xc1 ); FCML_A64( "vpmovzxbw (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x30, 0x00 ); FCML_A64( "vpmovzxbw %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x30, 0xc1 ); FCML_A64( "vpmovzxbd (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x31, 0x00 ); FCML_A64( "vpmovzxbd %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x31, 0xc1 ); FCML_A64( "vpmovzxbq (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x32, 0x00 ); FCML_A64( "vpmovzxbq %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x32, 0xc1 ); FCML_A64( "vpmovzxwd (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x33, 0x00 ); FCML_A64( "vpmovzxwd %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x33, 0xc1 ); FCML_A64( "vpmovzxwq (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x34, 0x00 ); FCML_A64( "vpmovzxwq %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x34, 0xc1 ); FCML_A64( "vpmovzxdq (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x35, 0x00 ); FCML_A64( "vpmovzxdq %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x35, 0xc1 ); FCML_A64( "vpmovzxbw (%rax),%ymm0", 0xc4, 0xe2, 0x7d, 0x30, 0x00 ); FCML_A64( "vpmovzxbw %xmm1,%ymm0", 0xc4, 0xe2, 0x7d, 0x30, 0xc1 ); FCML_A64( "vpmovzxbd (%rax),%ymm0", 0xc4, 0xe2, 0x7d, 0x31, 0x00 ); FCML_A64( "vpmovzxbd %xmm1,%ymm0", 0xc4, 0xe2, 0x7d, 0x31, 0xc1 ); FCML_A64( "vpmovzxbq (%rax),%ymm0", 0xc4, 0xe2, 0x7d, 0x32, 0x00 ); FCML_A64( "vpmovzxbq %xmm1,%ymm0", 0xc4, 0xe2, 0x7d, 0x32, 0xc1 ); FCML_A64( "vpmovzxwd (%rax),%ymm0", 0xc4, 0xe2, 0x7d, 0x33, 0x00 ); FCML_A64( "vpmovzxwd %xmm1,%ymm0", 0xc4, 0xe2, 0x7d, 0x33, 0xc1 ); } void fcml_tf_instruction_PMULDQ(void) { FCML_I64( "pmuldq xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x28, 0x00 ); FCML_I32( "pmuldq xmm0,xmm1", 0x66, 0x0F, 0x38, 0x28, 0xC1 ); FCML_I64( "vpmuldq xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x28, 0x00 ); FCML_I32( "vpmuldq xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x28, 0xC1 ); FCML_I64( "vpmuldq ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x28, 0x00 ); FCML_I32( "vpmuldq ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x28, 0xC1 ); FCML_A64( "pmuldq (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x28, 0x00 ); FCML_A64( "pmuldq %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x28, 0xc1 ); FCML_A64( "vpmuldq (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x28, 0x00 ); FCML_A64( "vpmuldq %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x28, 0xc1 ); FCML_A64( "vpmuldq (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x28, 0x00 ); FCML_A64( "vpmuldq %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x28, 0xc1 ); } void fcml_tf_instruction_PMULHRSW(void) { FCML_I64( "pmulhrsw mm0,mmword ptr [rax]", 0x0F, 0x38, 0x0B, 0x00 ); FCML_I32( "pmulhrsw mm0,mm1", 0x0F, 0x38, 0x0B, 0xC1 ); FCML_I64( "pmulhrsw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x0B, 0x00 ); FCML_I32( "pmulhrsw xmm0,xmm1", 0x66, 0x0F, 0x38, 0x0B, 0xC1 ); FCML_I64( "vpmulhrsw xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x0B, 0x00 ); FCML_I32( "vpmulhrsw xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x0B, 0xC1 ); FCML_I64( "vpmulhrsw ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x0B, 0x00 ); FCML_I32( "vpmulhrsw ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x0B, 0xC1 ); FCML_A64( "pmulhrsw (%rax),%mm0", 0x0f, 0x38, 0x0b, 0x00 ); FCML_A64( "pmulhrsw %mm1,%mm0", 0x0f, 0x38, 0x0b, 0xc1 ); FCML_A64( "pmulhrsw (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x0b, 0x00 ); FCML_A64( "pmulhrsw %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x0b, 0xc1 ); FCML_A64( "vpmulhrsw (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x0b, 0x00 ); FCML_A64( "vpmulhrsw %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x0b, 0xc1 ); FCML_A64( "vpmulhrsw (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x0b, 0x00 ); FCML_A64( "vpmulhrsw %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x0b, 0xc1 ); } void fcml_tf_instruction_PMULHUW(void) { FCML_I64( "pmulhuw mm0,mmword ptr [rax]", 0x0F, 0xE4, 0x00 ); FCML_I32( "pmulhuw mm0,mm1", 0x0F, 0xE4, 0xC1 ); FCML_I64( "pmulhuw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xE4, 0x00 ); FCML_I32( "pmulhuw xmm0,xmm1", 0x66, 0x0F, 0xE4, 0xC1 ); FCML_I64( "vpmulhuw xmm1,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xe4, 0x08 ); FCML_I32( "vpmulhuw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xe4, 0xc1 ); FCML_I64( "vpmulhuw ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xe4, 0x00 ); FCML_I32( "vpmulhuw ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xe4, 0xc1 ); FCML_A64( "pmulhuw (%rax),%mm0", 0x0f, 0xe4, 0x00 ); FCML_A64( "pmulhuw %mm1,%mm0", 0x0f, 0xe4, 0xc1 ); FCML_A64( "pmulhuw (%rax),%xmm0", 0x66, 0x0f, 0xe4, 0x00 ); FCML_A64( "pmulhuw %xmm1,%xmm0", 0x66, 0x0f, 0xe4, 0xc1 ); FCML_A64( "vpmulhuw (%rax),%xmm0,%xmm1", 0xc5, 0xf9, 0xe4, 0x08 ); FCML_A64( "vpmulhuw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xe4, 0xc1 ); FCML_A64( "vpmulhuw (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xe4, 0x00 ); FCML_A64( "vpmulhuw %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xe4, 0xc1 ); } void fcml_tf_instruction_PMULHW(void) { FCML_I64( "pmulhw mm0,mmword ptr [rax]", 0x0F, 0xE5, 0x00 ); FCML_I32( "pmulhw mm0,mm1", 0x0F, 0xE5, 0xC1 ); FCML_I64( "pmulhw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xE5, 0x00 ); FCML_I32( "pmulhw xmm0,xmm1", 0x66, 0x0F, 0xE5, 0xC1 ); FCML_I64( "vpmulhw xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xe5, 0x00 ); FCML_I32( "vpmulhw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xe5, 0xc1 ); FCML_I64( "vpmulhw ymm0,ymm13,ymmword ptr [rax]", 0xc5, 0x95, 0xe5, 0x00 ); FCML_I32( "vpmulhw ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xe5, 0xc1 ); FCML_A64( "pmulhw (%rax),%mm0", 0x0f, 0xe5, 0x00 ); FCML_A64( "pmulhw %mm1,%mm0", 0x0f, 0xe5, 0xc1 ); FCML_A64( "pmulhw (%rax),%xmm0", 0x66, 0x0f, 0xe5, 0x00 ); FCML_A64( "pmulhw %xmm1,%xmm0", 0x66, 0x0f, 0xe5, 0xc1 ); FCML_A64( "vpmulhw (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xe5, 0x00 ); FCML_A64( "vpmulhw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xe5, 0xc1 ); FCML_A64( "vpmulhw (%rax),%ymm13,%ymm0", 0xc5, 0x95, 0xe5, 0x00 ); FCML_A64( "vpmulhw %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xe5, 0xc1 ); } void fcml_tf_instruction_PMULUDQ(void) { FCML_I64( "pmuludq mm0,mmword ptr [rax]", 0x0F, 0xF4, 0x00 ); FCML_I32( "pmuludq mm0,mm1", 0x0F, 0xF4, 0xC1 ); FCML_I64( "pmuludq xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xF4, 0x00 ); FCML_I32( "pmuludq xmm0,xmm1", 0x66, 0x0F, 0xF4, 0xC1 ); FCML_I64( "vpmuludq ymm8,ymm13,ymmword ptr [rax]", 0xc5, 0x15, 0xf4, 0x00 ); FCML_I32( "vpmuludq xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xf4, 0xc1 ); FCML_I64( "vpmuludq ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xf4, 0x00 ); FCML_I32( "vpmuludq ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xf4, 0xc1 ); FCML_A64( "pmuludq (%rax),%mm0", 0x0f, 0xf4, 0x00 ); FCML_A64( "pmuludq %mm1,%mm0", 0x0f, 0xf4, 0xc1 ); FCML_A64( "pmuludq (%rax),%xmm0", 0x66, 0x0f, 0xf4, 0x00 ); FCML_A64( "pmuludq %xmm1,%xmm0", 0x66, 0x0f, 0xf4, 0xc1 ); FCML_A64( "vpmuludq (%rax),%ymm13,%ymm8", 0xc5, 0x15, 0xf4, 0x00 ); FCML_A64( "vpmuludq %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xf4, 0xc1 ); FCML_A64( "vpmuludq (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xf4, 0x00 ); FCML_A64( "vpmuludq %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xf4, 0xc1 ); } void fcml_tf_instruction_PMULLW(void) { FCML_I64( "pmullw mm0,mmword ptr [rax]", 0x0F, 0xD5, 0x00 ); FCML_I32( "pmullw mm0,mm1", 0x0F, 0xD5, 0xC1 ); FCML_I64( "pmullw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xD5, 0x00 ); FCML_I32( "pmullw xmm0,xmm1", 0x66, 0x0F, 0xD5, 0xC1 ); FCML_I64( "vpmullw xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xd5, 0x00 ); FCML_I32( "vpmullw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xd5, 0xc1 ); FCML_I64( "vpmullw ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xd5, 0x00 ); FCML_I32( "vpmullw ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xd5, 0xc1 ); FCML_A64( "pmullw (%rax),%mm0", 0x0f, 0xd5, 0x00 ); FCML_A64( "pmullw %mm1,%mm0", 0x0f, 0xd5, 0xc1 ); FCML_A64( "pmullw (%rax),%xmm0", 0x66, 0x0f, 0xd5, 0x00 ); FCML_A64( "pmullw %xmm1,%xmm0", 0x66, 0x0f, 0xd5, 0xc1 ); FCML_A64( "vpmullw (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xd5, 0x00 ); FCML_A64( "vpmullw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xd5, 0xc1 ); FCML_A64( "vpmullw (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xd5, 0x00 ); FCML_A64( "vpmullw %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xd5, 0xc1 ); } void fcml_tf_instruction_PMULLD(void) { FCML_I64( "pmulld xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x40, 0x00 ); FCML_I32( "pmulld xmm0,xmm1", 0x66, 0x0F, 0x38, 0x40, 0xC1 ); FCML_I64( "vpmulld xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x40, 0x00 ); FCML_I32( "vpmulld xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x40, 0xC1 ); FCML_I64( "vpmulld ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x40, 0x00 ); FCML_I32( "vpmulld ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x40, 0xC1 ); FCML_A64( "pmulld (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x40, 0x00 ); FCML_A64( "pmulld %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x40, 0xc1 ); FCML_A64( "vpmulld (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x40, 0x00 ); FCML_A64( "vpmulld %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x40, 0xc1 ); FCML_A64( "vpmulld (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x40, 0x00 ); FCML_A64( "vpmulld %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x40, 0xc1 ); } void fcml_tf_instruction_POP(void) { FCML_I32( "pop dword ptr [eax]", 0x8F, 0x00 ); FCML_I32_M( "pop eax", 2, FCML_MI( 0x58 ), FCML_MI( 0x8f, 0xc0 ) ); FCML_I32( "pop word ptr [eax]", 0x66, 0x8F, 0x00 ); FCML_I32_M( "pop dx", 2, FCML_MI( 0x66, 0x5a ), FCML_MI( 0x66, 0x8f, 0xc2 ) ); FCML_I32( "pop dword ptr [bx+si]", 0x67, 0x8F, 0x00 ); FCML_I32_D( "pop ecx", 0x67, 0x8F, 0xC1 ); FCML_I32_M( "pop ecx", 2, FCML_MI( 0x59 ), FCML_MI( 0x8f, 0xc1 ) ); FCML_I32( "pop word ptr [bx+si]", 0x66, 0x67, 0x8F, 0x00 ); FCML_I32_M( "pop cx", 2, FCML_MI( 0x66, 0x59 ), FCML_MI( 0x66, 0x8f, 0xc1 ) ); FCML_A32( "popl (%eax)", 0x8f, 0x00 ); FCML_I64( "pop qword ptr [rax]", 0x8F, 0x00 ); FCML_I64_M( "pop rcx", 2, FCML_MI( 0x59 ), FCML_MI( 0x8f, 0xc1 ) ); FCML_I64( "pop word ptr [rax]", 0x66, 0x8F, 0x00 ); FCML_I64_M( "pop cx", 2, FCML_MI( 0x66, 0x59 ), FCML_MI( 0x66, 0x8f, 0xc1 ) ); FCML_I64( "pop qword ptr [eax]", 0x67, 0x8F, 0x00 ); FCML_I64_D( "pop rcx", 0x67, 0x8F, 0xC1 ); FCML_I64( "pop word ptr [eax]", 0x66, 0x67, 0x8F, 0x00 ); FCML_I64_D( "pop cx", 0x66, 0x67, 0x8F, 0xC1 ); FCML_I64_D( "pop qword ptr [rax]", 0x48, 0x8F, 0x00 ); FCML_I64_D( "pop rcx", 0x48, 0x8F, 0xC1 ); FCML_A64( "popq (%rax)", 0x8f, 0x00 ); FCML_A64_M( "pop %rcx", 2, FCML_MI( 0x59 ), FCML_MI( 0x8f, 0xc1 ) ); FCML_A32_M( "pop %ecx", 2, FCML_MI( 0x59 ), FCML_MI( 0x8f, 0xc1 ) ); FCML_A64( "popw (%rax)", 0x66, 0x8f, 0x00 ); FCML_A64_M( "pop %cx", 2, FCML_MI( 0x66, 0x59 ), FCML_MI( 0x66, 0x8f, 0xc1 ) ); FCML_A64( "popq (%eax)", 0x67, 0x8f, 0x00 ); FCML_A64_M( "pop %rcx", 2, FCML_MI( 0x67, 0x59 ), FCML_MI( 0x67, 0x8f, 0xc1 ) ); FCML_A64( "popw (%eax)", 0x66, 0x67, 0x8f, 0x00 ); FCML_A64_M( "pop %cx", 2, FCML_MI( 0x66, 0x67, 0x59 ), FCML_MI( 0x66, 0x67, 0x8f, 0xc1 ) ); FCML_A64_D( "popq (%rax)", 0x48, 0x8f, 0x00 ); FCML_A64_D( "pop %rcx", 0x48, 0x8f, 0xc1 ); FCML_I32_M( "pop eax", 2, FCML_MI( 0x58 ), FCML_MI( 0x8f, 0xc0 ) ); FCML_I32_M( "pop ax", 2, FCML_MI( 0x66, 0x58 ), FCML_MI( 0x66, 0x8f, 0xc0 ) ); FCML_I32_D( "pop eax", 0x67, 0x58 ); FCML_I64_M( "pop rax", 2, FCML_MI( 0x58 ), FCML_MI( 0x8f, 0xc0 ) ); FCML_I64_M( "pop ax", 2, FCML_MI( 0x66, 0x58 ), FCML_MI( 0x66, 0x8f, 0xc0 ) ); FCML_I64_D( "pop rax", 0x67, 0x58 ); FCML_I64_D( "pop rax", 0x48, 0x58 ); FCML_A32_M( "pop %eax", 2, FCML_MI( 0x58 ), FCML_MI( 0x8f, 0xc0 ) ); FCML_A32_M( "pop %ax", 2, FCML_MI( 0x66, 0x58 ), FCML_MI( 0x66, 0x8f, 0xc0 ) ); FCML_A32_D( "pop %eax", 0x67, 0x58 ); FCML_A64_M( "pop %rax", 2, FCML_MI( 0x58 ), FCML_MI( 0x8f, 0xc0 ) ); FCML_A64_M( "pop %ax", 2, FCML_MI( 0x66, 0x58 ), FCML_MI( 0x66, 0x8f, 0xc0 ) ); FCML_A64_D( "pop %rax", 0x67, 0x58 ); FCML_A64_D( "pop %rax", 0x48, 0x58 ); FCML_I32( "pop ds", 0x1F ); FCML_I32( "pop es", 0x07 ); FCML_I32( "pop ss", 0x17 ); FCML_A32( "pop %ds", 0x1F ); FCML_A32( "pop %es", 0x07 ); FCML_A32( "pop %ss", 0x17 ); FCML_I32( "pop fs", 0x0F, 0xA1 ); FCML_I64( "pop fs", 0x0f, 0xa1 ); FCML_A32( "popw %fs", 0x66, 0x0f, 0xa1 ); FCML_A32( "popl %fs", 0x0f, 0xa1 ); FCML_A32_A( "pop %fs", 0x0f, 0xa1 ); FCML_A64( "popw %fs", 0x66, 0x0f, 0xa1 ); FCML_A64( "popq %fs", 0x0f, 0xa1 ); FCML_A64_A( "pop %fs", 0x0f, 0xa1 ); FCML_I32( "pop gs", 0x0F, 0xA9 ); FCML_I64( "pop gs", 0x0F, 0xA9 ); FCML_A32( "popw %gs", 0x66, 0x0f, 0xa9 ); FCML_A32( "popl %gs", 0x0f, 0xa9 ); FCML_A32_A( "pop %gs", 0x0f, 0xa9 ); FCML_A64( "popw %gs", 0x66, 0x0f, 0xa9 ); FCML_A64( "popq %gs", 0x0f, 0xa9 ); FCML_A64_A( "pop %gs", 0x0f, 0xa9 ); } void fcml_tf_instruction_POPA(void) { FCML_I32( "popad", 0x61 ); FCML_I64_FAILED( "popad", 0x61 ); FCML_I32( "popa", 0x66, 0x61 ); FCML_A32( "popa", 0x61 ); FCML_A32( "popaw", 0x66, 0x61 ); } void fcml_tf_instruction_POPCNT(void) { FCML_I32( "popcnt ax,word ptr [eax]", 0x66, 0xF3, 0x0F, 0xB8, 0x00 ); FCML_I32( "popcnt ax,ax", 0x66, 0xF3, 0x0F, 0xB8, 0xC0 ); FCML_I32( "popcnt eax,dword ptr [eax]", 0xF3, 0x0F, 0xB8, 0x00 ); FCML_I64( "popcnt rax,qword ptr [rax]", 0xF3, 0x48, 0x0F, 0xB8, 0x00 ); FCML_A64( "popcnt (%rax),%ax", 0x66, 0xf3, 0x0f, 0xb8, 0x00 ); FCML_A64( "popcnt %ax,%ax", 0x66, 0xf3, 0x0f, 0xb8, 0xc0 ); FCML_A64( "popcnt (%rax),%eax", 0xf3, 0x0f, 0xb8, 0x00 ); FCML_A64( "popcnt (%rax),%rax", 0xf3, 0x48, 0x0f, 0xb8, 0x00 ); } void fcml_tf_instruction_POPF(void) { FCML_I32( "popf", 0x66, 0x9D ); FCML_I64( "popf", 0x66, 0x9D ); FCML_I32( "popfd", 0x9D ); FCML_I64_FAILED( "popfd", 0x9D ); FCML_I64( "popfq", 0x48, 0x9D ); FCML_A32( "popfw", 0x66, 0x9d ); FCML_A32( "popf", 0x9D ); FCML_A64( "popfw", 0x66, 0x9d ); FCML_A64( "popfq", 0x48, 0x9d ); } void fcml_tf_instruction_POR(void) { FCML_I64( "por mm0,mmword ptr [rax]", 0x0F, 0xEB, 0x00 ); FCML_I32( "por mm0,mm1", 0x0F, 0xEB, 0xC1 ); FCML_I64( "por xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xEB, 0x00 ); FCML_I32( "por xmm0,xmm1", 0x66, 0x0F, 0xEB, 0xC1 ); FCML_I64( "vpor xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xeb, 0x00 ); FCML_I32( "vpor xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xeb, 0xc1 ); FCML_I64( "vpor ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xeb, 0x00 ); FCML_I32( "vpor ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xeb, 0xc1 ); FCML_A64( "por (%rax),%mm0", 0x0f, 0xeb, 0x00 ); FCML_A64( "por %mm1,%mm0", 0x0f, 0xeb, 0xc1 ); FCML_A64( "por (%rax),%xmm0", 0x66, 0x0f, 0xeb, 0x00 ); FCML_A64( "por %xmm1,%xmm0", 0x66, 0x0f, 0xeb, 0xc1 ); FCML_A64( "vpor (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xeb, 0x00 ); FCML_A64( "vpor %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xeb, 0xc1 ); FCML_A64( "vpor (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xeb, 0x00 ); FCML_A64( "vpor %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xeb, 0xc1 ); } void fcml_tf_instruction_PREFETCHT(void) { FCML_I32( "prefetcht0 byte ptr [eax]", 0x0F, 0x18, 0x08 ); FCML_I64( "prefetcht0 byte ptr [rax]", 0x0F, 0x18, 0x08 ); FCML_I32( "prefetcht1 byte ptr [eax]", 0x0F, 0x18, 0x10 ); FCML_I64( "prefetcht1 byte ptr [rax]", 0x0F, 0x18, 0x10 ); FCML_I32( "prefetcht2 byte ptr [eax]", 0x0F, 0x18, 0x18 ); FCML_I64( "prefetcht2 byte ptr [rax]", 0x0F, 0x18, 0x18 ); FCML_I32( "prefetchnta byte ptr [eax]", 0x0F, 0x18, 0x00 ); FCML_I64( "prefetchnta byte ptr [rax]", 0x0F, 0x18, 0x00 ); FCML_A64( "prefetcht0 (%rax)", 0x0f, 0x18, 0x08 ); FCML_A32( "prefetcht0 (%eax)", 0x0f, 0x18, 0x08 ); FCML_A64( "prefetcht1 (%rax)", 0x0f, 0x18, 0x10 ); FCML_A32( "prefetcht1 (%eax)", 0x0f, 0x18, 0x10 ); FCML_A64( "prefetcht2 (%rax)", 0x0f, 0x18, 0x18 ); FCML_A32( "prefetcht2 (%eax)", 0x0f, 0x18, 0x18 ); FCML_A64( "prefetchnta (%rax)", 0x0f, 0x18, 0x00 ); FCML_A32( "prefetchnta (%eax)", 0x0f, 0x18, 0x00 ); } void fcml_tf_instruction_PSADBW(void) { FCML_I64( "psadbw mm0,mmword ptr [rax]", 0x0F, 0xF6, 0x00 ); FCML_I32( "psadbw mm0,mm1", 0x0F, 0xF6, 0xC1 ); FCML_I64( "psadbw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xF6, 0x00 ); FCML_I32( "psadbw xmm0,xmm1", 0x66, 0x0F, 0xF6, 0xC1 ); FCML_I64( "vpsadbw xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xf6, 0x00 ); FCML_I32( "vpsadbw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xf6, 0xc1 ); FCML_I64( "vpsadbw ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xf6, 0x00 ); FCML_I32( "vpsadbw ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xf6, 0xc1 ); FCML_A64( "psadbw (%rax),%mm0", 0x0f, 0xf6, 0x00 ); FCML_A64( "psadbw %mm1,%mm0", 0x0f, 0xf6, 0xc1 ); FCML_A64( "psadbw (%rax),%xmm0", 0x66, 0x0f, 0xf6, 0x00 ); FCML_A64( "psadbw %xmm1,%xmm0", 0x66, 0x0f, 0xf6, 0xc1 ); FCML_A64( "vpsadbw (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xf6, 0x00 ); FCML_A64( "vpsadbw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xf6, 0xc1 ); FCML_A64( "vpsadbw (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xf6, 0x00 ); FCML_A64( "vpsadbw %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xf6, 0xc1 ); } void fcml_tf_instruction_PSHUFB(void) { FCML_I64( "pshufb mm0,mmword ptr [rax]", 0x0F, 0x38, 0x00, 0x00 ); FCML_I32( "pshufb mm0,mm1", 0x0F, 0x38, 0x00, 0xC1 ); FCML_I64( "pshufb xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x00, 0x00 ); FCML_I32( "pshufb xmm0,xmm1", 0x66, 0x0F, 0x38, 0x00, 0xC1 ); FCML_I64( "vpshufb xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x00, 0x00 ); FCML_I32( "vpshufb xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x00, 0xC1 ); FCML_I64( "vpshufb ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x00, 0x00 ); FCML_I32( "vpshufb ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x00, 0xC1 ); FCML_A64( "pshufb (%rax),%mm0", 0x0f, 0x38, 0x00, 0x00 ); FCML_A64( "pshufb %mm1,%mm0", 0x0f, 0x38, 0x00, 0xc1 ); FCML_A64( "pshufb (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x00, 0x00 ); FCML_A64( "pshufb %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x00, 0xc1 ); FCML_A64( "vpshufb (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x00, 0x00 ); FCML_A64( "vpshufb %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x00, 0xc1 ); FCML_A64( "vpshufb (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x00, 0x00 ); FCML_A64( "vpshufb %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x00, 0xc1 ); } void fcml_tf_instruction_PSHUFD(void) { FCML_I64( "pshufd xmm0,xmmword ptr [rax],0ffh", 0x66, 0x0F, 0x70, 0x00, 0xFF ); FCML_I32( "pshufd xmm0,xmm1,0ffh", 0x66, 0x0F, 0x70, 0xC1, 0xFF ); FCML_I64( "vpshufd xmm0,xmmword ptr [rax],0ffh", 0xc5, 0xf9, 0x70, 0x00, 0xff ); FCML_I32( "vpshufd xmm0,xmm1,0ffh", 0xc5, 0xf9, 0x70, 0xc1, 0xff ); FCML_I64( "vpshufd ymm0,ymmword ptr [rax],0ffh", 0xc5, 0xfd, 0x70, 0x00, 0xff ); FCML_I32( "vpshufd ymm0,ymm1,0ffh", 0xc5, 0xfd, 0x70, 0xc1, 0xff ); FCML_A64( "pshufd $0xff,(%rax),%xmm0", 0x66, 0x0f, 0x70, 0x00, 0xff ); FCML_A64( "pshufd $0xff,%xmm1,%xmm0", 0x66, 0x0f, 0x70, 0xc1, 0xff ); FCML_A64( "vpshufd $0xff,(%rax),%xmm0", 0xc5, 0xf9, 0x70, 0x00, 0xff ); FCML_A64( "vpshufd $0xff,%xmm1,%xmm0", 0xc5, 0xf9, 0x70, 0xc1, 0xff ); FCML_A64( "vpshufd $0xff,(%rax),%ymm0", 0xc5, 0xfd, 0x70, 0x00, 0xff ); FCML_A64( "vpshufd $0xff,%ymm1,%ymm0", 0xc5, 0xfd, 0x70, 0xc1, 0xff ); } void fcml_tf_instruction_PSHUFHW(void) { FCML_I64( "pshufhw xmm0,xmmword ptr [rax],0ffh", 0xF3, 0x0F, 0x70, 0x00, 0xFF ); FCML_I32( "pshufhw xmm0,xmm1,0ffh", 0xF3, 0x0F, 0x70, 0xC1, 0xFF ); FCML_I64( "vpshufhw xmm0,xmmword ptr [rax],0ffh", 0xc5, 0xfa, 0x70, 0x00, 0xff ); FCML_I32( "vpshufhw xmm0,xmm1,0ffh", 0xc5, 0xfa, 0x70, 0xc1, 0xff ); FCML_I64( "vpshufhw ymm0,ymmword ptr [rax],0ffh", 0xc5, 0xfe, 0x70, 0x00, 0xff ); FCML_I32( "vpshufhw ymm0,ymm1,0ffh", 0xc5, 0xfe, 0x70, 0xc1, 0xff ); FCML_A64( "pshufhw $0xff,(%rax),%xmm0", 0xf3, 0x0f, 0x70, 0x00, 0xff ); FCML_A64( "pshufhw $0xff,%xmm1,%xmm0", 0xf3, 0x0f, 0x70, 0xc1, 0xff ); FCML_A64( "vpshufhw $0xff,(%rax),%xmm0", 0xc5, 0xfa, 0x70, 0x00, 0xff ); FCML_A64( "vpshufhw $0xff,%xmm1,%xmm0", 0xc5, 0xfa, 0x70, 0xc1, 0xff ); FCML_A64( "vpshufhw $0xff,(%rax),%ymm0", 0xc5, 0xfe, 0x70, 0x00, 0xff ); FCML_A64( "vpshufhw $0xff,%ymm1,%ymm0", 0xc5, 0xfe, 0x70, 0xc1, 0xff ); } void fcml_tf_instruction_PSHUFLW(void) { FCML_I64( "pshuflw xmm0,xmmword ptr [rax],0ffh", 0xF2, 0x0F, 0x70, 0x00, 0xFF ); FCML_I32( "pshuflw xmm0,xmm1,0ffh", 0xF2, 0x0F, 0x70, 0xC1, 0xFF ); FCML_I64( "vpshuflw xmm0,xmmword ptr [rax],0ffh", 0xc5, 0xfb, 0x70, 0x00, 0xff ); FCML_I32( "vpshuflw xmm0,xmm1,0ffh", 0xc5, 0xfb, 0x70, 0xc1, 0xff ); FCML_I64( "vpshuflw ymm0,ymmword ptr [rax],0ffh", 0xc5, 0xff, 0x70, 0x00, 0xff ); FCML_I32( "vpshuflw ymm0,ymm1,0ffh", 0xc5, 0xff, 0x70, 0xc1, 0xff ); FCML_A64( "pshuflw $0xff,(%rax),%xmm0", 0xf2, 0x0f, 0x70, 0x00, 0xff ); FCML_A64( "pshuflw $0xff,%xmm1,%xmm0", 0xf2, 0x0f, 0x70, 0xc1, 0xff ); FCML_A64( "vpshuflw $0xff,(%rax),%xmm0", 0xc5, 0xfb, 0x70, 0x00, 0xff ); FCML_A64( "vpshuflw $0xff,%xmm1,%xmm0", 0xc5, 0xfb, 0x70, 0xc1, 0xff ); FCML_A64( "vpshuflw $0xff,(%rax),%ymm0", 0xc5, 0xff, 0x70, 0x00, 0xff ); FCML_A64( "vpshuflw $0xff,%ymm1,%ymm0", 0xc5, 0xff, 0x70, 0xc1, 0xff ); } void fcml_tf_instruction_PSHUFW(void) { FCML_I64( "pshufw mm0,mmword ptr [rax],0ffh", 0x0F, 0x70, 0x00, 0xFF ); FCML_I32( "pshufw mm0,mm1,0ffh", 0x0F, 0x70, 0xC1, 0xFF ); FCML_A64( "pshufw $0xff,(%rax),%mm0", 0x0f, 0x70, 0x00, 0xff ); FCML_A64( "pshufw $0xff,%mm1,%mm0", 0x0f, 0x70, 0xc1, 0xff ); } void fcml_tf_instruction_PSIGN(void) { FCML_I64( "psignb mm0,mmword ptr [rax]", 0x0F, 0x38, 0x08, 0x00 ); FCML_I32( "psignb mm0,mm1", 0x0F, 0x38, 0x08, 0xC1 ); FCML_I64( "psignw mm0,mmword ptr [rax]", 0x0F, 0x38, 0x09, 0x00 ); FCML_I32( "psignw mm0,mm1", 0x0F, 0x38, 0x09, 0xC1 ); FCML_I64( "psignd mm0,mmword ptr [rax]", 0x0F, 0x38, 0x0A, 0x00 ); FCML_I32( "psignd mm0,mm1", 0x0F, 0x38, 0x0A, 0xC1 ); FCML_I64( "psignb xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x08, 0x00 ); FCML_I32( "psignb xmm0,xmm1", 0x66, 0x0F, 0x38, 0x08, 0xC1 ); FCML_I64( "psignw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x09, 0x00 ); FCML_I32( "psignw xmm0,xmm1", 0x66, 0x0F, 0x38, 0x09, 0xC1 ); FCML_I64( "psignd xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x0A, 0x00 ); FCML_I32( "psignd xmm0,xmm1", 0x66, 0x0F, 0x38, 0x0A, 0xC1 ); FCML_I64( "vpsignb xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x08, 0x00 ); FCML_I32( "vpsignb xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x08, 0xC1 ); FCML_I64( "vpsignw xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x09, 0x00 ); FCML_I32( "vpsignw xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x09, 0xC1 ); FCML_I64( "vpsignd xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x0A, 0x00 ); FCML_I32( "vpsignd xmm0,xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x0A, 0xC1 ); FCML_I64( "vpsignb ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x08, 0x00 ); FCML_I32( "vpsignb ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x08, 0xC1 ); FCML_I64( "vpsignw ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x09, 0x00 ); FCML_I32( "vpsignw ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x09, 0xC1 ); FCML_I64( "vpsignd ymm0,ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x0A, 0x00 ); FCML_I32( "vpsignd ymm0,ymm0,ymm1", 0xC4, 0xE2, 0x7D, 0x0A, 0xC1 ); FCML_A64( "psignb (%rax),%mm0", 0x0f, 0x38, 0x08, 0x00 ); FCML_A64( "psignb %mm1,%mm0", 0x0f, 0x38, 0x08, 0xc1 ); FCML_A64( "psignw (%rax),%mm0", 0x0f, 0x38, 0x09, 0x00 ); FCML_A64( "psignw %mm1,%mm0", 0x0f, 0x38, 0x09, 0xc1 ); FCML_A64( "psignd (%rax),%mm0", 0x0f, 0x38, 0x0a, 0x00 ); FCML_A64( "psignd %mm1,%mm0", 0x0f, 0x38, 0x0a, 0xc1 ); FCML_A64( "psignb (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x08, 0x00 ); FCML_A64( "psignb %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x08, 0xc1 ); FCML_A64( "psignw (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x09, 0x00 ); FCML_A64( "psignw %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x09, 0xc1 ); FCML_A64( "psignd (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x0a, 0x00 ); FCML_A64( "psignd %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x0a, 0xc1 ); FCML_A64( "vpsignb (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x08, 0x00 ); FCML_A64( "vpsignb %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x08, 0xc1 ); FCML_A64( "vpsignw (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x09, 0x00 ); FCML_A64( "vpsignw %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x09, 0xc1 ); FCML_A64( "vpsignd (%rax),%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x0a, 0x00 ); FCML_A64( "vpsignd %xmm1,%xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x0a, 0xc1 ); FCML_A64( "vpsignb (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x08, 0x00 ); FCML_A64( "vpsignb %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x08, 0xc1 ); FCML_A64( "vpsignw (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x09, 0x00 ); FCML_A64( "vpsignw %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x09, 0xc1 ); FCML_A64( "vpsignd (%rax),%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x0a, 0x00 ); FCML_A64( "vpsignd %ymm1,%ymm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x0a, 0xc1 ); } void fcml_tf_instruction_PSLLDQ(void) { FCML_I32( "pslldq xmm1,0ffh", 0x66, 0x0F, 0x73, 0xF9, 0xFF ); FCML_I32_D( "vpslldq xmm3,xmm0,0ffh", 0xC4, 0xE1, 0x61, 0x73, 0xF8, 0xFF ); FCML_I32( "vpslldq xmm3,xmm0,0ffh", 0xc5, 0xe1, 0x73, 0xf8, 0xff ); FCML_I32_D( "vpslldq ymm3,ymm0,0ffh", 0xC4, 0xE1, 0x65, 0x73, 0xF8, 0xFF ); FCML_I32( "vpslldq ymm3,ymm0,0ffh", 0xc5, 0xe5, 0x73, 0xf8, 0xff ); FCML_A64( "pslldq $0xff,%xmm1", 0x66, 0x0f, 0x73, 0xf9, 0xff ); FCML_A64( "vpslldq $0xff,%xmm0,%xmm3", 0xc5, 0xe1, 0x73, 0xf8, 0xff ); FCML_A64( "vpslldq $0xff,%ymm0,%ymm3", 0xc5, 0xe5, 0x73, 0xf8, 0xff ); } void fcml_tf_instruction_PSLL(void) { FCML_I64( "psllw mm0,mmword ptr [rax]", 0x0F, 0xF1, 0x00 ); FCML_I32( "psllw mm0,mm1", 0x0F, 0xF1, 0xC1 ); FCML_I64( "pslld mm0,mmword ptr [rax]", 0x0F, 0xF2, 0x00 ); FCML_I32( "pslld mm0,mm1", 0x0F, 0xF2, 0xC1 ); FCML_I64( "psllq mm0,mmword ptr [rax]", 0x0F, 0xF3, 0x00 ); FCML_I32( "psllq mm0,mm1", 0x0F, 0xF3, 0xC1 ); FCML_I64( "psllw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xF1, 0x00 ); FCML_I32( "psllw xmm0,xmm1", 0x66, 0x0F, 0xF1, 0xC1 ); FCML_I64( "pslld xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xF2, 0x00 ); FCML_I32( "pslld xmm0,xmm1", 0x66, 0x0F, 0xF2, 0xC1 ); FCML_I64( "psllq xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xF3, 0x00 ); FCML_I32( "psllq xmm0,xmm1", 0x66, 0x0F, 0xF3, 0xC1 ); FCML_I32( "psllw mm1,0ffh", 0x0F, 0x71, 0xF1, 0xFF ); FCML_I32( "pslld mm2,0ffh", 0x0F, 0x72, 0xF2, 0xFF ); FCML_I32( "psllq mm3,0ffh", 0x0F, 0x73, 0xf3, 0xFF ); FCML_I32( "psllw xmm1,0ffh", 0x66, 0x0F, 0x71, 0xF1, 0xFF ); FCML_I32( "pslld xmm1,0ffh", 0x66, 0x0F, 0x72, 0xF1, 0xFF ); FCML_I32( "psllq xmm1,0ffh", 0x66, 0x0F, 0x73, 0xF1, 0xFF ); FCML_I64( "vpsllw xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xf1, 0x00 ); FCML_I64( "vpsllw ymm0,ymm0,xmmword ptr [rax]", 0xc5, 0xfd, 0xf1, 0x00 ); FCML_I32( "vpsllw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xf1, 0xc1 ); FCML_I32( "vpsllw ymm0,ymm0,xmm1", 0xc5, 0xfd, 0xf1, 0xc1 ); FCML_I64( "vpslld xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xf2, 0x00 ); FCML_I64( "vpslld ymm0,ymm0,xmmword ptr [rax]", 0xc5, 0xfd, 0xf2, 0x00 ); FCML_I32( "vpslld xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xf2, 0xc1 ); FCML_I32( "vpslld ymm0,ymm0,xmm1", 0xc5, 0xfd, 0xf2, 0xc1 ); FCML_I64( "vpsllq xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xf3, 0x00 ); FCML_I64( "vpsllq ymm0,ymm0,xmmword ptr [rax]", 0xc5, 0xfd, 0xf3, 0x00 ); FCML_I32( "vpsllq xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xf3, 0xc1 ); FCML_I32( "vpsllq ymm0,ymm0,xmm1", 0xc5, 0xfd, 0xf3, 0xc1 ); FCML_I3264( "vpsllw xmm3,xmm0,0ffh", 0xc5, 0xe1, 0x71, 0xf0, 0xff ); FCML_I3264( "vpslld xmm3,xmm0,0ffh", 0xc5, 0xe1, 0x72, 0xf0, 0xff ); FCML_I3264( "vpsllq xmm3,xmm0,0ffh", 0xc5, 0xe1, 0x73, 0xf0, 0xff ); FCML_I3264( "vpsllw ymm3,ymm0,0ffh", 0xc5, 0xe5, 0x71, 0xf0, 0xff ); FCML_I3264( "vpslld ymm3,ymm0,0ffh", 0xc5, 0xe5, 0x72, 0xf0, 0xff ); FCML_I3264( "vpsllq ymm3,ymm0,0ffh", 0xc5, 0xe5, 0x73, 0xf0, 0xff ); FCML_A64( "psllw (%rax),%mm0", 0x0f, 0xf1, 0x00 ); FCML_A64( "psllw %mm1,%mm0", 0x0f, 0xf1, 0xc1 ); FCML_A64( "pslld (%rax),%mm0", 0x0f, 0xf2, 0x00 ); FCML_A64( "pslld %mm1,%mm0", 0x0f, 0xf2, 0xc1 ); FCML_A64( "psllq (%rax),%mm0", 0x0f, 0xf3, 0x00 ); FCML_A64( "psllq %mm1,%mm0", 0x0f, 0xf3, 0xc1 ); FCML_A64( "psllw (%rax),%xmm0", 0x66, 0x0f, 0xf1, 0x00 ); FCML_A64( "psllw %xmm1,%xmm0", 0x66, 0x0f, 0xf1, 0xc1 ); FCML_A64( "pslld (%rax),%xmm0", 0x66, 0x0f, 0xf2, 0x00 ); FCML_A64( "pslld %xmm1,%xmm0", 0x66, 0x0f, 0xf2, 0xc1 ); FCML_A64( "psllq (%rax),%xmm0", 0x66, 0x0f, 0xf3, 0x00 ); FCML_A64( "psllq %xmm1,%xmm0", 0x66, 0x0f, 0xf3, 0xc1 ); FCML_A64( "psllw $0xff,%mm1", 0x0f, 0x71, 0xf1, 0xff ); FCML_A64( "pslld $0xff,%mm2", 0x0f, 0x72, 0xf2, 0xff ); FCML_A64( "psllq $0xff,%mm3", 0x0f, 0x73, 0xf3, 0xff ); FCML_A64( "psllw $0xff,%xmm1", 0x66, 0x0f, 0x71, 0xf1, 0xff ); FCML_A64( "pslld $0xff,%xmm1", 0x66, 0x0f, 0x72, 0xf1, 0xff ); FCML_A64( "psllq $0xff,%xmm1", 0x66, 0x0f, 0x73, 0xf1, 0xff ); FCML_A64( "vpsllw (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xf1, 0x00 ); FCML_A64( "vpsllw (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xf1, 0x00 ); FCML_A64( "vpsllw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xf1, 0xc1 ); FCML_A64( "vpsllw %xmm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xf1, 0xc1 ); FCML_A64( "vpslld (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xf2, 0x00 ); FCML_A64( "vpslld (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xf2, 0x00 ); FCML_A64( "vpslld %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xf2, 0xc1 ); FCML_A64( "vpslld %xmm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xf2, 0xc1 ); FCML_A64( "vpsllq (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xf3, 0x00 ); FCML_A64( "vpsllq (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xf3, 0x00 ); FCML_A64( "vpsllq %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xf3, 0xc1 ); FCML_A64( "vpsllq %xmm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xf3, 0xc1 ); FCML_A64( "vpsllw $0xff,%xmm0,%xmm3", 0xc5, 0xe1, 0x71, 0xf0, 0xff ); FCML_A64( "vpslld $0xff,%xmm0,%xmm3", 0xc5, 0xe1, 0x72, 0xf0, 0xff ); FCML_A64( "vpsllq $0xff,%xmm0,%xmm3", 0xc5, 0xe1, 0x73, 0xf0, 0xff ); FCML_A64( "vpsllw $0xff,%ymm0,%ymm3", 0xc5, 0xe5, 0x71, 0xf0, 0xff ); FCML_A64( "vpslld $0xff,%ymm0,%ymm3", 0xc5, 0xe5, 0x72, 0xf0, 0xff ); FCML_A64( "vpsllq $0xff,%ymm0,%ymm3", 0xc5, 0xe5, 0x73, 0xf0, 0xff ); } void fcml_tf_instruction_PSRA(void) { FCML_I64( "psraw mm0,mmword ptr [rax]", 0x0F, 0xE1, 0x00 ); FCML_I32( "psraw mm0,mm1", 0x0F, 0xE1, 0xC1 ); FCML_I64( "psrad mm0,mmword ptr [rax]", 0x0F, 0xE2, 0x00 ); FCML_I32( "psrad mm0,mm1", 0x0F, 0xE2, 0xC1 ); FCML_I64( "psraw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xE1, 0x00 ); FCML_I32( "psraw xmm0,xmm1", 0x66, 0x0F, 0xE1, 0xC1 ); FCML_I64( "psrad xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xE2, 0x00 ); FCML_I32( "psrad xmm0,xmm1", 0x66, 0x0F, 0xE2, 0xC1 ); FCML_I64( "vpsraw xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xe1, 0x00 ); FCML_I32( "vpsraw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xe1, 0xc1 ); FCML_I64( "vpsrad xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xe2, 0x00 ); FCML_I32( "vpsrad xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xe2, 0xc1 ); FCML_I64( "vpsraw ymm0,ymm0,xmmword ptr [rax]", 0xc5, 0xfd, 0xe1, 0x00 ); FCML_I32( "vpsraw ymm0,ymm0,xmm1", 0xc5, 0xfd, 0xe1, 0xc1 ); FCML_I64( "vpsrad ymm0,ymm0,xmmword ptr [rax]", 0xc5, 0xfd, 0xe2, 0x00 ); FCML_I32( "vpsrad ymm0,ymm0,xmm1", 0xc5, 0xfd, 0xe2, 0xc1 ); FCML_I32( "psraw mm1,0ffh", 0x0F, 0x71, 0xE1, 0xFF ); FCML_I32( "psrad mm2,0ffh", 0x0F, 0x72, 0xE2, 0xFF ); FCML_I32( "psraw xmm1,0ffh", 0x66, 0x0F, 0x71, 0xE1, 0xFF ); FCML_I32( "psrad xmm1,0ffh", 0x66, 0x0F, 0x72, 0xE1, 0xFF ); FCML_I32( "vpsraw xmm3,xmm0,0ffh", 0xc5, 0xe1, 0x71, 0xe0, 0xff ); FCML_I32( "vpsrad xmm3,xmm0,0ffh", 0xc5, 0xe1, 0x72, 0xe0, 0xff ); FCML_I32( "vpsraw ymm3,ymm0,0ffh", 0xc5, 0xe5, 0x71, 0xe0, 0xff ); FCML_I32( "vpsrad ymm3,ymm0,0ffh", 0xc5, 0xe5, 0x72, 0xe0, 0xff ); FCML_A64( "psraw (%rax),%mm0", 0x0f, 0xe1, 0x00 ); FCML_A64( "psraw %mm1,%mm0", 0x0f, 0xe1, 0xc1 ); FCML_A64( "psrad (%rax),%mm0", 0x0f, 0xe2, 0x00 ); FCML_A64( "psrad %mm1,%mm0", 0x0f, 0xe2, 0xc1 ); FCML_A64( "psraw (%rax),%xmm0", 0x66, 0x0f, 0xe1, 0x00 ); FCML_A64( "psraw %xmm1,%xmm0", 0x66, 0x0f, 0xe1, 0xc1 ); FCML_A64( "psrad (%rax),%xmm0", 0x66, 0x0f, 0xe2, 0x00 ); FCML_A64( "psrad %xmm1,%xmm0", 0x66, 0x0f, 0xe2, 0xc1 ); FCML_A64( "vpsraw (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xe1, 0x00 ); FCML_A64( "vpsraw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xe1, 0xc1 ); FCML_A64( "vpsrad (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xe2, 0x00 ); FCML_A64( "vpsrad %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xe2, 0xc1 ); FCML_A64( "vpsraw (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xe1, 0x00 ); FCML_A64( "vpsraw %xmm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xe1, 0xc1 ); FCML_A64( "vpsrad (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xe2, 0x00 ); FCML_A64( "vpsrad %xmm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xe2, 0xc1 ); FCML_A64( "psraw $0xff,%mm1", 0x0f, 0x71, 0xe1, 0xff ); FCML_A64( "psrad $0xff,%mm2", 0x0f, 0x72, 0xe2, 0xff ); FCML_A64( "psraw $0xff,%xmm1", 0x66, 0x0f, 0x71, 0xe1, 0xff ); FCML_A64( "psrad $0xff,%xmm1", 0x66, 0x0f, 0x72, 0xe1, 0xff ); FCML_A64( "vpsraw $0xff,%xmm0,%xmm3", 0xc5, 0xe1, 0x71, 0xe0, 0xff ); FCML_A64( "vpsrad $0xff,%xmm0,%xmm3", 0xc5, 0xe1, 0x72, 0xe0, 0xff ); FCML_A64( "vpsraw $0xff,%ymm0,%ymm3", 0xc5, 0xe5, 0x71, 0xe0, 0xff ); FCML_A64( "vpsrad $0xff,%ymm0,%ymm3", 0xc5, 0xe5, 0x72, 0xe0, 0xff ); } void fcml_tf_instruction_PSRLDQ(void) { FCML_I32( "pslldq xmm1,0ffh", 0x66, 0x0F, 0x73, 0xF9, 0xFF ); FCML_I32( "vpslldq xmm3,xmm0,0ffh", 0xc5, 0xe1, 0x73, 0xf8, 0xff ); FCML_I32( "vpslldq ymm3,ymm0,0ffh", 0xc5, 0xe5, 0x73, 0xf8, 0xff ); FCML_A64( "pslldq $0xff,%xmm1", 0x66, 0x0f, 0x73, 0xf9, 0xff ); FCML_A64( "vpslldq $0xff,%xmm0,%xmm3", 0xc5, 0xe1, 0x73, 0xf8, 0xff ); FCML_A64( "vpslldq $0xff,%ymm0,%ymm3", 0xc5, 0xe5, 0x73, 0xf8, 0xff ); } void fcml_tf_instruction_PSRL(void) { FCML_I64( "psrlw mm0,mmword ptr [rax]", 0x0F, 0xD1, 0x00 ); FCML_I32( "psrlw mm0,mm1", 0x0F, 0xD1, 0xC1 ); FCML_I64( "psrld mm0,mmword ptr [rax]", 0x0F, 0xD2, 0x00 ); FCML_I32( "psrld mm0,mm1", 0x0F, 0xD2, 0xC1 ); FCML_I64( "psrlq mm0,mmword ptr [rax]", 0x0F, 0xD3, 0x00 ); FCML_I32( "psrlq mm0,mm1", 0x0F, 0xD3, 0xC1 ); FCML_I64( "psrlw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xD1, 0x00 ); FCML_I32( "psrlw xmm0,xmm1", 0x66, 0x0F, 0xD1, 0xC1 ); FCML_I64( "psrld xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xD2, 0x00 ); FCML_I32( "psrld xmm0,xmm1", 0x66, 0x0F, 0xD2, 0xC1 ); FCML_I64( "psrlq xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xD3, 0x00 ); FCML_I32( "psrlq xmm0,xmm1", 0x66, 0x0F, 0xD3, 0xC1 ); FCML_I32( "psrlw mm1,0ffh", 0x0F, 0x71, 0xD1, 0xFF ); FCML_I32( "psrld mm2,0ffh", 0x0F, 0x72, 0xD2, 0xFF ); FCML_I32( "psrlq mm3,0ffh", 0x0F, 0x73, 0xD3, 0xFF ); FCML_I32( "psrlw xmm1,0ffh", 0x66, 0x0F, 0x71, 0xD1, 0xFF ); FCML_I32( "psrld xmm1,0ffh", 0x66, 0x0F, 0x72, 0xD1, 0xFF ); FCML_I32( "psrlq xmm1,0ffh", 0x66, 0x0F, 0x73, 0xD1, 0xFF ); FCML_I64_D( "vpsrlw xmm0,xmm0,xmmword ptr [rax]", 0xC4, 0xE1, 0x79, 0xD1, 0x00 ); FCML_I64( "vpsrlw xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xd1, 0x00 ); FCML_I32_D( "vpsrlw xmm0,xmm0,xmm1", 0xC4, 0xE1, 0x79, 0xD1, 0xC1 ); FCML_I32( "vpsrlw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xd1, 0xc1 ); FCML_I64( "vpsrlw ymm0,ymm0,xmmword ptr [rax]", 0xc5, 0xfd, 0xd1, 0x00 ); FCML_I32( "vpsrlw ymm0,ymm0,xmm1", 0xc5, 0xfd, 0xd1, 0xc1 ); FCML_I64( "vpsrld xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xd2, 0x00 ); FCML_I32( "vpsrld xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xd2, 0xc1 ); FCML_I64( "vpsrld ymm0,ymm0,xmmword ptr [rax]", 0xc5, 0xfd, 0xd2, 0x00 ); FCML_I32( "vpsrld ymm0,ymm0,xmm1", 0xc5, 0xfd, 0xd2, 0xc1 ); FCML_I64( "vpsrlq xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xd3, 0x00 ); FCML_I32( "vpsrlq xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xd3, 0xc1 ); FCML_I32_D( "vpsrlw xmm3,xmm0,0ffh", 0xC4, 0xE1, 0x61, 0x71, 0xD0, 0xFF ); FCML_I32( "vpsrlw xmm3,xmm0,0ffh", 0xc5, 0xe1, 0x71, 0xd0, 0xff ); FCML_I32_D( "vpsrld xmm3,xmm0,0ffh", 0xC4, 0xE1, 0x61, 0x72, 0xD0, 0xFF ); FCML_I32( "vpsrld xmm3,xmm0,0ffh", 0xc5, 0xe1, 0x72, 0xd0, 0xff ); FCML_I32_D( "vpsrlq xmm3,xmm0,0ffh", 0xC4, 0xE1, 0x61, 0x73, 0xD0, 0xFF ); FCML_I32( "vpsrlq xmm3,xmm0,0ffh", 0xc5, 0xe1, 0x73, 0xd0, 0xff ); FCML_I32_D( "vpsrlw ymm3,ymm0,0ffh", 0xC4, 0xE1, 0x65, 0x71, 0xD0, 0xFF ); FCML_I32( "vpsrlw ymm3,ymm0,0ffh", 0xc5, 0xe5, 0x71, 0xd0, 0xff ); FCML_A64( "psrlw (%rax),%mm0", 0x0f, 0xd1, 0x00 ); FCML_A64( "psrlw %mm1,%mm0", 0x0f, 0xd1, 0xc1 ); FCML_A64( "psrld (%rax),%mm0", 0x0f, 0xd2, 0x00 ); FCML_A64( "psrld %mm1,%mm0", 0x0f, 0xd2, 0xc1 ); FCML_A64( "psrlq (%rax),%mm0", 0x0f, 0xd3, 0x00 ); FCML_A64( "psrlq %mm1,%mm0", 0x0f, 0xd3, 0xc1 ); FCML_A64( "psrlw (%rax),%xmm0", 0x66, 0x0f, 0xd1, 0x00 ); FCML_A64( "psrlw %xmm1,%xmm0", 0x66, 0x0f, 0xd1, 0xc1 ); FCML_A64( "psrld (%rax),%xmm0", 0x66, 0x0f, 0xd2, 0x00 ); FCML_A64( "psrld %xmm1,%xmm0", 0x66, 0x0f, 0xd2, 0xc1 ); FCML_A64( "psrlq (%rax),%xmm0", 0x66, 0x0f, 0xd3, 0x00 ); FCML_A64( "psrlq %xmm1,%xmm0", 0x66, 0x0f, 0xd3, 0xc1 ); FCML_A64( "psrlw $0xff,%mm1", 0x0f, 0x71, 0xd1, 0xff ); FCML_A64( "psrld $0xff,%mm2", 0x0f, 0x72, 0xd2, 0xff ); FCML_A64( "psrlq $0xff,%mm3", 0x0f, 0x73, 0xd3, 0xff ); FCML_A64( "psrlw $0xff,%xmm1", 0x66, 0x0f, 0x71, 0xd1, 0xff ); FCML_A64( "psrld $0xff,%xmm1", 0x66, 0x0f, 0x72, 0xd1, 0xff ); FCML_A64( "psrlq $0xff,%xmm1", 0x66, 0x0f, 0x73, 0xd1, 0xff ); FCML_A64( "vpsrlw (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xd1, 0x00 ); FCML_A64( "vpsrlw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xd1, 0xc1 ); FCML_A64( "vpsrlw (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xd1, 0x00 ); FCML_A64( "vpsrlw %xmm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xd1, 0xc1 ); FCML_A64( "vpsrld (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xd2, 0x00 ); FCML_A64( "vpsrld %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xd2, 0xc1 ); FCML_A64( "vpsrld (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xd2, 0x00 ); FCML_A64( "vpsrld %xmm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xd2, 0xc1 ); FCML_A64( "vpsrlq (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xd3, 0x00 ); FCML_A64( "vpsrlq %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xd3, 0xc1 ); FCML_A64( "vpsrlw $0xff,%xmm0,%xmm3", 0xc5, 0xe1, 0x71, 0xd0, 0xff ); FCML_A64( "vpsrld $0xff,%xmm0,%xmm3", 0xc5, 0xe1, 0x72, 0xd0, 0xff ); FCML_A64( "vpsrlq $0xff,%xmm0,%xmm3", 0xc5, 0xe1, 0x73, 0xd0, 0xff ); FCML_A64( "vpsrlw $0xff,%ymm0,%ymm3", 0xc5, 0xe5, 0x71, 0xd0, 0xff ); } void fcml_tf_instruction_PSUB(void) { FCML_I64( "psubb mm0,mmword ptr [rax]", 0x0F, 0xF8, 0x00 ); FCML_I32( "psubb mm0,mm1", 0x0F, 0xF8, 0xC1 ); FCML_I64( "psubw mm0,mmword ptr [rax]", 0x0F, 0xF9, 0x00 ); FCML_I32( "psubw mm0,mm1", 0x0F, 0xF9, 0xC1 ); FCML_I64( "psubd mm0,mmword ptr [rax]", 0x0F, 0xFA, 0x00 ); FCML_I32( "psubd mm0,mm1", 0x0F, 0xFA, 0xC1 ); FCML_I64( "psubb xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xF8, 0x00 ); FCML_I32( "psubb xmm0,xmm1", 0x66, 0x0F, 0xF8, 0xC1 ); FCML_I64( "psubw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xF9, 0x00 ); FCML_I32( "psubw xmm0,xmm1", 0x66, 0x0F, 0xF9, 0xC1 ); FCML_I64( "psubd xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xFA, 0x00 ); FCML_I32( "psubd xmm0,xmm1", 0x66, 0x0F, 0xFA, 0xC1 ); FCML_I64( "vpsubb xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xf8, 0x00 ); FCML_I32( "vpsubb xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xf8, 0xc1 ); FCML_I64( "vpsubw xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xf9, 0x00 ); FCML_I32( "vpsubw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xf9, 0xc1 ); FCML_I64( "vpsubd xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xfa, 0x00 ); FCML_I32( "vpsubd xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xfa, 0xc1 ); FCML_I64( "vpsubb ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xf8, 0x00 ); FCML_I32( "vpsubb ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xf8, 0xc1 ); FCML_I64( "vpsubw ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xf9, 0x00 ); FCML_I32( "vpsubw ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xf9, 0xc1 ); FCML_I64( "vpsubd ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xfa, 0x00 ); FCML_I32( "vpsubd ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xfa, 0xc1 ); FCML_I64( "vpsubq ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xfb, 0x00 ); FCML_I32( "vpsubq ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xfb, 0xc1 ); FCML_A64( "psubb (%rax),%mm0", 0x0f, 0xf8, 0x00 ); FCML_A64( "psubb %mm1,%mm0", 0x0f, 0xf8, 0xc1 ); FCML_A64( "psubw (%rax),%mm0", 0x0f, 0xf9, 0x00 ); FCML_A64( "psubw %mm1,%mm0", 0x0f, 0xf9, 0xc1 ); FCML_A64( "psubd (%rax),%mm0", 0x0f, 0xfa, 0x00 ); FCML_A64( "psubd %mm1,%mm0", 0x0f, 0xfa, 0xc1 ); FCML_A64( "psubb (%rax),%xmm0", 0x66, 0x0f, 0xf8, 0x00 ); FCML_A64( "psubb %xmm1,%xmm0", 0x66, 0x0f, 0xf8, 0xc1 ); FCML_A64( "psubw (%rax),%xmm0", 0x66, 0x0f, 0xf9, 0x00 ); FCML_A64( "psubw %xmm1,%xmm0", 0x66, 0x0f, 0xf9, 0xc1 ); FCML_A64( "psubd (%rax),%xmm0", 0x66, 0x0f, 0xfa, 0x00 ); FCML_A64( "psubd %xmm1,%xmm0", 0x66, 0x0f, 0xfa, 0xc1 ); FCML_A64( "vpsubb (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xf8, 0x00 ); FCML_A64( "vpsubb %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xf8, 0xc1 ); FCML_A64( "vpsubw (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xf9, 0x00 ); FCML_A64( "vpsubw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xf9, 0xc1 ); FCML_A64( "vpsubd (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xfa, 0x00 ); FCML_A64( "vpsubd %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xfa, 0xc1 ); FCML_A64( "vpsubb (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xf8, 0x00 ); FCML_A64( "vpsubb %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xf8, 0xc1 ); FCML_A64( "vpsubw (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xf9, 0x00 ); FCML_A64( "vpsubw %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xf9, 0xc1 ); FCML_A64( "vpsubd (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xfa, 0x00 ); FCML_A64( "vpsubd %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xfa, 0xc1 ); FCML_A64( "vpsubq (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xfb, 0x00 ); FCML_A64( "vpsubq %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xfb, 0xc1 ); } void fcml_tf_instruction_PSUBQ(void) { FCML_I64( "psubq mm0,mmword ptr [rax]", 0x0F, 0xFB, 0x00 ); FCML_I32( "psubq mm0,mm1", 0x0F, 0xFB, 0xC1 ); FCML_I64( "psubq xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xFB, 0x00 ); FCML_I32( "psubq xmm0,xmm1", 0x66, 0x0F, 0xFB, 0xC1 ); FCML_I64( "vpsubq xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xfb, 0x00 ); FCML_I32( "vpsubq xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xfb, 0xc1 ); FCML_A64( "psubq (%rax),%mm0", 0x0f, 0xfb, 0x00 ); FCML_A64( "psubq %mm1,%mm0", 0x0f, 0xfb, 0xc1 ); FCML_A64( "psubq (%rax),%xmm0", 0x66, 0x0f, 0xfb, 0x00 ); FCML_A64( "psubq %xmm1,%xmm0", 0x66, 0x0f, 0xfb, 0xc1 ); FCML_A64( "vpsubq (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xfb, 0x00 ); FCML_A64( "vpsubq %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xfb, 0xc1 ); } void fcml_tf_instruction_PSUBS(void) { FCML_I64( "psubsb mm0,mmword ptr [rax]", 0x0F, 0xE8, 0x00 ); FCML_I32( "psubsb mm0,mm1", 0x0F, 0xE8, 0xC1 ); FCML_I64( "psubsw mm0,mmword ptr [rax]", 0x0F, 0xE9, 0x00 ); FCML_I32( "psubsw mm0,mm1", 0x0F, 0xE9, 0xC1 ); FCML_I64( "psubsb xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xE8, 0x00 ); FCML_I32( "psubsb xmm0,xmm1", 0x66, 0x0F, 0xE8, 0xC1 ); FCML_I64( "psubsw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xE9, 0x00 ); FCML_I32( "psubsw xmm0,xmm1", 0x66, 0x0F, 0xE9, 0xC1 ); FCML_I64( "vpsubsb xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xe8, 0x00 ); FCML_I32( "vpsubsb xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xe8, 0xc1 ); FCML_I64( "vpsubsw xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xe9, 0x00 ); FCML_I32( "vpsubsw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xe9, 0xc1 ); FCML_I64( "vpsubsb ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xe8, 0x00 ); FCML_I32( "vpsubsb ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xe8, 0xc1 ); FCML_I64( "vpsubsw ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xe9, 0x00 ); FCML_I32( "vpsubsw ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xe9, 0xc1 ); FCML_A64( "psubsb (%rax),%mm0", 0x0f, 0xe8, 0x00 ); FCML_A64( "psubsb %mm1,%mm0", 0x0f, 0xe8, 0xc1 ); FCML_A64( "psubsw (%rax),%mm0", 0x0f, 0xe9, 0x00 ); FCML_A64( "psubsw %mm1,%mm0", 0x0f, 0xe9, 0xc1 ); FCML_A64( "psubsb (%rax),%xmm0", 0x66, 0x0f, 0xe8, 0x00 ); FCML_A64( "psubsb %xmm1,%xmm0", 0x66, 0x0f, 0xe8, 0xc1 ); FCML_A64( "psubsw (%rax),%xmm0", 0x66, 0x0f, 0xe9, 0x00 ); FCML_A64( "psubsw %xmm1,%xmm0", 0x66, 0x0f, 0xe9, 0xc1 ); FCML_A64( "vpsubsb (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xe8, 0x00 ); FCML_A64( "vpsubsb %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xe8, 0xc1 ); FCML_A64( "vpsubsw (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xe9, 0x00 ); FCML_A64( "vpsubsw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xe9, 0xc1 ); FCML_A64( "vpsubsb (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xe8, 0x00 ); FCML_A64( "vpsubsb %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xe8, 0xc1 ); FCML_A64( "vpsubsw (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xe9, 0x00 ); FCML_A64( "vpsubsw %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xe9, 0xc1 ); } void fcml_tf_instruction_PSUBUS(void) { FCML_I64( "psubusb mm0,mmword ptr [rax]", 0x0F, 0xD8, 0x00 ); FCML_I32( "psubusb mm0,mm1", 0x0F, 0xD8, 0xC1 ); FCML_I64( "psubusw mm0,mmword ptr [rax]", 0x0F, 0xD9, 0x00 ); FCML_I32( "psubusw mm0,mm1", 0x0F, 0xD9, 0xC1 ); FCML_I64( "psubusb xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xD8, 0x00 ); FCML_I32( "psubusb xmm0,xmm1", 0x66, 0x0F, 0xD8, 0xC1 ); FCML_I64( "psubusw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xD9, 0x00 ); FCML_I32( "psubusw xmm0,xmm1", 0x66, 0x0F, 0xD9, 0xC1 ); FCML_I64( "vpsubusb xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xd8, 0x00 ); FCML_I32( "vpsubusb xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xd8, 0xc1 ); FCML_I64( "vpsubusw xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xd9, 0x00 ); FCML_I32( "vpsubusw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xd9, 0xc1 ); FCML_I64( "vpsubusb ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xd8, 0x00 ); FCML_I32( "vpsubusb ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xd8, 0xc1 ); FCML_I64( "vpsubusw ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xd9, 0x00 ); FCML_I32( "vpsubusw ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xd9, 0xc1 ); FCML_A64( "psubusb (%rax),%mm0", 0x0f, 0xd8, 0x00 ); FCML_A64( "psubusb %mm1,%mm0", 0x0f, 0xd8, 0xc1 ); FCML_A64( "psubusw (%rax),%mm0", 0x0f, 0xd9, 0x00 ); FCML_A64( "psubusw %mm1,%mm0", 0x0f, 0xd9, 0xc1 ); FCML_A64( "psubusb (%rax),%xmm0", 0x66, 0x0f, 0xd8, 0x00 ); FCML_A64( "psubusb %xmm1,%xmm0", 0x66, 0x0f, 0xd8, 0xc1 ); FCML_A64( "psubusw (%rax),%xmm0", 0x66, 0x0f, 0xd9, 0x00 ); FCML_A64( "psubusw %xmm1,%xmm0", 0x66, 0x0f, 0xd9, 0xc1 ); FCML_A64( "vpsubusb (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xd8, 0x00 ); FCML_A64( "vpsubusb %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xd8, 0xc1 ); FCML_A64( "vpsubusw (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xd9, 0x00 ); FCML_A64( "vpsubusw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xd9, 0xc1 ); FCML_A64( "vpsubusb (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xd8, 0x00 ); FCML_A64( "vpsubusb %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xd8, 0xc1 ); FCML_A64( "vpsubusw (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xd9, 0x00 ); FCML_A64( "vpsubusw %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xd9, 0xc1 ); } void fcml_tf_instruction_PTEST(void) { FCML_I64( "ptest xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x17, 0x00 ); FCML_I32( "ptest xmm0,xmm1", 0x66, 0x0F, 0x38, 0x17, 0xC1 ); FCML_I64( "vptest xmm3,xmm0", 0xC4, 0xE2, 0x79, 0x17, 0xD8 ); FCML_I32( "vptest xmm3,xmm0", 0xC4, 0xE2, 0x79, 0x17, 0xD8 ); FCML_I32( "vptest ymm0,ymmword ptr [eax]", 0xC4, 0xE2, 0x7D, 0x17, 0x00 ); FCML_A64( "ptest (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x17, 0x00 ); FCML_A64( "ptest %xmm1,%xmm0", 0x66, 0x0f, 0x38, 0x17, 0xc1 ); FCML_A64( "vptest %xmm0,%xmm3", 0xc4, 0xe2, 0x79, 0x17, 0xd8 ); FCML_A64( "vptest %xmm0,%xmm3", 0xc4, 0xe2, 0x79, 0x17, 0xd8 ); FCML_A64( "vptest (%rax),%ymm0", 0xc4, 0xe2, 0x7d, 0x17, 0x00 ); } void fcml_tf_instruction_PUNPCKLB(void) { FCML_I64( "punpcklbw mm0,dword ptr [rax]", 0x0F, 0x60, 0x00 ); FCML_I32( "punpcklbw mm0,mm1", 0x0F, 0x60, 0xC1 ); FCML_I64( "punpcklwd mm0,dword ptr [rax]", 0x0F, 0x61, 0x00 ); FCML_I32( "punpcklwd mm0,mm1", 0x0F, 0x61, 0xC1 ); FCML_I64( "punpckldq mm0,dword ptr [rax]", 0x0F, 0x62, 0x00 ); FCML_I32( "punpckldq mm0,mm1", 0x0F, 0x62, 0xC1 ); FCML_I64( "punpcklbw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x60, 0x00 ); FCML_I32( "punpcklbw xmm0,xmm1", 0x66, 0x0F, 0x60, 0xC1 ); FCML_I64( "punpcklwd xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x61, 0x00 ); FCML_I32( "punpcklwd xmm0,xmm1", 0x66, 0x0F, 0x61, 0xC1 ); FCML_I64( "punpckldq xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x62, 0x00 ); FCML_I32( "punpckldq xmm0,xmm1", 0x66, 0x0F, 0x62, 0xC1 ); FCML_I64( "punpcklqdq xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x6c, 0x00 ); FCML_I32( "punpcklqdq xmm0,xmm1", 0x66, 0x0F, 0x6c, 0xC1 ); FCML_I64( "vpunpcklbw xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0x60, 0x00 ); FCML_I32( "vpunpcklbw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0x60, 0xc1 ); FCML_I64( "vpunpcklwd xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0x61, 0x00 ); FCML_I32( "vpunpcklwd xmm0,xmm0,xmm1", 0xc5, 0xf9, 0x61, 0xc1 ); FCML_I64( "vpunpckldq xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0x62, 0x00 ); FCML_I32( "vpunpckldq xmm0,xmm0,xmm1", 0xc5, 0xf9, 0x62, 0xc1 ); FCML_I64( "vpunpcklqdq xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0x6c, 0x00 ); FCML_I32( "vpunpcklqdq xmm0,xmm0,xmm1", 0xc5, 0xf9, 0x6c, 0xc1 ); FCML_I64( "vpunpcklbw ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0x60, 0x00 ); FCML_I32( "vpunpcklbw ymm0,ymm0,ymm1", 0xc5, 0xfd, 0x60, 0xc1 ); FCML_I64( "vpunpcklwd ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0x61, 0x00 ); FCML_I32( "vpunpcklwd ymm0,ymm0,ymm1", 0xc5, 0xfd, 0x61, 0xc1 ); FCML_I64( "vpunpckldq ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0x62, 0x00 ); FCML_I32( "vpunpckldq ymm0,ymm0,ymm1", 0xc5, 0xfd, 0x62, 0xc1 ); FCML_I64( "vpunpcklqdq ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0x6c, 0x00 ); FCML_I32( "vpunpcklqdq ymm0,ymm0,ymm1", 0xc5, 0xfd, 0x6c, 0xc1 ); FCML_A64( "punpcklbw (%rax),%mm0", 0x0f, 0x60, 0x00 ); FCML_A64( "punpcklbw %mm1,%mm0", 0x0f, 0x60, 0xc1 ); FCML_A64( "punpcklwd (%rax),%mm0", 0x0f, 0x61, 0x00 ); FCML_A64( "punpcklwd %mm1,%mm0", 0x0f, 0x61, 0xc1 ); FCML_A64( "punpckldq (%rax),%mm0", 0x0f, 0x62, 0x00 ); FCML_A64( "punpckldq %mm1,%mm0", 0x0f, 0x62, 0xc1 ); FCML_A64( "punpcklbw (%rax),%xmm0", 0x66, 0x0f, 0x60, 0x00 ); FCML_A64( "punpcklbw %xmm1,%xmm0", 0x66, 0x0f, 0x60, 0xc1 ); FCML_A64( "punpcklwd (%rax),%xmm0", 0x66, 0x0f, 0x61, 0x00 ); FCML_A64( "punpcklwd %xmm1,%xmm0", 0x66, 0x0f, 0x61, 0xc1 ); FCML_A64( "punpckldq (%rax),%xmm0", 0x66, 0x0f, 0x62, 0x00 ); FCML_A64( "punpckldq %xmm1,%xmm0", 0x66, 0x0f, 0x62, 0xc1 ); FCML_A64( "punpcklqdq (%rax),%xmm0", 0x66, 0x0f, 0x6c, 0x00 ); FCML_A64( "punpcklqdq %xmm1,%xmm0", 0x66, 0x0f, 0x6c, 0xc1 ); FCML_A64( "vpunpcklbw (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0x60, 0x00 ); FCML_A64( "vpunpcklbw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0x60, 0xc1 ); FCML_A64( "vpunpcklwd (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0x61, 0x00 ); FCML_A64( "vpunpcklwd %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0x61, 0xc1 ); FCML_A64( "vpunpckldq (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0x62, 0x00 ); FCML_A64( "vpunpckldq %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0x62, 0xc1 ); FCML_A64( "vpunpcklqdq (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0x6c, 0x00 ); FCML_A64( "vpunpcklqdq %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0x6c, 0xc1 ); FCML_A64( "vpunpcklbw (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0x60, 0x00 ); FCML_A64( "vpunpcklbw %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0x60, 0xc1 ); FCML_A64( "vpunpcklwd (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0x61, 0x00 ); FCML_A64( "vpunpcklwd %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0x61, 0xc1 ); FCML_A64( "vpunpckldq (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0x62, 0x00 ); FCML_A64( "vpunpckldq %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0x62, 0xc1 ); FCML_A64( "vpunpcklqdq (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0x6c, 0x00 ); FCML_A64( "vpunpcklqdq %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0x6c, 0xc1 ); } void fcml_tf_instruction_PUNPCKHB(void) { FCML_I64( "punpckhbw mm0,mmword ptr [rax]", 0x0F, 0x68, 0x00 ); FCML_I32( "punpckhbw mm0,mm1", 0x0F, 0x68, 0xC1 ); FCML_I64( "punpckhwd mm0,mmword ptr [rax]", 0x0F, 0x69, 0x00 ); FCML_I32( "punpckhwd mm0,mm1", 0x0F, 0x69, 0xC1 ); FCML_I64( "punpckhdq mm0,mmword ptr [rax]", 0x0F, 0x6A, 0x00 ); FCML_I32( "punpckhdq mm0,mm1", 0x0F, 0x6A, 0xC1 ); FCML_I64( "punpckhbw xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x68, 0x00 ); FCML_I32( "punpckhbw xmm0,xmm1", 0x66, 0x0F, 0x68, 0xC1 ); FCML_I64( "punpckhwd xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x69, 0x00 ); FCML_I32( "punpckhwd xmm0,xmm1", 0x66, 0x0F, 0x69, 0xC1 ); FCML_I64( "punpckhdq xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x6A, 0x00 ); FCML_I32( "punpckhdq xmm0,xmm1", 0x66, 0x0F, 0x6A, 0xC1 ); FCML_I64( "punpckhqdq xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x6D, 0x00 ); FCML_I32( "punpckhqdq xmm0,xmm1", 0x66, 0x0F, 0x6D, 0xC1 ); FCML_I64( "vpunpckhbw xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0x68, 0x00 ); FCML_I32( "vpunpckhbw xmm0,xmm0,xmm1", 0xc5, 0xf9, 0x68, 0xc1 ); FCML_I64( "vpunpckhwd xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0x69, 0x00 ); FCML_I32( "vpunpckhwd xmm0,xmm0,xmm1", 0xc5, 0xf9, 0x69, 0xc1 ); FCML_I64( "vpunpckhdq xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0x6a, 0x00 ); FCML_I32( "vpunpckhdq xmm0,xmm0,xmm1", 0xc5, 0xf9, 0x6a, 0xc1 ); FCML_I64( "vpunpckhqdq xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0x6d, 0x00 ); FCML_I32( "vpunpckhqdq xmm0,xmm0,xmm1", 0xc5, 0xf9, 0x6d, 0xc1 ); FCML_I64( "vpunpckhbw ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0x68, 0x00 ); FCML_I32( "vpunpckhbw ymm0,ymm0,ymm1", 0xc5, 0xfd, 0x68, 0xc1 ); FCML_I64( "vpunpckhwd ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0x69, 0x00 ); FCML_I32( "vpunpckhwd ymm0,ymm0,ymm1", 0xc5, 0xfd, 0x69, 0xc1 ); FCML_I64( "vpunpckhdq ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0x6a, 0x00 ); FCML_I32( "vpunpckhdq ymm0,ymm0,ymm1", 0xc5, 0xfd, 0x6a, 0xc1 ); FCML_I64( "vpunpckhqdq ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0x6d, 0x00 ); FCML_I32( "vpunpckhqdq ymm0,ymm0,ymm1", 0xc5, 0xfd, 0x6d, 0xc1 ); FCML_A64( "punpckhbw (%rax),%mm0", 0x0f, 0x68, 0x00 ); FCML_A64( "punpckhbw %mm1,%mm0", 0x0f, 0x68, 0xc1 ); FCML_A64( "punpckhwd (%rax),%mm0", 0x0f, 0x69, 0x00 ); FCML_A64( "punpckhwd %mm1,%mm0", 0x0f, 0x69, 0xc1 ); FCML_A64( "punpckhdq (%rax),%mm0", 0x0f, 0x6a, 0x00 ); FCML_A64( "punpckhdq %mm1,%mm0", 0x0f, 0x6a, 0xc1 ); FCML_A64( "punpckhbw (%rax),%xmm0", 0x66, 0x0f, 0x68, 0x00 ); FCML_A64( "punpckhbw %xmm1,%xmm0", 0x66, 0x0f, 0x68, 0xc1 ); FCML_A64( "punpckhwd (%rax),%xmm0", 0x66, 0x0f, 0x69, 0x00 ); FCML_A64( "punpckhwd %xmm1,%xmm0", 0x66, 0x0f, 0x69, 0xc1 ); FCML_A64( "punpckhdq (%rax),%xmm0", 0x66, 0x0f, 0x6a, 0x00 ); FCML_A64( "punpckhdq %xmm1,%xmm0", 0x66, 0x0f, 0x6a, 0xc1 ); FCML_A64( "punpckhqdq (%rax),%xmm0", 0x66, 0x0f, 0x6d, 0x00 ); FCML_A64( "punpckhqdq %xmm1,%xmm0", 0x66, 0x0f, 0x6d, 0xc1 ); FCML_A64( "vpunpckhbw (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0x68, 0x00 ); FCML_A64( "vpunpckhbw %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0x68, 0xc1 ); FCML_A64( "vpunpckhwd (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0x69, 0x00 ); FCML_A64( "vpunpckhwd %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0x69, 0xc1 ); FCML_A64( "vpunpckhdq (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0x6a, 0x00 ); FCML_A64( "vpunpckhdq %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0x6a, 0xc1 ); FCML_A64( "vpunpckhqdq (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0x6d, 0x00 ); FCML_A64( "vpunpckhqdq %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0x6d, 0xc1 ); FCML_A64( "vpunpckhbw (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0x68, 0x00 ); FCML_A64( "vpunpckhbw %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0x68, 0xc1 ); FCML_A64( "vpunpckhwd (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0x69, 0x00 ); FCML_A64( "vpunpckhwd %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0x69, 0xc1 ); FCML_A64( "vpunpckhdq (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0x6a, 0x00 ); FCML_A64( "vpunpckhdq %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0x6a, 0xc1 ); FCML_A64( "vpunpckhqdq (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0x6d, 0x00 ); FCML_A64( "vpunpckhqdq %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0x6d, 0xc1 ); } void fcml_tf_instruction_PUSH(void) { FCML_I32( "push dword ptr [eax]", 0xFF, 0x30 ); FCML_I32_M( "push ecx", 2, FCML_MI( 0x51 ), FCML_MI( 0xff, 0xf1 ) ); FCML_I32( "push word ptr [eax]", 0x66, 0xFF, 0x30 ); FCML_I32_M( "push cx", 2, FCML_MI( 0x66, 0x51 ), FCML_MI( 0x66, 0xff, 0xf1 ) ); FCML_I32( "push dword ptr [bx+si]", 0x67, 0xFF, 0x30 ); FCML_I32_D( "push ecx", 0x67, 0xFF, 0xF1 ); FCML_I32( "push word ptr [bx+si]", 0x66, 0x67, 0xFF, 0x30 ); FCML_I32_D( "push cx", 0x66, 0x67, 0xFF, 0xF1 ); FCML_A32( "pushl (%eax)", 0xFF, 0x30 ); FCML_I64( "push qword ptr [rax]", 0xFF, 0x30 ); FCML_I64_M( "push rcx", 2, FCML_MI( 0x51 ), FCML_MI( 0xff, 0xf1 ) ); FCML_I64( "push word ptr [rax]", 0x66, 0xFF, 0x30 ); FCML_I64_M( "push cx", 2, FCML_MI( 0x66, 0x51 ), FCML_MI( 0x66, 0xff, 0xf1 ) ); FCML_I64( "push qword ptr [eax]", 0x67, 0xFF, 0x30 ); FCML_I64_D( "push rcx", 0x67, 0xFF, 0xF1 ); FCML_I64( "push word ptr [eax]", 0x66, 0x67, 0xFF, 0x30 ); FCML_I64_D( "push cx", 0x66, 0x67, 0xFF, 0xF1 ); FCML_I64_D( "push qword ptr [rax]", 0x48, 0xFF, 0x30 ); FCML_I64_D( "push rcx", 0x48, 0xFF, 0xF1 ); FCML_A64( "pushq (%rax)", 0xFF, 0x30 ); FCML_A64_M( "push %rcx", 2, FCML_MI( 0x51 ), FCML_MI( 0xff, 0xf1 ) ); FCML_A64( "pushw (%rax)", 0x66, 0xFF, 0x30 ); FCML_A64_M( "push %cx", 2, FCML_MI( 0x66, 0x51 ), FCML_MI( 0x66, 0xff, 0xf1 ) ); FCML_A64( "pushq (%eax)", 0x67, 0xFF, 0x30 ); FCML_A64_D( "push %rcx", 0x67, 0xFF, 0xF1 ); FCML_A64( "pushw (%eax)", 0x66, 0x67, 0xFF, 0x30 ); FCML_A64_D( "push %cx", 0x66, 0x67, 0xFF, 0xF1 ); FCML_A64_D( "pushq (%rax)", 0x48, 0xFF, 0x30 ); FCML_A64_D( "push %rcx", 0x48, 0xFF, 0xF1 ); FCML_I32_M( "push eax", 2, FCML_MI( 0x50 ), FCML_MI( 0xff, 0xf0 ) ); FCML_I32_M( "push ax", 2, FCML_MI( 0x66, 0x50 ), FCML_MI( 0x66, 0xff, 0xf0 ) ); FCML_I32_D( "push eax", 0x67, 0x50 ); FCML_I64_M( "push rax", 2, FCML_MI( 0x50 ), FCML_MI( 0xff, 0xf0 ) ); FCML_I64_M( "push ax", 2, FCML_MI( 0x66, 0x50 ), FCML_MI( 0x66, 0xff, 0xf0 ) ); FCML_I64_D( "push rax", 0x67, 0x50 ); FCML_I64_D( "push rax", 0x48, 0x50 ); FCML_A64_M( "push %rax", 2, FCML_MI( 0x50 ), FCML_MI( 0xff, 0xf0 ) ); FCML_A64_M( "push %ax", 2, FCML_MI( 0x66, 0x50 ), FCML_MI( 0x66, 0xff, 0xf0 ) ); FCML_A64_D( "push %rax", 0x67, 0x50 ); FCML_A64_D( "push %rax", 0x48, 0x50 ); FCML_I32_M( "push 0ffffffffh", 2, FCML_MI( 0x68, 0xff, 0xff, 0xff, 0xff ), FCML_MI( 0x6a, 0xff ) ); FCML_I32_M( "push 00000020h", 2, FCML_MI( 0x68, 0x20, 0x00, 0x00, 0x00 ), FCML_MI( 0x6a, 0x20 ) ); FCML_I32_M( "push 0ffffh", 2, FCML_MI( 0x66, 0x68, 0xff, 0xff ), FCML_MI( 0x66, 0x6a, 0xff ) ); FCML_I32( "push 50402020h", 0x68, 0x20, 0x20, 0x40, 0x50 ); FCML_I32( "push 11ff20ffh", 0x68, 0xFF, 0x20, 0xFF, 0x11 ); FCML_I64( "push 11ffh", 0x66, 0x68, 0xff, 0x11 ); FCML_I64_A( "push 11ffh", 0x68, 0xff, 0x11, 0x00, 0x00 ); FCML_I32( "push 11ffh", 0x66, 0x68, 0xff, 0x11 ); FCML_I32_A( "push 11ffh", 0x68, 0xff, 0x11, 0x00, 0x00 ); FCML_I64( "push 00000000221111ffh", 0x68, 0xFF, 0x11, 0x11, 0x22 ); FCML_I64_D( "push 00000000221111ffh", 0x48, 0x68, 0xFF, 0x11, 0x11, 0x22 ); FCML_I64( "push 00000000221111ffh", 0x68, 0xff, 0x11, 0x11, 0x22 ); FCML_I64( "push 0ffffffffff1111ffh", 0x68, 0xFF, 0x11, 0x11, 0xFF ); FCML_I64_D( "push 0ffffffffff1111ffh", 0x48, 0x68, 0xFF, 0x11, 0x11, 0xFF ); FCML_I16( "push 11ffh", 0x68, 0xff, 0x11 ); FCML_A64( "pushq $0xffffffffffffffff", 0x68, 0xff, 0xff, 0xff, 0xff ); FCML_A64( "pushq $0x00000000221111ff", 0x68, 0xff, 0x11, 0x11, 0x22 ); FCML_A32( "pushw $0x11ff", 0x66, 0x68, 0xff, 0x11 ); FCML_A32( "pushl $0x000011ff", 0x68, 0xff, 0x11, 0x00, 0x00 ); FCML_I32( "push cs", 0x0e ); FCML_I32( "push ss", 0x16 ); FCML_I32( "push ds", 0x1e ); FCML_I32( "push es", 0x06 ); FCML_I64_FAILED( "push cs", 0x0e ); FCML_I64_FAILED( "push ss", 0x16 ); FCML_I64_FAILED( "push ds", 0x1e ); FCML_I64_FAILED( "push es", 0x06 ); FCML_A32( "push %cs", 0x0e ); FCML_A32( "push %ss", 0x16 ); FCML_A32( "push %ds", 0x1e ); FCML_A32( "push %es", 0x06 ); FCML_I32( "push fs", 0x0f, 0xa0 ); FCML_I32( "push gs", 0x0f, 0xa8 ); FCML_I64( "push fs", 0x0f, 0xa0 ); FCML_I64( "push gs", 0x0f, 0xa8 ); FCML_A32( "pushw %fs", 0x66, 0x0f, 0xa0 ); FCML_A32( "pushl %fs", 0x0f, 0xa0 ); FCML_A32_A( "push %fs", 0x0f, 0xa0 ); FCML_A64( "pushw %fs", 0x66, 0x0f, 0xa0 ); FCML_A64( "pushq %fs", 0x0f, 0xa0 ); FCML_A64_A( "push %fs", 0x0f, 0xa0 ); FCML_A32( "pushw %gs", 0x66, 0x0f, 0xa8 ); FCML_A32( "pushl %gs", 0x0f, 0xa8 ); FCML_A32_A( "push %gs", 0x0f, 0xa8 ); FCML_A64( "pushw %gs", 0x66, 0x0f, 0xa8 ); FCML_A64( "pushq %gs", 0x0f, 0xa8 ); FCML_A64_A( "push %gs", 0x0f, 0xa8 ); } void fcml_tf_instruction_PUSHA(void) { FCML_I32( "pushad", 0x60 ); FCML_I64_FAILED( "pushad", 0x60 ); FCML_I32( "pusha", 0x66, 0x60 ); FCML_A32( "pusha", 0x60 ); FCML_A32( "pushaw", 0x66, 0x60 ); } void fcml_tf_instruction_PUSHF(void) { FCML_I32( "pushf", 0x66, 0x9C ); FCML_I64( "pushf", 0x66, 0x9C ); FCML_I32( "pushfd", 0x9C ); FCML_I64_FAILED( "pushfd", 0x9C ); FCML_I64( "pushfq", 0x9C ); FCML_A32( "pushfw", 0x66, 0x9c ); FCML_A32( "pushf", 0x9c ); FCML_A64( "pushfw", 0x66, 0x9c ); FCML_A64( "pushfq", 0x9c ); } void fcml_tf_instruction_PXOR(void) { FCML_I64( "pxor mm0,mmword ptr [rax]", 0x0F, 0xEF, 0x00 ); FCML_I32( "pxor mm0,mm1", 0x0F, 0xEF, 0xC1 ); FCML_I64( "pxor xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0xEF, 0x00 ); FCML_I32( "pxor xmm0,xmm1", 0x66, 0x0F, 0xEF, 0xC1 ); FCML_I64( "vpxor xmm0,xmm0,xmmword ptr [rax]", 0xc5, 0xf9, 0xef, 0x00 ); FCML_I32( "vpxor xmm0,xmm0,xmm1", 0xc5, 0xf9, 0xef, 0xc1 ); FCML_I64( "vpxor ymm0,ymm0,ymmword ptr [rax]", 0xc5, 0xfd, 0xef, 0x00 ); FCML_I32( "vpxor ymm0,ymm0,ymm1", 0xc5, 0xfd, 0xef, 0xc1 ); FCML_A64( "pxor (%rax),%mm0", 0x0f, 0xef, 0x00 ); FCML_A64( "pxor %mm1,%mm0", 0x0f, 0xef, 0xc1 ); FCML_A64( "pxor (%rax),%xmm0", 0x66, 0x0f, 0xef, 0x00 ); FCML_A64( "pxor %xmm1,%xmm0", 0x66, 0x0f, 0xef, 0xc1 ); FCML_A64( "vpxor (%rax),%xmm0,%xmm0", 0xc5, 0xf9, 0xef, 0x00 ); FCML_A64( "vpxor %xmm1,%xmm0,%xmm0", 0xc5, 0xf9, 0xef, 0xc1 ); FCML_A64( "vpxor (%rax),%ymm0,%ymm0", 0xc5, 0xfd, 0xef, 0x00 ); FCML_A64( "vpxor %ymm1,%ymm0,%ymm0", 0xc5, 0xfd, 0xef, 0xc1 ); } void fcml_tf_instruction_PAVGUSB(void) { FCML_I32( "pavgusb mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0xBF ); FCML_I64( "pavgusb mm0,mm1", 0x0F, 0x0F, 0xC1, 0xBF ); FCML_A64( "pavgusb (%rax),%mm0", 0x0f, 0x0f, 0x00, 0xbf ); FCML_A64( "pavgusb %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0xbf ); } void fcml_tf_instruction_PF2ID(void) { FCML_I32( "pf2id mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0x1D ); FCML_I64( "pf2id mm0,mm1", 0x0F, 0x0F, 0xC1, 0x1D ); FCML_A64( "pf2id (%rax),%mm0", 0x0f, 0x0f, 0x00, 0x1d ); FCML_A64( "pf2id %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0x1d ); } void fcml_tf_instruction_PFACC(void) { FCML_I32( "pfacc mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0xAE ); FCML_I64( "pfacc mm0,mm1", 0x0F, 0x0F, 0xC1, 0xAE ); FCML_A64( "pfacc (%rax),%mm0", 0x0f, 0x0f, 0x00, 0xae ); FCML_A64( "pfacc %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0xae ); } void fcml_tf_instruction_PFADD(void) { FCML_I32( "pfadd mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0x9E ); FCML_I64( "pfadd mm0,mm1", 0x0F, 0x0F, 0xC1, 0x9E ); FCML_A64( "pfadd (%rax),%mm0", 0x0f, 0x0f, 0x00, 0x9e ); FCML_A64( "pfadd %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0x9e ); } void fcml_tf_instruction_PFCMPEQ(void) { FCML_I32( "pfcmpeq mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0xB0 ); FCML_I64( "pfcmpeq mm0,mm1", 0x0F, 0x0F, 0xC1, 0xB0 ); FCML_A64( "pfcmpeq (%rax),%mm0", 0x0f, 0x0f, 0x00, 0xb0 ); FCML_A64( "pfcmpeq %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0xb0 ); } void fcml_tf_instruction_PFCMPGE(void) { FCML_I32( "pfcmpge mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0x90 ); FCML_I64( "pfcmpge mm0,mm1", 0x0F, 0x0F, 0xC1, 0x90 ); FCML_A64( "pfcmpeq (%rax),%mm0", 0x0f, 0x0f, 0x00, 0xb0 ); FCML_A64( "pfcmpeq %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0xb0 ); } void fcml_tf_instruction_PFCMPGT(void) { FCML_I32( "pfcmpgt mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0xA0 ); FCML_I64( "pfcmpgt mm0,mm1", 0x0F, 0x0F, 0xC1, 0xA0 ); FCML_A64( "pfcmpgt (%rax),%mm0", 0x0f, 0x0f, 0x00, 0xa0 ); FCML_A64( "pfcmpgt %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0xa0 ); } void fcml_tf_instruction_PFMAX(void) { FCML_I32( "pfmax mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0xA4 ); FCML_I64( "pfmax mm0,mm1", 0x0F, 0x0F, 0xC1, 0xA4 ); FCML_A64( "pfmax (%rax),%mm0", 0x0f, 0x0f, 0x00, 0xa4 ); FCML_A64( "pfmax %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0xa4 ); } void fcml_tf_instruction_PFMIN(void) { FCML_I32( "pfmin mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0x94 ); FCML_I64( "pfmin mm0,mm1", 0x0F, 0x0F, 0xC1, 0x94 ); FCML_A64( "pfmin (%rax),%mm0", 0x0f, 0x0f, 0x00, 0x94 ); FCML_A64( "pfmin %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0x94 ); } void fcml_tf_instruction_PFMUL(void) { FCML_I32( "pfmul mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0xB4 ); FCML_I64( "pfmul mm0,mm1", 0x0F, 0x0F, 0xC1, 0xB4 ); FCML_A64( "pfmul (%rax),%mm0", 0x0f, 0x0f, 0x00, 0xb4 ); FCML_A64( "pfmul %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0xb4 ); } void fcml_tf_instruction_PFRCP(void) { FCML_I32( "pfrcp mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0x96 ); FCML_I64( "pfrcp mm0,mm1", 0x0F, 0x0F, 0xC1, 0x96 ); FCML_A64( "pfrcp (%rax),%mm0", 0x0f, 0x0f, 0x00, 0x96 ); FCML_A64( "pfrcp %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0x96 ); } void fcml_tf_instruction_PFRCPIT1(void) { FCML_I32( "pfrcpit1 mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0xA6 ); FCML_I64( "pfrcpit1 mm0,mm1", 0x0F, 0x0F, 0xC1, 0xA6 ); FCML_I32( "pfrcpit1 mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0xA6 ); FCML_I64( "pfrcpit1 mm0,mm1", 0x0F, 0x0F, 0xC1, 0xA6 ); } void fcml_tf_instruction_PFRCPIT2(void) { FCML_I32( "pfrcpit2 mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0xB6 ); FCML_I64( "pfrcpit2 mm0,mm1", 0x0F, 0x0F, 0xC1, 0xB6 ); FCML_A64( "pfrcpit2 (%rax),%mm0", 0x0f, 0x0f, 0x00, 0xb6 ); FCML_A64( "pfrcpit2 %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0xb6 ); } void fcml_tf_instruction_PFRSQIT1(void) { FCML_I32( "pfrsqit1 mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0xA7 ); FCML_I64( "pfrsqit1 mm0,mm1", 0x0F, 0x0F, 0xC1, 0xA7 ); FCML_A64( "pfrsqit1 (%rax),%mm0", 0x0f, 0x0f, 0x00, 0xa7 ); FCML_A64( "pfrsqit1 %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0xa7 ); } void fcml_tf_instruction_PFRSQRT(void) { FCML_I32( "pfrsqrt mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0x97 ); FCML_I64( "pfrsqrt mm0,mm1", 0x0F, 0x0F, 0xC1, 0x97 ); } void fcml_tf_instruction_PFSUB(void) { FCML_I32( "pfsub mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0x9A ); FCML_I64( "pfsub mm0,mm1", 0x0F, 0x0F, 0xC1, 0x9A ); FCML_A64( "pfsub (%rax),%mm0", 0x0f, 0x0f, 0x00, 0x9a ); FCML_A64( "pfsub %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0x9a ); } void fcml_tf_instruction_PFSUBR(void) { FCML_I32( "pfsubr mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0xAA ); FCML_I64( "pfsubr mm0,mm1", 0x0F, 0x0F, 0xC1, 0xAA ); FCML_A64( "pfsubr (%rax),%mm0", 0x0f, 0x0f, 0x00, 0xaa ); FCML_A64( "pfsubr %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0xaa ); } void fcml_tf_instruction_PI2FD(void) { FCML_I32( "pi2fd mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0x0D ); FCML_I64( "pi2fd mm0,mm1", 0x0F, 0x0F, 0xC1, 0x0D ); FCML_A64( "pi2fd (%rax),%mm0", 0x0f, 0x0f, 0x00, 0x0d ); FCML_A64( "pi2fd %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0x0d ); } void fcml_tf_instruction_PMULHRW(void) { FCML_I32( "pmulhrw mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0xB7 ); FCML_I64( "pmulhrw mm0,mm1", 0x0F, 0x0F, 0xC1, 0xB7 ); FCML_A64( "pmulhrw (%rax),%mm0", 0x0f, 0x0f, 0x00, 0xb7 ); FCML_A64( "pmulhrw %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0xb7 ); } void fcml_tf_instruction_PREFETCH(void) { FCML_I32( "prefetch byte ptr [eax]", 0x0F, 0x0D, 0x00 ); FCML_I64( "prefetchw byte ptr [rax]", 0x0F, 0x0D, 0x08 ); FCML_A64( "prefetch (%rax)", 0x0f, 0x0d, 0x00 ); FCML_A64( "prefetchw (%rax)", 0x0f, 0x0d, 0x08 ); } void fcml_tf_instruction_PF2IW(void) { FCML_I32( "pf2iw mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0x1C ); FCML_I64( "pf2iw mm0,mm1", 0x0F, 0x0F, 0xC1, 0x1C ); FCML_A64( "pf2iw (%rax),%mm0", 0x0f, 0x0f, 0x00, 0x1c ); FCML_A64( "pf2iw %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0x1c ); } void fcml_tf_instruction_PFNACC(void) { FCML_I32( "pfnacc mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0x8A ); FCML_I64( "pfnacc mm0,mm1", 0x0F, 0x0F, 0xC1, 0x8A ); FCML_A64( "pfnacc (%rax),%mm0", 0x0f, 0x0f, 0x00, 0x8a ); FCML_A64( "pfnacc %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0x8a ); } void fcml_tf_instruction_PFPNACC(void) { FCML_I32( "pfpnacc mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0x8E ); FCML_I64( "pfpnacc mm0,mm1", 0x0F, 0x0F, 0xC1, 0x8E ); FCML_A64( "pfpnacc (%rax),%mm0", 0x0f, 0x0f, 0x00, 0x8e ); FCML_A64( "pfpnacc %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0x8e ); } void fcml_tf_instruction_PI2FW(void) { FCML_I32( "pi2fw mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0x0C ); FCML_I64( "pi2fw mm0,mm1", 0x0F, 0x0F, 0xC1, 0x0C ); FCML_A64( "pi2fw (%rax),%mm0", 0x0f, 0x0f, 0x00, 0x0c ); FCML_A64( "pi2fw %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0x0c ); } void fcml_tf_instruction_PSWAPD(void) { FCML_I32( "pswapd mm0,mmword ptr [eax]", 0x0F, 0x0F, 0x00, 0xBB ); FCML_I64( "pswapd mm0,mm1", 0x0F, 0x0F, 0xC1, 0xBB ); FCML_A64( "pswapd (%rax),%mm0", 0x0f, 0x0f, 0x00, 0xbb ); FCML_A64( "pswapd %mm1,%mm0", 0x0f, 0x0f, 0xc1, 0xbb ); } void fcml_tf_instruction_PDEP(void) { FCML_I32( "pdep eax,edi,dword ptr [eax]", 0xC4, 0xE2, 0x43, 0xF5, 0x00 ); FCML_I32( "pdep eax,edi,eax", 0xC4, 0xE2, 0x43, 0xF5, 0xC0 ); FCML_I64( "pdep rax,rdi,qword ptr [rax]", 0xC4, 0xE2, 0xC3, 0xF5, 0x00 ); FCML_I64( "pdep rax,rdi,rax", 0xC4, 0xE2, 0xC3, 0xF5, 0xC0 ); FCML_A64( "pdep (%rax),%edi,%eax", 0xc4, 0xe2, 0x43, 0xf5, 0x00 ); FCML_A64( "pdep %eax,%edi,%eax", 0xc4, 0xe2, 0x43, 0xf5, 0xc0 ); FCML_A64( "pdep (%rax),%rdi,%rax", 0xc4, 0xe2, 0xc3, 0xf5, 0x00 ); FCML_A64( "pdep %rax,%rdi,%rax", 0xc4, 0xe2, 0xc3, 0xf5, 0xc0 ); } void fcml_tf_instruction_PEXT(void) { FCML_I32( "pext eax,edi,dword ptr [eax]", 0xC4, 0xE2, 0x42, 0xF5, 0x00 ); FCML_I32( "pext eax,edi,eax", 0xC4, 0xE2, 0x42, 0xF5, 0xC0 ); FCML_I64( "pext rax,rdi,qword ptr [rax]", 0xC4, 0xE2, 0xC2, 0xF5, 0x00 ); FCML_I64( "pext rax,rdi,rax", 0xC4, 0xE2, 0xC2, 0xF5, 0xC0 ); FCML_A64( "pext (%rax),%edi,%eax", 0xc4, 0xe2, 0x42, 0xf5, 0x00 ); FCML_A64( "pext %eax,%edi,%eax", 0xc4, 0xe2, 0x42, 0xf5, 0xc0 ); FCML_A64( "pext (%rax),%rdi,%rax", 0xc4, 0xe2, 0xc2, 0xf5, 0x00 ); FCML_A64( "pext %rax,%rdi,%rax", 0xc4, 0xe2, 0xc2, 0xf5, 0xc0 ); } fcml_stf_test_case fctl_ti_instructions_p[] = { { "fcml_tf_instruction_PABS", fcml_tf_instruction_PABS }, { "fcml_tf_instruction_PACKSS", fcml_tf_instruction_PACKSS }, { "fcml_tf_instruction_PACKUSD", fcml_tf_instruction_PACKUSD }, { "fcml_tf_instruction_PACKUSW", fcml_tf_instruction_PACKUSW }, { "fcml_tf_instruction_PADD", fcml_tf_instruction_PADD }, { "fcml_tf_instruction_PADDS", fcml_tf_instruction_PADDS }, { "fcml_tf_instruction_PADDUS", fcml_tf_instruction_PADDUS }, { "fcml_tf_instruction_PADDQ", fcml_tf_instruction_PADDQ }, { "fcml_tf_instruction_PALIGNR", fcml_tf_instruction_PALIGNR }, { "fcml_tf_instruction_PAND", fcml_tf_instruction_PAND }, { "fcml_tf_instruction_PANDN", fcml_tf_instruction_PANDN }, { "fcml_tf_instruction_PAUSE", fcml_tf_instruction_PAUSE }, { "fcml_tf_instruction_PAVGB", fcml_tf_instruction_PAVGB }, { "fcml_tf_instruction_PBLENDVB", fcml_tf_instruction_PBLENDVB }, { "fcml_tf_instruction_PBLENDW", fcml_tf_instruction_PBLENDW }, { "fcml_tf_instruction_PCLMULQDQ", fcml_tf_instruction_PCLMULQDQ }, { "fcml_tf_instruction_PCMPEQ", fcml_tf_instruction_PCMPEQ }, { "fcml_tf_instruction_PCMPEQQ", fcml_tf_instruction_PCMPEQQ }, { "fcml_tf_instruction_PCMPESTRI", fcml_tf_instruction_PCMPESTRI }, { "fcml_tf_instruction_PCMPESTRM", fcml_tf_instruction_PCMPESTRM }, { "fcml_tf_instruction_PCMPGT", fcml_tf_instruction_PCMPGT }, { "fcml_tf_instruction_PCMPGTQ", fcml_tf_instruction_PCMPGTQ }, { "fcml_tf_instruction_PCMPISTRI", fcml_tf_instruction_PCMPISTRI }, { "fcml_tf_instruction_PCMPISTRM", fcml_tf_instruction_PCMPISTRM }, { "fcml_tf_instruction_PEXTRB", fcml_tf_instruction_PEXTRB }, { "fcml_tf_instruction_PEXTRW", fcml_tf_instruction_PEXTRW }, { "fcml_tf_instruction_PHADDW", fcml_tf_instruction_PHADDW }, { "fcml_tf_instruction_PHADDSW", fcml_tf_instruction_PHADDSW }, { "fcml_tf_instruction_PHMINPOSUW", fcml_tf_instruction_PHMINPOSUW }, { "fcml_tf_instruction_PHSUBW", fcml_tf_instruction_PHSUBW }, { "fcml_tf_instruction_PHSUBSW", fcml_tf_instruction_PHSUBSW }, { "fcml_tf_instruction_PINSR", fcml_tf_instruction_PINSR }, { "fcml_tf_instruction_PINSRW", fcml_tf_instruction_PINSRW }, { "fcml_tf_instruction_PMADDUBSW", fcml_tf_instruction_PMADDUBSW }, { "fcml_tf_instruction_PMADDWD", fcml_tf_instruction_PMADDWD }, { "fcml_tf_instruction_PMAXSB", fcml_tf_instruction_PMAXSB }, { "fcml_tf_instruction_PMAXSW", fcml_tf_instruction_PMAXSW }, { "fcml_tf_instruction_PMAXSD", fcml_tf_instruction_PMAXSD }, { "fcml_tf_instruction_PMAXUB", fcml_tf_instruction_PMAXUB }, { "fcml_tf_instruction_PMAXUW", fcml_tf_instruction_PMAXUW }, { "fcml_tf_instruction_PMAXUD", fcml_tf_instruction_PMAXUD }, { "fcml_tf_instruction_PMINSB", fcml_tf_instruction_PMINSB }, { "fcml_tf_instruction_PMINSW", fcml_tf_instruction_PMINSW }, { "fcml_tf_instruction_PMINSD", fcml_tf_instruction_PMINSD }, { "fcml_tf_instruction_PMINUB", fcml_tf_instruction_PMINUB }, { "fcml_tf_instruction_PMINUW", fcml_tf_instruction_PMINUW }, { "fcml_tf_instruction_PMINUD", fcml_tf_instruction_PMINUD }, { "fcml_tf_instruction_PMOVMSKB", fcml_tf_instruction_PMOVMSKB }, { "fcml_tf_instruction_PMOVSX", fcml_tf_instruction_PMOVSX }, { "fcml_tf_instruction_PMOVZX", fcml_tf_instruction_PMOVZX }, { "fcml_tf_instruction_PMULDQ", fcml_tf_instruction_PMULDQ }, { "fcml_tf_instruction_PMULHRSW", fcml_tf_instruction_PMULHRSW }, { "fcml_tf_instruction_PMULHUW", fcml_tf_instruction_PMULHUW }, { "fcml_tf_instruction_PMULHW", fcml_tf_instruction_PMULHW }, { "fcml_tf_instruction_PMULUDQ", fcml_tf_instruction_PMULUDQ }, { "fcml_tf_instruction_PMULLW", fcml_tf_instruction_PMULLW }, { "fcml_tf_instruction_PMULLD", fcml_tf_instruction_PMULLD }, { "fcml_tf_instruction_POP", fcml_tf_instruction_POP }, { "fcml_tf_instruction_POPA", fcml_tf_instruction_POPA }, { "fcml_tf_instruction_POPCNT", fcml_tf_instruction_POPCNT }, { "fcml_tf_instruction_POPF", fcml_tf_instruction_POPF }, { "fcml_tf_instruction_POR", fcml_tf_instruction_POR }, { "fcml_tf_instruction_PREFETCHT", fcml_tf_instruction_PREFETCHT }, { "fcml_tf_instruction_PSADBW", fcml_tf_instruction_PSADBW }, { "fcml_tf_instruction_PSHUFB", fcml_tf_instruction_PSHUFB }, { "fcml_tf_instruction_PSHUFD", fcml_tf_instruction_PSHUFD }, { "fcml_tf_instruction_PSHUFHW", fcml_tf_instruction_PSHUFHW }, { "fcml_tf_instruction_PSHUFLW", fcml_tf_instruction_PSHUFLW }, { "fcml_tf_instruction_PSHUFW", fcml_tf_instruction_PSHUFW }, { "fcml_tf_instruction_PSIGN", fcml_tf_instruction_PSIGN }, { "fcml_tf_instruction_PSLLDQ", fcml_tf_instruction_PSLLDQ }, { "fcml_tf_instruction_PSLL", fcml_tf_instruction_PSLL }, { "fcml_tf_instruction_PSRA", fcml_tf_instruction_PSRA }, { "fcml_tf_instruction_PSRLDQ", fcml_tf_instruction_PSRLDQ }, { "fcml_tf_instruction_PSRL", fcml_tf_instruction_PSRL }, { "fcml_tf_instruction_PSUB", fcml_tf_instruction_PSUB }, { "fcml_tf_instruction_PSUBQ", fcml_tf_instruction_PSUBQ }, { "fcml_tf_instruction_PSUBS", fcml_tf_instruction_PSUBS }, { "fcml_tf_instruction_PSUBUS", fcml_tf_instruction_PSUBUS }, { "fcml_tf_instruction_PTEST", fcml_tf_instruction_PTEST }, { "fcml_tf_instruction_PUNPCKLB", fcml_tf_instruction_PUNPCKLB }, { "fcml_tf_instruction_PUNPCKHB", fcml_tf_instruction_PUNPCKHB }, { "fcml_tf_instruction_PUSH", fcml_tf_instruction_PUSH }, { "fcml_tf_instruction_PUSHA", fcml_tf_instruction_PUSHA }, { "fcml_tf_instruction_PUSHF", fcml_tf_instruction_PUSHF }, { "fcml_tf_instruction_PXOR", fcml_tf_instruction_PXOR }, { "fcml_tf_instruction_PAVGUSB", fcml_tf_instruction_PAVGUSB }, { "fcml_tf_instruction_PF2ID", fcml_tf_instruction_PF2ID }, { "fcml_tf_instruction_PFACC", fcml_tf_instruction_PFACC }, { "fcml_tf_instruction_PFADD", fcml_tf_instruction_PFADD }, { "fcml_tf_instruction_PFCMPEQ", fcml_tf_instruction_PFCMPEQ }, { "fcml_tf_instruction_PFCMPGE", fcml_tf_instruction_PFCMPGE }, { "fcml_tf_instruction_PFCMPGT", fcml_tf_instruction_PFCMPGT }, { "fcml_tf_instruction_PFMAX", fcml_tf_instruction_PFMAX }, { "fcml_tf_instruction_PFMIN", fcml_tf_instruction_PFMIN }, { "fcml_tf_instruction_PFMUL", fcml_tf_instruction_PFMUL }, { "fcml_tf_instruction_PFRCP", fcml_tf_instruction_PFRCP }, { "fcml_tf_instruction_PFRCPIT1", fcml_tf_instruction_PFRCPIT1 }, { "fcml_tf_instruction_PFRCPIT2", fcml_tf_instruction_PFRCPIT2 }, { "fcml_tf_instruction_PFRSQIT1", fcml_tf_instruction_PFRSQIT1 }, { "fcml_tf_instruction_PFRSQRT", fcml_tf_instruction_PFRSQRT }, { "fcml_tf_instruction_PFSUB", fcml_tf_instruction_PFSUB }, { "fcml_tf_instruction_PFSUBR", fcml_tf_instruction_PFSUBR }, { "fcml_tf_instruction_PI2FD", fcml_tf_instruction_PI2FD }, { "fcml_tf_instruction_PMULHRW", fcml_tf_instruction_PMULHRW }, { "fcml_tf_instruction_PREFETCH", fcml_tf_instruction_PREFETCH }, { "fcml_tf_instruction_PF2IW", fcml_tf_instruction_PF2IW }, { "fcml_tf_instruction_PFNACC", fcml_tf_instruction_PFNACC }, { "fcml_tf_instruction_PFPNACC", fcml_tf_instruction_PFPNACC }, { "fcml_tf_instruction_PI2FW", fcml_tf_instruction_PI2FW }, { "fcml_tf_instruction_PSWAPD", fcml_tf_instruction_PSWAPD }, { "fcml_tf_instruction_PDEP", fcml_tf_instruction_PDEP }, { "fcml_tf_instruction_PEXT", fcml_tf_instruction_PEXT }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_p = { "suite-fctl_ti_instructions_p", fcml_tf_instructions_p_suite_init, fcml_tf_instructions_p_suite_cleanup, fctl_ti_instructions_p }; fcml-1.1.1/check/public-tests/prefixes_t.h0000644000175000017500000000172512560745216015405 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 PREFIXES_T_H_ #define PREFIXES_T_H_ #include extern fcml_stf_test_suite fcml_si_prefixes; #endif /* PREFIXES_T_H_ */ fcml-1.1.1/check/public-tests/instructions_base_t.c0000644000175000017500000004243112560745216017310 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 "instructions_base_t.h" #include #include #include #include #include #include #include fcml_st_assembler *assembler_intel; fcml_st_disassembler *disassembler_intel; fcml_st_dialect *dialect_intel; fcml_st_assembler *assembler_gas; fcml_st_disassembler *disassembler_gas; fcml_st_dialect *dialect_gas; #ifdef FCML_MSCC int fcml_fn_test_number_of_arguments( fcml_string code ) { int count = 1; for( int i = 0; code[i] != '\0'; i++ ) { if( code[i] == ',' ) { count++; } } return count; } #endif void fcml_ifn_ts_set_ip( fcml_ip *ip, fcml_en_operating_mode op_mode ) { switch( op_mode ) { case FCML_OM_16_BIT: case FCML_OM_32_BIT: *ip = 0x00401000; break; case FCML_OM_64_BIT: *ip = 0x0000800000401000; break; } } fcml_bool fcml_fn_ts_instruction_test( fcml_uint8_t *code, fcml_int size, fcml_en_operating_mode op_mode, fcml_string mnemonic, fcml_uint32_t t_flags, fcml_uint32_t rend_flags ) { fcml_st_assembler *assembler = assembler_intel; fcml_st_disassembler *disassembler = disassembler_intel; fcml_st_dialect *dialect = dialect_intel; fcml_bool is_gas = FCML_TSF_GAS_DIALECT & t_flags; if( is_gas ) { assembler = assembler_gas; disassembler = disassembler_gas; dialect = dialect_gas; } fcml_bool success = FCML_TRUE; fcml_st_disassembler_result dis_result; fcml_fn_disassembler_result_prepare( &dis_result ); fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; if( !(t_flags & FCML_TSF_ASM_ONLY) ) { fcml_st_disassembler_context context = {0}; context.configuration.enable_error_messages = FCML_TRUE; context.configuration.short_forms = FCML_FALSE; context.configuration.extend_disp_to_asa = FCML_TRUE; context.configuration.conditional_group = FCML_DASM_CONDITIONAL_GROUP_1; context.configuration.carry_flag_conditional_suffix = FCML_TRUE; context.configuration.extend_disp_to_asa = FCML_TRUE; context.configuration.increment_ip = FCML_FALSE; context.configuration.fail_if_unknown_instruction = FCML_TRUE; context.disassembler = disassembler; context.entry_point.op_mode = op_mode; context.entry_point.address_size_attribute = 0; context.entry_point.operand_size_attribute = 0; if( !(t_flags & FCML_TSF_MULTI_ASM_RESULTS) ) { context.code = code; context.code_length = size; } else { context.code = code + 2; context.code_length = code[1]; } fcml_ifn_ts_set_ip( &(context.entry_point.ip), op_mode ); /* Disassemble.*/ error = fcml_fn_disassemble( &context, &dis_result ); } if( error == FCML_CEH_GEC_NO_ERROR ) { fcml_bool is_67 = FCML_FALSE; fcml_bool is_66 = FCML_FALSE; if( !(t_flags & FCML_TSF_ASM_ONLY) ) { if( (t_flags & FCML_TSF_PRINT_ONLY) ) { printf("Instruction: %s\n", mnemonic); } /* Looking for 0x67 prefix.*/ int i; for( i = 0; i < FCML_DASM_PREFIXES_COUNT; i++ ) { if( dis_result.instruction_details.prefixes_details.prefixes[i].prefix == 0x67 ) { is_67 = FCML_TRUE; } if( dis_result.instruction_details.prefixes_details.prefixes[i].prefix == 0x66 ) { is_66 = FCML_TRUE; } } /* Print.*/ fcml_char buffer[FCML_REND_MAX_BUFF_LEN] = {0}; fcml_st_render_config config = {0}; config.render_flags = FCML_REND_FLAG_HEX_IMM | FCML_REND_FLAG_COND_SHOW_CARRY | FCML_REND_FLAG_HEX_DISPLACEMENT | rend_flags; error = fcml_fn_render( dialect, &config, buffer, sizeof( buffer ), &dis_result ); if( error ) { printf("Disassembling failed, with error code: %d\n", error ); if( !(t_flags & FCML_TSF_PRINT_ONLY) ) { success = FCML_FALSE; } fcml_fn_disassembler_result_free( &dis_result ); return success; } if( strcmp( buffer, mnemonic ) != 0 ) { if( t_flags & FCML_TSF_SHOULD_FAIL ) { fcml_fn_disassembler_result_free( &dis_result ); return FCML_TRUE; } printf("Disassembling failed, should be: %s (Was: %s)\n", mnemonic, buffer); if( !(t_flags & FCML_TSF_PRINT_ONLY) ) { success = FCML_FALSE; } fcml_fn_disassembler_result_free( &dis_result ); return success; } if( t_flags & FCML_TSF_SHOULD_FAIL ) { printf("Should fail: %s\n", mnemonic); success = FCML_FALSE; fcml_fn_disassembler_result_free( &dis_result ); return success; } } /* Parsing.*/ fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context parser_context = {0}; parser_context.dialect = dialect; fcml_ceh_error error = fcml_fn_parse( &parser_context, mnemonic, &result ); if( error ) { printf("Can not parse: %s\n", mnemonic ); if( !(t_flags & FCML_TSF_PRINT_ONLY) ) { success = FCML_FALSE; } fcml_fn_parser_result_free( &result ); fcml_fn_disassembler_result_free( &dis_result ); return success; } fcml_fn_symbol_table_free( parser_context.symbol_table ); fcml_uint16_t opt_flags = 0; /* Assembling.*/ fcml_st_assembler_context context = {0}; context.assembler = assembler; context.entry_point.address_size_attribute = 0; context.entry_point.operand_size_attribute = 0; context.entry_point.op_mode = op_mode; if( is_67 ) { if( op_mode == FCML_OM_64_BIT ) { opt_flags = FCML_OPTF_ASA_32; } else { opt_flags = FCML_OPTF_ASA_16; } } if( is_66 ) { opt_flags |= FCML_OPTF_OSA_16; } context.configuration.enable_error_messages = FCML_TRUE; context.configuration.choose_sib_encoding = FCML_FALSE; context.configuration.choose_abs_encoding = !(t_flags & FCML_TSF_ENABLE_RIP); context.configuration.chooser = NULL; context.configuration.optimizer = NULL; context.configuration.optimizer_flags = opt_flags; context.configuration.force_rex_prefix = FCML_FALSE; context.configuration.force_three_byte_VEX = FCML_FALSE; context.configuration.increment_ip = FCML_FALSE; fcml_ifn_ts_set_ip( &(context.entry_point.ip), op_mode ); fcml_st_assembler_result asm_result; fcml_fn_assembler_result_prepare( &asm_result ); error = fcml_fn_assemble( &context, result.instruction, &asm_result ); if( error ) { if( !t_flags & FCML_TSF_SHOULD_FAIL ) { printf("Can not assemble: %s\n", mnemonic ); } if( !(t_flags & FCML_TSF_PRINT_ONLY) ) { success = t_flags & FCML_TSF_SHOULD_FAIL; } } else { fcml_bool looking_for_instruction = FCML_TRUE; fcml_bool found = FCML_FALSE; fcml_uint8_t *assembled_code[100]; int assembled_code_len[100]; int assembled_code_index = 0; int j = 0; for( j = 0; j < 2; j++ ) { fcml_st_assembled_instruction *instructions = asm_result.instructions; assembled_code_index = 0; /* Fill code array.*/ fcml_st_assembled_instruction *assembled_instruction = instructions; while( assembled_instruction ) { assembled_code_len[assembled_code_index] = assembled_instruction->code_length; assembled_code[assembled_code_index++] = assembled_instruction->code; assembled_instruction = assembled_instruction->next; } if( !(t_flags & FCML_TSF_PRINT_ONLY) ) { if( !(t_flags & FCML_TSF_MULTI_ASM_RESULTS) && asm_result.number_of_instructions != 1 ) { found = FCML_FALSE; break; } /* Check if number of assembled instructions match.*/ if( (t_flags & FCML_TSF_MULTI_ASM_RESULTS) && asm_result.number_of_instructions != code[0] ) { found = FCML_FALSE; break; } } while( instructions ) { fcml_st_assembled_instruction *assembled_instruction = (fcml_st_assembled_instruction *)instructions; fcml_bool differ = FCML_FALSE; if( !(t_flags & FCML_TSF_PRINT_ONLY) ) { int i; if( (t_flags & FCML_TSF_MULTI_ASM_RESULTS) ) { int code_index = 0; fcml_uint8_t instruction_count = code[code_index++]; for( i = 0; i < instruction_count; i++ ) { fcml_uint8_t code_size = code[code_index++]; fcml_uint8_t *code_buff = &(code[code_index]); code_index += code_size; fcml_uint8_t k; differ = FCML_FALSE; if( code_size != assembled_instruction->code_length ) { differ = FCML_TRUE; } else { for( k = 0; k < code_size; k++ ) { if( code_buff[k] != assembled_instruction->code[k] ) { differ = FCML_TRUE; break; } } } if( !differ ) { break; } } } else { if( size == assembled_instruction->code_length ) { for( i = 0; i < size; i++ ) { if( code[i] != assembled_instruction->code[i] ) { differ = FCML_TRUE; break; } } } else { differ = FCML_TRUE; } } if( differ ) { found = FCML_FALSE; break; } else { found = FCML_TRUE; } } if( (t_flags & FCML_TSF_PRINT_ONLY) || ( differ && !looking_for_instruction ) ) { #ifdef FCML_DEBUG printf( "Index: %d\nOriginal code : ", assembled_instruction->__def_index ); #else printf( "Original code : " ); #endif fcml_int i; for( i = 0; i < size; i++ ) { printf( FCML_PRI_INT8_HEX, code[i] ); } printf( "\nAssembled code: " ); for( i = 0; i < (fcml_int)assembled_instruction->code_length; i++ ) { printf( FCML_PRI_INT8_HEX, assembled_instruction->code[i] ); } printf("\n"); } instructions = instructions->next; } if( found ) { break; } looking_for_instruction = FCML_FALSE; if( (t_flags & FCML_TSF_PRINT_ONLY) ) { break; } } if( !found ) { if( !(t_flags & FCML_TSF_PRINT_ONLY) && !(t_flags & FCML_TSF_SHOULD_FAIL) ) { printf("Can not assemble: %s\n", mnemonic); } if( !(t_flags & FCML_TSF_PRINT_ONLY) ) { success = t_flags & FCML_TSF_SHOULD_FAIL; } } /* Prints test code.*/ if( !(t_flags & FCML_TSF_SHOULD_FAIL) && assembled_code_index >= 1 && ( (t_flags & FCML_TSF_PRINT_ONLY) || !found ) ) { /* Mnemonic.*/ fcml_string macro; switch( op_mode ) { case FCML_OM_16_BIT: macro = ( assembled_code_index > 1 ) ? (is_gas ? "FCML_A16_M" : "FCML_I16_M") : (is_gas ? "FCML_A16" : "FCML_I16"); break; case FCML_OM_32_BIT: macro = ( assembled_code_index > 1 ) ? (is_gas ? "FCML_A32_M" : "FCML_I32_M") : (is_gas ? "FCML_A32" : "FCML_I32"); break; case FCML_OM_64_BIT: macro = ( assembled_code_index > 1 ) ? (is_gas ? "FCML_A64_M" : "FCML_I64_M") : (is_gas ? "FCML_A64" : "FCML_I64"); break; } printf("%s( \"%s\", ", macro, mnemonic ); /* Code.*/ if( assembled_code_index > 1 ) { /* multi.*/ printf( "%d, ", assembled_code_index ); int i, j; for( i = 0; i < assembled_code_index; i++ ) { if( i > 0 ) { printf(", "); } printf( "FCML_MI( " ); for( j = 0; j < assembled_code_len[i]; j++ ) { if( j > 0 ) { printf(", "); } printf( "0x"FCML_PRI_INT8_HEX, assembled_code[i][j] ); } printf( " )" ); } } else if ( assembled_code_index == 1 ) { int i; for( i = 0; i < assembled_code_len[0]; i++ ) { if( i > 0 ) { printf(", "); } printf( "0x"FCML_PRI_INT8_HEX, assembled_code[0][i] ); } } printf(" );\n"); } } fcml_fn_assembler_result_free( &asm_result ); fcml_fn_parser_result_free( &result ); } else { success = t_flags & FCML_TSF_SHOULD_FAIL; } fcml_fn_disassembler_result_free( &dis_result ); return success; } fcml_bool fcml_fn_ts_instruction_test_diss( fcml_uint8_t *code, fcml_int size, fcml_en_operating_mode op_mode, fcml_string mnemonic, fcml_uint32_t t_flags, fcml_uint32_t ren_flags ) { fcml_bool success = FCML_TRUE; fcml_st_disassembler *disassembler = disassembler_intel; fcml_st_dialect *dialect = dialect_intel; if( FCML_TSF_GAS_DIALECT & t_flags ) { disassembler = disassembler_gas; dialect = dialect_gas; } fcml_st_disassembler_result dis_result; fcml_fn_disassembler_result_prepare( &dis_result ); fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; fcml_st_disassembler_context context = {0}; context.configuration.enable_error_messages = FCML_TRUE; context.configuration.short_forms = ( t_flags & FCML_TSF_SHORT ) ? FCML_TRUE : FCML_FALSE; context.configuration.extend_disp_to_asa = FCML_TRUE; context.configuration.conditional_group = FCML_DASM_CONDITIONAL_GROUP_1; context.configuration.carry_flag_conditional_suffix = FCML_TRUE; context.disassembler = disassembler; context.entry_point.op_mode = op_mode; context.entry_point.address_size_attribute = 0; context.entry_point.operand_size_attribute = 0; context.code = code; context.code_length = size; fcml_ifn_ts_set_ip( &(context.entry_point.ip), op_mode ); /* Disassemble.*/ error = fcml_fn_disassemble( &context, &dis_result ); if( !error ) { /* Print.*/ char buffer[FCML_REND_MAX_BUFF_LEN] = {0}; fcml_st_render_config config = {0}; config.render_flags = FCML_REND_FLAG_HEX_IMM | FCML_REND_FLAG_COND_SHOW_CARRY | FCML_REND_FLAG_HEX_DISPLACEMENT | ren_flags; error = fcml_fn_render( dialect, &config, buffer, sizeof( buffer ), &dis_result ); if( t_flags & FCML_TSF_PRINT_ONLY ) { printf("Disassembled instruction: %s Renderer error code: %d\n", buffer, error); } else { if( error || strcmp( buffer, mnemonic ) != 0 ) { if( !(t_flags & FCML_TSF_SHOULD_FAIL) ) { printf("Disassembling failed, should be: %s (Was: %s)\n", mnemonic, buffer); } success = (t_flags & FCML_TSF_SHOULD_FAIL) ? FCML_TRUE : FCML_FALSE; } else { if( dis_result.instruction_details.instruction_size != size ) { printf("Instruction size: %d Disassembled code size: %d (%s)\n", (fcml_uint32_t)dis_result.instruction_details.instruction_size, size, mnemonic); success = FCML_FALSE; } else { if( !(t_flags & FCML_TSF_PRINT_ONLY) ) { if( (t_flags & FCML_TSF_SHOULD_FAIL) ) { printf("Should fail: %s\n", mnemonic); success = FCML_FALSE; } else { STF_ASSERT(FCML_TRUE); } } } } } } else { if( t_flags & FCML_TSF_PRINT_ONLY ) { printf("Error code: %d\n", error); } if( t_flags & FCML_TSF_SHOULD_FAIL ) { if( !(t_flags & FCML_TSF_PRINT_ONLY) ) { STF_ASSERT(FCML_TRUE); } success = FCML_TRUE; } else { success = FCML_FALSE; } } fcml_fn_disassembler_result_free( &dis_result ); return success; } fcml-1.1.1/check/public-tests/instructions_m_t.h0000644000175000017500000000171412560745216016636 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_M_H_ #define INS_M_H_ #include extern fcml_stf_test_suite fctl_si_instructions_m; #endif /* INS_M_H_ */ fcml-1.1.1/check/public-tests/instructions_u_t.c0000644000175000017500000001456012560745216016644 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "instructions_u_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_u_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_u_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_UCOMISD(void) { FCML_I32( "ucomisd xmm2,mmword ptr [ecx+eax]", 0x66, 0x0F, 0x2E, 0x14, 0x01 ); FCML_I64( "ucomisd xmm2,mmword ptr [rcx+rax]", 0x66, 0x0F, 0x2E, 0x14, 0x01 ); FCML_I64( "ucomisd xmm0,xmm0", 0x66, 0x0F, 0x2E, 0xC0 ); FCML_I32( "vucomisd xmm0,mmword ptr [eax]", 0xc5, 0xf9, 0x2e, 0x00 ); FCML_I64( "vucomisd xmm0,xmm1", 0xc5, 0xf9, 0x2e, 0xc1 ); FCML_A64( "ucomisd (%rcx,%rax),%xmm2", 0x66, 0x0f, 0x2e, 0x14, 0x01 ); FCML_A64( "ucomisd (%rcx,%rax),%xmm2", 0x66, 0x0f, 0x2e, 0x14, 0x01 ); FCML_A64( "ucomisd %xmm0,%xmm0", 0x66, 0x0f, 0x2e, 0xc0 ); FCML_A64( "vucomisd (%rax),%xmm0", 0xc5, 0xf9, 0x2e, 0x00 ); FCML_A64( "vucomisd %xmm1,%xmm0", 0xc5, 0xf9, 0x2e, 0xc1 ); } void fcml_tf_instruction_UCOMISS(void) { FCML_I32( "ucomiss xmm2,dword ptr [ecx+eax]", 0x0F, 0x2E, 0x14, 0x01 ); FCML_I64( "ucomiss xmm2,dword ptr [rcx+rax]", 0x0F, 0x2E, 0x14, 0x01 ); FCML_I64( "ucomiss xmm0,xmm0", 0x0F, 0x2E, 0xC0 ); FCML_I32( "vucomiss xmm0,dword ptr [eax]", 0xc5, 0xf8, 0x2e, 0x00 ); FCML_I64( "vucomiss xmm0,xmm1", 0xc5, 0xf8, 0x2e, 0xc1 ); FCML_A64( "ucomiss (%rcx,%rax),%xmm2", 0x0f, 0x2e, 0x14, 0x01 ); FCML_A64( "ucomiss (%rcx,%rax),%xmm2", 0x0f, 0x2e, 0x14, 0x01 ); FCML_A64( "ucomiss %xmm0,%xmm0", 0x0f, 0x2e, 0xc0 ); FCML_A64( "vucomiss (%rax),%xmm0", 0xc5, 0xf8, 0x2e, 0x00 ); FCML_A64( "vucomiss %xmm1,%xmm0", 0xc5, 0xf8, 0x2e, 0xc1 ); } void fcml_tf_instruction_UD2(void) { FCML_I3264( "ud2", 0x0F, 0x0B ); FCML_A64( "ud2", 0x0f, 0x0b ); } void fcml_tf_instruction_UNPCKHPD(void) { FCML_I32( "unpckhpd xmm0,xmmword ptr [eax]", 0x66, 0x0F, 0x15, 0x00 ); FCML_I32( "unpckhpd xmm0,xmm0", 0x66, 0x0F, 0x15, 0xC0 ); FCML_I64( "unpckhpd xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x15, 0x00 ); FCML_I32( "vunpckhpd xmm0,xmm6,xmmword ptr [eax]", 0xc5, 0xc9, 0x15, 0x00 ); FCML_I32( "vunpckhpd xmm0,xmm6,xmm0", 0xc5, 0xc9, 0x15, 0xc0 ); FCML_I64( "vunpckhpd xmm0,xmm6,xmmword ptr [rax]", 0xc5, 0xc9, 0x15, 0x00 ); FCML_I64( "vunpckhpd ymm0,ymm6,ymmword ptr [rax]", 0xc5, 0xcd, 0x15, 0x00 ); FCML_A64( "unpckhpd (%rax),%xmm0", 0x66, 0x0f, 0x15, 0x00 ); FCML_A64( "unpckhpd %xmm0,%xmm0", 0x66, 0x0f, 0x15, 0xc0 ); FCML_A64( "vunpckhpd %xmm0,%xmm6,%xmm0", 0xc5, 0xc9, 0x15, 0xc0 ); FCML_A64( "vunpckhpd (%rax),%xmm6,%xmm0", 0xc5, 0xc9, 0x15, 0x00 ); FCML_A64( "vunpckhpd (%rax),%ymm6,%ymm0", 0xc5, 0xcd, 0x15, 0x00 ); } void fcml_tf_instruction_UNPCKHPS(void) { FCML_I32( "unpckhps xmm0,xmmword ptr [eax]", 0x0F, 0x15, 0x00 ); FCML_I32( "unpckhps xmm0,xmm0", 0x0F, 0x15, 0xC0 ); FCML_I64( "unpckhps xmm0,xmmword ptr [rax]", 0x0F, 0x15, 0x00 ); FCML_I32( "vunpckhps xmm0,xmm6,xmmword ptr [eax]", 0xc5, 0xc8, 0x15, 0x00 ); FCML_I32( "vunpckhps xmm0,xmm6,xmm0", 0xc5, 0xc8, 0x15, 0xc0 ); FCML_I64( "vunpckhps xmm0,xmm6,xmmword ptr [rax]", 0xc5, 0xc8, 0x15, 0x00 ); FCML_A64( "unpckhps (%rax),%xmm0", 0x0f, 0x15, 0x00 ); FCML_A64( "unpckhps %xmm0,%xmm0", 0x0f, 0x15, 0xc0 ); FCML_A64( "vunpckhps (%rax),%xmm6,%xmm0", 0xc5, 0xc8, 0x15, 0x00 ); FCML_A64( "vunpckhps %xmm0,%xmm6,%xmm0", 0xc5, 0xc8, 0x15, 0xc0 ); } void fcml_tf_instruction_UNPCKLPD(void) { FCML_I32( "unpcklpd xmm0,xmmword ptr [eax]", 0x66, 0x0F, 0x14, 0x00 ); FCML_I32( "unpcklpd xmm0,xmm0", 0x66, 0x0F, 0x14, 0xC0 ); FCML_I64( "unpcklpd xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x14, 0x00 ); FCML_I32( "vunpcklpd xmm0,xmm6,xmmword ptr [eax]", 0xc5, 0xc9, 0x14, 0x00 ); FCML_I32( "vunpcklpd xmm0,xmm6,xmm0", 0xc5, 0xc9, 0x14, 0xc0 ); FCML_I64( "vunpcklpd xmm0,xmm6,xmmword ptr [rax]", 0xc5, 0xc9, 0x14, 0x00 ); FCML_A64( "unpcklpd %xmm0,%xmm0", 0x66, 0x0f, 0x14, 0xc0 ); FCML_A64( "unpcklpd (%rax),%xmm0", 0x66, 0x0f, 0x14, 0x00 ); FCML_A64( "vunpcklpd %xmm0,%xmm6,%xmm0", 0xc5, 0xc9, 0x14, 0xc0 ); FCML_A64( "vunpcklpd (%rax),%xmm6,%xmm0", 0xc5, 0xc9, 0x14, 0x00 ); } void fcml_tf_instruction_UNPCKLPS(void) { FCML_I32( "unpcklps xmm0,xmmword ptr [eax]", 0x0F, 0x14, 0x00 ); FCML_I32( "unpcklps xmm0,xmm0", 0x0F, 0x14, 0xC0 ); FCML_I64( "unpcklps xmm0,xmmword ptr [rax]", 0x0F, 0x14, 0x00 ); FCML_I32( "vunpcklps xmm0,xmm6,xmmword ptr [eax]", 0xc5, 0xc8, 0x14, 0x00 ); FCML_I32( "vunpcklps xmm0,xmm6,xmm0", 0xc5, 0xc8, 0x14, 0xc0 ); FCML_I64( "vunpcklps xmm0,xmm6,xmmword ptr [rax]", 0xc5, 0xc8, 0x14, 0x00 ); FCML_A64( "unpcklps %xmm0,%xmm0", 0x0f, 0x14, 0xc0 ); FCML_A64( "unpcklps (%rax),%xmm0", 0x0f, 0x14, 0x00 ); FCML_A64( "vunpcklps %xmm0,%xmm6,%xmm0", 0xc5, 0xc8, 0x14, 0xc0 ); FCML_A64( "vunpcklps (%rax),%xmm6,%xmm0", 0xc5, 0xc8, 0x14, 0x00 ); } fcml_stf_test_case fctl_ti_instructions_u[] = { { "fcml_tf_instruction_UCOMISD", fcml_tf_instruction_UCOMISD }, { "fcml_tf_instruction_UCOMISS", fcml_tf_instruction_UCOMISS }, { "fcml_tf_instruction_UD2", fcml_tf_instruction_UD2 }, { "fcml_tf_instruction_UNPCKHPD", fcml_tf_instruction_UNPCKHPD }, { "fcml_tf_instruction_UNPCKHPS", fcml_tf_instruction_UNPCKHPS }, { "fcml_tf_instruction_UNPCKLPD", fcml_tf_instruction_UNPCKLPD }, { "fcml_tf_instruction_UNPCKLPS", fcml_tf_instruction_UNPCKLPS }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_u = { "suite-fctl_ti_instructions_u", fcml_tf_instructions_u_suite_init, fcml_tf_instructions_u_suite_cleanup, fctl_ti_instructions_u }; fcml-1.1.1/check/public-tests/instructions_c_t.h0000644000175000017500000000171412560745216016624 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_C_H_ #define INS_C_H_ #include extern fcml_stf_test_suite fctl_si_instructions_c; #endif /* INS_C_H_ */ fcml-1.1.1/check/public-tests/instructions_f_t.h0000644000175000017500000000171412560745216016627 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_F_H_ #define INS_F_H_ #include extern fcml_stf_test_suite fctl_si_instructions_f; #endif /* INS_F_H_ */ fcml-1.1.1/check/public-tests/instructions_o_t.c0000644000175000017500000002634712560745216016644 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include #include "instructions_o_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_o_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_o_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_OR(void) { FCML_I32_M( "or al,42h", 2, FCML_MI( 0x80, 0xc8, 0x42 ), FCML_MI( 0x0c, 0x42 ) ); FCML_I32_A_FAILED( "lock or al,42h", 0xF0, 0x80, 0xc8, 0x42 ); FCML_I32_D( "lock or al,42h", 0xF0, 0x80, 0xc8, 0x42 ); FCML_I32_M( "or ax,8042h", 2, FCML_MI( 0x66, 0x81, 0xc8, 0x42, 0x80 ), FCML_MI( 0x66, 0x0d, 0x42, 0x80 ) ); FCML_I32_M( "or eax,42806521h", 2, FCML_MI( 0x81, 0xc8, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x0d, 0x21, 0x65, 0x80, 0x42 ) ); FCML_I64_M( "or rax,0000000042806521h", 2, FCML_MI( 0x48, 0x81, 0xc8, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x48, 0x0d, 0x21, 0x65, 0x80, 0x42 ) ); FCML_I64_M( "or ax,6521h", 2, FCML_MI( 0x66, 0x81, 0xc8, 0x21, 0x65 ), FCML_MI( 0x66, 0x0d, 0x21, 0x65 ) ); FCML_I64_M( "or rax,0000000042806521h", 2, FCML_MI( 0x48, 0x81, 0xc8, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x48, 0x0d, 0x21, 0x65, 0x80, 0x42 ) ); FCML_I64_M( "or rax,0ffffffffffffffffh", 3, FCML_MI( 0x67, 0x48, 0x83, 0xc8, 0xff ), FCML_MI( 0x67, 0x48, 0x81, 0xc8, 0xff, 0xff, 0xff, 0xff ), FCML_MI( 0x67, 0x48, 0x0d, 0xff, 0xff, 0xff, 0xff ) ); FCML_I32( "lock or byte ptr [04030201h],0ffh", 0xF0, 0x80, 0x0d, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "xacquire lock or byte ptr [04030201h],0ffh", 0xF2, 0xF0, 0x80, 0x0d, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "xrelease lock or byte ptr [04030201h],0ffh", 0xF3, 0xF0, 0x80, 0x0d, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "or byte ptr [esi+04030201h],0ffh", 0x80, 0x8e, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "or byte ptr [ecx+eax+00000002h],03h", 0x80, 0x4c, 0x01, 0x02, 0x03 ); FCML_I32( "or ebp,04030201h", 0x81, 0xcd, 0x01, 0x02, 0x03, 0x04 ); FCML_I32( "or bp,0201h", 0x66, 0x81, 0xcd, 0x01, 0x02 ); FCML_I64( "or bp,0201h", 0x66, 0x67, 0x81, 0xcd, 0x01, 0x02 ); FCML_I64( "or rbp,0000000004030201h", 0x48, 0x81, 0xcd, 0x01, 0x02, 0x03, 0x04 ); FCML_I64_M( "or rbp,0ffffffffffffffffh", 2, FCML_MI( 0x48, 0x83, 0xcd, 0xff ), FCML_MI( 0x48, 0x81, 0xcd, 0xff, 0xff, 0xff, 0xff ) ); FCML_I64_M( "or rbp,0ffffffffffffffffh", 2, FCML_MI( 0x67, 0x48, 0x83, 0xcd, 0xff ), FCML_MI( 0x67, 0x48, 0x81, 0xcd, 0xff, 0xff, 0xff, 0xff ) ); FCML_I64_M( "or rbp,0ffffffffffffffffh", 2, FCML_MI( 0x48, 0x83, 0xcd, 0xff ), FCML_MI( 0x48, 0x81, 0xcd, 0xff, 0xff, 0xff, 0xff ) ); FCML_I32_M( "lock or dword ptr [esi],00000001h", 2, FCML_MI( 0xF0, 0x83, 0x0e, 0x01 ), FCML_MI( 0xF0, 0x81, 0x0e, 0x01, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "xacquire lock or dword ptr [esi],00000001h", 2, FCML_MI( 0xF2, 0xF0, 0x83, 0x0e, 0x01 ), FCML_MI( 0xF2, 0xF0, 0x81, 0x0e, 0x01, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "xrelease lock or dword ptr [esi],00000001h", 2, FCML_MI( 0xF3, 0xF0, 0x83, 0x0e, 0x01 ), FCML_MI( 0xF3, 0xF0, 0x81, 0x0e, 0x01, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "or word ptr [esi],0001h", 2, FCML_MI( 0x66, 0x83, 0x0e, 0x01 ), FCML_MI( 0x66, 0x81, 0x0e, 0x01, 0x00 ) ); FCML_I32_M( "or dword ptr [0201h],00000003h", 2, FCML_MI( 0x67, 0x83, 0x0e, 0x01, 0x02, 0x03 ), FCML_MI( 0x67, 0x81, 0x0e, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00 ) ); FCML_I64_M( "or qword ptr [rdi+0000000004030201h],0000000000000005h", 2, FCML_MI( 0x48, 0x83, 0x8f, 0x01, 0x02, 0x03, 0x04, 0x05 ), FCML_MI( 0x48, 0x81, 0x8f, 0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00 ) ); FCML_I64_M( "or qword ptr [rdi+0000000004030201h],0ffffffffffffffffh", 2, FCML_MI( 0x48, 0x83, 0x8f, 0x01, 0x02, 0x03, 0x04, 0xff ), FCML_MI( 0x48, 0x81, 0x8f, 0x01, 0x02, 0x03, 0x04, 0xff, 0xff, 0xff, 0xff ) ); FCML_I32( "lock or byte ptr [ebp+04030201h],ah", 0xF0, 0x08, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "xacquire lock or byte ptr [ebp+04030201h],ah", 0xF2, 0xF0, 0x08, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "xrelease lock or byte ptr [ebp+04030201h],ah", 0xF3, 0xF0, 0x08, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I64( "or byte ptr [rbp+0000000004030201h],spl", 0x40, 0x08, 0xa5, 0x01, 0x02, 0x03, 0x04 ); FCML_I64( "or byte ptr [rbp+0000000000000001h],spl", 0x40, 0x08, 0x65, 0x01 ); FCML_I32( "lock or dword ptr [ebp+04030201h],esp", 0xF0, 0x09, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "xacquire lock or dword ptr [ebp+04030201h],esp", 0xF2, 0xF0, 0x09, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "xrelease lock or dword ptr [ebp+04030201h],esp", 0xF3, 0xF0, 0x09, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "or word ptr [di+0201h],sp", 0x66, 0x67, 0x09, 0xa5, 0x01, 0x02 ); FCML_I32( "or dword ptr [di+0201h],esp", 0x67, 0x09, 0xa5, 0x01, 0x02 ); FCML_I64( "or qword ptr [r9+rcx*4+0000000000000001h],r12", 0x4D, 0x09, 0x64, 0x89, 0x01 ); FCML_I32( "or ah,byte ptr [ebp+04030201h]", 0x0a, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I64( "or spl,byte ptr [rbp+0000000004030201h]", 0x40, 0x0a, 0xa5, 0x01, 0x02, 0x03, 0x04 ); FCML_I64( "or spl,byte ptr [rbp+0000000000000001h]", 0x40, 0x0a, 0x65, 0x01 ); FCML_I32( "or esp,dword ptr [ebp+04030201h]", 0x0b, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "or sp,word ptr [di+0201h]", 0x66, 0x67, 0x0b, 0xa5, 0x01, 0x02 ); FCML_I32( "or esp,dword ptr [di+0201h]", 0x67, 0x0b, 0xa5, 0x01, 0x02 ); FCML_I64( "or r12,qword ptr [r9+rcx*4+0000000000000001h]", 0x4D, 0x0b, 0x64, 0x89, 0x01 ); FCML_A32_M( "or $0x42806521,%eax", 2, FCML_MI( 0x81, 0xc8, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x0d, 0x21, 0x65, 0x80, 0x42 ) ); FCML_A64_M( "or $0x0000000042806521,%rax", 2, FCML_MI( 0x48, 0x81, 0xc8, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x48, 0x0d, 0x21, 0x65, 0x80, 0x42 ) ); FCML_A64_M( "or $0x6521,%ax", 2, FCML_MI( 0x66, 0x81, 0xc8, 0x21, 0x65 ), FCML_MI( 0x66, 0x0d, 0x21, 0x65 ) ); FCML_A32( "lock orb $0xff,0x04030201", 0xF0, 0x80, 0x0d, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_A32( "xacquire lock orb $0xff,0x04030201", 0xF2, 0xF0, 0x80, 0x0d, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_A64_M( "or $0x42,%al", 2, FCML_MI( 0x80, 0xc8, 0x42 ), FCML_MI( 0x0c, 0x42 ) ); FCML_A64( "lock orb $0xff,0x04030201(%rip)", 0xf0, 0x80, 0x0d, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_A64_M( "lock orl $0x00000001,(%rsi)", 2, FCML_MI( 0xf0, 0x83, 0x0e, 0x01 ), FCML_MI( 0xf0, 0x81, 0x0e, 0x01, 0x00, 0x00, 0x00 ) ); FCML_A64_M( "lock orw $0x0001,(%rsi)", 2, FCML_MI( 0xf0, 0x66, 0x83, 0x0e, 0x01 ), FCML_MI( 0xf0, 0x66, 0x81, 0x0e, 0x01, 0x00 ) ); FCML_A64( "or 0x0000000000000001(%r9,%rcx,4),%r12", 0x4d, 0x0b, 0x64, 0x89, 0x01 ); FCML_A64_M( "orq $0xffffffffffffffff,0x0000000004030201(%rdi)", 2, FCML_MI( 0x48, 0x83, 0x8f, 0x01, 0x02, 0x03, 0x04, 0xff ), FCML_MI( 0x48, 0x81, 0x8f, 0x01, 0x02, 0x03, 0x04, 0xff, 0xff, 0xff, 0xff ) ); } void fcml_tf_instruction_ORPD(void) { FCML_I32( "orpd xmm2,xmmword ptr [eax]", 0x66, 0x0F, 0x56, 0x10 ); FCML_I32( "orpd xmm3,xmm0", 0x66, 0x0F, 0x56, 0xD8 ); FCML_I64( "orpd xmm2,xmmword ptr [rax]", 0x66, 0x0F, 0x56, 0x10 ); FCML_I64( "vorpd xmm3,xmm1,xmm0", 0xc5, 0xf1, 0x56, 0xd8 ); FCML_I32( "vorpd ymm3,ymm0,ymm0", 0xc5, 0xfd, 0x56, 0xd8 ); FCML_I32( "vorpd ymm3,ymm3,ymmword ptr [eax]", 0xc5, 0xe5, 0x56, 0x18 ); FCML_A64( "orpd (%rax),%xmm2", 0x66, 0x0f, 0x56, 0x10 ); FCML_A64( "orpd %xmm0,%xmm3", 0x66, 0x0f, 0x56, 0xd8 ); FCML_A64( "vorpd %xmm0,%xmm1,%xmm3", 0xc5, 0xf1, 0x56, 0xd8 ); FCML_A64( "vorpd (%rax),%ymm3,%ymm3", 0xc5, 0xe5, 0x56, 0x18 ); } void fcml_tf_instruction_ORPS(void) { FCML_I32( "orps xmm2,xmmword ptr [eax]", 0x0F, 0x56, 0x10 ); FCML_I32( "orps xmm3,xmm0", 0x0F, 0x56, 0xD8 ); FCML_I64( "orps xmm2,xmmword ptr [rax]", 0x0F, 0x56, 0x10 ); FCML_I64( "vorps xmm3,xmm1,xmm0", 0xc5, 0xf0, 0x56, 0xd8 ); FCML_I32( "vorps ymm3,ymm0,ymm0", 0xc5, 0xfc, 0x56, 0xd8 ); FCML_I32( "vorps ymm3,ymm3,ymmword ptr [eax]", 0xc5, 0xe4, 0x56, 0x18 ); FCML_A64( "orps (%rax),%xmm2", 0x0f, 0x56, 0x10 ); FCML_A64( "orps %xmm0,%xmm3", 0x0f, 0x56, 0xd8 ); FCML_A64( "vorps %ymm0,%ymm0,%ymm3", 0xc5, 0xfc, 0x56, 0xd8 ); FCML_A64( "vorps (%rax),%ymm3,%ymm3", 0xc5, 0xe4, 0x56, 0x18 ); } void fcml_tf_instruction_OUT(void) { FCML_I64( "out 20h,al", 0x66, 0xE6, 0x20 ); FCML_I32( "out 20h,eax", 0xE7, 0x20 ); FCML_I32( "out 20h,ax", 0x66, 0xE7, 0x20 ); FCML_I64_D( "out 20h,eax", 0x48, 0xE7, 0x20 ); FCML_I64( "out 20h,eax", 0xE7, 0x20 ); FCML_I32( "out dx,al", 0xEE ); FCML_I64( "out dx,al", 0x66, 0xEE ); FCML_I32( "out dx,eax", 0xEF ); FCML_I32( "out dx,ax", 0x66, 0xEF ); FCML_I64_D( "out dx,eax", 0x48, 0xEF ); FCML_I64( "out dx,eax", 0xEF ); FCML_A64( "out %al,$0x20", 0xe6, 0x20 ); FCML_A64( "out %eax,$0x20", 0xe7, 0x20 ); FCML_A64( "out %al,%dx", 0xee ); FCML_A64( "out %ax,%dx", 0x66, 0xef ); } void fcml_tf_instruction_OUTS(void) { FCML_I32_D_RF( "repe outs dx,byte ptr [esi]", FCML_REND_FLAG_REP_PREFIX_GROUP_1, 0xF3, 0x6e ); FCML_I32_D_RF( "repz outs dx,byte ptr [esi]", FCML_REND_FLAG_REP_PREFIX_GROUP_2, 0xF3, 0x6e ); FCML_I32( "outs dx,byte ptr [esi]", 0x6e ); FCML_I32( "rep outs dx,byte ptr [esi]", 0xF3, 0x6e ); FCML_I32_A( "repz outs dx,byte ptr [esi]", 0xF3, 0x6e ); FCML_I32_A( "repe outs dx,byte ptr [esi]", 0xF3, 0x6e ); FCML_I64( "outs dx,byte ptr [rsi]", 0x6e ); FCML_I64_D( "outs dx,byte ptr [esi]", 0x67, 0x6e ); FCML_I64_A( "outsb", 0x6e ); FCML_I32( "outs dx,dword ptr [esi]", 0x6f ); FCML_I64( "outs dx,dword ptr [rsi]", 0x6f ); FCML_I64( "outs dx,dword ptr [esi]", 0x67, 0x6f ); FCML_I64( "outs dx,word ptr [esi]", 0x66, 0x67, 0x6f ); FCML_I64_A( "outsw", 0x66, 0x6f ); FCML_I64_D( "outs dx,dword ptr [rsi]", 0x48, 0x6f ); FCML_I64( "outs dx,dword ptr [rsi]", 0x6f ); FCML_I64_A( "outsd", 0x6f ); FCML_A64( "outsb (%rsi),%dx", 0x6e ); FCML_A64( "outsb (%esi),%dx", 0x67, 0x6e ); FCML_A64( "outsl (%rsi),%dx", 0x6f ); FCML_A64( "outsl (%esi),%dx", 0x67, 0x6f ); FCML_A64( "outsw (%esi),%dx", 0x66, 0x67, 0x6f ); } fcml_stf_test_case fctl_ti_instructions_o[] = { { "fcml_tf_instruction_OR", fcml_tf_instruction_OR }, { "fcml_tf_instruction_ORPD", fcml_tf_instruction_ORPD }, { "fcml_tf_instruction_ORPS", fcml_tf_instruction_ORPS }, { "fcml_tf_instruction_OUT", fcml_tf_instruction_OUT }, { "fcml_tf_instruction_OUTS", fcml_tf_instruction_OUTS }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_o = { "suite-fctl_ti_instructions_o", fcml_tf_instructions_o_suite_init, fcml_tf_instructions_o_suite_cleanup, fctl_ti_instructions_o }; fcml-1.1.1/check/public-tests/instructions_e_t.c0000644000175000017500000000723512560745216016625 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "instructions_e_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_e_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_e_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_EMMS(void) { FCML_I3264( "emms", 0x0F, 0x77 ); FCML_A64( "emms", 0x0f, 0x77 ); } void fcml_tf_instruction_ENTER(void) { FCML_I32( "enter 0ffeeh,55h", 0xc8, 0xEE, 0xFF, 0x55 ); FCML_I32( "enter 0ffeeh,55h", 0x66, 0xc8, 0xEE, 0xFF, 0x55 ); FCML_I64( "enter 0ffeeh,55h", 0xc8, 0xEE, 0xFF, 0x55 ); FCML_I64( "enter 0ffeeh,55h", 0x66, 0xc8, 0xEE, 0xFF, 0x55 ); FCML_I64_D( "enter 0ffeeh,55h", 0x66, 0x48, 0xc8, 0xEE, 0xFF, 0x55 ); FCML_I32( "enter 0ffeeh,00h", 0xc8, 0xEE, 0xFF, 0x00 ); FCML_I32( "enter 0ffeeh,01h", 0xc8, 0xEE, 0xFF, 0x01 ); /* GAS */ FCML_A64( "enter $0xffee,$0x55", 0xc8, 0xee, 0xff, 0x55 ); FCML_A64( "enter $0xffee,$0x00", 0xc8, 0xee, 0xff, 0x00 ); FCML_A64( "enter $0xffee,$0x01", 0xc8, 0xee, 0xff, 0x01 ); } void fcml_tf_instruction_EXTRACTPS(void) { FCML_I64( "extractps dword ptr [rax+0000000000000020h],xmm0,50h", 0x66, 0x0F, 0x3A, 0x17, 0x40, 0x20, 0x50 ); FCML_A64( "extractps $0x50,%xmm0,0x0000000000000020(%rax)", 0x66, 0x0f, 0x3a, 0x17, 0x40, 0x20, 0x50 ); FCML_I32( "extractps dword ptr [eax+00000020h],xmm0,50h", 0x66, 0x0F, 0x3A, 0x17, 0x40, 0x20, 0x50 ); FCML_I32( "vextractps dword ptr [ecx+eax],xmm2,20h", 0xC4, 0xE3, 0x79, 0x17, 0x14, 0x01, 0x20 ); FCML_I64( "vextractps eax,xmm0,20h", 0xC4, 0xE3, 0x79, 0x17, 0xC0, 0x20 ); FCML_A64( "vextractps $0x20,%xmm0,%eax", 0xc4, 0xe3, 0x79, 0x17, 0xc0, 0x20 ); } void fcml_tf_instruction_EXTRQ(void) { FCML_I32( "extrq xmm1,01h,02h", 0x66, 0x0F, 0x78, 0xC1, 0x01, 0x02 ); FCML_I32( "extrq xmm2,01h,02h", 0x66, 0x0F, 0x78, 0xC2, 0x01, 0x02 ); FCML_I64( "extrq xmm1,01h,02h", 0x66, 0x0F, 0x78, 0xC1, 0x01, 0x02 ); FCML_I64( "extrq xmm2,01h,02h", 0x66, 0x0F, 0x78, 0xC2, 0x01, 0x02 ); FCML_A64( "extrq $0x02,$0x01,%xmm1", 0x66, 0x0f, 0x78, 0xc1, 0x01, 0x02 ); FCML_I32( "extrq xmm0,xmm5", 0x66, 0x0F, 0x79, 0xC5 ); FCML_I32( "extrq xmm4,xmm1", 0x66, 0x0F, 0x79, 0xE1 ); FCML_I64( "extrq xmm0,xmm5", 0x66, 0x0F, 0x79, 0xC5 ); FCML_I64( "extrq xmm4,xmm1", 0x66, 0x0F, 0x79, 0xE1 ); FCML_A64( "extrq %xmm1,%xmm4", 0x66, 0x0f, 0x79, 0xe1 ); } fcml_stf_test_case fctl_ti_instructions_e[] = { { "fcml_tf_instruction_EMMS", fcml_tf_instruction_EMMS }, { "fcml_tf_instruction_ENTER", fcml_tf_instruction_ENTER }, { "fcml_tf_instruction_EXTRACTPS", fcml_tf_instruction_EXTRACTPS }, { "fcml_tf_instruction_EXTRQ", fcml_tf_instruction_EXTRQ }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_e = { "suite-fctl_ti_instructions_e", fcml_tf_instructions_e_suite_init, fcml_tf_instructions_e_suite_cleanup, fctl_ti_instructions_e }; fcml-1.1.1/check/public-tests/render_t.c0000644000175000017500000002175412560745216015036 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 "render_t.h" #include #include #include #include #include #include "instructions_base_t.h" fcml_bool fcml_ifn_render_test_disassemble_intel( fcml_st_disassembler_result *dasm_result, fcml_uint8_t *code, fcml_usize code_size ) { fcml_st_disassembler_context d_context = {0}; d_context.entry_point.op_mode = FCML_OM_32_BIT; d_context.entry_point.ip = 0x00401000; d_context.disassembler = disassembler_intel; d_context.code = code; d_context.code_length = code_size; fcml_fn_disassembler_result_prepare( dasm_result ); fcml_ceh_error error = fcml_fn_disassemble( &d_context, dasm_result ); if( error ) { STF_FAIL("Disassembling failed."); return FCML_FALSE; } return FCML_TRUE; } fcml_bool fcml_ifn_render_test_disassemble_gas( fcml_st_disassembler_result *dasm_result, fcml_uint8_t *code, fcml_usize code_size ) { fcml_st_disassembler_context d_context = {0}; d_context.entry_point.op_mode = FCML_OM_32_BIT; d_context.entry_point.ip = 0x00401000; d_context.disassembler = disassembler_gas; d_context.code = code; d_context.code_length = code_size; fcml_fn_disassembler_result_prepare( dasm_result ); fcml_ceh_error error = fcml_fn_disassemble( &d_context, dasm_result ); if( error ) { STF_FAIL("Disassembling failed."); return FCML_FALSE; } return FCML_TRUE; } fcml_bool fcml_tf_render_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_render_suite_cleanup(void) { return FCML_TRUE; } void fcml_fn_render_paddings_leading_zeroes_intel(void) { fcml_uint8_t code[] = { 0x80, 0x54, 0x01, 0x02, 0x03 }; fcml_st_disassembler_result dasm_result; if( !fcml_ifn_render_test_disassemble_intel( &dasm_result, code, sizeof( code ) ) ) { return; } fcml_st_render_config config = {0}; config.render_flags = FCML_REND_FLAG_REMOVE_LEADING_ZEROS | FCML_REND_FLAG_HEX_IMM | FCML_REND_FLAG_HEX_DISPLACEMENT; fcml_char buffer[FCML_REND_MAX_BUFF_LEN]; fcml_ceh_error error = fcml_fn_render( dialect_intel, &config, buffer, sizeof( buffer ), &dasm_result ); if( error ) { STF_FAIL("Rendering failed."); return; } STF_ASSERT_STRING_EQUAL( buffer, "adc byte ptr [ecx+eax+2h],3h" ); fcml_fn_disassembler_result_free( &dasm_result ); } void fcml_fn_render_paddings_leading_zeroes_intel_2(void) { fcml_uint8_t code[] = { 0x83, 0x15, 0x00, 0x00, 0x00, 0x00, 0x03 }; fcml_st_disassembler_result dasm_result; if( !fcml_ifn_render_test_disassemble_intel( &dasm_result, code, sizeof( code ) ) ) { return; } fcml_st_render_config config = {0}; config.render_flags = FCML_REND_FLAG_REMOVE_LEADING_ZEROS | FCML_REND_FLAG_HEX_IMM | FCML_REND_FLAG_HEX_DISPLACEMENT; fcml_char buffer[FCML_REND_MAX_BUFF_LEN]; fcml_ceh_error error = fcml_fn_render( dialect_intel, &config, buffer, sizeof( buffer ), &dasm_result ); if( error ) { STF_FAIL("Rendering failed."); return; } STF_ASSERT_STRING_EQUAL( buffer, "adc dword ptr [0h],3h" ); fcml_fn_disassembler_result_free( &dasm_result ); } void fcml_fn_render_paddings_leading_zeroes_gas(void) { fcml_uint8_t code[] = { 0x80, 0x54, 0x01, 0x02, 0x03 }; fcml_st_disassembler_result dasm_result; if( !fcml_ifn_render_test_disassemble_gas( &dasm_result, code, sizeof( code ) ) ) { return; } fcml_st_render_config config = {0}; config.render_flags = FCML_REND_FLAG_REMOVE_LEADING_ZEROS | FCML_REND_FLAG_HEX_IMM | FCML_REND_FLAG_HEX_DISPLACEMENT; fcml_char buffer[FCML_REND_MAX_BUFF_LEN]; fcml_ceh_error error = fcml_fn_render( dialect_gas, &config, buffer, sizeof( buffer ), &dasm_result ); if( error ) { STF_FAIL("Rendering failed."); return; } STF_ASSERT_STRING_EQUAL( buffer, "adcb $0x3,0x2(%ecx,%eax)" ); fcml_fn_disassembler_result_free( &dasm_result ); } void fcml_fn_render_paddings_intel(void) { fcml_uint8_t code[] = { 0x66, 0x81, 0xd0, 0x42, 0x80 }; fcml_st_disassembler_result dasm_result; if( !fcml_ifn_render_test_disassemble_intel( &dasm_result, code, sizeof( code ) ) ) { return; } fcml_st_render_config config = {0}; config.render_flags = FCML_REND_FLAG_CODE_PADDING | FCML_REND_FLAG_MNEMONIC_PADDING | FCML_REND_FLAG_RENDER_CODE; config.prefered_code_padding = 10; config.prefered_mnemonic_padding = 8; fcml_char buffer[FCML_REND_MAX_BUFF_LEN]; fcml_ceh_error error = fcml_fn_render( dialect_intel, &config, buffer, sizeof( buffer ), &dasm_result ); if( error ) { STF_FAIL("Rendering failed."); return; } STF_ASSERT_STRING_EQUAL( buffer, "6681d04280 adc ax,-32702" ); // Padding length equal to code and mnemonic. config.prefered_code_padding = 5; config.prefered_mnemonic_padding = 3; error = fcml_fn_render( dialect_intel, &config, buffer, sizeof( buffer ), &dasm_result ); if( error ) { STF_FAIL("Rendering failed."); return; } STF_ASSERT_STRING_EQUAL( buffer, "6681d04280 adc ax,-32702" ); // Paddings less than rendered mnemonic and code. config.prefered_code_padding = 1; config.prefered_mnemonic_padding = 1; error = fcml_fn_render( dialect_intel, &config, buffer, sizeof( buffer ), &dasm_result ); if( error ) { STF_FAIL("Rendering failed."); return; } STF_ASSERT_STRING_EQUAL( buffer, "6681d04280 adc ax,-32702" ); fcml_fn_disassembler_result_free( &dasm_result ); } void fcml_fn_render_paddings_intel_lock(void) { fcml_uint8_t code[] = { 0xF0, 0x80, 0x15, 0x01, 0x02, 0x03, 0x04, 0xff }; fcml_st_disassembler_result dasm_result; if( !fcml_ifn_render_test_disassemble_intel( &dasm_result, code, sizeof( code ) ) ) { return; } fcml_st_render_config config = {0}; config.render_flags = FCML_REND_FLAG_CODE_PADDING | FCML_REND_FLAG_MNEMONIC_PADDING | FCML_REND_FLAG_RENDER_CODE; config.prefered_code_padding = 10; config.prefered_mnemonic_padding = 8; fcml_char buffer[FCML_REND_MAX_BUFF_LEN]; fcml_ceh_error error = fcml_fn_render( dialect_intel, &config, buffer, sizeof( buffer ), &dasm_result ); if( error ) { STF_FAIL("Rendering failed."); return; } STF_ASSERT_STRING_EQUAL( buffer, "f0801501020304ff lock adc byte ptr [04030201h],-1" ); fcml_fn_disassembler_result_free( &dasm_result ); } void fcml_fn_render_paddings_gas(void) { fcml_uint8_t code[] = { 0x66, 0x81, 0xd0, 0x42, 0x80 }; fcml_st_disassembler_result dasm_result; if( !fcml_ifn_render_test_disassemble_gas( &dasm_result, code, sizeof( code ) ) ) { return; } fcml_st_render_config config = {0}; config.render_flags = FCML_REND_FLAG_CODE_PADDING | FCML_REND_FLAG_MNEMONIC_PADDING | FCML_REND_FLAG_RENDER_CODE; config.prefered_code_padding = 10; config.prefered_mnemonic_padding = 8; fcml_char buffer[FCML_REND_MAX_BUFF_LEN]; fcml_ceh_error error = fcml_fn_render( dialect_gas, &config, buffer, sizeof( buffer ), &dasm_result ); if( error ) { STF_FAIL("Rendering failed."); return; } STF_ASSERT_STRING_EQUAL( buffer, "6681d04280 adc $-32702,%ax" ); // Padding length equal to code and mnemonic. config.prefered_code_padding = 5; config.prefered_mnemonic_padding = 3; error = fcml_fn_render( dialect_gas, &config, buffer, sizeof( buffer ), &dasm_result ); if( error ) { STF_FAIL("Rendering failed."); return; } STF_ASSERT_STRING_EQUAL( buffer, "6681d04280 adc $-32702,%ax" ); // Paddings less than rendered mnemonic and code. config.prefered_code_padding = 1; config.prefered_mnemonic_padding = 1; error = fcml_fn_render( dialect_gas, &config, buffer, sizeof( buffer ), &dasm_result ); if( error ) { STF_FAIL("Rendering failed."); return; } STF_ASSERT_STRING_EQUAL( buffer, "6681d04280 adc $-32702,%ax" ); fcml_fn_disassembler_result_free( &dasm_result ); } fcml_stf_test_case fcml_ti_render[] = { { "fcml_fn_render_paddings_leading_zeroes_intel", fcml_fn_render_paddings_leading_zeroes_intel }, { "fcml_fn_render_paddings_leading_zeroes_intel_2", fcml_fn_render_paddings_leading_zeroes_intel_2 }, { "fcml_fn_render_paddings_leading_zeroes_gas", fcml_fn_render_paddings_leading_zeroes_gas }, { "fcml_fn_render_paddings_intel", fcml_fn_render_paddings_intel }, { "fcml_fn_render_paddings_intel_lock", fcml_fn_render_paddings_intel_lock }, { "fcml_fn_render_paddings_gas", fcml_fn_render_paddings_gas }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_render = { "suite-fcml-render", fcml_tf_render_suite_init, fcml_tf_render_suite_cleanup, fcml_ti_render }; fcml-1.1.1/check/public-tests/instructions_a_t.c0000644000175000017500000012716012560745216016621 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "instructions_a_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_a_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_a_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_AAA(void) { FCML_I32( "aaa", 0x37 ); FCML_A32( "aaa", 0x37 ); } void fcml_tf_instruction_AAD(void) { FCML_I32( "aad", 0xD5, 0x0A ); FCML_A32( "aad", 0xD5, 0x0A ); FCML_I64_FAILED( "aad", 0xD5, 0x0A ); FCML_I32( "aad 0ch", 0xD5, 0x0C ); FCML_A32( "aad $0x0c", 0xD5, 0x0C ); FCML_I64_FAILED( "aad 0ch", 0xD5, 0x0C ); } void fcml_tf_instruction_AAM(void) { FCML_I32( "aam", 0xD4, 0x0A ); FCML_A32( "aam", 0xD4, 0x0A ); FCML_I64_FAILED( "aam", 0xD4, 0x0A ); FCML_I32( "aam 0ch", 0xD4, 0x0C ); FCML_A32( "aam $0x0c", 0xD4, 0x0C ); FCML_I64_FAILED( "aam 0ch", 0xD4, 0x0C ); FCML_I64_FAILED( "aam $0x0c", 0xD4, 0x0C ); } void fcml_tf_instruction_AAS(void) { FCML_I32( "aas", 0x3F ); FCML_A32( "aas", 0x3F ); FCML_I64_FAILED( "aas", 0x3F ); } void fcml_tf_instruction_ADC(void) { FCML_I32_FAILED( "lock adc al,42h", 0xF0, 0x14, 0x42 ); FCML_A3264_M( "adc $0x42,%al", 2, FCML_MI( 0x14, 0x42 ), FCML_MI( 0x80, 0xD0, 0x42 ) ); FCML_I3264_M( "adc al,42h", 2, FCML_MI( 0x14, 0x42 ), FCML_MI( 0x80, 0xD0, 0x42 ) ); FCML_I3264_M( "adc al,0ffh", 2, FCML_MI( 0x14, 0xFF ), FCML_MI( 0x80, 0xD0, 0xFF ) ); FCML_I3264_M( "adc al,00h", 2, FCML_MI( 0x14, 0x00 ), FCML_MI( 0x80, 0xD0, 0x00 ) ); FCML_I3264_M( "adc ax,8042h", 2, FCML_MI( 0x66, 0x15, 0x42, 0x80 ), FCML_MI( 0x66, 0x81, 0xd0, 0x42, 0x80 ) ); FCML_A32_M( "adc $0x8042,%ax", 2, FCML_MI( 0x66, 0x81, 0xd0, 0x42, 0x80 ), FCML_MI( 0x66, 0x15, 0x42, 0x80 ) ); FCML_I32_FAILED( "lock adc ax,8042h", 0xF0, 0x66, 0x15, 0x42, 0x80 ); FCML_I3264_M( "adc eax,42806521h", 2, FCML_MI( 0x15, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x81, 0xd0, 0x21, 0x65, 0x80, 0x42 ) ); FCML_I64_D( "adc eax,42806521h", 0x40, 0x15, 0x21, 0x65, 0x80, 0x42 ); FCML_A32_M( "adc $0x8042,%ax", 2, FCML_MI( 0x66, 0x81, 0xd0, 0x42, 0x80 ), FCML_MI( 0x66, 0x15, 0x42, 0x80 ) ); FCML_I64_D( "adc ax,6521h", 0x66, 0x40, 0x15, 0x21, 0x65 ); FCML_I64_M( "adc rax,0000000042806521h", 2, FCML_MI( 0x48, 0x15, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x48, 0x81, 0xd0, 0x21, 0x65, 0x80, 0x42 ) ); FCML_A64_M( "adc $0x0000000042806521,%rax", 2, FCML_MI( 0x48, 0x15, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x48, 0x81, 0xd0, 0x21, 0x65, 0x80, 0x42 ) ); FCML_I64_D( "adc rax,0000000042806521h", 0x66, 0x48, 0x15, 0x21, 0x65, 0x80, 0x42 ); FCML_I64_D( "adc rax,0000000042806521h", 0x67, 0x66, 0x48, 0x15, 0x21, 0x65, 0x80, 0x42 ); FCML_I64_D( "adc rax,0ffffffffffffffffh", 0x67, 0x66, 0x48, 0x15, 0xff, 0xff, 0xff, 0xff ); FCML_I32( "adc byte ptr [04030201h],0ffh", 0x80, 0x15, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_A32( "adcb $0xff,0x04030201", 0x80, 0x15, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "lock adc byte ptr [04030201h],0ffh", 0xF0, 0x80, 0x15, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_A32( "lock adcb $0xff,0x04030201", 0xF0, 0x80, 0x15, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "adc byte ptr [esi+04030201h],0ffh", 0x80, 0x96, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "adc byte ptr [ecx+eax+00000002h],03h", 0x80, 0x54, 0x01, 0x02, 0x03 ); FCML_A32( "adcl $0x04030201,(%eax)", 0x81, 0x10, 0x01, 0x02, 0x03, 0x04 ); FCML_I3264( "adc ebp,04030201h", 0x81, 0xD5, 0x01, 0x02, 0x03, 0x04 ); FCML_A32_M( "adc $0x42806521,%eax", 2, FCML_MI( 0x81, 0xd0, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x15, 0x21, 0x65, 0x80, 0x42 ) ); FCML_I32_A_FAILED( "lock adc ebp,04030201h", 0xF0, 0x81, 0xD5, 0x01, 0x02, 0x03, 0x04 ); FCML_I16( "adc bp,0201h", 0x81, 0xD5, 0x01, 0x02 ); FCML_I3264( "adc bp,0201h", 0x66, 0x81, 0xD5, 0x01, 0x02 ); FCML_I64_D( "adc bp,0201h", 0x67, 0x66, 0x40, 0x81, 0xD5, 0x01, 0x02 ); FCML_I64( "adc rbp,0000000004030201h", 0x48, 0x81, 0xD5, 0x01, 0x02, 0x03, 0x04 ); FCML_A64( "adcq $0x0000000004030201,(%rax)", 0x48, 0x81, 0x10, 0x01, 0x02, 0x03, 0x04 ); FCML_A64_A_FAILED( "adc $0x0000000004030201,(%rax)", 0x48, 0x81, 0x10, 0x01, 0x02, 0x03, 0x04 ); FCML_A64_D_FAILED( "adc $0x0000000004030201,(%rax)", 0x48, 0x81, 0x10, 0x01, 0x02, 0x03, 0x04 ); FCML_A64( "adc $0x0000000004030201,%rbp", 0x48, 0x81, 0xD5, 0x01, 0x02, 0x03, 0x04 ); FCML_I64_A_FAILED( "lock adc rbp,0000000004030201h", 0xF0, 0x48, 0x81, 0xD5, 0x01, 0x02, 0x03, 0x04 ); FCML_A64_A_FAILED( "lock adc $0x0000000004030201,%rbp", 0xF0, 0x48, 0x81, 0xD5, 0x01, 0x02, 0x03, 0x04 ); FCML_I64_M( "adc rbp,0ffffffffffffffffh", 2, FCML_MI( 0x48, 0x81, 0xD5, 0xff, 0xff, 0xff, 0xff ), FCML_MI( 0x48, 0x83, 0xd5, 0xff ) ); FCML_I64_D( "adc rbp,0ffffffffffffffffh", 0x67, 0x48, 0x81, 0xD5, 0xff, 0xff, 0xff, 0xff ); FCML_I64_D( "adc rbp,0ffffffffffffffffh", 0x66, 0x48, 0x81, 0xD5, 0xff, 0xff, 0xff, 0xff ); FCML_I32_M( "lock adc dword ptr [esi],00000001h", 2, FCML_MI( 0xF0, 0x83, 0x16, 0x01 ), FCML_MI( 0xF0, 0x81, 0x16, 0x01, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "xacquire lock adc dword ptr [esi],00000001h", 2, FCML_MI( 0xF2, 0xF0, 0x83, 0x16, 0x01 ), FCML_MI( 0xF2, 0xF0, 0x81, 0x16, 0x01, 0x00, 0x00, 0x00 ) ); FCML_A32_M( "xacquire lock adcl $0x00000001,(%esi)", 2, FCML_MI( 0xF2, 0xF0, 0x83, 0x16, 0x01 ), FCML_MI( 0xF2, 0xF0, 0x81, 0x16, 0x01, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "xrelease lock adc dword ptr [esi],00000001h", 2, FCML_MI( 0xF3, 0xF0, 0x83, 0x16, 0x01 ), FCML_MI( 0xF3, 0xF0, 0x81, 0x16, 0x01, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "lock adc dword ptr [esi],00000001h", 2, FCML_MI( 0xF0, 0x83, 0x16, 0x01 ), FCML_MI( 0xF0, 0x81, 0x16, 0x01, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "adc word ptr [esi],0001h", 2, FCML_MI( 0x66, 0x83, 0x16, 0x01 ), FCML_MI( 0x66, 0x81, 0x16, 0x01, 0x00 ) ); FCML_I64_M( "adc word ptr [rsi],0001h", 2, FCML_MI( 0x66, 0x83, 0x16, 0x01 ), FCML_MI( 0x66, 0x81, 0x16, 0x01, 0x00 ) ); FCML_I32_M( "adc dword ptr [0201h],00000003h", 2, FCML_MI( 0x67, 0x83, 0x16, 0x01, 0x02, 0x03 ), FCML_MI( 0x67, 0x81, 0x16, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "adc word ptr [0201h],0ffffh", 2, FCML_MI( 0x66, 0x67, 0x83, 0x16, 0x01, 0x02, 0xFF ), FCML_MI( 0x66, 0x67, 0x81, 0x16, 0x01, 0x02, 0xff, 0xff ) ); FCML_I32_M( "adc dword ptr [0201h],00000003h", 2, FCML_MI( 0x67, 0x83, 0x16, 0x01, 0x02, 0x03 ), FCML_MI( 0x67, 0x81, 0x16, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00 ) ); FCML_I64_RIP_M( "adc dword ptr [0000800000401007h],00000003h", 2, FCML_MI( 0x83, 0x15, 0x00, 0x00, 0x00, 0x00, 0x03 ), FCML_MI( 0x81, 0x15, 0xfd, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00 ) ); FCML_A64_M( "adcl $0x00000003,0x00000000(%rip)", 2, FCML_MI( 0x83, 0x15, 0x00, 0x00, 0x00, 0x00, 0x03 ), FCML_MI( 0x81, 0x15, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00 ) ); FCML_A64_M( "adcl $0x00000003,0x00000005(%rip)", 2, FCML_MI( 0x83, 0x15, 0x05, 0x00, 0x00, 0x00, 0x03 ), FCML_MI( 0x81, 0x15, 0x05, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00 ) ); FCML_I64_M_A( "adc dword ptr [rip+0], 0x3", 2, FCML_MI( 0x83, 0x15, 0x00, 0x00, 0x00, 0x00, 0x03 ), FCML_MI( 0x81, 0x15, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00 ) ); FCML_I64_M( "adc qword ptr [rdi+0000000004030201h],0000000000000005h", 2, FCML_MI( 0x48, 0x83, 0x97, 0x01, 0x02, 0x03, 0x4, 0x05 ), FCML_MI( 0x48, 0x81, 0x97, 0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00 ) ); FCML_A64_M( "adcq $0x0000000000000005,0x0000000004030201(%rdi)", 2, FCML_MI( 0x48, 0x83, 0x97, 0x01, 0x02, 0x03, 0x4, 0x05 ), FCML_MI( 0x48, 0x81, 0x97, 0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00 ) ); FCML_I64_M( "adc qword ptr [rdi+0000000004030201h],0ffffffffffffffffh", 2, FCML_MI( 0x48, 0x83, 0x97, 0x01, 0x02, 0x03, 0x4, 0xff ), FCML_MI( 0x48, 0x81, 0x97, 0x01, 0x02, 0x03, 0x04, 0xff, 0xff, 0xff, 0xff ) ); FCML_I32( "lock adc byte ptr [ebp+04030201h],ah", 0xF0, 0x10, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I64( "adc byte ptr [rbp+0000000000000001h],ah", 0x10, 0x65, 0x01 ); FCML_A64( "adc %ah,0x0000000000000001(%rbp)", 0x10, 0x65, 0x01 ); FCML_I64( "adc byte ptr [rbp+0000000000000001h],spl", 0x40, 0x10, 0x65, 0x01 ); FCML_I64( "adc byte ptr [rbp+0000000000000001h],r12l", 0x44, 0x10, 0x65, 0x01 ); FCML_I64_D( "adc byte ptr [rbp+0000000000000001h],spl", 0x48, 0x10, 0x64, 0xa5, 0x01 ); FCML_I64_D( "adc byte ptr [rbp+0000000000000001h],spl", 0x40, 0x10, 0x64, 0xa5, 0x01 ); FCML_I64_D( "adc byte ptr [rbp+0000000000000001h],ah", 0x10, 0x64, 0xa5, 0x01 ); FCML_I32( "lock adc dword ptr [ebp+04030201h],esp", 0xF0, 0x11, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32_A( "lock adc [ebp+04030201h],esp", 0xF0, 0x11, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "adc word ptr [di+0201h],sp", 0x66, 0x67, 0x11, 0xa5, 0x01, 0x02 ); FCML_A32( "adc %sp,0x0201(%di)", 0x66, 0x67, 0x11, 0xa5, 0x01, 0x02 ); FCML_I32( "adc dword ptr [di+0201h],esp", 0x67, 0x11, 0xa5, 0x01, 0x02 ); FCML_I32_A( "adc [di+0201h],esp", 0x67, 0x11, 0xa5, 0x01, 0x02 ); FCML_A32( "adc %eax,0x0201(%bp,%di)", 0x67, 0x11, 0x83, 0x01, 0x02 ); FCML_I64( "adc qword ptr [r9+rcx*4+0000000000000001h],r12", 0x4D, 0x11, 0x64, 0x89, 0x01 ); FCML_A64( "adc %r12,0x0000000000000001(%r9,%rcx,4)", 0x4D, 0x11, 0x64, 0x89, 0x01 ); FCML_I32( "adc ah,byte ptr [ebp+04030201h]", 0x12, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32_FAILED( "lock adc ah,byte ptr [ebp+04030201h]", 0xF0, 0x12, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I64_D( "adc spl,byte ptr [rbp+0000000004030201h]", 0x48, 0x12, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I64_D( "adc spl,byte ptr [rbp+0000000000000001h]", 0x48, 0x12, 0x64, 0xa5, 0x01 ); FCML_I64_D( "adc ah,byte ptr [rbp+0000000000000001h]", 0x12, 0x64, 0xa5, 0x01 ); FCML_I64( "adc spl,byte ptr [rbp+0000000004030201h]", 0x40, 0x12, 0xa5, 0x01, 0x02, 0x03, 0x04 ); FCML_A64( "adc 0x0000000004030201(%rbp),%spl", 0x40, 0x12, 0xa5, 0x01, 0x02, 0x03, 0x04 ); FCML_I64( "adc spl,byte ptr [rbp+0000000000000001h]", 0x40, 0x12, 0x65, 0x01 ); FCML_I32( "adc esp,dword ptr [ebp+04030201h]", 0x13, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32_FAILED( "lock adc esp,dword ptr [ebp+04030201h]", 0xF0, 0x13, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "adc sp,word ptr [di+0201h]", 0x66, 0x67, 0x13, 0xa5, 0x01, 0x02 ); FCML_I32( "adc esp,dword ptr [di+0201h]", 0x67, 0x13, 0xa5, 0x01, 0x02 ); FCML_A32( "adc 0x0201(%di),%esp", 0x67, 0x13, 0xa5, 0x01, 0x02 ); FCML_I64( "adc r12,qword ptr [r9+rcx*4+0000000000000001h]", 0x4D, 0x13, 0x64, 0x89, 0x01 ); FCML_A64( "adc 0x0000000000000001(%r9,%rcx,4),%r12", 0x4D, 0x13, 0x64, 0x89, 0x01 ); } void fcml_tf_instruction_ADD(void) { FCML_A32_M( "add $0x42,%al", 2, FCML_MI( 0x04, 0x42 ), FCML_MI( 0x80, 0xc0, 0x42 ) ); FCML_I32_D_FAILED( "lock add al,42h", 0xF0, 0x04, 0x42 ); FCML_I32_A_FAILED( "lock add al,42h", 0xF0, 0x04, 0x42 ); FCML_I32_M( "add al,0ffh", 2, FCML_MI( 0x04, 0xff ), FCML_MI( 0x80, 0xc0, 0xff ) ); FCML_I64_M( "add al,42h", 2, FCML_MI( 0x04, 0x42 ), FCML_MI( 0x80, 0xc0, 0x42 ) ); FCML_I64_M( "add al,00h", 2, FCML_MI( 0x04, 0x00 ), FCML_MI( 0x80, 0xc0, 0x00 ) ); FCML_I64_M( "add al,0ffh", 2, FCML_MI( 0x04, 0xff ), FCML_MI( 0x80, 0xc0, 0xff ) ); FCML_I32_M( "add ax,8042h", 2, FCML_MI( 0x66, 0x05, 0x42, 0x80 ), FCML_MI( 0x66, 0x81, 0xc0, 0x42, 0x80 ) ); FCML_A32_M( "add $0x8042,%ax", 2, FCML_MI( 0x66, 0x05, 0x42, 0x80 ), FCML_MI( 0x66, 0x81, 0xc0, 0x42, 0x80 ) ); FCML_I32_D_FAILED( "add ax,8042h", 0xF0, 0x66, 0x05, 0x42, 0x80 ); FCML_I32_A_FAILED( "add ax,8042h", 0xF0, 0x66, 0x05, 0x42, 0x80 ); FCML_I32_M( "add eax,42806521h", 2, FCML_MI( 0x05, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x81, 0xc0, 0x21, 0x65, 0x80, 0x42 ) ); FCML_I64_D( "add eax,42806521h", 0x40, 0x05, 0x21, 0x65, 0x80, 0x42 ); FCML_I64_M( "add eax,42806521h", 2, FCML_MI( 0x05, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x81, 0xc0, 0x21, 0x65, 0x80, 0x42 ) ); FCML_A64_M( "add $0x42806521,%eax", 2, FCML_MI( 0x05, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x81, 0xc0, 0x21, 0x65, 0x80, 0x42 ) ); FCML_I64_D( "add ax,6521h", 0x66, 0x40, 0x05, 0x21, 0x65 ); FCML_I16_D( "add ax,6521h", 0x05, 0x21, 0x65 ); FCML_I16_D( "add eax,00006521h", 0x66, 0x05, 0x21, 0x65, 0x00, 0x00 ); FCML_I64_M( "add ax,6521h", 2, FCML_MI( 0x66, 0x05, 0x21, 0x65 ), FCML_MI( 0x66, 0x81, 0xc0, 0x21, 0x65 ) ); FCML_I64_D( "add rax,0000000042806521h", 0x48, 0x05, 0x21, 0x65, 0x80, 0x42 ); FCML_I64_D( "add rax,0000000042806521h", 0x66, 0x48, 0x05, 0x21, 0x65, 0x80, 0x42 ); FCML_I64_D( "add rax,0000000042806521h", 0x67, 0x66, 0x48, 0x05, 0x21, 0x65, 0x80, 0x42 ); FCML_I64_D( "add rax,0ffffffffffffffffh", 0x66, 0x67, 0x48, 0x05, 0xff, 0xff, 0xff, 0xff ); FCML_A64_D( "add $0xffffffffffffffff,%rax", 0x66, 0x67, 0x48, 0x05, 0xff, 0xff, 0xff, 0xff ); FCML_I64_M( "add rax,0000000042806521h", 2, FCML_MI( 0x48, 0x05, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x48, 0x81, 0xc0, 0x21, 0x65, 0x80, 0x42 ) ); FCML_I64_M( "add rax,0ffffffffffffffffh", 3, FCML_MI( 0x48, 0x05, 0xff, 0xff, 0xff, 0xff ), FCML_MI( 0x48, 0x81, 0xc0, 0xff, 0xff, 0xff, 0xff ), FCML_MI( 0x48, 0x83, 0xc0, 0xff ) ); FCML_I32( "lock add byte ptr [04030201h],0ffh", 0xF0, 0x80, 0x05, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_A32( "lock addb $0xff,0x04030201", 0xF0, 0x80, 0x05, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "xacquire lock add byte ptr [04030201h],0ffh", 0xF2, 0xF0, 0x80, 0x05, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "xrelease lock add byte ptr [04030201h],0ffh", 0xF3, 0xF0, 0x80, 0x05, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "add byte ptr [esi+04030201h],0ffh", 0x80, 0x86, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "add byte ptr [ecx+eax+00000002h],03h", 0x80, 0x44, 0x01, 0x02, 0x03 ); FCML_I64( "add byte ptr [rcx+rax+0000000000000002h],03h", 0x80, 0x44, 0x01, 0x02, 0x03 ); FCML_I32( "add ebp,04030201h", 0x81, 0xc5, 0x01, 0x02, 0x03, 0x04 ); FCML_A32( "addl $0x04030201,0x00000000(%ebp)", 0x81, 0x45, 0x00, 0x01, 0x02, 0x03, 0x04 ); FCML_A32( "addw $0x0201,0x0000(%bp)", 0x66, 0x67, 0x81, 0x46, 0x00, 0x01, 0x02 ); FCML_I32( "add ebp,04030201h", 0x81, 0xc5, 0x01, 0x02, 0x03, 0x04 ); FCML_A32( "add $0x04030201,%ebp", 0x81, 0xc5, 0x01, 0x02, 0x03, 0x04 ); FCML_I32_A_FAILED( "lock add ebp,04030201h", 0xF0, 0x81, 0xc5, 0x01, 0x02, 0x03, 0x04 ); FCML_I32_A_FAILED( "xacquire add ebp,04030201h", 0xF0, 0x81, 0xc5, 0x01, 0x02, 0x03, 0x04 ); FCML_I32_A_FAILED( "xrelease add ebp,04030201h", 0xF0, 0x81, 0xc5, 0x01, 0x02, 0x03, 0x04 ); FCML_I32( "add bp,0201h", 0x66, 0x81, 0xc5, 0x01, 0x02 ); FCML_A32( "add $0x0201,%bp", 0x66, 0x81, 0xc5, 0x01, 0x02 ); FCML_I64_D( "add bp,0201h", 0x67, 0x66, 0x40, 0x81, 0xc5, 0x01, 0x02 ); FCML_I64( "add bp,0201h", 0x66, 0x67, 0x81, 0xc5, 0x01, 0x02 ); FCML_I64_D( "add rbp,0000000004030201h", 0x48, 0x81, 0xc5, 0x01, 0x02, 0x03, 0x04 ); FCML_A64_D( "addq $0x0000000004030201,(%rax)", 0x48, 0x81, 0x00, 0x01, 0x02, 0x03, 0x04 ); FCML_I64( "lock add qword ptr [rcx],0000000003020100h", 0xF0, 0x48, 0x81, 0x01, 0x00, 0x01, 0x02, 0x03 ); FCML_I64( "xacquire lock add qword ptr [rcx],0000000003020100h", 0xF2, 0xF0, 0x48, 0x81, 0x01, 0x00, 0x01, 0x02, 0x03 ); FCML_I64( "xrelease lock add qword ptr [rcx],0000000003020100h", 0xF3, 0xF0, 0x48, 0x81, 0x01, 0x00, 0x01, 0x02, 0x03 ); FCML_I64_D( "add rbp,0ffffffffffffffffh", 0x48, 0x81, 0xc5, 0xff, 0xff, 0xff, 0xff ); FCML_I64_D( "add rbp,0ffffffffffffffffh", 0x67, 0x48, 0x81, 0xc5, 0xff, 0xff, 0xff, 0xff ); FCML_I64_D( "add rbp,0ffffffffffffffffh", 0x66, 0x48, 0x81, 0xc5, 0xff, 0xff, 0xff, 0xff ); FCML_I64( "add rbp,0000000004030201h", 0x48, 0x81, 0xc5, 0x01, 0x02, 0x03, 0x04 ); FCML_I64_M( "add rbp,0ffffffffffffffffh", 2, FCML_MI( 0x48, 0x81, 0xc5, 0xff, 0xff, 0xff, 0xff ), FCML_MI( 0x48, 0x83, 0xc5, 0xff ) ); FCML_I32_M( "lock add dword ptr [esi],00000001h", 2, FCML_MI( 0xF0, 0x83, 0x06, 0x01 ), FCML_MI( 0xF0, 0x81, 0x06, 0x01, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "xacquire lock add dword ptr [esi],00000001h", 2, FCML_MI( 0xF2, 0xF0, 0x83, 0x06, 0x01 ), FCML_MI( 0xF2, 0xF0, 0x81, 0x06, 0x01, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "xrelease lock add dword ptr [esi],00000001h", 2, FCML_MI( 0xF3, 0xF0, 0x83, 0x06, 0x01 ), FCML_MI( 0xF3, 0xF0, 0x81, 0x06, 0x01, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "add word ptr [esi],0001h", 2, FCML_MI( 0x66, 0x83, 0x06, 0x01 ), FCML_MI( 0x66, 0x81, 0x06, 0x01, 0x00 ) ); FCML_A32_M( "addw $0x0001,(%esi)", 2, FCML_MI( 0x66, 0x83, 0x06, 0x01 ), FCML_MI( 0x66, 0x81, 0x06, 0x01, 0x00 ) ); FCML_I32_M( "add dword ptr [0201h],00000003h", 2, FCML_MI( 0x67, 0x83, 0x06, 0x01, 0x02, 0x03 ), FCML_MI( 0x67, 0x81, 0x06, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00 ) ); FCML_I64_M( "lock add qword ptr [rdi+0000000004030201h],0000000000000005h", 2, FCML_MI( 0xF0, 0x48, 0x83, 0x87, 0x01, 0x02, 0x03, 0x4, 0x05 ), FCML_MI( 0xF0, 0x48, 0x81, 0x87, 0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00 ) ); FCML_I64_M( "add qword ptr [rdi+0000000004030201h],0ffffffffffffffffh", 2, FCML_MI( 0x48, 0x83, 0x87, 0x01, 0x02, 0x03, 0x4, 0xff ), FCML_MI( 0x48, 0x81, 0x87, 0x01, 0x02, 0x03, 0x04, 0xff, 0xff, 0xff, 0xff ) ); FCML_A64_M( "addq $0xffffffffffffffff,0x0000000004030201(%rdi)", 2, FCML_MI( 0x48, 0x83, 0x87, 0x01, 0x02, 0x03, 0x4, 0xff ), FCML_MI( 0x48, 0x81, 0x87, 0x01, 0x02, 0x03, 0x04, 0xff, 0xff, 0xff, 0xff ) ); FCML_I32( "lock add byte ptr [ebp+04030201h],ah", 0xF0, 0x00, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "xacquire lock add byte ptr [ebp+04030201h],ah", 0xF2, 0xF0, 0x00, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "xrelease lock add byte ptr [ebp+04030201h],ah", 0xF3, 0xF0, 0x00, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I64( "add byte ptr [rbp+0000000004030201h],spl", 0x40, 0x00, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I64( "add byte ptr [rbp+0000000000000001h],spl", 0x40, 0x00, 0x65, 0x01 ); FCML_A64( "add %spl,0x0000000000000001(%rbp)", 0x40, 0x00, 0x65, 0x01 ); FCML_I32( "lock add dword ptr [ebp+04030201h],esp", 0xF0, 0x01, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "xacquire lock add dword ptr [ebp+04030201h],esp", 0xF2, 0xF0, 0x01, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "xrelease lock add dword ptr [ebp+04030201h],esp", 0xF3, 0xF0, 0x01, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "add word ptr [di+0201h],sp", 0x66, 0x67, 0x01, 0xa5, 0x01, 0x02 ); FCML_I32( "add dword ptr [di+0201h],esp", 0x67, 0x01, 0xa5, 0x01, 0x02 ); FCML_I64( "add qword ptr [r9+rcx*4+0000000000000001h],r12", 0x4D, 0x01, 0x64, 0x89, 0x01 ); FCML_A64( "add %r12,0x0000000000000001(%r9,%rcx,4)", 0x4D, 0x01, 0x64, 0x89, 0x01 ); FCML_I32( "add ah,byte ptr [ebp+04030201h]", 0x02, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I64( "add spl,byte ptr [rbp+0000000004030201h]", 0x40, 0x02, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I64( "add spl,byte ptr [rbp+0000000000000001h]", 0x40, 0x02, 0x65, 0x01 ); FCML_A64( "add 0x0000000000000001(%rbp),%spl", 0x40, 0x02, 0x65, 0x01 ); FCML_I32( "add esp,dword ptr [ebp+04030201h]", 0x03, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "add sp,word ptr [di+0201h]", 0x66, 0x67, 0x03, 0xa5, 0x01, 0x02 ); FCML_I32( "add esp,dword ptr [di+0201h]", 0x67, 0x03, 0xa5, 0x01, 0x02 ); FCML_I64( "add r12,qword ptr [r9+rcx*4+0000000000000001h]", 0x4D, 0x03, 0x64, 0x89, 0x01 ); FCML_A64( "add 0x0000000000000001(%r9,%rcx,4),%r12", 0x4D, 0x03, 0x64, 0x89, 0x01 ); } void fcml_tf_instruction_ADDPD_VADDPD(void) { FCML_I32( "addpd xmm2,xmmword ptr [ecx+eax]", 0x66, 0x0F, 0x58, 0x14, 0x01 ); FCML_I64( "addpd xmm2,xmmword ptr [rcx+rax]", 0x66, 0x0F, 0x58, 0x14, 0x01 ); FCML_A64( "addpd (%rcx,%rax),%xmm2", 0x66, 0x0F, 0x58, 0x14, 0x01 ); FCML_I64( "vaddpd ymm10,ymm14,ymmword ptr [r9+r8]", 0xC4, 0x01, 0x0D, 0x58, 0x14, 0x01 ); FCML_A64( "vaddpd (%r9,%r8),%ymm14,%ymm10", 0xC4, 0x01, 0x0D, 0x58, 0x14, 0x01 ); FCML_I64( "vaddpd ymm10,ymm14,ymmword ptr [r9+rax]", 0xC4, 0x41, 0x0D, 0x58, 0x14, 0x01 ); FCML_I64( "vaddpd xmm2,xmm14,xmmword ptr [r9+rax]", 0xC4, 0xC1, 0x09, 0x58, 0x14, 0x01 ); FCML_A64( "vaddpd (%r9,%rax),%xmm14,%xmm2", 0xC4, 0xC1, 0x09, 0x58, 0x14, 0x01 ); FCML_I32_D( "vaddpd xmm2,xmm2,xmmword ptr [ecx+eax]", 0xC4, 0xC1, 0x69, 0x58, 0x14, 0x01 ); FCML_I32_D( "vaddpd xmm2,xmm2,xmmword ptr [ecx+eax]", 0xC4, 0xE1, 0x69, 0x58, 0x14, 0x01 ); FCML_I32_D( "vaddpd ymm2,ymm2,ymmword ptr [ecx+eax]", 0xC4, 0xE1, 0x6D, 0x58, 0x14, 0x01 ); FCML_I32( "vaddpd xmm2,xmm2,xmmword ptr [ecx+eax]", 0xC5, 0xE9, 0x58, 0x14, 0x01 ); FCML_I32( "vaddpd ymm2,ymm2,ymmword ptr [ecx+eax]", 0xC5, 0xED, 0x58, 0x14, 0x01 ); FCML_A32( "vaddpd (%ecx,%eax),%ymm2,%ymm2", 0xC5, 0xED, 0x58, 0x14, 0x01 ); FCML_I32( "vaddpd xmm2,xmm0,xmmword ptr [ecx+eax]", 0xC5, 0xF9, 0x58, 0x14, 0x01 ); FCML_A32( "vaddpd (%ecx,%eax),%xmm0,%xmm2", 0xC5, 0xF9, 0x58, 0x14, 0x01 ); FCML_I64( "vaddpd ymm10,ymm4,ymmword ptr [rcx+rax]", 0xC5, 0x5D, 0x58, 0x14, 0x01 ); FCML_A64( "vaddpd (%rcx,%rax),%ymm4,%ymm10", 0xC5, 0x5D, 0x58, 0x14, 0x01 ); FCML_I32( "vaddpd ymm2,ymm0,ymmword ptr [ecx+eax]", 0xC5, 0xFD, 0x58, 0x14, 0x01 ); FCML_A32( "vaddpd (%ecx,%eax),%ymm0,%ymm2", 0xC5, 0xFD, 0x58, 0x14, 0x01 ); } void fcml_tf_instruction_ADDPS_VADDPS(void) { FCML_I32( "addps xmm2,xmmword ptr [ecx+eax]", 0x0F, 0x58, 0x14, 0x01 ); FCML_I64( "addps xmm2,xmmword ptr [rcx+rax]", 0x0F, 0x58, 0x14, 0x01 ); FCML_A64( "addps (%rcx,%rax),%xmm2", 0x0F, 0x58, 0x14, 0x01 ); FCML_I64( "vaddps ymm10,ymm14,ymmword ptr [r9+r8]", 0xC4, 0x01, 0x0C, 0x58, 0x14, 0x01 ); FCML_A64( "vaddps (%r9,%r8),%ymm14,%ymm10", 0xC4, 0x01, 0x0C, 0x58, 0x14, 0x01 ); FCML_I32( "vaddps ymm2,ymm0,ymmword ptr [ecx+eax]", 0xC5, 0xFC, 0x58, 0x14, 0x01 ); } void fcml_tf_instruction_ADDSD_VADDSD(void) { FCML_I32( "addsd xmm2,mmword ptr [ecx+eax]", 0xF2, 0x0F, 0x58, 0x14, 0x01 ); FCML_I64( "addsd xmm2,mmword ptr [rcx+rax]", 0xF2, 0x0F, 0x58, 0x14, 0x01 ); FCML_A64( "addsd (%rcx,%rax),%xmm2", 0xF2, 0x0F, 0x58, 0x14, 0x01 ); FCML_I32_D( "vaddsd xmm2,xmm5,mmword ptr [ecx+eax]", 0xC4, 0xE1, 0x53, 0x58, 0x14, 0x01 ); FCML_I32( "vaddsd xmm2,xmm4,mmword ptr [ecx+eax]", 0xC5, 0xDB, 0x58, 0x14, 0x01 ); FCML_A32( "vaddsd (%ecx,%eax),%xmm4,%xmm2", 0xC5, 0xDB, 0x58, 0x14, 0x01 ); } void fcml_tf_instruction_ADDSS_VADDSS(void) { FCML_I32( "addss xmm2,dword ptr [ecx+eax]", 0xF3, 0x0F, 0x58, 0x14, 0x01 ); FCML_I64( "addss xmm2,dword ptr [rcx+rax]", 0xF3, 0x0F, 0x58, 0x14, 0x01 ); FCML_A64( "addss (%rcx,%rax),%xmm2", 0xF3, 0x0F, 0x58, 0x14, 0x01 ); FCML_I32_D( "vaddss xmm2,xmm5,dword ptr [ecx+eax]", 0xC4, 0xE1, 0x52, 0x58, 0x14, 0x01 ); FCML_I32( "vaddss xmm2,xmm4,dword ptr [ecx+eax]", 0xC5, 0xDA, 0x58, 0x14, 0x01 ); FCML_A32( "vaddss (%ecx,%eax),%xmm4,%xmm2", 0xC5, 0xDA, 0x58, 0x14, 0x01 ); } void fcml_tf_instruction_ADDSUBPD_VADDSUBPD(void) { FCML_I32( "addsubpd xmm2,xmmword ptr [ecx+eax]", 0x66, 0x0F, 0xD0, 0x14, 0x01 ); FCML_I64( "addsubpd xmm2,xmmword ptr [rcx+rax]", 0x66, 0x0F, 0xD0, 0x14, 0x01 ); FCML_A64( "addsubpd (%rcx,%rax),%xmm2", 0x66, 0x0F, 0xD0, 0x14, 0x01 ); FCML_I64( "vaddsubpd ymm10,ymm14,ymmword ptr [r9+rax]", 0xC4, 0x41, 0x0D, 0xD0, 0x14, 0x01 ); FCML_I64( "vaddsubpd ymm10,ymm14,ymmword ptr [r9+rax]", 0xC4, 0x41, 0x0D, 0xD0, 0x14, 0x01 ); FCML_A64( "vaddsubpd (%r9,%rax),%ymm14,%ymm10", 0xC4, 0x41, 0x0D, 0xD0, 0x14, 0x01 ); FCML_I32_D( "vaddsubpd xmm2,xmm7,xmmword ptr [ecx+eax]", 0xC4, 0xC1, 0x41, 0xD0, 0x14, 0x01 ); FCML_I32_D( "vaddsubpd xmm2,xmm2,xmmword ptr [ecx+eax]", 0xC4, 0xC1, 0x69, 0xD0, 0x14, 0x01 ); FCML_I32( "vaddsubpd xmm2,xmm7,xmmword ptr [ecx+eax]", 0xC5, 0xC1, 0xD0, 0x14, 0x01 ); FCML_I32( "vaddsubpd xmm2,xmm2,xmmword ptr [ecx+eax]", 0xC5, 0xE9, 0xD0, 0x14, 0x01 ); } void fcml_tf_instruction_ADDSUBPS_VADDSUBPS(void) { FCML_I32( "addsubps xmm2,xmmword ptr [ecx+eax]", 0xf2, 0x0F, 0xD0, 0x14, 0x01 ); FCML_I32_A( "addsubps xmm2,[ecx+eax]", 0xf2, 0x0F, 0xD0, 0x14, 0x01 ); FCML_I64( "addsubps xmm2,xmmword ptr [rcx+rax]", 0xf2, 0x0F, 0xD0, 0x14, 0x01 ); FCML_A64( "addsubps (%rcx,%rax),%xmm2", 0xf2, 0x0F, 0xD0, 0x14, 0x01 ); FCML_I64( "vaddsubps ymm10,ymm14,ymmword ptr [r9+rax]", 0xC4, 0x41, 0x0F, 0xD0, 0x14, 0x01 ); FCML_I64_A( "vaddsubps ymm10,ymm14,[r9+rax]", 0xC4, 0x41, 0x0F, 0xD0, 0x14, 0x01 ); FCML_A64( "vaddsubps (%r9,%rax),%ymm14,%ymm10", 0xC4, 0x41, 0x0F, 0xD0, 0x14, 0x01 ); FCML_I64( "vaddsubps xmm2,xmm14,xmmword ptr [r9+rax]", 0xC4, 0xC1, 0x0B, 0xD0, 0x14, 0x01 ); FCML_I32_D( "vaddsubps xmm2,xmm2,xmmword ptr [ecx+eax]", 0xC4, 0xC1, 0x6B, 0xD0, 0x14, 0x01 ); FCML_I32( "vaddsubps xmm2,xmm2,xmmword ptr [ecx+eax]", 0xC5, 0xEB, 0xD0, 0x14, 0x01 ); FCML_I32( "vaddsubps xmm2,xmm6,xmmword ptr [ecx+eax]", 0xC5, 0xCB, 0xD0, 0x14, 0x01 ); FCML_A32( "vaddsubps (%ecx,%eax),%xmm6,%xmm2", 0xC5, 0xCB, 0xD0, 0x14, 0x01 ); } void fcml_tf_instruction_AESDEC_VAESDEC(void) { FCML_I32( "aesdec xmm2,xmmword ptr [ecx+eax]", 0x66, 0x0F, 0x38, 0xDE, 0x14, 0x01 ); FCML_I64( "aesdec xmm2,xmmword ptr [rcx+rax]", 0x66, 0x0F, 0x38, 0xDE, 0x14, 0x01 ); FCML_I64_A( "aesdec xmm2,[rcx+rax]", 0x66, 0x0F, 0x38, 0xDE, 0x14, 0x01 ); FCML_A64( "aesdec (%rcx,%rax),%xmm2", 0x66, 0x0F, 0x38, 0xDE, 0x14, 0x01 ); FCML_I32( "vaesdec xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0xDE, 0x00 ); FCML_A32( "vaesdec (%eax),%xmm3,%xmm0", 0xC4, 0xE2, 0x61, 0xDE, 0x00 ); FCML_I32( "vaesdec xmm0,xmm3,xmm0", 0xC4, 0xE2, 0x61, 0xDE, 0xC0 ); FCML_I64( "vaesdec xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0x61, 0xDE, 0x00 ); } void fcml_tf_instruction_AESDECLAST_VAESDECLAST(void) { FCML_I32( "aesdeclast xmm2,xmmword ptr [ecx+eax]", 0x66, 0x0F, 0x38, 0xDF, 0x14, 0x01 ); FCML_I64( "aesdeclast xmm2,xmmword ptr [rcx+rax]", 0x66, 0x0F, 0x38, 0xDF, 0x14, 0x01 ); FCML_I64_A( "aesdeclast xmm2,[rcx+rax]", 0x66, 0x0F, 0x38, 0xDF, 0x14, 0x01 ); FCML_A64( "aesdeclast (%rcx,%rax),%xmm2", 0x66, 0x0F, 0x38, 0xDF, 0x14, 0x01 ); FCML_I32( "vaesdeclast xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0xDF, 0x00 ); FCML_I32( "vaesdeclast xmm0,xmm3,xmm0", 0xC4, 0xE2, 0x61, 0xDF, 0xC0 ); FCML_I64( "vaesdeclast xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0x61, 0xDF, 0x00 ); FCML_A64( "vaesdeclast (%rax),%xmm3,%xmm0", 0xC4, 0xE2, 0x61, 0xDF, 0x00 ); } void fcml_tf_instruction_AESENC_VAESENC(void) { FCML_I32( "aesenc xmm2,xmmword ptr [ecx+eax]", 0x66, 0x0F, 0x38, 0xDC, 0x14, 0x01 ); FCML_I64( "aesenc xmm2,xmmword ptr [rcx+rax]", 0x66, 0x0F, 0x38, 0xDC, 0x14, 0x01 ); FCML_I64_A( "aesenc xmm2,[rcx+rax]", 0x66, 0x0F, 0x38, 0xDC, 0x14, 0x01 ); FCML_A64( "aesenc (%rcx,%rax),%xmm2", 0x66, 0x0F, 0x38, 0xDC, 0x14, 0x01 ); FCML_I32( "vaesenc xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0xDC, 0x00 ); FCML_I32( "vaesenc xmm0,xmm3,xmm0", 0xC4, 0xE2, 0x61, 0xDC, 0xC0 ); FCML_I64( "vaesenc xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0x61, 0xDC, 0x00 ); FCML_A64( "vaesenc (%rax),%xmm3,%xmm0", 0xC4, 0xE2, 0x61, 0xDC, 0x00 ); } void fcml_tf_instruction_AESENCLAST(void) { FCML_I32( "aesenclast xmm2,xmmword ptr [ecx+eax]", 0x66, 0x0F, 0x38, 0xDD, 0x14, 0x01 ); FCML_I64( "aesenclast xmm2,xmmword ptr [rcx+rax]", 0x66, 0x0F, 0x38, 0xDD, 0x14, 0x01 ); FCML_I64_A( "aesenclast xmm2,[rcx+rax]", 0x66, 0x0F, 0x38, 0xDD, 0x14, 0x01 ); FCML_A64( "aesenclast (%rcx,%rax),%xmm2", 0x66, 0x0F, 0x38, 0xDD, 0x14, 0x01 ); FCML_I32( "vaesenclast xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0xDD, 0x00 ); FCML_I32( "vaesenclast xmm0,xmm3,xmm0", 0xC4, 0xE2, 0x61, 0xDD, 0xC0 ); FCML_I64( "vaesenclast xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0x61, 0xDD, 0x00 ); FCML_A64( "vaesenclast (%rax),%xmm3,%xmm0", 0xC4, 0xE2, 0x61, 0xDD, 0x00 ); } void fcml_tf_instruction_AESIMC_VAESIMC(void) { FCML_I32( "aesimc xmm2,xmmword ptr [ecx+eax]", 0x66, 0x0F, 0x38, 0xDB, 0x14, 0x01 ); FCML_I64( "aesimc xmm2,xmmword ptr [rcx+rax]", 0x66, 0x0F, 0x38, 0xDB, 0x14, 0x01 ); FCML_I64_A( "aesimc xmm2,[rcx+rax]", 0x66, 0x0F, 0x38, 0xDB, 0x14, 0x01 ); FCML_A64( "aesimc (%rcx,%rax),%xmm2", 0x66, 0x0F, 0x38, 0xDB, 0x14, 0x01 ); FCML_I32( "vaesimc xmm0,xmmword ptr [eax]", 0xC4, 0xE2, 0x79, 0xDB, 0x00 ); FCML_I32( "vaesimc xmm0,xmm0", 0xC4, 0xE2, 0x79, 0xDB, 0xC0 ); FCML_I64( "vaesimc xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0xDB, 0x00 ); FCML_A64( "vaesimc (%rax),%xmm0", 0xC4, 0xE2, 0x79, 0xDB, 0x00 ); } void fcml_tf_instruction_AESKEYGENASSIST_VAESKEYGENASSIST(void) { FCML_I32( "aeskeygenassist xmm2,xmmword ptr [ecx+eax],0ffh", 0x66, 0x0F, 0x3a, 0xDF, 0x14, 0x01, 0xFF ); FCML_I64( "aeskeygenassist xmm2,xmmword ptr [rcx+rax],0ffh", 0x66, 0x0F, 0x3a, 0xDF, 0x14, 0x01, 0xFF ); FCML_A64( "aeskeygenassist $0xff,(%rcx,%rax),%xmm2", 0x66, 0x0F, 0x3a, 0xDF, 0x14, 0x01, 0xFF ); FCML_I32( "vaeskeygenassist xmm0,xmmword ptr [eax],0ffh", 0xC4, 0xE3, 0x79, 0xDF, 0x00, 0xFF ); FCML_I32( "vaeskeygenassist xmm0,xmm0,0ffh", 0xC4, 0xE3, 0x79, 0xDF, 0xC0, 0xFF ); FCML_A32( "vaeskeygenassist $0xff,%xmm0,%xmm0", 0xC4, 0xE3, 0x79, 0xDF, 0xC0, 0xFF ); } void fcml_tf_instruction_AND(void) { FCML_I32_M( "and al,42h", 2, FCML_MI( 0x24, 0x42 ), FCML_MI( 0x80, 0xE0, 0x42 ) ); FCML_I32_A_FAILED( "lock and al,42h", 0xF0, 0x24, 0x42 ); FCML_I32_D_FAILED( "lock and al,42h", 0xF0, 0x24, 0x42 ); FCML_I32_M( "and al,0ffh", 2, FCML_MI( 0x24, 0xFF ), FCML_MI( 0x80, 0xE0, 0xFF ) ); FCML_A32_M( "and $0xff,%al", 2, FCML_MI( 0x24, 0xFF ), FCML_MI( 0x80, 0xE0, 0xFF ) ); FCML_I32_M( "and al,00h", 2, FCML_MI( 0x24, 0x00 ), FCML_MI( 0x80, 0xE0, 0x00 ) ); FCML_I32_M( "and al,0ffh", 2, FCML_MI( 0x24, 0xFF ), FCML_MI( 0x80, 0xE0, 0xFF ) ); FCML_I32_M( "and ax,8042h", 2, FCML_MI( 0x66, 0x25, 0x42, 0x80 ), FCML_MI( 0x66, 0x81, 0xE0, 0x42, 0x80 ) ); FCML_I32_M( "and eax,42806521h", 2, FCML_MI( 0x25, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x81, 0xe0, 0x21, 0x65, 0x80, 0x42 ) ); FCML_I64_D( "and eax,42806521h", 0x40, 0x25, 0x21, 0x65, 0x80, 0x42 ); FCML_A64_D( "and $0x42806521,%eax", 0x40, 0x25, 0x21, 0x65, 0x80, 0x42 ); FCML_I64_D_FAILED( "lock and eax,42806521h", 0xF0, 0x40, 0x25, 0x21, 0x65, 0x80, 0x42 ); FCML_I64_A_FAILED( "lock and eax,42806521h", 0xF0, 0x40, 0x25, 0x21, 0x65, 0x80, 0x42 ); FCML_I64_D( "and ax,6521h", 0x66, 0x40, 0x25, 0x21, 0x65 ); FCML_I64_M( "and rax,0000000042806521h", 2, FCML_MI( 0x48, 0x25, 0x21, 0x65, 0x80, 0x42 ), FCML_MI(0x48, 0x81, 0xe0, 0x21, 0x65, 0x80, 0x42 ) ); FCML_I64_D( "and rax,0000000042806521h", 0x66, 0x48, 0x25, 0x21, 0x65, 0x80, 0x42 ); FCML_I64_D( "and rax,0000000042806521h", 0x67, 0x66, 0x48, 0x25, 0x21, 0x65, 0x80, 0x42 ); FCML_I64_D( "and rax,0ffffffffffffffffh", 0x67, 0x66, 0x48, 0x25, 0xff, 0xff, 0xff, 0xff ); FCML_I32( "and byte ptr [04030201h],0ffh", 0x80, 0x25, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "lock and byte ptr [04030201h],0ffh", 0xF0, 0x80, 0x25, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "xacquire lock and byte ptr [04030201h],0ffh", 0xF2, 0xF0, 0x80, 0x25, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "xrelease lock and byte ptr [04030201h],0ffh", 0xF3, 0xF0, 0x80, 0x25, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_A64( "xrelease lock andb $0xff,0x04030201(%rip)", 0xF3, 0xF0, 0x80, 0x25, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "and byte ptr [esi+04030201h],0ffh", 0x80, 0xA6, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "and byte ptr [ecx+eax+00000002h],03h", 0x80, 0x64, 0x01, 0x02, 0x03 ); FCML_I32( "and ebp,04030201h", 0x81, 0xe5, 0x01, 0x02, 0x03, 0x04 ); FCML_A32( "and $0x04030201,%ebp", 0x81, 0xe5, 0x01, 0x02, 0x03, 0x04 ); FCML_I32( "and bp,0201h", 0x66, 0x81, 0xe5, 0x01, 0x02 ); FCML_I64_D( "and bp,0201h", 0x67, 0x66, 0x40, 0x81, 0xe5, 0x01, 0x02 ); /* 32 bit mode doesn't not allow REX.*/ FCML_I64( "and rbp,0000000004030201h", 0x48, 0x81, 0xe5, 0x01, 0x02, 0x03, 0x04 ); FCML_I64_M( "and rbp,0ffffffffffffffffh", 2, FCML_MI( 0x48, 0x81, 0xe5, 0xff, 0xff, 0xff, 0xff ), FCML_MI( 0x48, 0x83, 0xe5, 0xff ) ); FCML_I64_M( "and rbp,0ffffffffffffffffh", 2, FCML_MI( 0x67, 0x48, 0x81, 0xe5, 0xff, 0xff, 0xff, 0xff ), FCML_MI( 0x67, 0x48, 0x83, 0xe5, 0xff ) ); FCML_I64_D( "and rbp,0ffffffffffffffffh", 0x66, 0x48, 0x81, 0xe5, 0xff, 0xff, 0xff, 0xff ); FCML_I32_M( "and dword ptr [esi],00000001h", 2, FCML_MI( 0x83, 0x26, 0x01 ), FCML_MI( 0x81, 0x26, 0x01, 0x00, 0x00, 0x00 ) ); FCML_A32_M( "andl $0x00000001,(%esi)", 2, FCML_MI( 0x83, 0x26, 0x01 ), FCML_MI( 0x81, 0x26, 0x01, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "lock and dword ptr [esi],00000001h", 2, FCML_MI( 0xF0, 0x83, 0x26, 0x01 ), FCML_MI( 0xF0, 0x81, 0x26, 0x01, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "xacquire lock and dword ptr [esi],00000001h", 2, FCML_MI( 0xF2, 0xF0, 0x83, 0x26, 0x01 ), FCML_MI( 0xF2, 0xF0, 0x81, 0x26, 0x01, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "xrelease lock and dword ptr [esi],00000001h", 2, FCML_MI( 0xF3, 0xF0, 0x83, 0x26, 0x01 ), FCML_MI( 0xF3, 0xF0, 0x81, 0x26, 0x01, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "and word ptr [esi],0001h", 2, FCML_MI( 0x66, 0x83, 0x26, 0x01 ), FCML_MI( 0x66, 0x81, 0x26, 0x01, 0x00 ) ); FCML_I32_M( "and dword ptr [0201h],00000003h", 2, FCML_MI( 0x67, 0x83, 0x26, 0x01, 0x02, 0x03 ), FCML_MI( 0x67, 0x81, 0x26, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00 ) ); FCML_A32_M( "andl $0x00000003,0x0201", 2, FCML_MI( 0x67, 0x83, 0x26, 0x01, 0x02, 0x03 ), FCML_MI( 0x67, 0x81, 0x26, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00 ) ); FCML_I64_M( "and qword ptr [rdi+0000000004030201h],0000000000000005h", 2, FCML_MI( 0x48, 0x83, 0xA7, 0x01, 0x02, 0x03, 0x4, 0x05 ), FCML_MI( 0x48, 0x81, 0xa7, 0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00 ) ); FCML_I64_M( "and qword ptr [rdi+0000000004030201h],0ffffffffffffffffh", 2, FCML_MI( 0x48, 0x83, 0xA7, 0x01, 0x02, 0x03, 0x4, 0xff ), FCML_MI( 0x48, 0x81, 0xa7, 0x01, 0x02, 0x03, 0x04, 0xff, 0xff, 0xff, 0xff ) ); FCML_I32( "and byte ptr [ebp+04030201h],ah", 0x20, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "lock and byte ptr [ebp+04030201h],ah", 0xF0, 0x20, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "xacquire lock and byte ptr [ebp+04030201h],ah", 0xF2, 0xF0, 0x20, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "xrelease lock and byte ptr [ebp+04030201h],ah", 0xF3, 0xF0, 0x20, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I64_D( "and byte ptr [rbp+0000000004030201h],spl", 0x48, 0x20, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I64_D( "and byte ptr [rbp+0000000000000001h],spl", 0x48, 0x20, 0x64, 0xa5, 0x01 ); FCML_I64( "and byte ptr [rbp+0000000000000001h],spl", 0x40, 0x20, 0x65, 0x01 ); FCML_A64( "and %spl,0x0000000000000001(%rbp)", 0x40, 0x20, 0x65, 0x01 ); FCML_I32( "and dword ptr [ebp+04030201h],esp", 0x21, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "and word ptr [di+0201h],sp", 0x66, 0x67, 0x21, 0xa5, 0x01, 0x02 ); FCML_I32( "and dword ptr [di+0201h],esp", 0x67, 0x21, 0xa5, 0x01, 0x02 ); FCML_I32_M( "and edi,edx", 2, FCML_MI( 0x21, 0xD7 ), FCML_MI(0x23, 0xfa) ); FCML_I32_M( "and di,dx", 2, FCML_MI( 0x66, 0x21, 0xD7 ), FCML_MI( 0x66, 0x23, 0xfa ) ); FCML_I32_M( "and edi,edx", 2, FCML_MI( 0x67, 0x21, 0xD7 ), FCML_MI( 0x67, 0x23, 0xfa ) ); FCML_I32( "and dword ptr [030201a5h],eax", 0x21, 0x05, 0xa5, 0x01, 0x02, 0x03 ); FCML_I32( "and dword ptr [01a5h],eax", 0x67, 0x21, 0x06, 0xa5, 0x01 ); FCML_I32( "and dword ptr [ebp+00000001h],ecx", 0x21, 0x4d, 0x01 ); FCML_I32_D( "and dword ptr [50030201h],ecx", 0x21, 0x0c, 0x25, 0x01, 0x02, 0x03, 0x50 ); FCML_I32( "and dword ptr [50030201h],ecx", 0x21, 0x0d, 0x01, 0x02, 0x03, 0x50 ); FCML_I64_D( "and qword ptr [rbp+0000000000000001h],rcx", 0x48, 0x21, 0x4c, 0x25, 0x01 ); FCML_I64( "and qword ptr [rbp+0000000000000001h],rcx", 0x48, 0x21, 0x4d, 0x01 ); FCML_I64_D( "and qword ptr [00008000034211ach],rax", 0x48, 0x21, 0x05, 0xa5, 0x01, 0x02, 0x03 ); FCML_I64_RIP( "and qword ptr [00008000034211ach],rax", 0x48, 0x21, 0x05, 0xa5, 0x01, 0x02, 0x03 ); FCML_I64( "and qword ptr [rcx+rsi*4],rax", 0x48, 0x21, 0x04, 0xB1 ); FCML_I64( "and qword ptr [r9+rcx*4+0000000000000001h],r12", 0x4D, 0x21, 0x64, 0x89, 0x01 ); FCML_A64( "and %r12,0x0000000000000001(%r9,%rcx,4)", 0x4D, 0x21, 0x64, 0x89, 0x01 ); FCML_I32_D( "and dword ptr [ebp+00000001h],ebx", 0x21, 0x5C, 0xA5, 0x01 ); FCML_I32( "and dword ptr [ebp+00000001h],ebx", 0x21, 0x5D, 0x01 ); FCML_I32_D( "and dword ptr [ebp+04030201h],ebx", 0x21, 0x9C, 0xA5, 0x01, 0x02, 0x03, 0x04 ); FCML_I32( "and dword ptr [ebp+04030201h],ebx", 0x21, 0x9D, 0x01, 0x02, 0x03, 0x04 ); FCML_A32( "and %ebx,0x04030201(%ebp)", 0x21, 0x9D, 0x01, 0x02, 0x03, 0x04 ); FCML_I32_D( "and dword ptr [04030201h],ebx", 0x21, 0x1C, 0xA5, 0x01, 0x02, 0x03, 0x04 ); FCML_I32( "and dword ptr [04030201h],ebx", 0x21, 0x1D, 0x01, 0x02, 0x03, 0x04 ); FCML_I32_D( "and dword ptr [04030201h],edx", 0x21, 0x14, 0x25, 0x01, 0x02, 0x03, 0x04 ); FCML_I32( "and dword ptr [04030201h],edx", 0x21, 0x15, 0x01, 0x02, 0x03, 0x04 ); FCML_I32_D( "and dword ptr [eax],edx", 0x21, 0x14, 0x20 ); /* DUAL*/ FCML_I32( "and dword ptr [eax],edx", 0x21, 0x10 ); /* DUAL*/ FCML_I32_D( "and dword ptr [ecx],edx", 0x21, 0x14, 0x21 ); /* DUAL*/ FCML_I32( "and dword ptr [ecx],edx", 0x21, 0x11 ); /* DUAL*/ FCML_I32_D( "and dword ptr [edx],edx", 0x21, 0x14, 0x22 ); /* DUAL*/ FCML_I32( "and dword ptr [edx],edx", 0x21, 0x12 ); /* DUAL*/ FCML_I32_D( "and dword ptr [ebx],edx", 0x21, 0x14, 0x23 ); /* DUAL*/ FCML_I32( "and dword ptr [ebx],edx", 0x21, 0x13 ); /* DUAL*/ FCML_I32( "and dword ptr [esp],edx", 0x21, 0x14, 0x24 ); /* SIB ONLY*/ FCML_I32_D( "and dword ptr [04030201h],edx", 0x21, 0x14, 0x25, 0x01, 0x02, 0x03, 0x04 ); /* DUAL*/ FCML_I32( "and dword ptr [04030201h],edx", 0x21, 0x15, 0x01, 0x02, 0x03, 0x04 ); /* DUAL*/ FCML_I32_D( "and dword ptr [esi],edx", 0x21, 0x14, 0x26 ); /* DUAL*/ FCML_I32( "and dword ptr [esi],edx", 0x21, 0x16 ); /* DUAL*/ FCML_I32( "lock and dword ptr [esi],edx", 0xF0, 0x21, 0x16 ); /* DUAL*/ } void fcml_tf_instruction_ANDPD_VANDPD(void) { FCML_I32( "andpd xmm2,xmmword ptr [ecx+eax]", 0x66, 0x0F, 0x54, 0x14, 0x01 ); FCML_I64( "andpd xmm2,xmmword ptr [rcx+rax]", 0x66, 0x0F, 0x54, 0x14, 0x01 ); FCML_A64( "andpd (%rcx,%rax),%xmm2", 0x66, 0x0F, 0x54, 0x14, 0x01 ); FCML_I64( "vandpd ymm10,ymm14,ymmword ptr [r9+rax]", 0xC4, 0x41, 0x0D, 0x54, 0x14, 0x01 ); FCML_I32( "vandpd xmm2,xmm7,xmmword ptr [ecx+eax]", 0xC5, 0xC1, 0x54, 0x14, 0x01 ); FCML_I32( "vandpd xmm2,xmm2,xmmword ptr [ecx+eax]", 0xC5, 0xE9, 0x54, 0x14, 0x01 ); FCML_I32( "vandpd xmm2,xmm6,xmmword ptr [ecx+eax]", 0xC5, 0xC9, 0x54, 0x14, 0x01 ); FCML_I32( "vandpd xmm2,xmm6,xmmword ptr [ecx+eax]", 0xC5, 0xC9, 0x54, 0x14, 0x01 ); FCML_A32( "vandpd (%ecx,%eax),%xmm6,%xmm2", 0xC5, 0xC9, 0x54, 0x14, 0x01 ); } void fcml_tf_instruction_ANDPS_VANDPS(void) { FCML_I32( "andps xmm2,xmmword ptr [ecx+eax]", 0x0F, 0x54, 0x14, 0x01 ); FCML_I64( "andps xmm2,xmmword ptr [rcx+rax]", 0x0F, 0x54, 0x14, 0x01 ); FCML_A64( "andps (%rcx,%rax),%xmm2", 0x0F, 0x54, 0x14, 0x01 ); FCML_I64( "vandps ymm10,ymm14,ymmword ptr [r9+rax]", 0xC4, 0x41, 0x0C, 0x54, 0x14, 0x01 ); FCML_I32( "vandps xmm2,xmm7,xmmword ptr [ecx+eax]", 0xc5, 0xc0, 0x54, 0x14, 0x01 ); FCML_I32( "vandps xmm2,xmm2,xmmword ptr [ecx+eax]", 0xc5, 0xe8, 0x54, 0x14, 0x01 ); FCML_I32( "vandps xmm2,xmm6,xmmword ptr [ecx+eax]", 0xC5, 0xC8, 0x54, 0x14, 0x01 ); FCML_A32( "vandps (%ecx,%eax),%xmm6,%xmm2", 0xC5, 0xC8, 0x54, 0x14, 0x01 ); } void fcml_tf_instruction_ANDNPD_VANDNPD(void) { FCML_I32( "andnpd xmm2,xmmword ptr [ecx+eax]", 0x66, 0x0F, 0x55, 0x14, 0x01 ); FCML_A64( "andnpd (%rcx,%rax),%xmm2", 0x66, 0x0F, 0x55, 0x14, 0x01 ); FCML_I64( "vandnpd ymm10,ymm14,ymmword ptr [r9+rax]", 0xC4, 0x41, 0x0D, 0x55, 0x14, 0x01 ); FCML_I32( "vandnpd xmm2,xmm7,xmmword ptr [ecx+eax]", 0xc5, 0xc1, 0x55, 0x14, 0x01 ); FCML_I32( "vandnpd xmm2,xmm2,xmmword ptr [ecx+eax]", 0xc5, 0xe9, 0x55, 0x14, 0x01 ); FCML_I32( "vandnpd xmm2,xmm6,xmmword ptr [ecx+eax]", 0xC5, 0xC9, 0x55, 0x14, 0x01 ); } void fcml_tf_instruction_ANDNPS_VANDNPS(void) { FCML_I32( "andnps xmm2,xmmword ptr [ecx+eax]", 0x0F, 0x55, 0x14, 0x01 ); FCML_I64( "andnps xmm2,xmmword ptr [rcx+rax]", 0x0F, 0x55, 0x14, 0x01 ); FCML_I64_A( "andnps xmm2,[rcx+rax]", 0x0F, 0x55, 0x14, 0x01 ); FCML_I64( "vandnps ymm10,ymm14,ymmword ptr [r9+rax]", 0xC4, 0x41, 0x0C, 0x55, 0x14, 0x01 ); FCML_A64( "vandnps (%r9,%rax),%ymm14,%ymm10", 0xC4, 0x41, 0x0C, 0x55, 0x14, 0x01 ); FCML_I32( "vandnps xmm2,xmm7,xmmword ptr [ecx+eax]", 0xc5, 0xc0, 0x55, 0x14, 0x01 ); FCML_I32_A( "vandnps xmm2,xmm7,[ecx+eax]", 0xc5, 0xc0, 0x55, 0x14, 0x01 ); FCML_I32( "vandnps xmm2,xmm2,xmmword ptr [ecx+eax]", 0xc5, 0xe8, 0x55, 0x14, 0x01 ); FCML_A32( "vandnps (%ecx,%eax),%xmm6,%xmm2", 0xC5, 0xC8, 0x55, 0x14, 0x01 ); } void fcml_tf_instruction_ARPL(void) { FCML_I32( "arpl word ptr [ecx+eax],dx", 0x63, 0x14, 0x01 ); FCML_I32_A( "arpl [ecx+eax],dx", 0x63, 0x14, 0x01 ); FCML_A32( "arpl %dx,(%ecx,%eax)", 0x63, 0x14, 0x01 ); FCML_I32_D( "arpl word ptr [ecx+eax],dx", 0x66, 0x63, 0x14, 0x01 ); FCML_I32( "arpl word ptr [si],dx", 0x67, 0x63, 0x14 ); FCML_A32( "arpl %dx,(%si)", 0x67, 0x63, 0x14 ); FCML_I64_FAILED( "arpl edi", 0x63, 0xDF ); } void fcml_tf_instruction_ANDN(void) { FCML_I32( "andn eax,edi,dword ptr [eax]", 0xC4, 0xE2, 0x40, 0xF2, 0x00 ); FCML_I32_A( "andn eax,edi,[eax]", 0xC4, 0xE2, 0x40, 0xF2, 0x00 ); FCML_A64( "andn (%rax),%edi,%eax", 0xC4, 0xE2, 0x40, 0xF2, 0x00 ); FCML_I32( "andn eax,edi,eax", 0xC4, 0xE2, 0x40, 0xF2, 0xC0 ); FCML_I64( "andn rax,rdi,qword ptr [rax]", 0xC4, 0xE2, 0xC0, 0xF2, 0x00 ); FCML_I64( "andn rax,rdi,rax", 0xC4, 0xE2, 0xC0, 0xF2, 0xC0 ); FCML_A64( "andn %rax,%rdi,%rax", 0xC4, 0xE2, 0xC0, 0xF2, 0xC0 ); } void fcml_tf_instruction_ADCX(void) { FCML_I32( "adcx eax,dword ptr [eax]", 0x66, 0x0F, 0x38, 0xF6, 0x00 ); FCML_A32( "adcx (%eax),%eax", 0x66, 0x0F, 0x38, 0xF6, 0x00 ); FCML_I64( "adcx eax,dword ptr [rax]", 0x66, 0x0F, 0x38, 0xF6, 0x00 ); FCML_I64( "adcx rax,qword ptr [rax]", 0x66, 0x48, 0x0F, 0x38, 0xF6, 0x00 ); FCML_A64( "adcx (%rax),%rax", 0x66, 0x48, 0x0F, 0x38, 0xF6, 0x00 ); } void fcml_tf_instruction_ADOX(void) { FCML_I32( "adox eax,dword ptr [eax]", 0xF3, 0x0F, 0x38, 0xF6, 0x00 ); FCML_A64( "adox (%rax),%eax", 0xF3, 0x0F, 0x38, 0xF6, 0x00 ); FCML_I64( "adox eax,dword ptr [rax]", 0xF3, 0x0F, 0x38, 0xF6, 0x00 ); FCML_I64( "adox rax,qword ptr [rax]", 0xF3, 0x48, 0x0F, 0x38, 0xF6, 0x00 ); FCML_A64( "adox (%rax),%rax", 0xF3, 0x48, 0x0F, 0x38, 0xF6, 0x00 ); } fcml_stf_test_case fctl_ti_instructions_a[] = { { "fcml_tf_instruction_AAA", fcml_tf_instruction_AAA }, { "fcml_tf_instruction_AAD", fcml_tf_instruction_AAD }, { "fcml_tf_instruction_AAM", fcml_tf_instruction_AAM }, { "fcml_tf_instruction_AAS", fcml_tf_instruction_AAS }, { "fcml_tf_instruction_ADC", fcml_tf_instruction_ADC }, { "fcml_tf_instruction_ADD", fcml_tf_instruction_ADD }, { "fcml_tf_instruction_ADDPD_VADDPD", fcml_tf_instruction_ADDPD_VADDPD }, { "fcml_tf_instruction_ADDPS_VADDPS", fcml_tf_instruction_ADDPS_VADDPS }, { "fcml_tf_instruction_ADDSD_VADDSD", fcml_tf_instruction_ADDSD_VADDSD }, { "fcml_tf_instruction_ADDSS_VADDSS", fcml_tf_instruction_ADDSS_VADDSS }, { "fcml_tf_instruction_ADDSUBPD_VADDSUBPD", fcml_tf_instruction_ADDSUBPD_VADDSUBPD }, { "fcml_tf_instruction_ADDSUBPS_VADDSUBPS", fcml_tf_instruction_ADDSUBPS_VADDSUBPS }, { "fcml_tf_instruction_AESDEC_VAESDEC", fcml_tf_instruction_AESDEC_VAESDEC }, { "fcml_tf_instruction_AESDECLAST_VAESDECLAST", fcml_tf_instruction_AESDECLAST_VAESDECLAST }, { "fcml_tf_instruction_AESENC_VAESENC", fcml_tf_instruction_AESENC_VAESENC }, { "fcml_tf_instruction_AESENCLAST", fcml_tf_instruction_AESENCLAST }, { "fcml_tf_instruction_AESIMC_VAESIMC", fcml_tf_instruction_AESIMC_VAESIMC }, { "fcml_tf_instruction_AESKEYGENASSIST_VAESKEYGENASSIST", fcml_tf_instruction_AESKEYGENASSIST_VAESKEYGENASSIST }, { "fcml_tf_instruction_AND", fcml_tf_instruction_AND }, { "fcml_tf_instruction_ANDPD_VANDPD", fcml_tf_instruction_ANDPD_VANDPD }, { "fcml_tf_instruction_ANDPS_VANDPS", fcml_tf_instruction_ANDPS_VANDPS }, { "fcml_tf_instruction_ANDNPD_VANDNPD", fcml_tf_instruction_ANDNPD_VANDNPD }, { "fcml_tf_instruction_ANDNPS_VANDNPS", fcml_tf_instruction_ANDNPS_VANDNPS }, { "fcml_tf_instruction_ARPL", fcml_tf_instruction_ARPL }, { "fcml_tf_instruction_ANDN", fcml_tf_instruction_ANDN }, { "fcml_tf_instruction_ADCX", fcml_tf_instruction_ADCX }, { "fcml_tf_instruction_ADOX", fcml_tf_instruction_ADOX }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_a = { "suite-fctl_ti_instructions_a", fcml_tf_instructions_a_suite_init, fcml_tf_instructions_a_suite_cleanup, fctl_ti_instructions_a }; fcml-1.1.1/check/public-tests/chooser_t.c0000644000175000017500000001417612560745216015221 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 "chooser_t.h" #include #include #include #include #include #include #include #include #include #include #include "instructions_base_t.h" fcml_bool fcml_tf_chooser_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_chooser_suite_cleanup(void) { return FCML_TRUE; } void fcml_fn_chooser_default(void) { /* Instruction "adc ax,8042h" can be assembled in two ways.*/ /* 1: 0x66, 0x15, 0x42, 0x80*/ /* 2: 0x66, 0x81, 0xd0, 0x42, 0x80*/ /* Default instruction chooser is responsible for choosing the shortest form.*/ fcml_st_assembler_context context = {0}; context.assembler = assembler_intel; context.entry_point.op_mode = FCML_OM_32_BIT; context.entry_point.ip = 0x00401000; fcml_st_instruction instruction = {0}; instruction.mnemonic = "adc"; instruction.operands[0] = FCML_REG( fcml_reg_AX ); instruction.operands[1] = FCML_IMM16( 0x8042 ); fcml_st_assembler_result result; fcml_fn_assembler_result_prepare( &result ); if( !fcml_fn_assemble( &context, &instruction, &result ) ) { STF_ASSERT_PTR_NOT_NULL( result.chosen_instruction ); if( result.chosen_instruction ) { STF_ASSERT_EQUAL( 4, result.chosen_instruction->code_length ); if( result.chosen_instruction->code_length == 4 ) { STF_ASSERT_EQUAL( 0x66, result.chosen_instruction->code[0] ); STF_ASSERT_EQUAL( 0x15, result.chosen_instruction->code[1] ); STF_ASSERT_EQUAL( 0x42, result.chosen_instruction->code[2] ); STF_ASSERT_EQUAL( 0x80, result.chosen_instruction->code[3] ); } } fcml_fn_assembler_result_free( &result ); } else { STF_FAIL("Can not assemble instruction."); } } void fcml_fn_chooser_null_optimizer_all_forms(void) { /* Instruction "adc ax,8042h" can be assembled in two ways.*/ /* 1: 0x66, 0x15, 0x42, 0x80*/ /* 2: 0x66, 0x81, 0xd0, 0x42, 0x80*/ /* Null instruction chooser is responsible for choosing them all. Optimizer should also try all allowed ASA/OSA combinations.*/ fcml_ceh_error error; fcml_st_assembler_context context = {0}; context.configuration.optimizer_flags = FCML_OPTF_ALL_FORMS; context.configuration.chooser = &fcml_fn_asm_no_instruction_chooser; context.assembler = assembler_intel; context.entry_point.op_mode = FCML_OM_32_BIT; context.entry_point.ip = 0x00401000; fcml_st_instruction instruction = {0}; instruction.mnemonic = "adc"; instruction.operands[0] = FCML_REG( fcml_reg_AX ); instruction.operands[1] = FCML_IMM16( 0x8042 ); fcml_st_assembler_result result; fcml_fn_assembler_result_prepare( &result ); if( !fcml_fn_assemble( &context, &instruction, &result ) ) { STF_ASSERT_PTR_NULL( result.chosen_instruction ); /* Disassemble and render every instruction available.*/ fcml_st_disassembler_context d_context = {0}; d_context.entry_point.op_mode = FCML_OM_32_BIT; d_context.entry_point.ip = 0x00401000; d_context.disassembler = disassembler_intel; fcml_int flags = 0; /* Iterate over all instructions.*/ fcml_st_assembled_instruction *instruction = result.instructions; while( instruction ) { /* Disassemble instructions one by one.*/ d_context.code = instruction->code; d_context.code_length = instruction->code_length; fcml_st_disassembler_result dasm_result; fcml_fn_disassembler_result_prepare( &dasm_result ); error = fcml_fn_disassemble( &d_context, &dasm_result ); if( error ) { break; } /* Render instructions one by one.*/ fcml_char buffer[FCML_REND_MAX_BUFF_LEN]; fcml_st_render_config config = {0}; config.render_flags = FCML_REND_FLAG_RENDER_CODE; error = fcml_fn_render( dialect_intel, &config, buffer, sizeof( buffer ), &dasm_result ); if( error ) { /* Free disassembling result.*/ fcml_fn_disassembler_result_free( &dasm_result ); break; } fcml_fn_disassembler_result_free( &dasm_result ); if( strcmp( FCML_TEXT( "666781d04280 adc ax,-32702" ), buffer ) == 0 ) { flags |= 0x01; } if( strcmp( FCML_TEXT( "6681d04280 adc ax,-32702" ), buffer ) == 0 ) { flags |= 0x02; } if( strcmp( FCML_TEXT( "6667154280 adc ax,-32702" ), buffer ) == 0 ) { flags |= 0x04; } if( strcmp( FCML_TEXT( "66154280 adc ax,-32702" ), buffer ) == 0) { flags |= 0x08; } instruction = instruction->next; } fcml_fn_assembler_result_free( &result ); STF_ASSERT_EQUAL( error, 0 ); STF_ASSERT_EQUAL( flags, 0x0000000F ); } else { STF_FAIL("Can not assemble instruction."); } } fcml_stf_test_case fcml_ti_chooser[] = { { "fcml_fn_chooser_default", fcml_fn_chooser_default }, { "fcml_fn_chooser_null_optimizer_all_forms", fcml_fn_chooser_null_optimizer_all_forms }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_chooser = { "suite-fcml-chooser", fcml_tf_chooser_suite_init, fcml_tf_chooser_suite_cleanup, fcml_ti_chooser }; fcml-1.1.1/check/public-tests/Makefile.am0000644000175000017500000000316612560745216015121 00000000000000noinst_PROGRAMS = fcml_public_check fcml_public_check_SOURCES = main.c \ error_handling_t.c \ error_handling_t.h \ hints_t.c \ hints_t.h \ instructions_a_t.c \ instructions_a_t.h \ instructions_base_t.c \ instructions_base_t.h \ instructions_b_t.c \ instructions_b_t.h \ instructions_c_t.c \ instructions_c_t.h \ instructions_d_t.c \ instructions_d_t.h \ instructions_e_t.c \ instructions_e_t.h \ instructions_f_t.c \ instructions_f_t.h \ instructions_g_t.c \ instructions_g_t.h \ instructions_h_t.c \ instructions_h_t.h \ instructions_i_t.c \ instructions_i_t.h \ instructions_j_t.c \ instructions_j_t.h \ instructions_l_t.c \ instructions_l_t.h \ instructions_m_t.c \ instructions_m_t.h \ instructions_n_t.c \ instructions_n_t.h \ instructions_o_t.c \ instructions_o_t.h \ instructions_p_t.c \ instructions_p_t.h \ instructions_r_t.c \ instructions_r_t.h \ instructions_s_t.c \ instructions_s_t.h \ instructions_t_t.c \ instructions_t_t.h \ instructions_u_t.c \ instructions_u_t.h \ instructions_v_t.c \ instructions_v_t.h \ instructions_w_t.c \ instructions_w_t.h \ instructions_x_t.c \ instructions_x_t.h \ prefixes_t.c \ prefixes_t.h \ segment_reg_t.c \ segment_reg_t.h \ chooser_t.c \ chooser_t.h \ render_t.h \ render_t.c \ disassembler_t.c \ disassembler_t.h \ assembler_t.c \ assembler_t.h \ general_usage_t.h \ general_usage_t.c fcml_public_check_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/check/stf @FCML_IMPORT_LIB@ fcml_public_check_LDADD = $(top_srcdir)/src/libfcml.la $(top_srcdir)/check/stf/libstf.la check_SCRIPTS = fcml_public_check TESTS = $(check_SCRIPTS) fcml-1.1.1/check/public-tests/instructions_l_t.c0000644000175000017500000003551412560745216016635 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "instructions_l_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_l_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_l_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_LAHF(void) { FCML_I3264( "lahf", 0x9F ); FCML_A64( "lahf", 0x9f ); } void fcml_tf_instruction_LAR(void) { FCML_I32( "lar ebp,word ptr [eax+00000020h]", 0x0f, 0x02, 0x68, 0x20 ); FCML_I32( "lar ecx,esp", 0x0f, 0x02, 0xcc ); FCML_I32( "lar bp,word ptr [eax+00000020h]", 0x66, 0x0f, 0x02, 0x68, 0x20 ); FCML_I32( "lar cx,sp", 0x66, 0x0f, 0x02, 0xcc ); FCML_I64( "lar ebp,word ptr [rax+0000000000000020h]", 0x0f, 0x02, 0x68, 0x20 ); FCML_I64( "lar ecx,esp", 0x0f, 0x02, 0xcc ); FCML_I64( "lar rbp,word ptr [rax+0000000000000020h]", 0x48, 0x0f, 0x02, 0x68, 0x20 ); FCML_I64( "lar rcx,esp", 0x48, 0x0f, 0x02, 0xcc ); FCML_A32( "lar 0x00000020(%eax),%ebp", 0x0f, 0x02, 0x68, 0x20 ); FCML_A32( "lar 0x00000020(%eax),%bp", 0x66, 0x0f, 0x02, 0x68, 0x20 ); FCML_A64( "lar 0x0000000000000020(%rax),%rbp", 0x48, 0x0f, 0x02, 0x68, 0x20 ); FCML_A64( "lar %sp,%cx", 0x66, 0x0f, 0x02, 0xcc ); } void fcml_tf_instruction_LDDQU(void) { FCML_I32( "lddqu xmm5,[eax+00000020h]", 0xF2, 0x0F, 0xF0, 0x68, 0x20 ); FCML_I64( "lddqu xmm5,[rax+0000000000000020h]", 0xF2, 0x0F, 0xF0, 0x68, 0x20 ); FCML_I64( "vlddqu xmm8,xmmword ptr [r8]", 0xC4, 0x41, 0x7B, 0xF0, 0x00 ); FCML_I32( "vlddqu ymm0,ymmword ptr [eax]", 0xc5, 0xff, 0xf0, 0x00 ); FCML_A64( "lddqu 0x0000000000000020(%rax),%xmm5", 0xf2, 0x0f, 0xf0, 0x68, 0x20 ); FCML_A64( "vlddqu (%r8),%xmm8", 0xc4, 0x41, 0x7b, 0xf0, 0x00 ); FCML_A64( "vlddqu (%rax),%ymm0", 0xc5, 0xff, 0xf0, 0x00 ); } void fcml_tf_instruction_LDMXCSR(void) { FCML_I32( "ldmxcsr dword ptr [eax+00000020h]", 0x0F, 0xAE, 0x50, 0x20 ); FCML_I64( "ldmxcsr dword ptr [rax+0000000000000020h]", 0x0F, 0xAE, 0x50, 0x20 ); FCML_A64( "ldmxcsr 0x0000000000000020(%rax)", 0x0f, 0xae, 0x50, 0x20 ); FCML_A64( "vldmxcsr 0x0000000000000020(%rax)", 0xc5, 0xf8, 0xae, 0x50, 0x20 ); } void fcml_tf_instruction_LDS(void) { FCML_I32( "lds far ebp,fword ptr [eax+00000020h]", 0xC5, 0x68, 0x20 ); FCML_I32( "lds far bp,dword ptr [eax+00000020h]", 0x66, 0xc5, 0x68, 0x20 ); FCML_A32( "lds 0x00000020(%eax),%ebp", 0xC5, 0x68, 0x20 ); FCML_A32( "lds 0x00000020(%eax),%bp", 0x66, 0xc5, 0x68, 0x20 ); FCML_I32( "lss far ebp,fword ptr [eax+00000020h]", 0x0F, 0xB2, 0x68, 0x20 ); FCML_I64( "lss far ebp,fword ptr [rax+0000000000000020h]", 0x0F, 0xB2, 0x68, 0x20 ); FCML_I32( "lss far bp,dword ptr [eax+00000020h]", 0x66, 0x0F, 0xB2, 0x68, 0x20 ); FCML_I64( "lss far bp,dword ptr [rax+0000000000000020h]", 0x66, 0x0F, 0xB2, 0x68, 0x20 ); FCML_I64( "lss far rbp,tbyte ptr [rax+0000000000000020h]", 0x48, 0x0F, 0xB2, 0x68, 0x20 ); FCML_A64( "lss 0x0000000000000020(%rax),%ebp", 0x0f, 0xb2, 0x68, 0x20 ); FCML_A64( "lss 0x0000000000000020(%rax),%bp", 0x66, 0x0f, 0xb2, 0x68, 0x20 ); FCML_A64( "lss 0x0000000000000020(%rax),%rbp", 0x48, 0x0f, 0xb2, 0x68, 0x20 ); FCML_I32( "les far ebp,fword ptr [eax+00000020h]", 0xC4, 0x68, 0x20 ); FCML_I32( "les far bp,dword ptr [eax+00000020h]", 0x66, 0xc4, 0x68, 0x20 ); FCML_A32( "les 0x00000020(%eax),%ebp", 0xC4, 0x68, 0x20 ); FCML_A32( "les 0x00000020(%eax),%bp", 0x66, 0xc4, 0x68, 0x20 ); FCML_I32( "lfs far ebp,fword ptr [eax+00000020h]", 0x0F, 0xB4, 0x68, 0x20 ); FCML_I64( "lfs far ebp,fword ptr [rax+0000000000000020h]", 0x0F, 0xB4, 0x68, 0x20 ); FCML_I32( "lfs far bp,dword ptr [eax+00000020h]", 0x66, 0x0F, 0xB4, 0x68, 0x20 ); FCML_I64( "lfs far bp,dword ptr [rax+0000000000000020h]", 0x66, 0x0F, 0xB4, 0x68, 0x20 ); FCML_I64( "lfs far rbp,tbyte ptr [rax+0000000000000020h]", 0x48, 0x0F, 0xB4, 0x68, 0x20 ); FCML_A64( "lfs 0x0000000000000020(%rax),%ebp", 0x0f, 0xb4, 0x68, 0x20 ); FCML_A64( "lfs 0x0000000000000020(%rax),%bp", 0x66, 0x0f, 0xb4, 0x68, 0x20 ); FCML_A64( "lfs 0x0000000000000020(%rax),%rbp", 0x48, 0x0f, 0xb4, 0x68, 0x20 ); FCML_I32( "lgs far ebp,fword ptr [eax+00000020h]", 0x0F, 0xB5, 0x68, 0x20 ); FCML_I64( "lgs far ebp,fword ptr [rax+0000000000000020h]", 0x0F, 0xB5, 0x68, 0x20 ); FCML_I32( "lgs far bp,dword ptr [eax+00000020h]", 0x66, 0x0F, 0xB5, 0x68, 0x20 ); FCML_I64( "lgs far bp,dword ptr [rax+0000000000000020h]", 0x66, 0x0F, 0xB5, 0x68, 0x20 ); FCML_I64( "lgs far rbp,tbyte ptr [rax+0000000000000020h]", 0x48, 0x0F, 0xB5, 0x68, 0x20 ); FCML_A64( "lgs 0x0000000000000020(%rax),%ebp", 0x0f, 0xb5, 0x68, 0x20 ); FCML_A64( "lgs 0x0000000000000020(%rax),%bp", 0x66, 0x0f, 0xb5, 0x68, 0x20 ); FCML_A64( "lgs 0x0000000000000020(%rax),%rbp", 0x48, 0x0f, 0xb5, 0x68, 0x20 ); } void fcml_tf_instruction_LEA(void) { FCML_I32( "lea ebp,[eax+00000020h]", 0x8D, 0x68, 0x20 ); FCML_I32( "lea bp,[eax+00000020h]", 0x66, 0x8D, 0x68, 0x20 ); FCML_I64( "lea rbp,[rax+0000000000000020h]", 0x48, 0x8D, 0x68, 0x20 ); FCML_A32( "lea 0x00000020(%eax),%ebp", 0x8D, 0x68, 0x20 ); FCML_A32( "lea 0x00000020(%eax),%bp", 0x66, 0x8D, 0x68, 0x20 ); FCML_A64( "lea 0x0000000000000020(%rax),%rbp", 0x48, 0x8d, 0x68, 0x20 ); } void fcml_tf_instruction_LEAVE(void) { FCML_I3264( "leave", 0xc9 ); FCML_A3264( "leave", 0xc9 ); } void fcml_tf_instruction_LFENCE(void) { FCML_I3264("lfence", 0x0F, 0xAE, 0xE8); FCML_A3264("lfence", 0x0F, 0xAE, 0xE8); } void fcml_tf_instruction_LLWPCB(void) { FCML_I32_D( "llwpcb eax", 0x8F, 0xE9, 0x60, 0x12, 0xC0 ); FCML_I32( "llwpcb eax", 0x8F, 0xE9, 0x78, 0x12, 0xC0 ); FCML_I64_D( "llwpcb rax", 0x8F, 0xE9, 0xE0, 0x12, 0xC0 ); FCML_I64( "llwpcb rax", 0x8F, 0xE9, 0xF8, 0x12, 0xC0 ); FCML_A32( "llwpcb %eax", 0x8f, 0xe9, 0x78, 0x12, 0xc0 ); FCML_A64( "llwpcb %rax", 0x8f, 0xe9, 0xf8, 0x12, 0xc0 ); } void fcml_tf_instruction_LGDT(void) { FCML_I32( "lgdt fword ptr [eax+00000020h]", 0x0F, 0x01, 0x50, 0x20 ); FCML_I32( "lgdt fword ptr [eax+00000020h]", 0x66, 0x0F, 0x01, 0x50, 0x20 ); FCML_I64_D( "lgdt tbyte ptr [rax+0000000000000020h]", 0x66, 0x0F, 0x01, 0x50, 0x20 ); FCML_I64_D( "lgdt tbyte ptr [rax+0000000000000020h]", 0x48, 0x0F, 0x01, 0x50, 0x20 ); FCML_I64( "lgdt tbyte ptr [rax+0000000000000020h]", 0x0F, 0x01, 0x50, 0x20 ); FCML_A32( "lgdt 0x00000020(%eax)", 0x0f, 0x01, 0x50, 0x20 ); FCML_A64( "lgdt 0x0000000000000020(%rax)", 0x0f, 0x01, 0x50, 0x20 ); FCML_A32( "lgdt 0x00000020(%eax)", 0x0f, 0x01, 0x50, 0x20 ); FCML_A64( "lgdt 0x0000000000000020(%rax)", 0x0f, 0x01, 0x50, 0x20 ); } void fcml_tf_instruction_LIDT(void) { FCML_I32( "lidt fword ptr [eax+00000020h]", 0x0F, 0x01, 0x58, 0x20 ); FCML_I32( "lidt fword ptr [eax+00000020h]", 0x66, 0x0F, 0x01, 0x58, 0x20 ); FCML_I64_D( "lidt tbyte ptr [rax+0000000000000020h]", 0x66, 0x0F, 0x01, 0x58, 0x20 ); FCML_I64_D( "lidt tbyte ptr [rax+0000000000000020h]", 0x48, 0x0F, 0x01, 0x58, 0x20 ); FCML_I64( "lidt tbyte ptr [rax+0000000000000020h]", 0x0F, 0x01, 0x58, 0x20 ); FCML_A32( "lidt 0x00000020(%eax)", 0x0f, 0x01, 0x58, 0x20 ); FCML_A64( "lidt 0x0000000000000020(%rax)", 0x0f, 0x01, 0x58, 0x20 ); FCML_A32( "lidt 0x00000020(%eax)", 0x0f, 0x01, 0x58, 0x20 ); FCML_A64( "lidt 0x0000000000000020(%rax)", 0x0f, 0x01, 0x58, 0x20 ); } void fcml_tf_instruction_LLDT(void) { FCML_I32( "lldt word ptr [eax+00000020h]", 0x0F, 0x00, 0x50, 0x20 ); FCML_I32( "lldt word ptr [eax+00000020h]", 0x66, 0x0F, 0x00, 0x50, 0x20 ); FCML_I64( "lldt word ptr [rax+0000000000000020h]", 0x0F, 0x00, 0x50, 0x20 ); FCML_A32( "lldt 0x00000020(%eax)", 0x0F, 0x00, 0x50, 0x20 ); FCML_A64( "lldt 0x0000000000000020(%rax)", 0x0f, 0x00, 0x50, 0x20 ); } void fcml_tf_instruction_LMSW(void) { FCML_I32( "lmsw word ptr [eax+00000020h]", 0x0F, 0x01, 0x70, 0x20 ); FCML_I32( "lmsw word ptr [eax+00000020h]", 0x66, 0x0F, 0x01, 0x70, 0x20 ); FCML_I64( "lmsw word ptr [rax+0000000000000020h]", 0x0F, 0x01, 0x70, 0x20 ); } void fcml_tf_instruction_LODS(void) { FCML_I32( "rep lods byte ptr es:[esi]", 0xF3, 0x26, 0xAC ); FCML_I32( "lods byte ptr [esi]", 0xAC ); FCML_I32( "lods dword ptr [esi]", 0xAD ); FCML_I32( "lods word ptr [si]",0x66, 0x67, 0xAD ); FCML_I64( "lods word ptr [rsi]",0x66, 0xAD ); FCML_I64( "lods qword ptr [rsi]", 0x48, 0xAD ); FCML_I32_A( "lodsb", 0xAC ); FCML_I32_A( "lodsw", 0x66, 0xAD ); FCML_I32_A( "lodsd", 0xAD ); FCML_I64_A( "lodsw", 0x66, 0xAD ); FCML_I64_A( "lodsd", 0xAD ); FCML_I64_A( "lodsq", 0x48, 0xAD ); FCML_A32( "rep lodsb %es:(%esi)", 0xF3, 0x26, 0xAC ); FCML_A32( "lodsb (%esi)", 0xAC ); FCML_A32( "lodsl (%esi)", 0xAD ); FCML_A32( "lodsw (%si)",0x66, 0x67, 0xAD ); FCML_A64( "lodsq (%rsi)", 0x48, 0xAD ); FCML_A32_A( "lodsb", 0xAC ); FCML_A32_A( "lodsl", 0xAD ); FCML_A32_A( "lodsw",0x66, 0xAD ); FCML_A64_A( "lodsq", 0x48, 0xAD ); } void fcml_tf_instruction_LOOP(void) { FCML_I32( "loop 00401012h", 0xE2, 0x10); FCML_I32( "loop 00401013h", 0x67, 0xE2, 0x10); FCML_I64( "loop 0000800000401013h", 0x48, 0xE2, 0x10); FCML_I32( "loope 00401012h", 0xE1, 0x10); FCML_I32( "loope 00401013h", 0x67, 0xE1, 0x10); FCML_I64( "loope 0000800000401013h", 0x48, 0xE1, 0x10); FCML_I32( "loopne 00401012h", 0xE0, 0x10); FCML_I32_A( "loopz 00401012h", 0xE1, 0x10); FCML_I32( "loopne 00401013h", 0x67, 0xE0, 0x10); FCML_I64( "loopne 0000800000401013h", 0x48, 0xE0, 0x10); FCML_I32_A( "loopnz 00401012h", 0xE0, 0x10); FCML_A64( "loop 0x0000800000401013", 0x48, 0xE2, 0x10); FCML_A64( "loope 0x0000800000401013", 0x48, 0xE1, 0x10); FCML_A64( "loopne 0x0000800000401013", 0x48, 0xE0, 0x10); } void fcml_tf_instruction_LWPINS(void) { FCML_I32( "lwpins ebx,dword ptr [eax],33221100h", 0x8F, 0xEA, 0x60, 0x12, 0x00, 0x00, 0x11, 0x22, 0x33 ); FCML_I32( "lwpins ebx,eax,33221100h", 0x8F, 0xEA, 0x60, 0x12, 0xC0, 0x00, 0x11, 0x22, 0x33 ); FCML_I64( "lwpins rbx,dword ptr [rax],33221100h", 0x8F, 0xEA, 0xE0, 0x12, 0x00, 0x00, 0x11, 0x22, 0x33 ); FCML_I64( "lwpins rbx,eax,33221100h", 0x8F, 0xEA, 0xE0, 0x12, 0xC0, 0x00, 0x11, 0x22, 0x33 ); FCML_A32( "lwpins $0x33221100,(%eax),%ebx", 0x8f, 0xea, 0x60, 0x12, 0x00, 0x00, 0x11, 0x22, 0x33 ); FCML_A64( "lwpins $0x33221100,%eax,%rbx", 0x8f, 0xea, 0xe0, 0x12, 0xc0, 0x00, 0x11, 0x22, 0x33 ); } void fcml_tf_instruction_LWPVAL(void) { FCML_I32( "lwpval ebx,dword ptr [eax],33221100h", 0x8F, 0xEA, 0x60, 0x12, 0x08, 0x00, 0x11, 0x22, 0x33 ); FCML_I32( "lwpval ebx,eax,33221100h", 0x8F, 0xEA, 0x60, 0x12, 0xC8, 0x00, 0x11, 0x22, 0x33 ); FCML_I64( "lwpval rbx,dword ptr [rax],33221100h", 0x8F, 0xEA, 0xE0, 0x12, 0x08, 0x00, 0x11, 0x22, 0x33 ); FCML_I64( "lwpval rbx,eax,33221100h", 0x8F, 0xEA, 0xE0, 0x12, 0xC8, 0x00, 0x11, 0x22, 0x33 ); FCML_A32( "lwpval $0x33221100,(%eax),%ebx", 0x8f, 0xea, 0x60, 0x12, 0x08, 0x00, 0x11, 0x22, 0x33 ); FCML_A64( "lwpval $0x33221100,%eax,%rbx", 0x8f, 0xea, 0xe0, 0x12, 0xc8, 0x00, 0x11, 0x22, 0x33 ); } void fcml_tf_instruction_LSL(void) { FCML_I32( "lsl ebp,word ptr [eax+00000020h]", 0x0f, 0x03, 0x68, 0x20 ); FCML_I32( "lsl ecx,sp", 0x0f, 0x03, 0xcc ); FCML_I32( "lsl bp,word ptr [eax+00000020h]", 0x66, 0x0f, 0x03, 0x68, 0x20 ); FCML_I32( "lsl cx,sp", 0x66, 0x0f, 0x03, 0xcc ); FCML_I64( "lsl ebp,word ptr [rax+0000000000000020h]", 0x0f, 0x03, 0x68, 0x20 ); FCML_I64( "lsl ecx,sp", 0x0f, 0x03, 0xcc ); FCML_I64( "lsl rbp,word ptr [rax+0000000000000020h]", 0x48, 0x0f, 0x03, 0x68, 0x20 ); FCML_I64( "lsl rcx,sp", 0x48, 0x0f, 0x03, 0xcc ); FCML_A32( "lsl 0x00000020(%eax),%ebp", 0x0f, 0x03, 0x68, 0x20 ); FCML_A32( "lsl %sp,%ecx", 0x0f, 0x03, 0xcc ); FCML_A32( "lsl 0x00000020(%eax),%bp", 0x66, 0x0f, 0x03, 0x68, 0x20 ); FCML_A32( "lsl %sp,%cx", 0x66, 0x0f, 0x03, 0xcc ); FCML_A64( "lsl 0x0000000000000020(%rax),%rbp", 0x48, 0x0f, 0x03, 0x68, 0x20 ); } void fcml_tf_instruction_LTR(void) { FCML_I32( "ltr word ptr [eax+00000020h]", 0x0F, 0x00, 0x58, 0x20 ); FCML_I32( "ltr ax", 0x0F, 0x00, 0xD8); FCML_I64( "ltr word ptr [rax+0000000000000020h]", 0x0F, 0x00, 0x58, 0x20 ); FCML_A32( "ltr 0x00000020(%eax)", 0x0f, 0x00, 0x58, 0x20 ); FCML_A64( "ltr 0x0000000000000020(%rax)", 0x0f, 0x00, 0x58, 0x20 ); } void fcml_tf_instruction_LZCNT(void) { FCML_I32( "lzcnt eax,dword ptr [eax]", 0xF3, 0x0F, 0xBD, 0x00 ); FCML_I32( "lzcnt ax,word ptr [eax]", 0x66, 0xF3, 0x0F, 0xBD, 0x00 ); FCML_I32( "lzcnt ax,ax", 0x66, 0xF3, 0x0F, 0xBD, 0xC0 ); FCML_I64( "lzcnt rax,qword ptr [rax]", 0xF3, 0x48, 0x0F, 0xBD, 0x00 ); FCML_A32( "lzcnt %ax,%ax", 0x66, 0xF3, 0x0F, 0xBD, 0xC0 ); FCML_A32( "lzcnt (%eax),%eax", 0xf3, 0x0f, 0xbd, 0x00 ); FCML_A64( "lzcnt (%rax),%rax", 0xf3, 0x48, 0x0f, 0xbd, 0x00 ); } fcml_stf_test_case fctl_ti_instructions_l[] = { { "fcml_tf_instruction_LAHF", fcml_tf_instruction_LAHF }, { "fcml_tf_instruction_LAR", fcml_tf_instruction_LAR }, { "fcml_tf_instruction_LDDQU", fcml_tf_instruction_LDDQU }, { "fcml_tf_instruction_LDMXCSR", fcml_tf_instruction_LDMXCSR }, { "fcml_tf_instruction_LDS", fcml_tf_instruction_LDS }, { "fcml_tf_instruction_LEA", fcml_tf_instruction_LEA }, { "fcml_tf_instruction_LEAVE", fcml_tf_instruction_LEAVE }, { "fcml_tf_instruction_LFENCE", fcml_tf_instruction_LFENCE }, { "fcml_tf_instruction_LLWPCB", fcml_tf_instruction_LLWPCB }, { "fcml_tf_instruction_LGDT", fcml_tf_instruction_LGDT }, { "fcml_tf_instruction_LIDT", fcml_tf_instruction_LIDT }, { "fcml_tf_instruction_LLDT", fcml_tf_instruction_LLDT }, { "fcml_tf_instruction_LMSW", fcml_tf_instruction_LMSW }, { "fcml_tf_instruction_LODS", fcml_tf_instruction_LODS }, { "fcml_tf_instruction_LOOP", fcml_tf_instruction_LOOP }, { "fcml_tf_instruction_LWPINS", fcml_tf_instruction_LWPINS }, { "fcml_tf_instruction_LWPVAL", fcml_tf_instruction_LWPVAL }, { "fcml_tf_instruction_LSL", fcml_tf_instruction_LSL }, { "fcml_tf_instruction_LTR", fcml_tf_instruction_LTR }, { "fcml_tf_instruction_LZCNT", fcml_tf_instruction_LZCNT }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_l = { "suite-fctl_ti_instructions_l", fcml_tf_instructions_l_suite_init, fcml_tf_instructions_l_suite_cleanup, fctl_ti_instructions_l }; fcml-1.1.1/check/public-tests/instructions_u_t.h0000644000175000017500000000171412560745216016646 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_U_H_ #define INS_U_H_ #include extern fcml_stf_test_suite fctl_si_instructions_u; #endif /* INS_U_H_ */ fcml-1.1.1/check/public-tests/instructions_h_t.c0000644000175000017500000001155512560745216016630 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "instructions_h_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_h_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_h_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_HADDPD(void) { FCML_I64( "haddpd xmm0,xmmword ptr [rax+0000000000000020h]", 0x66, 0x0F, 0x7C, 0x40, 0x20 ); FCML_I32( "haddpd xmm0,xmmword ptr [eax+00000020h]", 0x66, 0x0F, 0x7C, 0x40, 0x20 ); FCML_I64( "vhaddpd ymm10,ymm14,ymmword ptr [r9+rax]", 0xC4, 0x41, 0x0D, 0x7C, 0x14, 0x01 ); FCML_I32_D( "vhaddpd xmm2,xmm7,xmmword ptr [ecx+eax]", 0xC4, 0xC1, 0x41, 0x7C, 0x14, 0x01 ); FCML_I32_D( "vhaddpd xmm2,xmm2,xmmword ptr [ecx+eax]", 0xC4, 0xC1, 0x69, 0x7C, 0x14, 0x01 ); FCML_I32( "vhaddpd xmm2,xmm7,xmmword ptr [ecx+eax]", 0xc5, 0xc1, 0x7c, 0x14, 0x01 ); FCML_I32( "vhaddpd xmm2,xmm2,xmmword ptr [ecx+eax]", 0xc5, 0xe9, 0x7c, 0x14, 0x01 ); /* GAS */ FCML_A64( "haddpd 0x0000000000000020(%rax),%xmm0", 0x66, 0x0f, 0x7c, 0x40, 0x20 ); FCML_A64( "vhaddpd (%r9,%rax),%ymm14,%ymm10", 0xc4, 0x41, 0x0d, 0x7c, 0x14, 0x01 ); FCML_A64( "vhaddpd (%rcx,%rax),%xmm2,%xmm2", 0xc5, 0xe9, 0x7c, 0x14, 0x01 ); } void fcml_tf_instruction_HADDPS(void) { FCML_I64( "haddps xmm0,xmmword ptr [rax+0000000000000020h]", 0xF2, 0x0F, 0x7C, 0x40, 0x20 ); FCML_I32( "haddps xmm0,xmmword ptr [eax+00000020h]", 0xF2, 0x0F, 0x7C, 0x40, 0x20 ); FCML_I64( "vhaddps ymm10,ymm14,ymmword ptr [r9+rax]", 0xC4, 0x41, 0x0F, 0x7C, 0x14, 0x01 ); FCML_I32_D( "vhaddps xmm2,xmm7,xmmword ptr [ecx+eax]", 0xC4, 0xC1, 0x43, 0x7C, 0x14, 0x01 ); FCML_I32_D( "vhaddps xmm2,xmm2,xmmword ptr [ecx+eax]", 0xC4, 0xC1, 0x6B, 0x7C, 0x14, 0x01 ); FCML_I32( "vhaddps xmm2,xmm7,xmmword ptr [ecx+eax]", 0xc5, 0xc3, 0x7c, 0x14, 0x01 ); FCML_I32( "vhaddps xmm2,xmm2,xmmword ptr [ecx+eax]", 0xc5, 0xeb, 0x7c, 0x14, 0x01 ); /* GAS */ FCML_A64( "haddps 0x0000000000000020(%rax),%xmm0", 0xf2, 0x0f, 0x7c, 0x40, 0x20 ); FCML_A64( "vhaddps (%r9,%rax),%ymm14,%ymm10", 0xc4, 0x41, 0x0f, 0x7c, 0x14, 0x01 ); FCML_A64( "vhaddps (%rcx,%rax),%xmm2,%xmm2", 0xc5, 0xeb, 0x7c, 0x14, 0x01 ); } void fcml_tf_instruction_HLT(void) { FCML_I3264( "hlt", 0xF4 ); FCML_A64( "hlt", 0xf4 ); } void fcml_tf_instruction_HSUBPD(void) { FCML_I64( "hsubpd xmm0,xmmword ptr [rax+0000000000000020h]", 0x66, 0x0F, 0x7D, 0x40, 0x20 ); FCML_I32( "hsubpd xmm0,xmmword ptr [eax+00000020h]", 0x66, 0x0F, 0x7D, 0x40, 0x20 ); FCML_I64( "vhsubpd ymm10,ymm14,ymmword ptr [r9+rax]", 0xC4, 0x41, 0x0D, 0x7D, 0x14, 0x01 ); FCML_I32_D( "vhsubpd xmm2,xmm7,xmmword ptr [ecx+eax]", 0xC4, 0xC1, 0x41, 0x7D, 0x14, 0x01 ); FCML_I32( "vhsubpd xmm2,xmm7,xmmword ptr [ecx+eax]", 0xc5, 0xc1, 0x7d, 0x14, 0x01 ); /* GAS */ FCML_A64( "hsubpd 0x0000000000000020(%rax),%xmm0", 0x66, 0x0f, 0x7d, 0x40, 0x20 ); FCML_A64( "vhsubpd (%r9,%rax),%ymm14,%ymm10", 0xc4, 0x41, 0x0d, 0x7d, 0x14, 0x01 ); FCML_A64( "vhsubpd (%rcx,%rax),%xmm7,%xmm2", 0xc5, 0xc1, 0x7d, 0x14, 0x01 ); } void fcml_tf_instruction_HSUBPS(void) { FCML_I64( "hsubps xmm0,xmmword ptr [rax+0000000000000020h]", 0xF2, 0x0F, 0x7D, 0x40, 0x20 ); FCML_I32( "hsubps xmm0,xmmword ptr [eax+00000020h]", 0xF2, 0x0F, 0x7D, 0x40, 0x20 ); FCML_I64( "vhsubps ymm10,ymm14,ymmword ptr [r9+rax]", 0xC4, 0x41, 0x0F, 0x7D, 0x14, 0x01 ); FCML_I32_D( "vhsubps xmm2,xmm7,xmmword ptr [ecx+eax]", 0xC4, 0xC1, 0x43, 0x7D, 0x14, 0x01 ); FCML_I32( "vhsubps xmm2,xmm7,xmmword ptr [ecx+eax]", 0xc5, 0xc3, 0x7d, 0x14, 0x01 ); } fcml_stf_test_case fctl_ti_instructions_h[] = { { "fcml_tf_instruction_HADDPD", fcml_tf_instruction_HADDPD }, { "fcml_tf_instruction_HADDPS", fcml_tf_instruction_HADDPS }, { "fcml_tf_instruction_HLT", fcml_tf_instruction_HLT }, { "fcml_tf_instruction_HSUBPD", fcml_tf_instruction_HSUBPD }, { "fcml_tf_instruction_HSUBPS", fcml_tf_instruction_HSUBPS }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_h = { "suite-fctl_ti_instructions_h", fcml_tf_instructions_h_suite_init, fcml_tf_instructions_h_suite_cleanup, fctl_ti_instructions_h }; fcml-1.1.1/check/public-tests/prefixes_t.c0000644000175000017500000001367412560745216015406 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 "prefixes_t.h" #include #include #include #include #include "instructions_base_t.h" fcml_bool fcml_tf_prefixes_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_prefixes_suite_cleanup(void) { return FCML_TRUE; } void fcml_fn_prefixes_66(void) { /* Prefixes aren't needed.*/ fcml_st_assembler_context context = {0}; context.assembler = assembler_intel; context.entry_point.op_mode = FCML_OM_16_BIT; context.entry_point.ip = 0x00401000; fcml_st_instruction instruction = {0}; instruction.mnemonic = "adc"; instruction.operands[0] = FCML_REG( fcml_reg_BP ); instruction.operands[1] = FCML_IMM16( 0x0201 ); fcml_st_assembler_result result; fcml_fn_assembler_result_prepare( &result ); if( !fcml_fn_assemble( &context, &instruction, &result ) ) { STF_ASSERT_PTR_NOT_NULL( result.chosen_instruction ); if( result.chosen_instruction ) { STF_ASSERT_EQUAL( 4, result.chosen_instruction->code_length ); if( result.chosen_instruction->code_length == 4 ) { STF_ASSERT_EQUAL( 0x81, result.chosen_instruction->code[0] ); STF_ASSERT_EQUAL( 0xD5, result.chosen_instruction->code[1] ); STF_ASSERT_EQUAL( 0x01, result.chosen_instruction->code[2] ); STF_ASSERT_EQUAL( 0x02, result.chosen_instruction->code[3] ); } } fcml_fn_assembler_result_free( &result ); } else { STF_FAIL("Can not assemble instruction."); } /* Prefixes 0x66 is needed to change default operand size attribute back to 16 bits.*/ context.entry_point.operand_size_attribute = FCML_DS_32; context.entry_point.op_mode = FCML_OM_16_BIT; context.entry_point.ip = 0x00401000; instruction.mnemonic = "adc"; instruction.operands[0] = FCML_REG( fcml_reg_BP ); instruction.operands[1] = FCML_IMM16( 0x0201 ); if( !fcml_fn_assemble( &context, &instruction, &result ) ) { STF_ASSERT_PTR_NOT_NULL( result.chosen_instruction ); if( result.chosen_instruction ) { STF_ASSERT_EQUAL( 5, result.chosen_instruction->code_length ); if( result.chosen_instruction->code_length == 5 ) { STF_ASSERT_EQUAL( 0x66, result.chosen_instruction->code[0] ); STF_ASSERT_EQUAL( 0x81, result.chosen_instruction->code[1] ); STF_ASSERT_EQUAL( 0xD5, result.chosen_instruction->code[2] ); STF_ASSERT_EQUAL( 0x01, result.chosen_instruction->code[3] ); STF_ASSERT_EQUAL( 0x02, result.chosen_instruction->code[4] ); } } fcml_fn_assembler_result_free( &result ); } else { STF_FAIL("Can not assemble instruction."); } /* Prefixes 0x66 is needed to change default operand size attribute to 32 bits.*/ context.entry_point.operand_size_attribute = FCML_DS_16; context.entry_point.op_mode = FCML_OM_16_BIT; context.entry_point.ip = 0x00401000; instruction.mnemonic = "adc"; instruction.operands[0] = FCML_REG( fcml_reg_EBP ); instruction.operands[1] = FCML_IMM32( 0x02010000 ); if( !fcml_fn_assemble( &context, &instruction, &result ) ) { STF_ASSERT_PTR_NOT_NULL( result.chosen_instruction ); if( result.chosen_instruction ) { STF_ASSERT_EQUAL( 7, result.chosen_instruction->code_length ); if( result.chosen_instruction->code_length == 5 ) { STF_ASSERT_EQUAL( 0x66, result.chosen_instruction->code[0] ); STF_ASSERT_EQUAL( 0x81, result.chosen_instruction->code[1] ); STF_ASSERT_EQUAL( 0xD5, result.chosen_instruction->code[2] ); STF_ASSERT_EQUAL( 0x00, result.chosen_instruction->code[3] ); STF_ASSERT_EQUAL( 0x00, result.chosen_instruction->code[4] ); STF_ASSERT_EQUAL( 0x01, result.chosen_instruction->code[3] ); STF_ASSERT_EQUAL( 0x02, result.chosen_instruction->code[4] ); } } fcml_fn_assembler_result_free( &result ); } else { STF_FAIL("Can not assemble instruction."); } /* Prefixes 0x66 is needed to change default operand size attribute back to 32 bits.*/ context.entry_point.operand_size_attribute = FCML_DS_16; context.entry_point.op_mode = FCML_OM_32_BIT; context.entry_point.ip = 0x00401000; instruction.mnemonic = "adc"; instruction.operands[0] = FCML_REG( fcml_reg_EBP ); instruction.operands[1] = FCML_IMM32( 0x02010000 ); if( !fcml_fn_assemble( &context, &instruction, &result ) ) { STF_ASSERT_PTR_NOT_NULL( result.chosen_instruction ); if( result.chosen_instruction ) { STF_ASSERT_EQUAL( 7, result.chosen_instruction->code_length ); if( result.chosen_instruction->code_length == 5 ) { STF_ASSERT_EQUAL( 0x66, result.chosen_instruction->code[0] ); STF_ASSERT_EQUAL( 0x81, result.chosen_instruction->code[1] ); STF_ASSERT_EQUAL( 0xD5, result.chosen_instruction->code[2] ); STF_ASSERT_EQUAL( 0x00, result.chosen_instruction->code[3] ); STF_ASSERT_EQUAL( 0x00, result.chosen_instruction->code[4] ); STF_ASSERT_EQUAL( 0x01, result.chosen_instruction->code[3] ); STF_ASSERT_EQUAL( 0x02, result.chosen_instruction->code[4] ); } } fcml_fn_assembler_result_free( &result ); } else { STF_FAIL("Can not assemble instruction."); } } fcml_stf_test_case fcml_ti_prefixes[] = { { "fcml_fn_prefixes_66", fcml_fn_prefixes_66 }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_prefixes = { "suite-fcml-prefixes", fcml_tf_prefixes_suite_init, fcml_tf_prefixes_suite_cleanup, fcml_ti_prefixes }; fcml-1.1.1/check/public-tests/general_usage_t.c0000644000175000017500000002224412560745216016353 00000000000000/* * general_usage_t.h * * Created on: May 25, 2014 * Author: tas */ #include "general_usage_t.h" #include #include #include #include #include fcml_st_dialect *gu_intel_dialect; fcml_st_dialect *gu_gas_dialect; fcml_st_assembler *gu_intel_assembler; fcml_st_assembler *gu_gas_assembler; fcml_st_disassembler *gu_intel_disassembler; fcml_st_disassembler *gu_gas_disassembler; fcml_st_assembler_context gu_i32ctx = { 0 }; fcml_st_assembler_context gu_g32ctx = { 0 }; fcml_st_assembler_context gu_i64ctx = { 0 }; fcml_st_assembler_context gu_g64ctx = { 0 }; fcml_st_disassembler_context gu_di32ctx = { 0 }; fcml_st_disassembler_context gu_dg32ctx = { 0 }; fcml_st_disassembler_context gu_di64ctx = { 0 }; fcml_st_disassembler_context gu_dg64ctx = { 0 }; fcml_st_disassembler_result dis_result; fcml_st_assembler_result asm_result; fcml_bool fcml_tf_general_usage_suite_init(void) { fcml_fn_assembler_result_prepare( &asm_result ); fcml_fn_disassembler_result_free( &dis_result ); if( fcml_fn_dialect_init_intel( FCML_INTEL_DIALECT_CF_DEFAULT, &gu_intel_dialect ) ) { return FCML_FALSE; } if( fcml_fn_dialect_init_gas( FCML_GAS_DIALECT_CF_DEFAULT, &gu_gas_dialect ) ) { fcml_fn_dialect_free( gu_intel_dialect ); return FCML_FALSE; } if( fcml_fn_assembler_init( gu_intel_dialect, &gu_intel_assembler ) ) { fcml_fn_dialect_free( gu_intel_dialect ); fcml_fn_dialect_free( gu_gas_dialect ); return FCML_FALSE; } if( fcml_fn_assembler_init( gu_gas_dialect, &gu_gas_assembler ) ) { fcml_fn_assembler_free( gu_intel_assembler ); fcml_fn_dialect_free( gu_intel_dialect ); fcml_fn_dialect_free( gu_gas_dialect ); return FCML_FALSE; } if( fcml_fn_disassembler_init( gu_intel_dialect, &gu_intel_disassembler ) ) { fcml_fn_assembler_free( gu_intel_assembler ); fcml_fn_assembler_free( gu_gas_assembler ); fcml_fn_dialect_free( gu_intel_dialect ); fcml_fn_dialect_free( gu_gas_dialect ); return FCML_FALSE; } if( fcml_fn_disassembler_init( gu_gas_dialect, &gu_gas_disassembler ) ) { fcml_fn_disassembler_free( gu_intel_disassembler ); fcml_fn_assembler_free( gu_intel_assembler ); fcml_fn_assembler_free( gu_gas_assembler ); fcml_fn_dialect_free( gu_intel_dialect ); fcml_fn_dialect_free( gu_gas_dialect ); return FCML_FALSE; } gu_i32ctx.assembler = gu_intel_assembler; gu_i32ctx.entry_point.ip = 0x00401000; gu_i32ctx.entry_point.op_mode = FCML_OM_32_BIT; gu_g32ctx.assembler = gu_gas_assembler; gu_g32ctx.entry_point.ip = 0x00401000; gu_g32ctx.entry_point.op_mode = FCML_OM_32_BIT; gu_i64ctx.assembler = gu_intel_assembler; gu_i64ctx.entry_point.ip = 0x000000013FB40000LL; gu_i64ctx.entry_point.op_mode = FCML_OM_64_BIT; gu_g64ctx.assembler = gu_gas_assembler; gu_g64ctx.entry_point.ip = 0x000000013FB40000LL; gu_g64ctx.entry_point.op_mode = FCML_OM_64_BIT; gu_di32ctx.disassembler = gu_intel_disassembler; gu_di32ctx.entry_point.ip = 0x00401000; gu_di32ctx.entry_point.op_mode = FCML_OM_32_BIT; gu_dg32ctx.disassembler = gu_gas_disassembler; gu_dg32ctx.entry_point.ip = 0x00401000; gu_dg32ctx.entry_point.op_mode = FCML_OM_32_BIT; gu_di64ctx.disassembler = gu_intel_disassembler; gu_di64ctx.entry_point.ip = 0x000000013FB40000LL; gu_di64ctx.entry_point.op_mode = FCML_OM_64_BIT; gu_dg64ctx.disassembler = gu_gas_disassembler; gu_dg64ctx.entry_point.ip = 0x000000013FB40000LL; gu_dg64ctx.entry_point.op_mode = FCML_OM_64_BIT; return FCML_TRUE; } fcml_bool fcml_tf_general_usage_suite_cleanup(void) { fcml_fn_assembler_result_free( &asm_result ); fcml_fn_disassembler_result_free( &dis_result ); fcml_fn_disassembler_free( gu_intel_disassembler ); fcml_fn_disassembler_free( gu_gas_disassembler ); fcml_fn_assembler_free( gu_intel_assembler ); fcml_fn_assembler_free( gu_gas_assembler ); fcml_fn_dialect_free( gu_intel_dialect ); fcml_fn_dialect_free( gu_gas_dialect ); return FCML_TRUE; } fcml_uint8_t fcml_iarr_general_usage_disassemble_multiple_code[] = { 0x3F, 0x80, 0xD0, 0x42, 0x66, 0x81, 0xd0, 0x42, 0x80 }; void fcml_fn_general_usage_disassemble_multiple() { fcml_usize code_length = sizeof( fcml_iarr_general_usage_disassemble_multiple_code ); gu_di32ctx.configuration.increment_ip = FCML_TRUE; gu_di32ctx.code = fcml_iarr_general_usage_disassemble_multiple_code; gu_di32ctx.code_length = code_length; gu_di32ctx.entry_point.ip = 0x401000; STF_ASSERT_EQUAL( fcml_fn_disassemble( &gu_di32ctx, &dis_result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( gu_di32ctx.code_length, 8 ); STF_ASSERT_EQUAL( gu_di32ctx.entry_point.ip, 0x00401001 ); STF_ASSERT_EQUAL( fcml_fn_disassemble( &gu_di32ctx, &dis_result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( gu_di32ctx.code_length, 5 ); STF_ASSERT_EQUAL( gu_di32ctx.entry_point.ip, 0x00401004 ); STF_ASSERT_EQUAL( fcml_fn_disassemble( &gu_di32ctx, &dis_result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( gu_di32ctx.code_length, 0 ); STF_ASSERT_EQUAL( gu_di32ctx.entry_point.ip, 0x00401009 ); STF_ASSERT_EQUAL( fcml_fn_disassemble( &gu_di32ctx, &dis_result ), FCML_CEH_GEC_EOF ); fcml_fn_disassembler_result_free( &dis_result ); } fcml_uint8_t fcml_iarr_general_usage_disassemble_unknown_instruction[] = { 0x3F, 0x82, // Unknown instruction disassembled to "db". 0x80, 0xD0, 0x42, 0x66, 0x81, 0xd0, 0x42, 0x80 }; void fcml_fn_general_usage_unknown_instruction() { fcml_usize code_length = sizeof( fcml_iarr_general_usage_disassemble_unknown_instruction ); gu_di32ctx.configuration.increment_ip = FCML_TRUE; gu_di32ctx.configuration.fail_if_unknown_instruction = FCML_FALSE; gu_di32ctx.code = fcml_iarr_general_usage_disassemble_unknown_instruction; gu_di32ctx.code_length = code_length; gu_di32ctx.entry_point.ip = 0x401000; STF_ASSERT_EQUAL( fcml_fn_disassemble( &gu_di32ctx, &dis_result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( gu_di32ctx.code_length, 9 ); STF_ASSERT_EQUAL( gu_di32ctx.entry_point.ip, 0x00401001 ); STF_ASSERT_EQUAL( fcml_fn_disassemble( &gu_di32ctx, &dis_result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( gu_di32ctx.code_length, 8 ); STF_ASSERT_EQUAL( gu_di32ctx.entry_point.ip, 0x00401002 ); STF_ASSERT_EQUAL( fcml_fn_disassemble( &gu_di32ctx, &dis_result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( gu_di32ctx.code_length, 5 ); STF_ASSERT_EQUAL( gu_di32ctx.entry_point.ip, 0x00401005 ); STF_ASSERT_EQUAL( fcml_fn_disassemble( &gu_di32ctx, &dis_result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( gu_di32ctx.code_length, 0 ); STF_ASSERT_EQUAL( gu_di32ctx.entry_point.ip, 0x0040100A ); STF_ASSERT_EQUAL( fcml_fn_disassemble( &gu_di32ctx, &dis_result ), FCML_CEH_GEC_EOF ); fcml_fn_disassembler_result_free( &dis_result ); } void fcml_fn_general_usage_change_offset(void) { fcml_ceh_error error; // Before: // adc byte ptr [04030201h],0ffh (0x80, 0x15, 0x01, 0x02, 0x03, 0x04, 0xff) // After: // adc byte ptr [05000000h],0ffh (0x80, 0x15, 0x00, 0x00, 0x00, 0x05, 0xFF) fcml_uint8_t code[] = { 0x80, 0x15, 0x01, 0x02, 0x03, 0x04, 0xff }; gu_di32ctx.code = code; gu_di32ctx.code_length = sizeof( code ); error = fcml_fn_disassemble( &gu_di32ctx, &dis_result ); STF_ASSERT_EQUAL( FCML_CEH_GEC_NO_ERROR, error ); if( !error ) { STF_ASSERT( dis_result.instruction_details.instruction_group & FCML_AMT_GPI ); STF_ASSERT( FCML_IS_INSTRUCTION_GROUP( dis_result, FCML_AMT_GPI ) ); STF_ASSERT( !FCML_IS_INSTRUCTION_GROUP( dis_result, FCML_AMT_FPU ) ); STF_ASSERT( FCML_IS_INSTRUCTION_CODE( dis_result, F_ADC ) ); STF_ASSERT( !FCML_IS_INSTRUCTION_CODE( dis_result, F_MOV ) ); STF_ASSERT_EQUAL( F_ADC, dis_result.instruction_details.instruction ); fcml_st_operand *operand = fcml_fn_cu_find_operand( &(dis_result.instruction ), FCML_OT_ADDRESS ); if( operand && operand->address.address_form == FCML_AF_OFFSET ) { *operand = fcml_fn_cu_operand_addr_offset_32( 0x05000000, operand->address.size_operator ); error = fcml_fn_assemble( &gu_i32ctx, &(dis_result.instruction), &asm_result ); if( !error ) { fcml_st_assembled_instruction *chosen_instruction = asm_result.chosen_instruction; STF_ASSERT_EQUAL( 0x80, chosen_instruction->code[0] ); STF_ASSERT_EQUAL( 0x15, chosen_instruction->code[1] ); STF_ASSERT_EQUAL( 0x00, chosen_instruction->code[2] ); STF_ASSERT_EQUAL( 0x00, chosen_instruction->code[3] ); STF_ASSERT_EQUAL( 0x00, chosen_instruction->code[4] ); STF_ASSERT_EQUAL( 0x05, chosen_instruction->code[5] ); STF_ASSERT_EQUAL( 0xFF, chosen_instruction->code[6] ); } else { STF_FAIL("Can not assemble instruction."); } } else { STF_FAIL("Address operand not found."); } } } fcml_stf_test_case fcml_ti_general_usage[] = { { "fcml_fn_general_usage_change_offset", fcml_fn_general_usage_change_offset }, { "fcml_fn_general_usage_disassemble_multiple", fcml_fn_general_usage_disassemble_multiple }, { "fcml_fn_general_usage_unknown_instruction", fcml_fn_general_usage_unknown_instruction }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_general_usage = { "suite-fcml-general-usage", fcml_tf_general_usage_suite_init, fcml_tf_general_usage_suite_cleanup, fcml_ti_general_usage }; fcml-1.1.1/check/public-tests/segment_reg_t.c0000644000175000017500000000662312560745216016054 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 "segment_reg_t.h" #include #include #include #include #include "instructions_base_t.h" fcml_bool fcml_tf_prefixes_segment_reg_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_prefixes_segment_reg_suite_cleanup(void) { return FCML_TRUE; } void fcml_fn_segment_reg(void) { fcml_st_assembler_context context = {0}; context.assembler = assembler_intel; context.entry_point.op_mode = FCML_OM_32_BIT; context.entry_point.ip = 0x00401000; context.configuration.enable_error_messages = FCML_TRUE; fcml_st_instruction instruction = {0}; instruction.mnemonic = "cmps"; instruction.operands[0].type = FCML_OT_ADDRESS; instruction.operands[0].address.segment_selector.segment_selector = fcml_reg_DS; instruction.operands[0].address.address_form = FCML_AF_COMBINED; instruction.operands[0].address.size_operator = FCML_DS_32; instruction.operands[0].address.effective_address.base = fcml_reg_ESI; instruction.operands[1].type = FCML_OT_ADDRESS; instruction.operands[1].address.segment_selector.segment_selector = fcml_reg_ES; instruction.operands[1].address.address_form = FCML_AF_COMBINED; instruction.operands[1].address.size_operator = FCML_DS_32; instruction.operands[1].address.effective_address.base = fcml_reg_EDI; fcml_st_assembler_result result; fcml_fn_assembler_result_prepare( &result ); if( !fcml_fn_assemble( &context, &instruction, &result ) ) { STF_ASSERT_PTR_NOT_NULL( result.chosen_instruction ); if( result.chosen_instruction ) { STF_ASSERT_EQUAL( 1, result.chosen_instruction->code_length ); if( result.chosen_instruction->code_length == 4 ) { STF_ASSERT_EQUAL( 0xA7, result.chosen_instruction->code[0] ); } } } else { STF_FAIL("Can not assemble instruction."); } fcml_fn_assembler_result_free( &result ); /* Now try to override ES.*/ instruction.operands[1].address.segment_selector.segment_selector = fcml_reg_CS; if( fcml_fn_assemble( &context, &instruction, &result ) ) { STF_ASSERT_PTR_NOT_NULL( result.errors.last_error ); if( result.errors.last_error ) { STF_ASSERT_STRING_EQUAL( "Segment register can not be overridden.", result.errors.last_error->message ); } } else { STF_FAIL("Instruction should fail."); } fcml_fn_assembler_result_free( &result ); } fcml_stf_test_case fcml_ti_segment_reg[] = { { "fcml_fn_segment_reg", fcml_fn_segment_reg }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_segment_reg = { "suite-fcml-segment_reg", fcml_tf_prefixes_segment_reg_suite_init, fcml_tf_prefixes_segment_reg_suite_cleanup, fcml_ti_segment_reg }; fcml-1.1.1/check/public-tests/instructions_d_t.c0000644000175000017500000002224412560745216016621 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "instructions_d_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_d_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_d_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_DAA(void) { FCML_I32( "daa", 0x27 ); FCML_A32( "daa", 0x27 ); FCML_I64_FAILED( "daa", 0x27 ); } void fcml_tf_instruction_DAS(void) { FCML_I32( "das", 0x2F ); FCML_A32( "das", 0x2F ); FCML_I64_FAILED( "das", 0x2F ); } void fcml_tf_instruction_DEC(void) { FCML_I32_M( "dec eax", 2, FCML_MI( 0x48 ), FCML_MI( 0xFF, 0xC8 ) ); FCML_A32_M( "dec %eax", 2, FCML_MI( 0x48 ), FCML_MI( 0xFF, 0xC8 ) ); FCML_I32_M( "dec ax", 2, FCML_MI( 0x66, 0x48 ), FCML_MI( 0x66, 0xff, 0xc8 ) ); FCML_I64_FAILED( "dec eax", 0x48 ); FCML_I64_FAILED( "dec spl", 0x48 ); FCML_I32( "dec byte ptr [ebx]", 0xFE, 0x0B ); FCML_A32( "decb (%ebx)", 0xFE, 0x0B ); FCML_A32_D( "decb %dl", 0xFE, 0xca ); FCML_A32_A( "dec %dl", 0xFE, 0xca ); FCML_I32( "lock dec byte ptr [ebx]", 0xF0, 0xFE, 0x0B ); FCML_I32( "xacquire lock dec byte ptr [ebx]", 0xF2, 0xF0, 0xFE, 0x0B ); FCML_A32( "xacquire lock decb (%ebx)", 0xF2, 0xF0, 0xFE, 0x0B ); FCML_I32( "xrelease lock dec byte ptr [ebx]", 0xF3, 0xF0, 0xFE, 0x0B ); FCML_I64( "dec byte ptr [rbx]", 0xFE, 0x0B ); FCML_A64( "decb (%rbx)", 0xFE, 0x0B ); FCML_I64_D( "dec byte ptr [rbx]", 0x48, 0xFE, 0x0B ); FCML_I64( "dec spl", 0x40, 0xFE, 0xCC ); FCML_I32( "dec dword ptr [ebx]", 0xFF, 0x0B ); FCML_A32( "decl (%ebx)", 0xFF, 0x0B ); FCML_I32( "lock dec dword ptr [ebx]", 0xF0, 0xFF, 0x0B ); FCML_I32( "xacquire lock dec dword ptr [ebx]", 0xF2, 0xF0, 0xFF, 0x0B ); FCML_A32( "xacquire lock decl (%ebx)", 0xF2, 0xF0, 0xFF, 0x0B ); FCML_I32( "xrelease lock dec dword ptr [ebx]", 0xF3, 0xF0, 0xFF, 0x0B ); FCML_I32( "dec word ptr [ebx]", 0x66, 0xFF, 0x0B ); FCML_I64( "dec dword ptr [rbx]", 0xFF, 0x0B ); FCML_I64( "dec qword ptr [rbx]", 0x48, 0xFF, 0x0B ); FCML_A64( "decq (%rbx)", 0x48, 0xFF, 0x0B ); FCML_A64( "decq %rbx", 0x48, 0xFF, 0xCB ); FCML_A64_A( "dec %rbx", 0x48, 0xFF, 0xCB ); FCML_I64_D( "dec word ptr [rbx]", 0x66, 0x40, 0xFF, 0x0B ); FCML_I64( "dec r12", 0x49, 0xFF, 0xCC ); } void fcml_tf_instruction_DIV(void) { FCML_I32( "div ax,byte ptr [ebx]", 0xF6, 0x33 ); FCML_A32( "divb (%ebx),%ax", 0xF6, 0x33 ); FCML_A32( "divb %bl,%ax", 0xF6, 0xF3 ); FCML_A32_A( "div %bl,%ax", 0xF6, 0xF3 ); FCML_I32( "div ax,byte ptr [ebx]", 0x66, 0xF6, 0x33 ); FCML_I64( "div ax,sil", 0x40, 0xF6, 0xF6 ); FCML_I64( "div ax,dh", 0xF6, 0xF6 ); FCML_I32( "div eax,dword ptr [ebx]", 0xF7, 0x33 ); FCML_A32( "divl (%ebx),%eax", 0xF7, 0x33 ); FCML_I32( "div ax,word ptr [ebx]", 0x66, 0xF7, 0x33 ); FCML_A32( "divw (%ebx),%ax", 0x66, 0xF7, 0x33 ); FCML_I64( "div rax,rsi", 0x48, 0xF7, 0xF6 ); FCML_A64( "divq %rsi,%rax", 0x48, 0xF7, 0xF6 ); FCML_A64_A( "div %rsi,%rax", 0x48, 0xF7, 0xF6 ); FCML_I64( "div eax,esi", 0xF7, 0xF6 ); } void fcml_tf_instruction_DIVPD(void) { FCML_I32( "divpd xmm2,xmmword ptr [ecx+eax]", 0x66, 0x0F, 0x5E, 0x14, 0x01 ); FCML_I64( "divpd xmm2,xmmword ptr [rcx+rax]", 0x66, 0x0F, 0x5E, 0x14, 0x01 ); FCML_A64( "divpd (%rcx,%rax),%xmm2", 0x66, 0x0F, 0x5E, 0x14, 0x01 ); FCML_I64( "vdivpd ymm10,ymm14,ymmword ptr [r9+rax]", 0xC4, 0x41, 0x0D, 0x5E, 0x14, 0x01 ); FCML_A64( "vdivpd (%r9,%rax),%ymm14,%ymm10", 0xC4, 0x41, 0x0D, 0x5E, 0x14, 0x01 ); FCML_I32_D( "vdivpd xmm2,xmm7,xmmword ptr [ecx+eax]", 0xC4, 0xC1, 0x41, 0x5E, 0x14, 0x01 ); FCML_I32_D( "vdivpd xmm2,xmm2,xmmword ptr [ecx+eax]", 0xC4, 0xC1, 0x69, 0x5E, 0x14, 0x01 ); FCML_I32( "vdivpd xmm2,xmm7,xmmword ptr [ecx+eax]", 0xc5, 0xc1, 0x5e, 0x14, 0x01 ); FCML_I32( "vdivpd xmm2,xmm2,xmmword ptr [ecx+eax]", 0xc5, 0xe9, 0x5e, 0x14, 0x01 ); FCML_A32( "vdivpd (%ecx,%eax),%xmm2,%xmm2", 0xc5, 0xe9, 0x5e, 0x14, 0x01 ); } void fcml_tf_instruction_DIVPS(void) { FCML_I32( "divps xmm2,xmmword ptr [ecx+eax]", 0x0F, 0x5E, 0x14, 0x01 ); FCML_I64( "divps xmm2,xmmword ptr [rcx+rax]", 0x0F, 0x5E, 0x14, 0x01 ); FCML_A64( "divps (%rcx,%rax),%xmm2", 0x0f, 0x5e, 0x14, 0x01 ); FCML_I64( "vdivps ymm10,ymm14,ymmword ptr [r9+rax]", 0xC4, 0x41, 0x0C, 0x5E, 0x14, 0x01 ); FCML_A64( "vdivps (%r8),%ymm14,%ymm8", 0xc4, 0x41, 0x0c, 0x5e, 0x00 ); FCML_I32_D( "vdivps xmm2,xmm7,xmmword ptr [ecx+eax]", 0xC4, 0xC1, 0x40, 0x5E, 0x14, 0x01 ); FCML_I32_D( "vdivps xmm2,xmm2,xmmword ptr [ecx+eax]", 0xC4, 0xC1, 0x68, 0x5E, 0x14, 0x01 ); FCML_I32( "vdivps xmm2,xmm7,xmmword ptr [ecx+eax]", 0xc5, 0xc0, 0x5e, 0x14, 0x01 ); FCML_I32( "vdivps xmm2,xmm2,xmmword ptr [ecx+eax]", 0xc5, 0xe8, 0x5e, 0x14, 0x01 ); } void fcml_tf_instruction_DIVSD(void) { FCML_I64( "divsd xmm0,mmword ptr [rax+0000000000000020h]", 0xF2, 0x0F, 0x5E, 0x40, 0x20 ); FCML_A64( "divsd 0x0000000000000020(%rax),%xmm0", 0xf2, 0x0f, 0x5e, 0x40, 0x20 ); FCML_I32( "divsd xmm0,xmm2", 0xF2, 0x0F, 0x5E, 0xC2 ); FCML_I32( "divsd xmm0,mmword ptr [eax+00000020h]", 0xF2, 0x0F, 0x5E, 0x40, 0x20 ); FCML_I32_D( "vdivsd xmm2,xmm6,mmword ptr [ecx+eax]", 0xC4, 0xE1, 0x4B, 0x5E, 0x14, 0x01 ); FCML_I64_D( "vdivsd xmm2,xmm6,mmword ptr [rcx+rax]", 0xC4, 0xE1, 0x4B, 0x5E, 0x14, 0x01 ); FCML_I32( "vdivsd xmm2,xmm6,mmword ptr [ecx+eax]", 0xc5, 0xcb, 0x5e, 0x14, 0x01 ); FCML_I64( "vdivsd xmm2,xmm6,mmword ptr [rcx+rax]", 0xc5, 0xcb, 0x5e, 0x14, 0x01 ); FCML_A64( "vdivsd (%rcx,%rax),%xmm6,%xmm2", 0xc5, 0xcb, 0x5e, 0x14, 0x01 ); } void fcml_tf_instruction_DIVSS(void) { FCML_I64( "divss xmm0,dword ptr [rax+0000000000000020h]", 0xF3, 0x0F, 0x5E, 0x40, 0x20 ); FCML_A64( "divss 0x0000000000000020(%rax),%xmm0", 0xf3, 0x0f, 0x5e, 0x40, 0x20 ); FCML_I32( "divss xmm0,xmm2", 0xF3, 0x0F, 0x5E, 0xC2 ); FCML_I32( "divss xmm0,dword ptr [eax+00000020h]", 0xF3, 0x0F, 0x5E, 0x40, 0x20 ); FCML_I32_D( "vdivss xmm2,xmm6,dword ptr [ecx+eax]", 0xC4, 0xE1, 0x4A, 0x5E, 0x14, 0x01 ); FCML_I64_D( "vdivss xmm2,xmm6,dword ptr [rcx+rax]", 0xC4, 0xE1, 0x4A, 0x5E, 0x14, 0x01 ); FCML_I32( "vdivss xmm2,xmm6,dword ptr [ecx+eax]", 0xc5, 0xca, 0x5e, 0x14, 0x01 ); FCML_I64( "vdivss xmm2,xmm6,dword ptr [rcx+rax]", 0xc5, 0xca, 0x5e, 0x14, 0x01 ); FCML_A64( "vdivss (%rcx,%rax),%xmm6,%xmm2", 0xc5, 0xca, 0x5e, 0x14, 0x01 ); } void fcml_tf_instruction_DPPD(void) { FCML_I32( "dppd xmm2,xmmword ptr [ecx+eax],0ffh", 0x66, 0x0F, 0x3A, 0x41, 0x14, 0x01, 0xFF ); FCML_I64( "dppd xmm2,xmmword ptr [rcx+rax],0ffh", 0x66, 0x0F, 0x3A, 0x41, 0x14, 0x01, 0xFF ); FCML_A64( "dppd $0xff,(%rcx,%rax),%xmm2", 0x66, 0x0f, 0x3a, 0x41, 0x14, 0x01, 0xff ); FCML_I32( "vdppd xmm2,xmm6,xmmword ptr [ecx+eax],20h", 0xC4, 0xE3, 0x49, 0x41, 0x14, 0x01, 0x20 ); FCML_I64( "vdppd xmm2,xmm6,xmmword ptr [rcx+rax],20h", 0xC4, 0xE3, 0x49, 0x41, 0x14, 0x01, 0x20 ); FCML_A64( "vdppd $0x20,(%rcx,%rax),%xmm6,%xmm2", 0xc4, 0xe3, 0x49, 0x41, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_DPPS(void) { FCML_I32( "dpps xmm2,xmmword ptr [ecx+eax],0ffh", 0x66, 0x0F, 0x3A, 0x40, 0x14, 0x01, 0xFF ); FCML_I64( "dpps xmm2,xmmword ptr [rcx+rax],0ffh", 0x66, 0x0F, 0x3A, 0x40, 0x14, 0x01, 0xFF ); FCML_A64( "dpps $0xff,(%rcx,%rax),%xmm2", 0x66, 0x0f, 0x3a, 0x40, 0x14, 0x01, 0xff ); FCML_I32( "vdpps xmm2,xmm6,xmmword ptr [ecx+eax],20h", 0xC4, 0xE3, 0x49, 0x40, 0x14, 0x01, 0x20 ); FCML_I64( "vdpps xmm2,xmm6,xmmword ptr [rcx+rax],20h", 0xC4, 0xE3, 0x49, 0x40, 0x14, 0x01, 0x20 ); FCML_A64( "vdpps $0x20,(%rcx,%rax),%xmm6,%xmm2", 0xc4, 0xe3, 0x49, 0x40, 0x14, 0x01, 0x20 ); } fcml_stf_test_case fctl_ti_instructions_d[] = { { "fcml_tf_instruction_DAA", fcml_tf_instruction_DAA }, { "fcml_tf_instruction_DAS", fcml_tf_instruction_DAS }, { "fcml_tf_instruction_DEC", fcml_tf_instruction_DEC }, { "fcml_tf_instruction_DIV", fcml_tf_instruction_DIV }, { "fcml_tf_instruction_DIVPD", fcml_tf_instruction_DIVPD }, { "fcml_tf_instruction_DIVPS", fcml_tf_instruction_DIVPS }, { "fcml_tf_instruction_DIVSD", fcml_tf_instruction_DIVSD }, { "fcml_tf_instruction_DIVSS", fcml_tf_instruction_DIVSS }, { "fcml_tf_instruction_DPPD", fcml_tf_instruction_DPPD }, { "fcml_tf_instruction_DPPS", fcml_tf_instruction_DPPS }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_d = { "suite-fctl_ti_instructions_d", fcml_tf_instructions_d_suite_init, fcml_tf_instructions_d_suite_cleanup, fctl_ti_instructions_d }; fcml-1.1.1/check/public-tests/instructions_w_t.c0000644000175000017500000000520012560745216016635 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "instructions_w_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_w_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_w_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_WAIT(void) { FCML_I3264( "wait", 0x9B ); FCML_A64( "wait", 0x9b ); FCML_A64_A( "fwait", 0x9b ); } void fcml_tf_instruction_WBINVD(void) { FCML_I3264( "wbinvd", 0x0F, 0x09 ); FCML_A3264( "wbinvd", 0x0f, 0x09 ); } void fcml_tf_instruction_WRFSBASE(void) { FCML_I64( "wrfsbase eax", 0xF3, 0x0F, 0xAE, 0xD0 ); FCML_I64( "wrfsbase eax", 0x66, 0xF3, 0x0F, 0xAE, 0xD0 ); FCML_I64( "wrfsbase rax", 0xF3, 0x48, 0x0F, 0xAE, 0xD0 ); FCML_I64( "wrgsbase eax", 0xF3, 0x0F, 0xAE, 0xD8 ); FCML_I64( "wrgsbase eax", 0x66, 0xF3, 0x0F, 0xAE, 0xD8 ); FCML_I64( "wrgsbase rax", 0xF3, 0x48, 0x0F, 0xAE, 0xD8 ); FCML_A64( "wrfsbase %eax", 0xf3, 0x0f, 0xae, 0xd0 ); FCML_A64( "wrfsbase %rax", 0xf3, 0x48, 0x0f, 0xae, 0xd0 ); FCML_A64( "wrgsbase %eax", 0xf3, 0x0f, 0xae, 0xd8 ); FCML_A64( "wrgsbase %rax", 0xf3, 0x48, 0x0f, 0xae, 0xd8 ); } void fcml_tf_instruction_WRMSR(void) { FCML_I32( "wrmsr", 0x0F, 0x30 ); FCML_I64( "wrmsr", 0x0F, 0x30 ); FCML_A64( "wrmsr", 0x0f, 0x30 ); FCML_A64( "wrmsr", 0x0f, 0x30 ); } fcml_stf_test_case fctl_ti_instructions_w[] = { { "fcml_tf_instruction_WAIT", fcml_tf_instruction_WAIT }, { "fcml_tf_instruction_WBINVD", fcml_tf_instruction_WBINVD }, { "fcml_tf_instruction_WRFSBASE", fcml_tf_instruction_WRFSBASE }, { "fcml_tf_instruction_WRMSR", fcml_tf_instruction_WRMSR }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_w = { "suite-fctl_ti_instructions_w", fcml_tf_instructions_w_suite_init, fcml_tf_instructions_w_suite_cleanup, fctl_ti_instructions_w }; fcml-1.1.1/check/public-tests/instructions_x_t.h0000644000175000017500000000171412560745216016651 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_X_H_ #define INS_X_H_ #include extern fcml_stf_test_suite fctl_si_instructions_x; #endif /* INS_X_H_ */ fcml-1.1.1/check/public-tests/main.c0000644000175000017500000001137512560745216014156 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include #include /* FCML.*/ #include #include #include #include #include /* Tests.*/ #include "error_handling_t.h" #include "instructions_a_t.h" #include "instructions_b_t.h" #include "instructions_c_t.h" #include "instructions_d_t.h" #include "instructions_e_t.h" #include "instructions_f_t.h" #include "instructions_g_t.h" #include "instructions_h_t.h" #include "instructions_i_t.h" #include "instructions_j_t.h" #include "instructions_l_t.h" #include "instructions_m_t.h" #include "instructions_n_t.h" #include "instructions_o_t.h" #include "instructions_p_t.h" #include "instructions_r_t.h" #include "instructions_s_t.h" #include "instructions_t_t.h" #include "instructions_u_t.h" #include "instructions_v_t.h" #include "instructions_w_t.h" #include "instructions_x_t.h" #include "hints_t.h" #include "prefixes_t.h" #include "segment_reg_t.h" #include "chooser_t.h" #include "render_t.h" #include "disassembler_t.h" #include "assembler_t.h" #include "general_usage_t.h" #include "instructions_base_t.h" fcml_stf_test_suite *fcml_arr_suites[] = { &fcml_si_render, &fctl_si_instructions_a, &fctl_si_instructions_b, &fctl_si_instructions_c, &fctl_si_instructions_d, &fctl_si_instructions_e, &fctl_si_instructions_f, &fctl_si_instructions_g, &fctl_si_instructions_h, &fctl_si_instructions_i, &fctl_si_instructions_j, &fctl_si_instructions_l, &fctl_si_instructions_m, &fctl_si_instructions_n, &fctl_si_instructions_o, &fctl_si_instructions_p, &fctl_si_instructions_r, &fctl_si_instructions_s, &fctl_si_instructions_t, &fctl_si_instructions_u, &fctl_si_instructions_v, &fctl_si_instructions_w, &fctl_si_instructions_x, &fcml_si_error_handling, &fcml_si_hints, &fcml_si_chooser, &fcml_si_prefixes, &fcml_si_segment_reg, &fcml_si_disassembler, &fcml_si_assembler, &fcml_si_general_usage, FCML_STF_NULL_SUITE }; int main(int argc, char **argv) { fcml_ceh_error error; fcml_bool result = FCML_TRUE; error = fcml_fn_dialect_init_intel( FCML_INTEL_DIALECT_CF_DEFAULT, &dialect_intel ); if( error ) { exit(1); } error = fcml_fn_dialect_init_gas( FCML_GAS_DIALECT_CF_DEFAULT, &dialect_gas ); if( error ) { fcml_fn_dialect_free( dialect_intel ); exit(1); } assembler_intel = NULL; assembler_gas = NULL; error = fcml_fn_assembler_init( dialect_intel, &assembler_intel ); if( error ) { fcml_fn_dialect_free( dialect_intel ); fcml_fn_dialect_free( dialect_gas ); printf("Can not initialize INTEL assembler.\n"); exit(1); } error = fcml_fn_assembler_init( dialect_gas, &assembler_gas ); if( error ) { fcml_fn_assembler_free( assembler_intel ); fcml_fn_dialect_free( dialect_intel ); fcml_fn_dialect_free( dialect_gas ); printf("Can not initialize AT&T assembler.\n"); exit(1); } error = fcml_fn_disassembler_init( dialect_intel, &disassembler_intel ); if( error ) { /* Error.*/ fcml_fn_assembler_free( assembler_intel ); fcml_fn_assembler_free( assembler_gas ); fcml_fn_dialect_free( dialect_intel ); fcml_fn_dialect_free( dialect_gas ); printf( "Can not allocate INTEL disassembler.\n" ); exit(1); } error = fcml_fn_disassembler_init( dialect_gas, &disassembler_gas ); if( error ) { /* Error.*/ fcml_fn_disassembler_free( disassembler_intel ); fcml_fn_assembler_free( assembler_intel ); fcml_fn_assembler_free( assembler_gas ); fcml_fn_dialect_free( dialect_intel ); fcml_fn_dialect_free( dialect_gas ); printf( "Can not allocate AT&T disassembler.\n" ); exit(1); } /* Run tests.*/ result = fcml_stf_run_tests( "Public API tests", fcml_arr_suites ); fcml_fn_disassembler_free( disassembler_intel ); fcml_fn_disassembler_free( disassembler_gas ); fcml_fn_assembler_free( assembler_intel ); fcml_fn_assembler_free( assembler_gas ); fcml_fn_dialect_free( dialect_intel ); fcml_fn_dialect_free( dialect_gas ); exit( result ? 0 : 1 ); } fcml-1.1.1/check/public-tests/instructions_a_t.h0000644000175000017500000000171412560745216016622 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_A_H_ #define INS_A_H_ #include extern fcml_stf_test_suite fctl_si_instructions_a; #endif /* INS_A_H_ */ fcml-1.1.1/check/public-tests/instructions_n_t.c0000644000175000017500000001007312560745216016630 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "instructions_n_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_n_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_n_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_NEG(void) { FCML_I32( "lock neg byte ptr [eax]", 0xF0, 0xF6, 0x18 ); FCML_I32( "xacquire lock neg byte ptr [eax]", 0xF2, 0xF0, 0xF6, 0x18 ); FCML_I32( "xrelease lock neg byte ptr [eax]", 0xF3, 0xF0, 0xF6, 0x18 ); FCML_I64_D( "neg byte ptr [rax]", 0x48, 0xF6, 0x18); FCML_I64( "neg byte ptr [rax]", 0xF6, 0x18); FCML_I32( "lock neg word ptr [eax]", 0xF0, 0x66, 0xF7, 0x18 ); FCML_I32( "xacquire lock neg word ptr [eax]", 0xF2, 0xF0, 0x66, 0xF7, 0x18 ); FCML_I32( "xrelease lock neg word ptr [eax]", 0xF3, 0xF0, 0x66, 0xF7, 0x18 ); FCML_I32( "neg dword ptr [eax]", 0xF7, 0x18 ); FCML_I64( "neg qword ptr [rax]", 0x48, 0xF7, 0x18 ); FCML_A64( "lock negb (%rax)", 0xf0, 0xf6, 0x18 ); FCML_A64( "xacquire lock negb (%rax)", 0xf2, 0xf0, 0xf6, 0x18 ); FCML_A64( "lock negw (%rax)", 0xf0, 0x66, 0xf7, 0x18 ); FCML_A64( "negl (%rax)", 0xf7, 0x18 ); FCML_A64( "negq (%rax)", 0x48, 0xf7, 0x18 ); } void fcml_tf_instruction_NOP(void) { FCML_I32( "nop", 0x90 ); FCML_I64( "nop", 0x90 ); FCML_I32( "nop word ptr [eax]", 0x66, 0x0f, 0x1f, 0x00 ); FCML_I32( "nop dword ptr [eax]", 0x0f, 0x1f, 0x00 ); FCML_I64( "nop qword ptr [rax]", 0x48, 0x0f, 0x1f, 0x00 ); FCML_A64( "nop", 0x90 ); FCML_A64( "nopw (%rax)", 0x66, 0x0f, 0x1f, 0x00 ); FCML_A64( "nopl (%rax)", 0x0f, 0x1f, 0x00 ); FCML_A64( "nop %eax", 0x0f, 0x1f, 0xc0 ); FCML_A64( "nopq (%rax)", 0x48, 0x0f, 0x1f, 0x00 ); FCML_A64( "add %cl,(%rdi)", 0x00, 0x0f ); } void fcml_tf_instruction_NOT(void) { FCML_I32( "lock not byte ptr [eax]", 0xF0, 0xF6, 0x10 ); FCML_I32( "xacquire lock not byte ptr [eax]", 0xF2, 0xF0, 0xF6, 0x10 ); FCML_I32( "xrelease lock not byte ptr [eax]", 0xF3, 0xF0, 0xF6, 0x10 ); FCML_I64_D( "not byte ptr [rax]", 0x48, 0xF6, 0x10 ); FCML_I64( "not byte ptr [rax]", 0xF6, 0x10 ); FCML_I32( "lock not word ptr [eax]", 0xF0, 0x66, 0xF7, 0x10 ); FCML_I32( "xacquire lock not word ptr [eax]", 0xF2, 0xF0, 0x66, 0xF7, 0x10 ); FCML_I32( "xrelease lock not word ptr [eax]", 0xF3, 0xF0, 0x66, 0xF7, 0x10 ); FCML_I32( "not dword ptr [eax]", 0xF7, 0x10 ); FCML_I64( "not qword ptr [rax]", 0x48, 0xF7, 0x10 ); FCML_A64( "lock notb (%rax)", 0xf0, 0xf6, 0x10 ); FCML_A64( "notb (%rax)", 0xf6, 0x10 ); FCML_A64( "lock notw (%rax)", 0xf0, 0x66, 0xf7, 0x10 ); FCML_A64( "xacquire lock notw (%rax)", 0xf2, 0xf0, 0x66, 0xf7, 0x10 ); FCML_A64( "notl (%rax)", 0xf7, 0x10 ); FCML_A64( "notq (%rax)", 0x48, 0xf7, 0x10 ); FCML_A64( "not %eax", 0xf7, 0xd0 ); FCML_A64_A( "notl %eax", 0xf7, 0xd0 ); } fcml_stf_test_case fctl_ti_instructions_n[] = { { "fcml_tf_instruction_NEG", fcml_tf_instruction_NEG }, { "fcml_tf_instruction_NOP", fcml_tf_instruction_NOP }, { "fcml_tf_instruction_NOT", fcml_tf_instruction_NOT }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_n = { "suite-fctl_ti_instructions_n", fcml_tf_instructions_n_suite_init, fcml_tf_instructions_n_suite_cleanup, fctl_ti_instructions_n }; fcml-1.1.1/check/public-tests/render_t.h0000644000175000017500000000171512560745216015036 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 RENDER_T_H_ #define RENDER_T_H_ #include extern fcml_stf_test_suite fcml_si_render; #endif /* RENDER_T_H_ */ fcml-1.1.1/check/public-tests/disassembler_t.h0000644000175000017500000000174512560745216016237 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 DISASSEMBLER_T_H_ #define DISASSEMBLER_T_H_ #include extern fcml_stf_test_suite fcml_si_disassembler; #endif /* DISASSEMBLER_T_H_ */ fcml-1.1.1/check/public-tests/instructions_v_t.h0000644000175000017500000000171412560745216016647 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_V_H_ #define INS_v_H_ #include extern fcml_stf_test_suite fctl_si_instructions_v; #endif /* INS_V_H_ */ fcml-1.1.1/check/public-tests/instructions_m_t.c0000644000175000017500000017074612560745216016645 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "instructions_m_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_m_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_m_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_MASKMOVQ(void) { FCML_I64( "maskmovq mm3,mm0", 0x0F, 0xF7, 0xD8 ); FCML_I32( "maskmovq mm4,mm0", 0x0F, 0xF7, 0xE0 ); FCML_I32_FAILED( "FAIL", 0x0F, 0xF7, 0x40, 0x20 ); FCML_A64( "maskmovq %mm0,%mm3", 0x0f, 0xf7, 0xd8 ); } void fcml_tf_instruction_MASKMOVDQU(void) { FCML_I64( "maskmovdqu xmm3,xmm0", 0x66, 0x0F, 0xF7, 0xD8 ); FCML_I32( "maskmovdqu xmm4,xmm0", 0x66, 0x0F, 0xF7, 0xE0 ); FCML_I32_FAILED( "FAIL", 0x66, 0x0F, 0xF7, 0x40, 0x20 ); FCML_I3264( "vmaskmovdqu xmm3,xmm0", 0xc5, 0xf9, 0xf7, 0xd8 ); FCML_A3264( "maskmovdqu %xmm0,%xmm3", 0x66, 0x0f, 0xf7, 0xd8 ); FCML_A3264( "vmaskmovdqu %xmm0,%xmm3", 0xc5, 0xf9, 0xf7, 0xd8 ); } void fcml_tf_instruction_MAXPD(void) { FCML_I64( "maxpd xmm0,xmmword ptr [rax+0000000000000020h]", 0x66, 0x0F, 0x5F, 0x40, 0x20 ); FCML_I32( "maxpd xmm0,xmm2", 0x66, 0x0F, 0x5F, 0xC2 ); FCML_I32( "maxpd xmm0,xmmword ptr [eax+00000020h]", 0x66, 0x0F, 0x5F, 0x40, 0x20 ); FCML_I64( "vmaxpd xmm3,xmm0,xmm0", 0xc5, 0xf9, 0x5f, 0xd8 ); FCML_I32( "vmaxpd ymm3,ymm0,ymm0", 0xc5, 0xfd, 0x5f, 0xd8 ); FCML_I32( "vmaxpd ymm3,ymm3,ymmword ptr [eax]", 0xc5, 0xe5, 0x5f, 0x18 ); FCML_A64( "maxpd 0x0000000000000020(%rax),%xmm0", 0x66, 0x0f, 0x5f, 0x40, 0x20 ); FCML_A64( "vmaxpd %xmm0,%xmm0,%xmm3", 0xc5, 0xf9, 0x5f, 0xd8 ); } void fcml_tf_instruction_MAXPS(void) { FCML_I64( "maxps xmm0,xmmword ptr [rax+0000000000000020h]", 0x0F, 0x5F, 0x40, 0x20 ); FCML_I32( "maxps xmm0,xmm2", 0x0F, 0x5F, 0xC2 ); FCML_I32( "maxps xmm0,xmmword ptr [eax+00000020h]", 0x0F, 0x5F, 0x40, 0x20 ); FCML_I64( "vmaxps xmm3,xmm0,xmm0", 0xc5, 0xf8, 0x5f, 0xd8 ); FCML_I32( "vmaxps ymm3,ymm0,ymm0", 0xc5, 0xfc, 0x5f, 0xd8 ); FCML_I32( "vmaxps ymm3,ymm3,ymmword ptr [eax]", 0xc5, 0xe4, 0x5f, 0x18 ); FCML_A64( "maxps 0x0000000000000020(%rax),%xmm0", 0x0f, 0x5f, 0x40, 0x20 ); FCML_A64( "vmaxps %xmm0,%xmm0,%xmm3", 0xc5, 0xf8, 0x5f, 0xd8 ); } void fcml_tf_instruction_MAXSD(void) { FCML_I64( "maxsd xmm0,mmword ptr [rax+0000000000000020h]", 0xF2, 0x0F, 0x5F, 0x40, 0x20 ); FCML_I32( "maxsd xmm0,xmm2", 0xF2, 0x0F, 0x5F, 0xC2 ); FCML_I32( "maxsd xmm0,mmword ptr [eax+00000020h]", 0xF2, 0x0F, 0x5F, 0x40, 0x20 ); FCML_I64( "vmaxsd xmm3,xmm3,xmm0", 0xc5, 0xe3, 0x5f, 0xd8 ); FCML_I32( "vmaxsd xmm3,xmm7,xmm0", 0xc5, 0xc3, 0x5f, 0xd8 ); FCML_I32_A( "vmaxsd long_form xmm3,xmm7,xmm0", 0xc4, 0xe1, 0x43, 0x5f, 0xd8 ); FCML_I32( "vmaxsd xmm3,xmm0,mmword ptr [eax]", 0xc5, 0xfb, 0x5f, 0x18 ); FCML_A64( "maxsd 0x0000000000000020(%rax),%xmm0", 0xf2, 0x0f, 0x5f, 0x40, 0x20 ); FCML_A64( "vmaxsd %xmm0,%xmm3,%xmm3", 0xc5, 0xe3, 0x5f, 0xd8 ); } void fcml_tf_instruction_MAXSS(void) { FCML_I64( "maxss xmm0,dword ptr [rax+0000000000000020h]", 0xF3, 0x0F, 0x5F, 0x40, 0x20 ); FCML_I32( "maxss xmm0,xmm2", 0xF3, 0x0F, 0x5F, 0xC2 ); FCML_I32( "maxss xmm0,dword ptr [eax+00000020h]", 0xF3, 0x0F, 0x5F, 0x40, 0x20 ); FCML_I64( "vmaxss xmm3,xmm3,xmm0", 0xc5, 0xe2, 0x5f, 0xd8 ); FCML_I32( "vmaxss xmm3,xmm7,xmm0", 0xc5, 0xc2, 0x5f, 0xd8 ); FCML_I32( "vmaxss xmm3,xmm0,dword ptr [eax]", 0xc5, 0xfa, 0x5f, 0x18 ); FCML_A64( "maxss 0x0000000000000020(%rax),%xmm0", 0xf3, 0x0f, 0x5f, 0x40, 0x20 ); FCML_A64( "vmaxss %xmm0,%xmm3,%xmm3", 0xc5, 0xe2, 0x5f, 0xd8 ); } void fcml_tf_instruction_MFENCE(void) { FCML_I3264( "mfence", 0x0F, 0xAE, 0xF0 ); FCML_A64( "mfence", 0x0f, 0xae, 0xf0 ); } void fcml_tf_instruction_MINPD(void) { FCML_I64( "minpd xmm0,xmmword ptr [rax+0000000000000020h]", 0x66, 0x0F, 0x5D, 0x40, 0x20 ); FCML_I32( "minpd xmm0,xmm2", 0x66, 0x0F, 0x5D, 0xC2 ); FCML_I32( "minpd xmm0,xmmword ptr [eax+00000020h]", 0x66, 0x0F, 0x5D, 0x40, 0x20 ); FCML_I64( "vminpd xmm3,xmm0,xmm0", 0xc5, 0xf9, 0x5d, 0xd8 ); FCML_I32( "vminpd ymm3,ymm0,ymm0", 0xc5, 0xfd, 0x5d, 0xd8 ); FCML_I32( "vminpd ymm3,ymm3,ymmword ptr [eax]", 0xc5, 0xe5, 0x5d, 0x18 ); FCML_A64( "minpd 0x0000000000000020(%rax),%xmm0", 0x66, 0x0f, 0x5d, 0x40, 0x20 ); FCML_A64( "vminpd %xmm0,%xmm0,%xmm3", 0xc5, 0xf9, 0x5d, 0xd8 ); } void fcml_tf_instruction_MINPS(void) { FCML_I64( "minps xmm0,xmmword ptr [rax+0000000000000020h]", 0x0F, 0x5D, 0x40, 0x20 ); FCML_I32( "minps xmm0,xmm2", 0x0F, 0x5D, 0xC2 ); FCML_I32( "minps xmm0,xmmword ptr [eax+00000020h]", 0x0F, 0x5D, 0x40, 0x20 ); FCML_I64( "vminps xmm3,xmm0,xmm0", 0xc5, 0xf8, 0x5d, 0xd8 ); FCML_I32( "vminps ymm3,ymm0,ymm0", 0xc5, 0xfc, 0x5d, 0xd8 ); FCML_I32( "vminps ymm3,ymm3,ymmword ptr [eax]", 0xc5, 0xe4, 0x5d, 0x18 ); FCML_A64( "minps 0x0000000000000020(%rax),%xmm0", 0x0f, 0x5d, 0x40, 0x20 ); FCML_A64( "vminps %xmm0,%xmm0,%xmm3", 0xc5, 0xf8, 0x5d, 0xd8 ); } void fcml_tf_instruction_MINSD(void) { FCML_I64( "minsd xmm0,mmword ptr [rax+0000000000000020h]", 0xF2, 0x0F, 0x5D, 0x40, 0x20 ); FCML_I32( "minsd xmm0,xmm2", 0xF2, 0x0F, 0x5D, 0xC2 ); FCML_I32( "minsd xmm0,mmword ptr [eax+00000020h]", 0xF2, 0x0F, 0x5D, 0x40, 0x20 ); FCML_I64( "vminsd xmm3,xmm0,xmm0", 0xc5, 0xfb, 0x5d, 0xd8 ); FCML_I32( "vminsd xmm3,xmm0,xmm0", 0xc5, 0xfb, 0x5d, 0xd8 ); FCML_I32( "vminsd xmm3,xmm3,mmword ptr [eax]", 0xc5, 0xe3, 0x5d, 0x18 ); FCML_A64( "minsd 0x0000000000000020(%rax),%xmm0", 0xf2, 0x0f, 0x5d, 0x40, 0x20 ); FCML_A64( "vminsd %xmm0,%xmm0,%xmm3", 0xc5, 0xfb, 0x5d, 0xd8 ); } void fcml_tf_instruction_MINSS(void) { FCML_I64( "minss xmm0,dword ptr [rax+0000000000000020h]", 0xF3, 0x0F, 0x5D, 0x40, 0x20 ); FCML_I32( "minss xmm0,xmm2", 0xF3, 0x0F, 0x5D, 0xC2 ); FCML_I32( "minss xmm0,dword ptr [eax+00000020h]", 0xF3, 0x0F, 0x5D, 0x40, 0x20 ); FCML_I64( "vminss xmm3,xmm0,xmm0", 0xc5, 0xfa, 0x5d, 0xd8 ); FCML_I32( "vminss xmm3,xmm0,xmm0", 0xc5, 0xfa, 0x5d, 0xd8 ); FCML_A64( "minss 0x0000000000000020(%rax),%xmm0", 0xf3, 0x0f, 0x5d, 0x40, 0x20 ); FCML_A64( "vminss %xmm0,%xmm0,%xmm3", 0xc5, 0xfa, 0x5d, 0xd8 ); } void fcml_tf_instruction_MONITOR(void) { FCML_I64( "monitor rax,rcx,rdx", 0x0F, 0x01, 0xC8 ); FCML_I32_A( "monitor", 0x0F, 0x01, 0xC8 ); FCML_A64( "monitor %rax,%rcx,%rdx", 0x0f, 0x01, 0xc8 ); FCML_I32_A( "monitor", 0x0F, 0x01, 0xC8 ); } void fcml_tf_instruction_MOV(void) { FCML_I32( "mov eax,dr2", 0x0F, 0x21, 0xD0 ); FCML_I32( "mov eax,dr2", 0x66, 0x0F, 0x21, 0xD0 ); FCML_I64_D( "mov rax,dr2", 0x66, 0x0F, 0x21, 0xD0 ); FCML_I64_D( "mov rax,dr2", 0x48, 0x0F, 0x21, 0xD0 ); FCML_I64( "mov rax,dr2", 0x0F, 0x21, 0xD0 ); FCML_I32( "mov dr2,eax", 0x0F, 0x23, 0xD0 ); FCML_I32( "mov dr2,eax", 0x66, 0x0F, 0x23, 0xD0 ); FCML_I64_D( "mov dr2,rax", 0x66, 0x0F, 0x23, 0xD0 ); FCML_I64_D( "mov dr2,rax", 0x48, 0x0F, 0x23, 0xD0 ); FCML_I64( "mov dr2,rax", 0x0F, 0x23, 0xD0 ); FCML_A64( "mov %db2,%rax", 0x0f, 0x21, 0xd0 ); FCML_A64( "mov %rax,%db2", 0x0f, 0x23, 0xd0 ); FCML_I32( "mov eax,dr0", 0x0F, 0x21, 0xC0 ); FCML_I32( "mov eax,dr1", 0x0F, 0x21, 0xC8 ); FCML_I32( "mov eax,dr2", 0x0F, 0x21, 0xD0 ); FCML_I32( "mov eax,dr3", 0x0F, 0x21, 0xD8 ); FCML_I32( "mov eax,dr4", 0x0F, 0x21, 0xE0 ); FCML_I32( "mov eax,dr5", 0x0F, 0x21, 0xE8 ); FCML_I32( "mov eax,dr6", 0x0F, 0x21, 0xF0 ); FCML_I32( "mov eax,dr7", 0x0F, 0x21, 0xF8 ); FCML_I64_D( "mov rax,", 0x44, 0x0F, 0x21, 0xC0 ); FCML_I64_D( "mov rax,", 0x44, 0x0F, 0x21, 0xC8 ); FCML_I64_D( "mov rax,", 0x44, 0x0F, 0x21, 0xD0 ); FCML_I64_D( "mov rax,", 0x44, 0x0F, 0x21, 0xD8 ); FCML_I64_D( "mov rax,", 0x44, 0x0F, 0x21, 0xE0 ); FCML_I64_D( "mov rax,", 0x44, 0x0F, 0x21, 0xE8 ); FCML_I64_D( "mov rax,", 0x44, 0x0F, 0x21, 0xF0 ); FCML_I64_D( "mov rax,", 0x44, 0x0F, 0x21, 0xF8 ); FCML_I32( "mov eax,cr2", 0x0F, 0x20, 0xD0 ); FCML_I32( "mov eax,cr2", 0x66, 0x0F, 0x20, 0xD0 ); FCML_I64_D( "mov rax,cr2", 0x66, 0x0F, 0x20, 0xD0 ); FCML_I64_D( "mov rax,cr2", 0x48, 0x0F, 0x20, 0xD0 ); FCML_I64( "mov rax,cr2", 0x0F, 0x20, 0xD0 ); FCML_I32( "mov cr2,eax", 0x0F, 0x22, 0xD0 ); FCML_I32_D( "mov cr2,eax", 0x66, 0x0F, 0x22, 0xD0 ); FCML_I64_D( "mov cr2,rax", 0x66, 0x0F, 0x22, 0xD0 ); FCML_I64_D( "mov cr2,rax", 0x48, 0x0F, 0x22, 0xD0 ); FCML_I64( "mov cr2,rax", 0x0F, 0x22, 0xD0 ); FCML_I32_D( "mov eax,cr0", 0x0F, 0x20, 0xC0 ); FCML_I32_D( "mov eax,", 0x0F, 0x20, 0xC8 ); FCML_I32_D( "mov eax,cr2", 0x0F, 0x20, 0xD0 ); FCML_I32_D( "mov eax,cr3", 0x0F, 0x20, 0xD8 ); FCML_I32_D( "mov eax,cr4", 0x0F, 0x20, 0xE0 ); FCML_I32_D( "mov eax,", 0x0F, 0x20, 0xE8 ); FCML_I32_D( "mov eax,", 0x0F, 0x20, 0xF0 ); FCML_I32_D( "mov eax,", 0x0F, 0x20, 0xF8 ); FCML_I64_D( "mov rax,cr8", 0x44, 0x0F, 0x20, 0xC0 ); FCML_I64_D( "mov rax,", 0x44, 0x0F, 0x20, 0xC8 ); FCML_I64_D( "mov rax,", 0x44, 0x0F, 0x20, 0xD0 ); FCML_I64_D( "mov rax,", 0x44, 0x0F, 0x20, 0xD8 ); FCML_I64_D( "mov rax,", 0x44, 0x0F, 0x20, 0xE0 ); FCML_I64_D( "mov rax,", 0x44, 0x0F, 0x20, 0xE8 ); FCML_I64_D( "mov rax,", 0x44, 0x0F, 0x20, 0xF0 ); FCML_I64_D( "mov rax,", 0x44, 0x0F, 0x20, 0xF8 ); FCML_A64( "mov %cr2,%rax", 0x0f, 0x20, 0xd0 ); FCML_A64( "mov %rax,%cr2", 0x0f, 0x22, 0xd0 ); FCML_I64_D( "mov byte ptr [rax],dl", 0x48, 0x88, 0x10 ); FCML_I64( "mov byte ptr [rax],dl", 0x88, 0x10 ); FCML_I32( "mov byte ptr [eax],dl", 0x88, 0x10 ); FCML_I32( "xrelease mov byte ptr [eax],dl", 0xF3, 0x88, 0x10 ); FCML_I32_A_FAILED( "xacquire mov byte ptr [eax],dl", 0xF2, 0x88, 0x10 ); FCML_A64( "mov %dl,(%rax)", 0x88, 0x10 ); FCML_A64( "xrelease mov %dl,(%rax)", 0xf3, 0x88, 0x10 ); FCML_I64( "mov qword ptr [rax],rdx", 0x48, 0x89, 0x10 ); FCML_I32( "mov dword ptr [eax],edx", 0x89, 0x10 ); FCML_I32( "mov word ptr [eax],dx", 0x66, 0x89, 0x10 ); FCML_I32( "xrelease mov word ptr [eax],dx", 0xF3, 0x66, 0x89, 0x10 ); FCML_I32_A_FAILED( "xacquire mov word ptr [eax],dx", 0xF2, 0x66, 0x89, 0x10 ); FCML_A64( "mov %rdx,(%rax)", 0x48, 0x89, 0x10 ); FCML_A64( "xrelease mov %dx,(%rax)", 0xf3, 0x66, 0x89, 0x10 ); FCML_I64_D( "mov dl,byte ptr [rax]", 0x48, 0x8A, 0x10 ); FCML_I64( "mov dl,byte ptr [rax]", 0x8A, 0x10 ); FCML_I32( "mov dl,byte ptr [eax]", 0x8A, 0x10 ); FCML_A64( "mov (%rax),%dl", 0x8a, 0x10 ); FCML_I64( "mov rdx,qword ptr [rax]", 0x48, 0x8B, 0x10 ); FCML_I32( "mov edx,dword ptr [eax]", 0x8B, 0x10 ); FCML_I32( "mov dx,word ptr [eax]", 0x66, 0x8B, 0x10 ); FCML_A64( "mov (%rax),%rdx", 0x48, 0x8b, 0x10 ); FCML_A64( "mov (%rax),%edx", 0x8b, 0x10 ); FCML_I32( "mov eax,ss", 0x8C, 0xD0 ); FCML_I32( "mov ax,ss", 0x66, 0x8C, 0xD0 ); FCML_I64( "mov rax,ss", 0x48, 0x8C, 0xD0 ); FCML_I32( "mov word ptr [eax],ss", 0x8C, 0x10 ); FCML_I32_A( "mov word ptr [eax],ss", 0x8C, 0x10 ); FCML_I32( "mov word ptr [eax],ss", 0x66, 0x8C, 0x10 ); FCML_I64( "mov word ptr [rax],ss", 0x8C, 0x10 ); FCML_A32( "mov %ss,%eax", 0x8C, 0xD0 ); FCML_A32( "mov %ss,%ax", 0x66, 0x8C, 0xD0 ); FCML_A64( "mov %ss,%rax", 0x48, 0x8C, 0xD0 ); FCML_A64( "mov %ss,(%rax)", 0x8C, 0x10 ); FCML_I64( "mov rax,ss", 0x48, 0x8C, 0xD0 ); FCML_I32( "mov ds,bx", 0x8E, 0xDB ); FCML_I64( "mov ds,bx", 0x8E, 0xDB ); FCML_I64( "mov ds,word ptr [rbx]", 0x8E, 0x1B ); FCML_I64_A( "mov ds,[rbx]", 0x8E, 0x1B ); FCML_I64_A_FAILED( "mov ds,ebx", 0x8E, 0xDB ); FCML_I64_A_FAILED( "mov ds,rbx", 0x48, 0x8E, 0xDB ); FCML_A32( "mov %bx,%ds", 0x8e, 0xdb ); FCML_I32_M( "mov al,byte ptr [40302010h]", 2, FCML_MI( 0xA0, 0x10, 0x20, 0x30, 0x40 ), FCML_MI( 0x8a, 0x05, 0x10, 0x20, 0x30, 0x40 ) ); FCML_I32_M( "mov al,byte ptr [2010h]", 2, FCML_MI( 0x67, 0xA0, 0x10, 0x20 ), FCML_MI( 0x67, 0x8a, 0x06, 0x10, 0x20 ) ); FCML_I64( "mov al,byte ptr [5352515040302010h]", 0xA0, 0x10, 0x20, 0x30, 0x40, 0x50, 0x51, 0x52, 0x53 ); FCML_I64_M( "mov al,byte ptr [40302010h]", 2, FCML_MI( 0x67, 0xa0, 0x10, 0x20, 0x30, 0x40 ), FCML_MI( 0x67, 0x8a, 0x04, 0x25, 0x10, 0x20, 0x30, 0x40 ) ); FCML_A64( "movabs 0x5352515040302010,%al", 0xa0, 0x10, 0x20, 0x30, 0x40, 0x50, 0x51, 0x52, 0x53 ); FCML_A64( "movabs 0x0000000089482010,%al", 0xa0, 0x10, 0x20, 0x48, 0x89, 0x00, 0x00, 0x00, 0x00 ); FCML_A64_M( "mov 0x89482010,%al", 2, FCML_MI( 0x67, 0xa0, 0x10, 0x20, 0x48, 0x89 ), FCML_MI( 0x67, 0x8a, 0x04, 0x25, 0x10, 0x20, 0x48, 0x89 ) ); FCML_A32_M_A( "mov 0x89482010,%al", 2, FCML_MI( 0xa0, 0x10, 0x20, 0x48, 0x89 ), FCML_MI( 0x8a, 0x05, 0x10, 0x20, 0x48, 0x89 ) ); FCML_I32_M( "mov eax,dword ptr [40302010h]", 2, FCML_MI( 0xA1, 0x10, 0x20, 0x30, 0x40 ), FCML_MI( 0x8b, 0x05, 0x10, 0x20, 0x30, 0x40 ) ); FCML_I32_M( "mov ax,word ptr [2010h]", 2, FCML_MI( 0x66, 0x67, 0xA1, 0x10, 0x20 ), FCML_MI( 0x66, 0x67, 0x8B, 0x06, 0x10, 0x20 ) ); FCML_I32_M( "mov ax,word ptr [40302010h]", 2, FCML_MI( 0x66, 0xA1, 0x10, 0x20, 0x30, 0x040 ), FCML_MI( 0x66, 0x8B, 0x05, 0x10, 0x20, 0x30, 0x040 ) ); FCML_I64( "mov eax,dword ptr [5352515040302010h]", 0xA1, 0x10, 0x20, 0x30, 0x40, 0x50, 0x51, 0x52, 0x53 ); FCML_I64( "mov ax,word ptr [5352515040302010h]", 0x66, 0xA1, 0x10, 0x20, 0x30, 0x40, 0x50, 0x51, 0x52, 0x53 ); FCML_I64( "mov rax,qword ptr [5352515040302010h]", 0x48, 0xA1, 0x10, 0x20, 0x30, 0x40, 0x50, 0x51, 0x52, 0x53 ); FCML_I64_M( "mov ax,word ptr [40302010h]", 2, FCML_MI( 0x66, 0x67, 0xa1, 0x10, 0x20, 0x30, 0x40 ), FCML_MI( 0x66, 0x67, 0x8b, 0x04, 0x25, 0x10, 0x20, 0x30, 0x40 ) ); FCML_A64( "movabs 0x5352515040302010,%eax", 0xa1, 0x10, 0x20, 0x30, 0x40, 0x50, 0x51, 0x52, 0x53 ); FCML_A64( "movabs 0x5352515040302010,%ax", 0x66, 0xa1, 0x10, 0x20, 0x30, 0x40, 0x50, 0x51, 0x52, 0x53 ); FCML_A32_M_A( "mov 0x40302010,%eax", 2, FCML_MI( 0xa1, 0x10, 0x20, 0x30, 0x40 ), FCML_MI( 0x8b, 0x05, 0x10, 0x20, 0x30, 0x40 ) ); FCML_I32_M( "mov byte ptr [40302010h],al", 2, FCML_MI( 0xA2, 0x10, 0x20, 0x30, 0x40 ), FCML_MI( 0x88, 0x05, 0x10, 0x20, 0x30, 0x40 ) ); FCML_I32_M( "mov byte ptr [2010h],al", 2, FCML_MI( 0x67, 0xA2, 0x10, 0x20 ), FCML_MI( 0x67, 0x88, 0x06, 0x10, 0x20 ) ); FCML_I64( "mov byte ptr [5352515040302010h],al", 0xA2, 0x10, 0x20, 0x30, 0x40, 0x50, 0x51, 0x52, 0x53 ); FCML_I64_M( "mov byte ptr [40302010h],al", 2, FCML_MI( 0x67, 0xa2, 0x10, 0x20, 0x30, 0x40 ), FCML_MI( 0x67, 0x88, 0x04, 0x25, 0x10, 0x20, 0x30, 0x40 ) ); FCML_A32_M( "mov %al,0x2010", 3, FCML_MI( 0x67, 0xa2, 0x10, 0x20 ), FCML_MI( 0xa2, 0x10, 0x20, 0x00, 0x00 ), FCML_MI( 0x67, 0x88, 0x06, 0x10, 0x20 ) ); FCML_A64( "movabs %al,0x5352515040302010", 0xA2, 0x10, 0x20, 0x30, 0x40, 0x50, 0x51, 0x52, 0x53 ); FCML_I32_M( "mov dword ptr [40302010h],eax", 2, FCML_MI( 0xA3, 0x10, 0x20, 0x30, 0x40 ), FCML_MI( 0x89, 0x05, 0x10, 0x20, 0x30, 0x40 ) ); FCML_I32_M( "mov word ptr [2010h],ax", 2, FCML_MI( 0x66, 0x67, 0xA3, 0x10, 0x20 ), FCML_MI( 0x66, 0x67, 0x89, 0x06, 0x10, 0x20 ) ); FCML_I32_M( "mov word ptr [40302010h],ax", 2, FCML_MI( 0x66, 0xA3, 0x10, 0x20, 0x30, 0x040 ), FCML_MI( 0x66, 0x89, 0x05, 0x10, 0x20, 0x30, 0x040 ) ); FCML_I64( "mov dword ptr [5352515040302010h],eax", 0xA3, 0x10, 0x20, 0x30, 0x40, 0x50, 0x51, 0x52, 0x53 ); FCML_I64( "mov word ptr [5352515040302010h],ax", 0x66, 0xA3, 0x10, 0x20, 0x30, 0x40, 0x50, 0x51, 0x52, 0x53 ); FCML_I64( "mov qword ptr [5352515040302010h],rax", 0x48, 0xA3, 0x10, 0x20, 0x30, 0x40, 0x50, 0x51, 0x52, 0x53 ); FCML_I64_M( "mov word ptr [40302010h],ax", 2, FCML_MI( 0x66, 0x67, 0xa3, 0x10, 0x20, 0x30, 0x40 ), FCML_MI( 0x66, 0x67, 0x89, 0x04, 0x25, 0x10, 0x20, 0x30, 0x40 ) ); FCML_A32_M( "mov %ax,0x2010", 3, FCML_MI( 0x66, 0x67, 0xa3, 0x10, 0x20 ), FCML_MI( 0x66, 0xa3, 0x10, 0x20, 0x00, 0x00 ), FCML_MI( 0x66, 0x67, 0x89, 0x06, 0x10, 0x20 ) ); FCML_A64( "movabs %rax,0x5352515040302010", 0x48, 0xA3, 0x10, 0x20, 0x30, 0x40, 0x50, 0x51, 0x52, 0x53 ); FCML_I32_M( "mov al,0d0h", 2, FCML_MI( 0xB0, 0xD0 ), FCML_MI( 0xC6, 0xC0, 0xD0 ) ); FCML_I32_M( "mov cl,0d0h", 2, FCML_MI( 0xB1, 0xD0 ), FCML_MI( 0xC6, 0xC1, 0xD0 ) ); FCML_I32_M( "mov al,0d0h", 2, FCML_MI( 0x66, 0xB0, 0xD0 ), FCML_MI( 0x66, 0xC6, 0xC0, 0xD0 ) ); FCML_I64_M( "mov al,0d0h", 2, FCML_MI( 0xB0, 0xD0 ), FCML_MI( 0xC6, 0xC0, 0xD0 ) ); FCML_A32_M( "mov $0xd0,%al", 2, FCML_MI( 0xb0, 0xd0 ), FCML_MI( 0xc6, 0xc0, 0xd0 ) ); FCML_I32_M( "mov eax,0d1d0d0d0h", 2, FCML_MI( 0xB8, 0xD0, 0xD0, 0xD0, 0xD1 ), FCML_MI( 0xC7, 0xC0, 0xD0, 0xD0, 0xD0, 0xD1 ) ); FCML_I32_M( "mov ecx,0d1d0d0d0h", 2 ,FCML_MI( 0xB9, 0xD0, 0xD0, 0xD0, 0xD1 ), FCML_MI( 0xC7, 0xC1, 0xD0, 0xD0, 0xD0, 0xD1 ) ); FCML_I32_M( "mov ax,0d1d0h", 2, FCML_MI( 0x66, 0xB8, 0xD0, 0xD1 ), FCML_MI( 0x66, 0xc7, 0xc0, 0xd0, 0xd1 ) ); FCML_I64( "mov rax,0d1d0d0d0d1d0d0d0h", 0x48, 0xB8, 0xD0, 0xD0, 0xD0, 0xD1, 0xD0, 0xD0, 0xD0, 0xD1); FCML_I64_M( "mov ax,0d0d0h", 2, FCML_MI( 0x66, 0xB8, 0xD0, 0xD0 ), FCML_MI( 0x66, 0xc7, 0xc0, 0xd0, 0xd0 ) ); FCML_A32_M( "mov $0xd1d0,%ax", 2, FCML_MI( 0x66, 0xB8, 0xD0, 0xD1 ), FCML_MI( 0x66, 0xc7, 0xc0, 0xd0, 0xd1 ) ); FCML_A64( "movabs $0xd1d0d0d0d1d0d0d0,%rax", 0x48, 0xb8, 0xd0, 0xd0, 0xd0, 0xd1, 0xd0, 0xd0, 0xd0, 0xd1 ); FCML_I32( "mov byte ptr [eax+00000010h],20h", 0xC6, 0x40, 0x10, 0x20 ); FCML_I32( "mov byte ptr [eax+00000010h],20h", 0x66, 0xC6, 0x40, 0x10, 0x20 ); FCML_I32_M( "mov al,20h", 2, FCML_MI( 0x66, 0xC6, 0xc0, 0x20 ), FCML_MI( 0x66, 0xb0, 0x20 ) ); FCML_I64_D( "mov byte ptr [rax+0000000000000010h],20h", 0x48, 0xC6, 0x40, 0x10, 0x20); FCML_I64( "mov byte ptr [rax+0000000000000010h],20h", 0xC6, 0x40, 0x10, 0x20); FCML_A64( "movb $0x20,0x0000000000000010(%rax)", 0xc6, 0x40, 0x10, 0x20 ); FCML_A32( "movb $0x20,%al", 0xC6, 0xc0, 0x20 ); FCML_A32_M_A( "mov $0x20,%al", 2, FCML_MI( 0xc6, 0xc0, 0x20 ), FCML_MI( 0xb0, 0x20 ) ); FCML_I32( "mov dword ptr [eax+00000010h],40302010h", 0xC7, 0x40, 0x10, 0x10, 0x20, 0x30, 0x40 ); FCML_I32( "mov word ptr [eax+00000010h],2010h", 0x66, 0xC7, 0x40, 0x10, 0x10, 0x20 ); FCML_I32_M( "mov ax,2010h", 2, FCML_MI( 0x66, 0xb8, 0x10, 0x20 ), FCML_MI( 0x66, 0xc7, 0xc0, 0x10, 0x20 ) ); FCML_I64( "mov qword ptr [rax+0000000000000010h],0000000040302010h", 0x48, 0xC7, 0x40, 0x10, 0x10, 0x20, 0x30, 0x40 ); FCML_I64( "mov qword ptr [rbp+rbx*8+0000000040302010h],0ffffffff80706050h", 0x48, 0xC7, 0x84, 0xDD, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80 ); FCML_A32( "movl $0x40302010,0x00000010(%eax)", 0xC7, 0x40, 0x10, 0x10, 0x20, 0x30, 0x40 ); FCML_A32( "movw $0x2010,0x00000010(%eax)", 0x66, 0xC7, 0x40, 0x10, 0x10, 0x20 ); FCML_A64( "movq $0xffffffff80706050,0x0000000040302010(%rbp,%rbx,8)", 0x48, 0xc7, 0x84, 0xdd, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80 ); FCML_A64_M( "mov $0x2010,%ax", 2, FCML_MI( 0x66, 0xb8, 0x10, 0x20 ), FCML_MI( 0x66, 0xc7, 0xc0, 0x10, 0x20 ) ); } void fcml_tf_instruction_MOVAPD(void) { FCML_I64( "movapd xmm0,xmmword ptr [rax+0000000000000020h]", 0x66, 0x0F, 0x28, 0x40, 0x20 ); FCML_I64_D( "movapd xmm0,xmmword ptr [rax+0000000000000020h]", 0x66, 0x48, 0x0F, 0x28, 0x40, 0x20 ); FCML_I32_M( "movapd xmm0,xmm2", 2, FCML_MI( 0x66, 0x0F, 0x28, 0xC2 ), FCML_MI( 0x66, 0x0f, 0x29, 0xd0 ) ); FCML_I32( "movapd xmm0,xmmword ptr [eax+00000020h]", 0x66, 0x0F, 0x28, 0x40, 0x20 ); FCML_I64( "movapd xmmword ptr [rax+0000000000000020h],xmm0", 0x66, 0x0F, 0x29, 0x40, 0x20 ); FCML_I64_D( "movapd xmmword ptr [rax+0000000000000020h],xmm0", 0x66, 0x48, 0x0F, 0x29, 0x40, 0x20 ); FCML_I32_M( "movapd xmm2,xmm0", 2, FCML_MI( 0x66, 0x0F, 0x29, 0xC2 ), FCML_MI( 0x66, 0x0f, 0x28, 0xd0 ) ); FCML_I32( "movapd xmmword ptr [eax+00000020h],xmm0", 0x66, 0x0F, 0x29, 0x40, 0x20 ); FCML_I3264_M( "vmovapd xmm3,xmm0", 2, FCML_MI( 0xc5, 0xf9, 0x29, 0xc3 ), FCML_MI( 0xc5, 0xf9, 0x28, 0xd8 ) ); FCML_I32( "vmovapd xmm0,xmmword ptr [eax]", 0xc5, 0xf9, 0x28, 0x00 ); FCML_I64_M( "vmovapd xmm0,xmm3", 2, FCML_MI( 0xc5, 0xf9, 0x29, 0xd8 ), FCML_MI( 0xc5, 0xf9, 0x28, 0xc3 ) ); FCML_I32_M( "vmovapd xmm0,xmm3", 2, FCML_MI( 0xc5, 0xf9, 0x29, 0xd8 ), FCML_MI( 0xc5, 0xf9, 0x28, 0xc3 ) ); FCML_I32( "vmovapd xmmword ptr [eax],xmm0", 0xc5, 0xf9, 0x29, 0x00 ); FCML_A64( "movapd 0x0000000000000020(%rax),%xmm0", 0x66, 0x0f, 0x28, 0x40, 0x20 ); FCML_A64( "movapd %xmm0,0x0000000000000020(%rax)", 0x66, 0x0f, 0x29, 0x40, 0x20 ); FCML_A64( "vmovapd (%rax),%xmm0", 0xc5, 0xf9, 0x28, 0x00 ); FCML_A64( "vmovapd %xmm0,(%rax)", 0xc5, 0xf9, 0x29, 0x00 ); } void fcml_tf_instruction_MOVAPS(void) { FCML_I64( "movaps xmm0,xmmword ptr [rax+0000000000000020h]", 0x0F, 0x28, 0x40, 0x20 ); FCML_I32_M( "movaps xmm0,xmm2", 2, FCML_MI( 0x0f, 0x29, 0xd0 ), FCML_MI( 0x0f, 0x28, 0xc2 ) ); FCML_I32( "movaps xmm0,xmmword ptr [eax+00000020h]", 0x0F, 0x28, 0x40, 0x20 ); FCML_I64( "movaps xmmword ptr [rax+0000000000000020h],xmm0", 0x0F, 0x29, 0x40, 0x20 ); FCML_I32_M( "movaps xmm2,xmm0", 2, FCML_MI( 0x0f, 0x29, 0xc2 ), FCML_MI( 0x0f, 0x28, 0xd0 ) ); FCML_I32( "movaps xmmword ptr [eax+00000020h],xmm0", 0x0F, 0x29, 0x40, 0x20 ); FCML_I64_M( "vmovaps xmm3,xmm0", 2, FCML_MI( 0xc5, 0xf8, 0x29, 0xc3 ), FCML_MI( 0xc5, 0xf8, 0x28, 0xd8 ) ); FCML_I32_M( "vmovaps xmm3,xmm0", 2, FCML_MI( 0xc5, 0xf8, 0x29, 0xc3 ), FCML_MI( 0xc5, 0xf8, 0x28, 0xd8 ) ); FCML_I32_M( "vmovaps ymm3,ymm0", 2, FCML_MI( 0xc5, 0xfc, 0x29, 0xc3 ), FCML_MI( 0xc5, 0xfc, 0x28, 0xd8 ) ); FCML_I32( "vmovaps xmm0,xmmword ptr [eax]", 0xc5, 0xf8, 0x28, 0x00 ); FCML_I64_M( "vmovaps xmm0,xmm3", 2, FCML_MI( 0xc5, 0xf8, 0x29, 0xd8 ), FCML_MI( 0xc5, 0xf8, 0x28, 0xc3 ) ); FCML_I32_M( "vmovaps xmm0,xmm3", 2, FCML_MI( 0xc5, 0xf8, 0x29, 0xd8 ), FCML_MI( 0xc5, 0xf8, 0x28, 0xc3 ) ); FCML_I32( "vmovaps xmmword ptr [eax],xmm0", 0xc5, 0xf8, 0x29, 0x00 ); FCML_I32( "vmovaps ymmword ptr [eax],ymm0", 0xc5, 0xfc, 0x29, 0x00 ); FCML_A64( "movaps 0x0000000000000020(%rax),%xmm0", 0x0f, 0x28, 0x40, 0x20 ); FCML_A64( "movaps %xmm0,0x0000000000000020(%rax)", 0x0f, 0x29, 0x40, 0x20 ); FCML_A64( "vmovaps (%rax),%xmm0", 0xc5, 0xf8, 0x28, 0x00 ); FCML_A64( "vmovaps %ymm0,(%rax)", 0xc5, 0xfc, 0x29, 0x00 ); } void fcml_tf_instruction_MOVBE(void) { FCML_I64( "movbe edx,dword ptr [rax]", 0x0F, 0x38, 0xF0, 0x10 ); FCML_I64( "movbe rdx,qword ptr [rax]", 0x48, 0x0F, 0x38, 0xF0, 0x10 ); FCML_I32_FAILED( "movbe eax,edx", 0x0F, 0x38, 0xF0, 0xC2 ); FCML_I32( "movbe dx,word ptr [eax]", 0x66, 0x0F, 0x38, 0xF0, 0x10 ); FCML_I64( "movbe dword ptr [rax],edx", 0x0F, 0x38, 0xF1, 0x10 ); FCML_I64( "movbe qword ptr [rax],rdx", 0x48, 0x0F, 0x38, 0xF1, 0x10 ); FCML_I32_FAILED( "movbe edx,eax", 0x0F, 0x38, 0xF1, 0xC2 ); FCML_I32( "movbe word ptr [eax],dx", 0x66, 0x0F, 0x38, 0xF1, 0x10 ); FCML_A64( "movbe (%rax),%edx", 0x0f, 0x38, 0xf0, 0x10 ); FCML_A64( "movbe %edx,(%rax)", 0x0f, 0x38, 0xf1, 0x10 ); } void fcml_tf_instruction_MOVQ(void) { FCML_I32( "movq mm0,mmword ptr [eax]", 0x0F, 0x6F, 0x00 ); FCML_I64( "movq mm0,mmword ptr [rax]", 0x0F, 0x6F, 0x00 ); FCML_I64_M_A( "movq mm0,[rax]", 2, FCML_MI( 0x0f, 0x6f, 0x00 ), FCML_MI( 0x48, 0x0f, 0x6e, 0x00 ) ); FCML_I32_D( "movq mm0,mm2", 0x0f, 0x6f, 0xc2 ); FCML_I64_M( "movq mm2,mm0", 2, FCML_MI( 0x0f, 0x6f, 0xd0 ), FCML_MI( 0x0f, 0x7f, 0xc2 ) ); /* GAS (ambigous syntax) */ FCML_A64_M( "movq (%rax),%mm0", 2, FCML_MI( 0x0f, 0x6f, 0x00 ), FCML_MI( 0x48, 0x0f, 0x6e, 0x00 ) ); FCML_A64_M( "movq %mm0,%mm0", 2, FCML_MI( 0x0f, 0x7f, 0xc0 ), FCML_MI( 0x0f, 0x6f, 0xc0 ) ); FCML_I32( "movq mmword ptr [eax],mm0", 0x0F, 0x7F, 0x00 ); FCML_I64( "movq mmword ptr [rax],mm0", 0x0F, 0x7F, 0x00 ); FCML_I64_M( "movq mm0,mm2", 2, FCML_MI( 0x0f, 0x7f, 0xd0 ), FCML_MI( 0x0f, 0x6f, 0xc2 ) ); FCML_A64_M( "movq %mm0,(%rax)", 2, FCML_MI( 0x0f, 0x7f, 0x00 ), FCML_MI( 0x48, 0x0f, 0x7e, 0x00 ) ); FCML_I64_A( "movq mmword ptr [rax],mm2", 0x0f, 0x7f, 0x10 ); FCML_A64_M( "movq %mm2,(%rax)", 2, FCML_MI( 0x0f, 0x7f, 0x10 ), FCML_MI( 0x48, 0x0f, 0x7e, 0x10 ) ); FCML_I32( "movq xmm0,mmword ptr [eax]", 0xF3, 0x0F, 0x7E, 0x00 ); FCML_I64( "movq xmm0,mmword ptr [rax]", 0xF3, 0x0F, 0x7E, 0x00 ); FCML_I64_M( "movq xmm2,xmm0", 2, FCML_MI( 0x66, 0x0f, 0xd6, 0xc2 ), FCML_MI( 0xf3, 0x0f, 0x7e, 0xd0 ) ); FCML_A64_M( "movq (%rax),%xmm0", 2, FCML_MI( 0xf3, 0x0f, 0x7e, 0x00 ), FCML_MI( 0x66, 0x48, 0x0f, 0x6e, 0x00 ) ); FCML_A64_M( "movq %xmm0,%xmm2", 2, FCML_MI( 0x66, 0x0f, 0xd6, 0xc2 ), FCML_MI( 0xf3, 0x0f, 0x7e, 0xd0 ) ); FCML_I32( "movq mmword ptr [eax],xmm0", 0x66, 0x0F, 0xD6, 0x00 ); FCML_I64( "movq mmword ptr [rax],xmm0", 0x66, 0x0F, 0xD6, 0x00 ); FCML_I64_M( "movq xmm0,xmm2", 2, FCML_MI( 0x66, 0x0f, 0xd6, 0xd0 ), FCML_MI( 0xf3, 0x0f, 0x7e, 0xc2 ) ); FCML_A64_M( "movq %xmm0,(%rax)", 2, FCML_MI( 0x66, 0x0f, 0xd6, 0x00 ), FCML_MI( 0x66, 0x48, 0x0f, 0x7e, 0x00 ) ); FCML_A64_M( "movq %xmm2,%xmm0", 2, FCML_MI( 0x66, 0x0f, 0xd6, 0xd0 ), FCML_MI( 0xf3, 0x0f, 0x7e, 0xc2 ) ); FCML_I32( "vmovq xmm0,mmword ptr [eax]", 0xc5, 0xfa, 0x7e, 0x00 ); FCML_I32_M( "vmovq xmm0,xmm0", 2, FCML_MI( 0xc5, 0xf9, 0xd6, 0xc0 ), FCML_MI( 0xc5, 0xfa, 0x7e, 0xc0 ) ); FCML_A32( "vmovq (%eax),%xmm0", 0xc5, 0xfa, 0x7e, 0x00 ); FCML_I32( "vmovq mmword ptr [eax],xmm0", 0xc5, 0xf9, 0xd6, 0x00 ); FCML_I32_M( "vmovq xmm0,xmm0", 2, FCML_MI( 0xc5, 0xf9, 0xd6, 0xc0 ), FCML_MI( 0xc5, 0xfa, 0x7e, 0xc0 ) ); FCML_A32( "vmovq %xmm0,(%eax)", 0xc5, 0xf9, 0xd6, 0x00 ); FCML_A32_M( "vmovq %xmm0,%xmm0", 2, FCML_MI( 0xc5, 0xf9, 0xd6, 0xc0 ), FCML_MI( 0xc5, 0xfa, 0x7e, 0xc0 ) ); FCML_I64( "vmovq mmword ptr [rcx+rax],xmm2", 0xc5, 0xf9, 0xd6, 0x14, 0x01 ); FCML_A64_M( "vmovq %xmm2,(%rcx,%rax)", 2, FCML_MI( 0xc5, 0xf9, 0xd6, 0x14, 0x01 ), FCML_MI( 0xc4, 0xe1, 0xf9, 0x7e, 0x14, 0x01 ) ); FCML_I64_M( "movq mm2,qword ptr [rax]", 2, FCML_MI( 0x48, 0x0f, 0x6e, 0x10 ), FCML_MI( 0x0f, 0x6f, 0x10 ) ); FCML_A64_M( "movq (%rax),%mm2", 2,FCML_MI( 0x48, 0x0f, 0x6e, 0x10 ), FCML_MI( 0x0f, 0x6f, 0x10 ) ); FCML_A64( "movq %rax,%mm0", 0x48, 0x0f, 0x6e, 0xc0 ); FCML_I64_A( "movq xmm2,mmword ptr [rax]", 0xf3, 0x0f, 0x7e, 0x10 ); FCML_A64_M( "movq (%rax),%xmm2", 2, FCML_MI( 0xf3, 0x0f, 0x7e, 0x10 ), FCML_MI( 0x66, 0x48, 0x0f, 0x6e, 0x10 ) ); FCML_I64_M( "movq qword ptr [rax],xmm2", 2, FCML_MI( 0x66, 0x48, 0x0f, 0x7e, 0x10 ), FCML_MI( 0x66, 0x0f, 0xd6, 0x10 ) ); FCML_A64_M( "movq %xmm2,(%rax)", 2, FCML_MI( 0x66, 0x48, 0x0f, 0x7e, 0x10 ), FCML_MI( 0x66, 0x0f, 0xd6, 0x10 ) ); FCML_I64( "vmovq xmm2,mmword ptr [rcx+rax]", 0xc5, 0xfa, 0x7e, 0x14, 0x01 ); FCML_A64_M( "vmovq (%rcx,%rax),%xmm2", 2, FCML_MI( 0xc5, 0xfa, 0x7e, 0x14, 0x01 ), FCML_MI( 0xc4, 0xe1, 0xf9, 0x6e, 0x14, 0x01 ) ); } void fcml_tf_instruction_MOVD(void) { FCML_I32( "movd mm2,dword ptr [eax]", 0x0F, 0x6E, 0x10 ); FCML_I64( "movd mm2,dword ptr [rax]", 0x0F, 0x6E, 0x10 ); FCML_A64( "movd (%rax),%mm2", 0x0f, 0x6e, 0x10 ); FCML_A64( "movd %eax,%mm0", 0x0f, 0x6e, 0xc0 ); FCML_I32( "movd dword ptr [eax],mm2", 0x0F, 0x7E, 0x10 ); FCML_I64( "movd dword ptr [rax],mm2", 0x0F, 0x7E, 0x10 ); FCML_A64( "movd %mm2,(%rax)", 0x0f, 0x7e, 0x10 ); FCML_A64( "movd %mm0,%eax", 0x0f, 0x7e, 0xc0 ); FCML_I32( "movd xmm2,dword ptr [eax]", 0x66, 0x0F, 0x6E, 0x10 ); FCML_I64( "movd xmm2,dword ptr [rax]", 0x66, 0x0F, 0x6E, 0x10 ); FCML_A64( "movd (%rax),%xmm2", 0x66, 0x0f, 0x6e, 0x10 ); FCML_A64( "movd %eax,%xmm0", 0x66, 0x0f, 0x6e, 0xc0 ); FCML_I32( "movd dword ptr [eax],xmm2", 0x66, 0x0F, 0x7E, 0x10 ); FCML_I64( "movd dword ptr [rax],xmm2", 0x66, 0x0F, 0x7E, 0x10 ); FCML_A64( "movd %xmm2,(%rax)", 0x66, 0x0f, 0x7e, 0x10 ); FCML_A64( "movd %xmm0,%eax", 0x66, 0x0f, 0x7e, 0xc0 ); FCML_I32( "vmovd xmm2,dword ptr [ecx+eax]", 0xc5, 0xf9, 0x6e, 0x14, 0x01 ); FCML_A64( "vmovd (%rcx,%rax),%xmm2", 0xc5, 0xf9, 0x6e, 0x14, 0x01 ); FCML_A64( "vmovd (%rcx,%rax,8),%xmm2", 0xc5, 0xf9, 0x6e, 0x14, 0xc1 ); FCML_A64( "vmovd %ecx,%xmm0", 0xc5, 0xf9, 0x6e, 0xc1 ); FCML_I32( "vmovd dword ptr [ecx+eax],xmm2", 0xc5, 0xf9, 0x7e, 0x14, 0x01 ); FCML_A64( "vmovd %xmm2,(%rcx,%rax)", 0xc5, 0xf9, 0x7e, 0x14, 0x01 ); FCML_A64( "vmovd %xmm0,%ecx", 0xc5, 0xf9, 0x7e, 0xc1 ); } void fcml_tf_instruction_MOVDDUP(void) { FCML_I32( "movddup xmm2,mmword ptr [eax]", 0xF2, 0x0F, 0x12, 0x10 ); FCML_I32( "movddup xmm3,xmm0", 0xF2, 0x0F, 0x12, 0xD8 ); FCML_I64( "movddup xmm2,mmword ptr [rax]", 0xF2, 0x0F, 0x12, 0x10 ); FCML_A64( "movddup (%rax),%xmm2", 0xf2, 0x0f, 0x12, 0x10 ); FCML_A64( "movddup %xmm0,%xmm3", 0xf2, 0x0f, 0x12, 0xd8 ); FCML_I64( "vmovddup xmm3,xmm0", 0xc5, 0xfb, 0x12, 0xd8 ); FCML_I32( "vmovddup xmm0,mmword ptr [eax]", 0xc5, 0xfb, 0x12, 0x00 ); FCML_I32( "vmovddup ymm3,ymm0", 0xc5, 0xff, 0x12, 0xd8 ); FCML_I64( "vmovddup ymm0,ymmword ptr [rax]", 0xc5, 0xff, 0x12, 0x00 ); FCML_A64( "vmovddup %ymm0,%ymm3", 0xc5, 0xff, 0x12, 0xd8 ); FCML_A64( "vmovddup (%rax),%ymm0", 0xc5, 0xff, 0x12, 0x00 ); FCML_I64_M( "vmovdqu xmm3,xmm0", 2, FCML_MI( 0xc5, 0xfa, 0x7f, 0xc3 ), FCML_MI( 0xc5, 0xfa, 0x6f, 0xd8 ) ); FCML_I32( "vmovdqu ymm0,ymmword ptr [eax]", 0xc5, 0xfe, 0x6f, 0x00 ); FCML_A64_M( "vmovdqu %xmm0,%xmm3", 2, FCML_MI( 0xc5, 0xfa, 0x7f, 0xc3 ), FCML_MI( 0xc5, 0xfa, 0x6f, 0xd8 ) ); FCML_A64( "vmovdqu (%rax),%ymm0", 0xc5, 0xfe, 0x6f, 0x00 ); FCML_I32_M( "vmovdqu xmm0,xmm3", 2, FCML_MI( 0xc5, 0xfa, 0x7f, 0xd8 ), FCML_MI( 0xc5, 0xfa, 0x6f, 0xc3 ) ); FCML_I64( "vmovdqu ymmword ptr [rax],ymm0", 0xc5, 0xfe, 0x7f, 0x00 ); FCML_A64_M( "vmovdqu %xmm3,%xmm0", 2, FCML_MI( 0xc5, 0xfa, 0x7f, 0xd8 ), FCML_MI( 0xc5, 0xfa, 0x6f, 0xc3 ) ); FCML_A64( "vmovdqu %ymm0,(%rax)", 0xc5, 0xfe, 0x7f, 0x00 ); } void fcml_tf_instruction_MOVDQA(void) { FCML_I32( "movdqa xmm2,xmmword ptr [eax]", 0x66, 0x0F, 0x6F, 0x10 ); FCML_I32_M( "movdqa xmm3,xmm0", 2, FCML_MI( 0x66, 0x0f, 0x7f, 0xc3 ), FCML_MI( 0x66, 0x0f, 0x6f, 0xd8 ) ); FCML_I64( "movdqa xmm2,xmmword ptr [rax]", 0x66, 0x0F, 0x6F, 0x10 ); FCML_A64( "movdqa (%rax),%xmm2", 0x66, 0x0f, 0x6f, 0x10 ); FCML_A64_M( "movdqa %xmm0,%xmm3", 2, FCML_MI( 0x66, 0x0f, 0x7f, 0xc3 ), FCML_MI( 0x66, 0x0f, 0x6f, 0xd8 ) ); FCML_I32( "movdqa xmmword ptr [eax],xmm2", 0x66, 0x0F, 0x7F, 0x10 ); FCML_I32_M( "movdqa xmm0,xmm3", 2, FCML_MI( 0x66, 0x0f, 0x7f, 0xd8 ), FCML_MI( 0x66, 0x0f, 0x6f, 0xc3 ) ); FCML_I64( "movdqa xmmword ptr [rax],xmm2", 0x66, 0x0F, 0x7F, 0x10 ); FCML_A64( "movdqa %xmm2,(%rax)", 0x66, 0x0f, 0x7f, 0x10 ); FCML_I64_M( "vmovdqa xmm3,xmm0", 2, FCML_MI( 0xc5, 0xf9, 0x7f, 0xc3 ), FCML_MI( 0xc5, 0xf9, 0x6f, 0xd8 ) ); FCML_I32( "vmovdqa ymm0,ymmword ptr [eax]", 0xc5, 0xfd, 0x6f, 0x00 ); FCML_A64( "vmovdqa (%rax),%ymm0", 0xc5, 0xfd, 0x6f, 0x00 ); FCML_I32_M( "vmovdqa xmm0,xmm3", 2, FCML_MI( 0xc5, 0xf9, 0x7f, 0xd8 ), FCML_MI( 0xc5, 0xf9, 0x6f, 0xc3 ) ); FCML_I64( "vmovdqa ymmword ptr [rax],ymm0", 0xc5, 0xfd, 0x7f, 0x00 ); FCML_A64( "vmovdqa %ymm0,(%rax)", 0xc5, 0xfd, 0x7f, 0x00 ); } void fcml_tf_instruction_MOVDQU(void) { FCML_I32( "movdqu xmm2,xmmword ptr [eax]", 0xF3, 0x0F, 0x6F, 0x10 ); FCML_I32_M( "movdqu xmm3,xmm0", 2, FCML_MI( 0xf3, 0x0f, 0x7f, 0xc3 ), FCML_MI( 0xf3, 0x0f, 0x6f, 0xd8 ) ); FCML_I64( "movdqu xmm2,xmmword ptr [rax]", 0xF3, 0x0F, 0x6F, 0x10 ); FCML_A64_M( "movdqu %xmm0,%xmm3", 2, FCML_MI( 0xf3, 0x0f, 0x7f, 0xc3 ), FCML_MI( 0xf3, 0x0f, 0x6f, 0xd8 ) ); FCML_A64( "movdqu (%rax),%xmm2", 0xf3, 0x0f, 0x6f, 0x10 ); FCML_I32( "movdqu xmmword ptr [eax],xmm2", 0xF3, 0x0F, 0x7F, 0x10 ); FCML_I32_M( "movdqu xmm0,xmm3", 2, FCML_MI( 0xf3, 0x0f, 0x7f, 0xd8 ), FCML_MI( 0xf3, 0x0f, 0x6f, 0xc3 ) ); FCML_I64( "movdqu xmmword ptr [rax],xmm2", 0xF3, 0x0F, 0x7F, 0x10 ); FCML_A64( "movdqu %xmm2,(%rax)", 0xf3, 0x0f, 0x7f, 0x10 ); } void fcml_tf_instruction_MOVDQ2Q(void) { FCML_I32( "movdq2q mm2,xmm0", 0xF2, 0x0F, 0xD6, 0xD0 ); FCML_I32( "movdq2q mm3,xmm0", 0xF2, 0x0F, 0xD6, 0xD8 ); FCML_I64( "movdq2q mm2,xmm0", 0xF2, 0x0F, 0xD6, 0xD0 ); FCML_A64( "movdq2q %xmm0,%mm3", 0xf2, 0x0f, 0xd6, 0xd8 ); } void fcml_tf_instruction_MOVHLPS(void) { FCML_I32( "movhlps xmm2,xmm0", 0x0F, 0x12, 0xD0 ); FCML_I32( "movhlps xmm3,xmm0", 0x0F, 0x12, 0xD8 ); FCML_I64( "movhlps xmm2,xmm0", 0x0F, 0x12, 0xD0 ); FCML_A64( "movhlps %xmm0,%xmm3", 0x0f, 0x12, 0xd8 ); FCML_I32( "vmovhlps xmm3,xmm0,xmm0", 0xc5, 0xf8, 0x12, 0xd8 ); FCML_I64( "vmovhlps xmm3,xmm0,xmm1", 0xc5, 0xf8, 0x12, 0xd9 ); FCML_I64( "vmovhlps xmm3,xmm15,xmm1", 0xc5, 0x80, 0x12, 0xd9 ); FCML_A64( "vmovhlps %xmm1,%xmm0,%xmm3", 0xc5, 0xf8, 0x12, 0xd9 ); } void fcml_tf_instruction_MOVHPD(void) { FCML_I32( "movhpd xmm1,qword ptr [eax]", 0x66, 0x0F, 0x16, 0x08 ); FCML_I64( "movhpd xmm1,qword ptr [rax]", 0x66, 0x0F, 0x16, 0x08 ); FCML_I32( "movhpd qword ptr [eax],xmm1", 0x66, 0x0F, 0x17, 0x08 ); FCML_I64( "movhpd qword ptr [rax],xmm1", 0x66, 0x0F, 0x17, 0x08 ); FCML_I32( "vmovhpd xmm2,xmm1,qword ptr [eax]", 0xC5, 0xF1, 0x16, 0x10 ); FCML_I64( "vmovhpd xmm0,xmm5,qword ptr [rax]", 0xc5, 0xd1, 0x16, 0x00 ); FCML_I64( "vmovhpd qword ptr [rax],xmm0", 0xc5, 0xf9, 0x17, 0x00 ); FCML_A64( "movhpd (%rax),%xmm1", 0x66, 0x0f, 0x16, 0x08 ); FCML_A64( "movhpd %xmm1,(%rax)", 0x66, 0x0f, 0x17, 0x08 ); FCML_A64( "vmovhpd (%rax),%xmm5,%xmm0", 0xc5, 0xd1, 0x16, 0x00 ); FCML_A64( "vmovhpd %xmm0,(%rax)", 0xc5, 0xf9, 0x17, 0x00 ); } void fcml_tf_instruction_MOVHPS(void) { FCML_I32( "movhps xmm1,qword ptr [eax]", 0x0F, 0x16, 0x08 ); FCML_I64( "movhps xmm1,qword ptr [rax]", 0x0F, 0x16, 0x08 ); FCML_I32( "movhps qword ptr [eax],xmm1", 0x0F, 0x17, 0x08 ); FCML_I64( "movhps qword ptr [rax],xmm1", 0x0F, 0x17, 0x08 ); FCML_I32( "vmovhps xmm2,xmm1,qword ptr [eax]", 0xC5, 0xF0, 0x16, 0x10 ); FCML_I64( "vmovhps xmm0,xmm5,qword ptr [rax]", 0xc5, 0xd0, 0x16, 0x00 ); FCML_I64( "vmovhps qword ptr [rax],xmm0", 0xc5, 0xf8, 0x17, 0x00 ); FCML_A64( "movhps (%rax),%xmm1", 0x0f, 0x16, 0x08 ); FCML_A64( "movhps %xmm1,(%rax)", 0x0f, 0x17, 0x08 ); FCML_A64( "vmovhps (%rax),%xmm5,%xmm0", 0xc5, 0xd0, 0x16, 0x00 ); FCML_A64( "vmovhps %xmm0,(%rax)", 0xc5, 0xf8, 0x17, 0x00 ); } void fcml_tf_instruction_MOVLHPS(void) { FCML_I32( "movlhps xmm2,xmm0", 0x0F, 0x16, 0xD0 ); FCML_I32( "movlhps xmm3,xmm0", 0x0F, 0x16, 0xD8 ); FCML_I64( "movlhps xmm2,xmm0", 0x0F, 0x16, 0xD0 ); FCML_I32( "vmovlhps xmm2,xmm5,xmm0", 0xC5, 0xD0, 0x16, 0xD0 ); FCML_I64( "vmovlhps xmm0,xmm6,xmm0", 0xc5, 0xc8, 0x16, 0xc0 ); FCML_A64( "movlhps %xmm0,%xmm2", 0x0f, 0x16, 0xd0 ); FCML_A64( "vmovlhps %xmm0,%xmm5,%xmm2", 0xc5, 0xd0, 0x16, 0xd0 ); } void fcml_tf_instruction_MOVLPD(void) { FCML_I32( "movlpd xmm0,qword ptr [eax]", 0x66, 0x0F, 0x12, 0x00 ); FCML_I64( "movlpd xmm0,qword ptr [rax]", 0x66, 0x0F, 0x12, 0x00 ); FCML_I32( "movlpd qword ptr [eax],xmm0", 0x66, 0x0F, 0x13, 0x00 ); FCML_I64( "movlpd qword ptr [rax],xmm0", 0x66, 0x0F, 0x13, 0x00 ); FCML_I32( "vmovlpd xmm2,xmm1,qword ptr [eax]", 0xC5, 0xF1, 0x12, 0x10 ); FCML_I64( "vmovlpd xmm0,xmm5,qword ptr [rax]", 0xc5, 0xd1, 0x12, 0x00 ); FCML_I64( "vmovlpd qword ptr [rax],xmm0", 0xc5, 0xf9, 0x13, 0x00 ); FCML_A64( "movlpd (%rax),%xmm0", 0x66, 0x0f, 0x12, 0x00 ); FCML_A64( "movlpd %xmm0,(%rax)", 0x66, 0x0f, 0x13, 0x00 ); FCML_A64( "vmovlpd (%rax),%xmm5,%xmm0", 0xc5, 0xd1, 0x12, 0x00 ); FCML_A64( "vmovlpd %xmm0,(%rax)", 0xc5, 0xf9, 0x13, 0x00 ); } void fcml_tf_instruction_MOVLPS(void) { FCML_I32( "movlps xmm0,qword ptr [eax]", 0x0F, 0x12, 0x00 ); FCML_I64( "movlps xmm0,qword ptr [rax]", 0x0F, 0x12, 0x00 ); FCML_I32( "movlps qword ptr [eax],xmm0", 0x0F, 0x13, 0x00 ); FCML_I64( "movlps qword ptr [rax],xmm0", 0x0F, 0x13, 0x00 ); FCML_I32( "vmovlps xmm2,xmm1,qword ptr [eax]", 0xC5, 0xF0, 0x12, 0x10 ); FCML_I64( "vmovlps xmm0,xmm5,qword ptr [rax]", 0xc5, 0xd0, 0x12, 0x00 ); FCML_I64( "vmovlps qword ptr [rax],xmm0", 0xc5, 0xf8, 0x13, 0x00 ); FCML_A64( "movlps (%rax),%xmm0", 0x0f, 0x12, 0x00 ); FCML_A64( "movlps %xmm0,(%rax)", 0x0f, 0x13, 0x00 ); FCML_A64( "vmovlps (%rax),%xmm5,%xmm0", 0xc5, 0xd0, 0x12, 0x00 ); FCML_A64( "vmovlps %xmm0,(%rax)", 0xc5, 0xf8, 0x13, 0x00 ); } void fcml_tf_instruction_MOVMSKPD(void) { FCML_I32( "movmskpd edx,xmm0", 0x66, 0x0F, 0x50, 0xD0 ); FCML_I32( "movmskpd ebx,xmm0", 0x66, 0x0F, 0x50, 0xD8 ); FCML_I64( "movmskpd rdx,xmm0", 0x66, 0x0F, 0x50, 0xD0 ); FCML_I32( "vmovmskpd edx,xmm0", 0xc5, 0xf9, 0x50, 0xd0 ); FCML_I32( "vmovmskpd ebx,xmm0", 0xc5, 0xf9, 0x50, 0xd8 ); FCML_I64( "vmovmskpd rdx,ymm0", 0xc5, 0xfd, 0x50, 0xd0 ); FCML_I64( "vmovmskpd rdx,ymm0", 0xc5, 0xfd, 0x50, 0xd0 ); FCML_I32( "vmovmskpd ebx,ymm0", 0xc5, 0xfd, 0x50, 0xd8 ); FCML_A64( "movmskpd %xmm0,%rdx", 0x66, 0x0f, 0x50, 0xd0 ); FCML_A64( "vmovmskpd %ymm0,%rbx", 0xc5, 0xfd, 0x50, 0xd8 ); } void fcml_tf_instruction_MOVMSKPS(void) { FCML_I32( "movmskps edx,xmm0", 0x0F, 0x50, 0xD0 ); FCML_I32( "movmskps ebx,xmm0", 0x0F, 0x50, 0xD8 ); FCML_I64( "movmskps rdx,xmm0", 0x0F, 0x50, 0xD0 ); FCML_I32( "vmovmskps edx,xmm0", 0xc5, 0xf8, 0x50, 0xd0 ); FCML_I32( "vmovmskps ebx,xmm0", 0xc5, 0xf8, 0x50, 0xd8 ); FCML_I64( "vmovmskps rdx,ymm0", 0xc5, 0xfc, 0x50, 0xd0 ); FCML_I64( "vmovmskps rdx,ymm0", 0xc5, 0xfc, 0x50, 0xd0 ); FCML_I32( "vmovmskps ebx,ymm0", 0xc5, 0xfc, 0x50, 0xd8 ); FCML_A64( "movmskps %xmm0,%rdx", 0x0f, 0x50, 0xd0 ); FCML_A64( "vmovmskps %ymm0,%rdx", 0xc5, 0xfc, 0x50, 0xd0 ); } void fcml_tf_instruction_MOVNTDQA(void) { FCML_I32( "movntdqa xmm0,xmmword ptr [eax]", 0x66, 0x0F, 0x38, 0x2A, 0x00 ); FCML_I64( "movntdqa xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x38, 0x2A, 0x00 ); FCML_I64( "vmovntdqa xmm0,xmmword ptr [rax]", 0xC4, 0xE2, 0x79, 0x2A, 0x00 ); FCML_I64( "vmovntdqa ymm0,ymmword ptr [rax]", 0xC4, 0xE2, 0x7D, 0x2A, 0x00 ); FCML_A64( "movntdqa (%rax),%xmm0", 0x66, 0x0f, 0x38, 0x2a, 0x00 ); FCML_A64( "vmovntdqa (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x2a, 0x00 ); FCML_A64( "vmovntdqa (%rax),%ymm0", 0xc4, 0xe2, 0x7d, 0x2a, 0x00 ); } void fcml_tf_instruction_MOVNTDQ(void) { FCML_I32( "movntdq xmmword ptr [eax],xmm0", 0x66, 0x0F, 0xE7, 0x00 ); FCML_I64( "movntdq xmmword ptr [rax],xmm0", 0x66, 0x0F, 0xE7, 0x00 ); FCML_I64( "vmovntdq xmmword ptr [rax],xmm0", 0xc5, 0xf9, 0xe7, 0x00 ); FCML_A64( "movntdq %xmm0,(%rax)", 0x66, 0x0f, 0xe7, 0x00 ); FCML_A64( "vmovntdq %xmm0,(%rax)", 0xc5, 0xf9, 0xe7, 0x00 ); } void fcml_tf_instruction_MOVNTI(void) { FCML_I32( "movnti dword ptr [eax],eax", 0x0F, 0xC3, 0x00 ); FCML_I32( "movnti dword ptr [eax],eax", 0x66, 0x0F, 0xC3, 0x00 ); FCML_I64( "movnti dword ptr [rax],eax", 0x0F, 0xC3, 0x00 ); FCML_I64( "movnti qword ptr [rax],rax", 0x48, 0x0F, 0xC3, 0x00 ); FCML_A64( "movnti %eax,(%rax)", 0x0f, 0xc3, 0x00 ); FCML_A64( "movnti %rax,(%rax)", 0x48, 0x0f, 0xc3, 0x00 ); } void fcml_tf_instruction_MOVNTPD(void) { FCML_I32( "movntpd xmmword ptr [eax],xmm0", 0x66, 0x0F, 0x2B, 0x00 ); FCML_I64( "movntpd xmmword ptr [rax],xmm0", 0x66, 0x0F, 0x2B, 0x00 ); FCML_I64( "vmovntpd xmmword ptr [rax],xmm0", 0xc5, 0xf9, 0x2b, 0x00 ); FCML_A64( "movntpd %xmm0,(%rax)", 0x66, 0x0f, 0x2b, 0x00 ); FCML_A64( "vmovntpd %xmm0,(%rax)", 0xc5, 0xf9, 0x2b, 0x00 ); } void fcml_tf_instruction_MOVNTPS(void) { FCML_I32( "movntps xmmword ptr [eax],xmm0", 0x0F, 0x2B, 0x00 ); FCML_I64( "movntps xmmword ptr [rax],xmm0", 0x0F, 0x2B, 0x00 ); FCML_I64( "vmovntps xmmword ptr [rax],xmm0", 0xc5, 0xf8, 0x2b, 0x00 ); FCML_I32( "vmovntps xmmword ptr [eax],xmm0", 0xc5, 0xf8, 0x2b, 0x00 ); FCML_A64( "movntps %xmm0,(%rax)", 0x0f, 0x2b, 0x00 ); FCML_A64( "vmovntps %xmm0,(%rax)", 0xc5, 0xf8, 0x2b, 0x00 ); } void fcml_tf_instruction_MOVNTSD(void) { FCML_I32( "movntsd qword ptr [eax],xmm0", 0xF2, 0x0F, 0x2B, 0x00 ); FCML_I64( "movntsd qword ptr [rax],xmm0", 0xF2, 0x0F, 0x2B, 0x00 ); FCML_I32_FAILED( "FAIL", 0xF2, 0x0F, 0x2B, 0xC0 ); FCML_A64( "movntsd %xmm0,(%rax)", 0xf2, 0x0f, 0x2b, 0x00 ); } void fcml_tf_instruction_MOVNTSS(void) { FCML_I32( "movntss dword ptr [eax],xmm0", 0xF3, 0x0F, 0x2B, 0x00 ); FCML_I64( "movntss dword ptr [rax],xmm0", 0xF3, 0x0F, 0x2B, 0x00 ); FCML_I32_FAILED( "FAIL", 0xF3, 0x0F, 0x2B, 0xC0 ); FCML_A64( "movntss %xmm0,(%rax)", 0xf3, 0x0f, 0x2b, 0x00 ); } void fcml_tf_instruction_MOVNTQ(void) { FCML_I32( "movntq qword ptr [eax],mm0", 0x0F, 0xE7, 0x00 ); FCML_I64( "movntq qword ptr [rax],mm0", 0x0F, 0xE7, 0x00 ); FCML_A64( "movntq %mm0,(%rax)", 0x0f, 0xe7, 0x00 ); } void fcml_tf_instruction_MOVQ2DQ(void) { FCML_I32( "movq2dq xmm2,mm0", 0xF3, 0x0F, 0xD6, 0xD0 ); FCML_I32( "movq2dq xmm3,mm0", 0xF3, 0x0F, 0xD6, 0xD8 ); FCML_I64( "movq2dq xmm2,mm0", 0xF3, 0x0F, 0xD6, 0xD0 ); FCML_A64( "movq2dq %mm0,%xmm2", 0xf3, 0x0f, 0xd6, 0xd0 ); } void fcml_tf_instruction_MOVS(void) { FCML_I32( "rep movs byte ptr [di],byte ptr [si]", 0xF3, 0x67, 0xA4 ); FCML_I32( "movs byte ptr [di],byte ptr [si]", 0x66, 0x67, 0xA4 ); FCML_I32( "movs byte ptr [edi],byte ptr [esi]", 0xA4 ); FCML_I64( "movs byte ptr [rdi],byte ptr [rsi]", 0xA4 ); FCML_I64_A( "movsb", 0xA4 ); FCML_I64_D( "movs byte ptr [rdi],byte ptr [rsi]", 0x40, 0xA4 ); FCML_I64_D( "movs byte ptr [edi],byte ptr [esi]", 0x67, 0x40, 0xA4 ); FCML_I64_D( "movs byte ptr [edi],byte ptr [esi]", 0x66, 0x67, 0x40, 0xA4 ); FCML_A64( "movsb (%rsi),(%rdi)", 0xa4 ); FCML_A64( "movsb (%esi),(%edi)", 0x67, 0xa4 ); FCML_A64_A( "movsb", 0xA4 ); FCML_I32( "rep movs dword ptr [di],dword ptr [si]", 0xF3, 0x67, 0xA5 ); FCML_I32( "movs word ptr [di],word ptr [si]", 0x66, 0x67, 0xA5 ); FCML_I32( "movs dword ptr [edi],dword ptr [esi]", 0xA5 ); FCML_I64( "movs qword ptr [rdi],qword ptr [rsi]", 0x48, 0xA5 ); FCML_I64( "movs dword ptr [rdi],dword ptr [rsi]", 0xA5 ); FCML_I64_A( "movsw", 0x66, 0xA5 ); FCML_I64_A( "movsd", 0xA5 ); FCML_I64_A( "movsq", 0x48, 0xA5 ); FCML_I64_D( "movs dword ptr [rdi],dword ptr [rsi]", 0x40, 0xA5 ); FCML_I64_D( "movs dword ptr [edi],dword ptr [esi]", 0x67, 0x40, 0xA5 ); FCML_I64_D( "movs word ptr [edi],word ptr [esi]", 0x66, 0x67, 0x40, 0xA5 ); FCML_A32( "rep movsl (%si),(%di)", 0xF3, 0x67, 0xA5 ); FCML_A32( "movsw (%si),(%di)", 0x66, 0x67, 0xA5 ); FCML_A32( "movsl (%esi),(%edi)", 0xA5 ); FCML_A64_A( "movsw", 0x66, 0xA5 ); FCML_A64_A( "movsl", 0xA5 ); FCML_A64_A( "movsq", 0x48, 0xA5 ); } void fcml_tf_instruction_MOVSD(void) { FCML_I32( "movsd xmm2,mmword ptr [eax]", 0xF2, 0x0F, 0x10, 0x10 ); FCML_I32_M( "movsd xmm3,xmm0", 2, FCML_MI( 0xf2, 0x0f, 0x11, 0xc3 ), FCML_MI( 0xf2, 0x0f, 0x10, 0xd8 ) ); FCML_I64( "movsd xmm2,mmword ptr [rax]", 0xF2, 0x0F, 0x10, 0x10 ); FCML_I32( "movsd mmword ptr [eax],xmm2", 0xF2, 0x0F, 0x11, 0x10 ); FCML_I32_M( "movsd xmm0,xmm3", 2, FCML_MI( 0xf2, 0x0f, 0x11, 0xd8 ), FCML_MI( 0xf2, 0x0f, 0x10, 0xc3 ) ); FCML_I64( "movsd mmword ptr [rax],xmm2", 0xF2, 0x0F, 0x11, 0x10 ); /* These two encodings are functionally equivalent. See: 26568_APM_v4.pdf */ FCML_I32_M( "vmovsd xmm1,xmm3,xmm0", 2, FCML_MI( 0xc5, 0xe3, 0x11, 0xc1 ), FCML_MI( 0xc5, 0xe3, 0x10, 0xc8 ) ); FCML_I64_M( "vmovsd xmm1,xmm3,xmm0", 2, FCML_MI( 0xc5, 0xe3, 0x11, 0xc1 ), FCML_MI( 0xc5, 0xe3, 0x10, 0xc8 ) ); FCML_I64_M( "vmovsd xmm1,xmm3,xmm0", 2, FCML_MI( 0xc5, 0xe3, 0x11, 0xc1 ), FCML_MI( 0xc5, 0xe3, 0x10, 0xc8 ) ); FCML_I32_M( "vmovsd xmm0,xmm3,xmm1", 2, FCML_MI( 0xc5, 0xe3, 0x11, 0xc8 ), FCML_MI( 0xc5, 0xe3, 0x10, 0xc1 ) ); FCML_I32( "vmovsd xmm0,qword ptr [eax]", 0xc5, 0xfb, 0x10, 0x00 ); FCML_I32( "vmovsd qword ptr [eax],xmm0", 0xc5, 0xfb, 0x11, 0x00 ); FCML_A64( "movsd (%rax),%xmm2", 0xf2, 0x0f, 0x10, 0x10 ); FCML_A64( "movsd %xmm2,(%rax)", 0xf2, 0x0f, 0x11, 0x10 ); FCML_A64_M( "movsd %xmm3,%xmm0", 2, FCML_MI( 0xf2, 0x0f, 0x11, 0xd8 ), FCML_MI( 0xf2, 0x0f, 0x10, 0xc3 ) ); FCML_A64_M( "vmovsd %xmm0,%xmm3,%xmm1", 2, FCML_MI( 0xc5, 0xe3, 0x11, 0xc1 ), FCML_MI( 0xc5, 0xe3, 0x10, 0xc8 ) ); FCML_A64_M( "vmovsd %xmm1,%xmm3,%xmm0", 2, FCML_MI( 0xc5, 0xe3, 0x11, 0xc8 ), FCML_MI( 0xc5, 0xe3, 0x10, 0xc1 ) ); FCML_A64( "vmovsd %xmm0,(%rax)", 0xc5, 0xfb, 0x11, 0x00 ); } void fcml_tf_instruction_MOVSHDUP(void) { FCML_I32( "movshdup xmm2,xmmword ptr [eax]", 0xF3, 0x0F, 0x16, 0x10 ); FCML_I32( "movshdup xmm3,xmm0", 0xF3, 0x0F, 0x16, 0xD8 ); FCML_I64( "movshdup xmm2,xmmword ptr [rax]", 0xF3, 0x0F, 0x16, 0x10 ); FCML_I64( "vmovshdup xmm3,xmm0", 0xc5, 0xfa, 0x16, 0xd8 ); FCML_I32( "vmovshdup ymm0,ymmword ptr [eax]", 0xc5, 0xfe, 0x16, 0x00 ); FCML_A64( "movshdup %xmm0,%xmm3", 0xf3, 0x0f, 0x16, 0xd8 ); FCML_A64( "movshdup (%rax),%xmm2", 0xf3, 0x0f, 0x16, 0x10 ); FCML_A64( "vmovshdup (%rax),%ymm0", 0xc5, 0xfe, 0x16, 0x00 ); } void fcml_tf_instruction_MOVSLDUP(void) { FCML_I32( "movsldup xmm2,xmmword ptr [eax]", 0xF3, 0x0F, 0x12, 0x10 ); FCML_I32( "movsldup xmm3,xmm0", 0xF3, 0x0F, 0x12, 0xD8 ); FCML_I64( "movsldup xmm2,xmmword ptr [rax]", 0xF3, 0x0F, 0x12, 0x10 ); FCML_I64( "vmovsldup xmm3,xmm0", 0xc5, 0xfa, 0x12, 0xd8 ); FCML_I32( "vmovsldup ymm0,ymmword ptr [eax]", 0xc5, 0xfe, 0x12, 0x00 ); FCML_A64( "movsldup %xmm0,%xmm3", 0xf3, 0x0f, 0x12, 0xd8 ); FCML_A64( "vmovsldup (%rax),%ymm0", 0xc5, 0xfe, 0x12, 0x00 ); } void fcml_tf_instruction_MOVSS(void) { FCML_I32( "movss xmm2,dword ptr [eax]", 0xF3, 0x0F, 0x10, 0x10 ); FCML_I32_M( "movss xmm3,xmm0", 2, FCML_MI( 0xf3, 0x0f, 0x11, 0xc3 ), FCML_MI( 0xf3, 0x0f, 0x10, 0xd8 ) ); FCML_I64( "movss xmm2,dword ptr [rax]", 0xF3, 0x0F, 0x10, 0x10 ); FCML_I32( "movss dword ptr [eax],xmm2", 0xF3, 0x0F, 0x11, 0x10 ); FCML_I32_M( "movss xmm0,xmm3", 2, FCML_MI( 0xf3, 0x0f, 0x11, 0xd8 ), FCML_MI( 0xf3, 0x0f, 0x10, 0xc3 ) ); FCML_I64( "movss dword ptr [rax],xmm2", 0xF3, 0x0F, 0x11, 0x10 ); FCML_I32_M( "vmovss xmm1,xmm3,xmm0", 2, FCML_MI( 0xc5, 0xe2, 0x11, 0xc1 ), FCML_MI( 0xc5, 0xe2, 0x10, 0xc8 ) ); FCML_I64_M( "vmovss xmm1,xmm3,xmm0", 2, FCML_MI( 0xc5, 0xe2, 0x11, 0xc1 ), FCML_MI( 0xc5, 0xe2, 0x10, 0xc8 ) ); FCML_I32_M( "vmovss xmm0,xmm3,xmm1", 2, FCML_MI( 0xc5, 0xe2, 0x11, 0xc8 ), FCML_MI( 0xc5, 0xe2, 0x10, 0xc1 ) ); FCML_I64_M( "vmovss xmm0,xmm3,xmm1", 2, FCML_MI( 0xc5, 0xe2, 0x11, 0xc8 ), FCML_MI( 0xc5, 0xe2, 0x10, 0xc1 ) ); FCML_I32( "vmovss xmm0,dword ptr [eax]", 0xc5, 0xfa, 0x10, 0x00 ); FCML_I32( "vmovss dword ptr [eax],xmm0", 0xc5, 0xfa, 0x11, 0x00 ); FCML_A64( "movss (%rax),%xmm2", 0xf3, 0x0f, 0x10, 0x10 ); FCML_A64( "movss %xmm2,(%rax)", 0xf3, 0x0f, 0x11, 0x10 ); FCML_A64_M( "vmovss %xmm1,%xmm3,%xmm0", 2, FCML_MI( 0xc5, 0xe2, 0x11, 0xc8 ), FCML_MI( 0xc5, 0xe2, 0x10, 0xc1 ) ); FCML_A64( "vmovss %xmm0,(%rax)", 0xc5, 0xfa, 0x11, 0x00 ); } void fcml_tf_instruction_MOVSX(void) { FCML_I32( "movsx dx,byte ptr [eax]", 0x66, 0x0F, 0xBE, 0x10 ); FCML_I32( "movsx edx,byte ptr [eax]", 0x0F, 0xBE, 0x10 ); FCML_I64( "movsx dx,byte ptr [rax]", 0x66, 0x0F, 0xBE, 0x10 ); FCML_I64( "movsx edx,byte ptr [rax]", 0x0F, 0xBE, 0x10 ); FCML_I64( "movsx rdx,byte ptr [rax]", 0x48, 0x0F, 0xBE, 0x10 ); FCML_A64( "movsbw (%rax),%dx", 0x66, 0x0f, 0xbe, 0x10 ); FCML_A64( "movsbl (%rax),%edx", 0x0f, 0xbe, 0x10 ); FCML_A64( "movsbl %al,%eax", 0x0f, 0xbe, 0xc0 ); FCML_A64( "movsbq (%rax),%rdx", 0x48, 0x0f, 0xbe, 0x10 ); FCML_I32( "movsx edx,word ptr [eax]", 0x66, 0x0F, 0xBF, 0x10 ); FCML_I32( "movsx edx,word ptr [eax]", 0x0F, 0xBF, 0x10 ); FCML_I64( "movsx rdx,word ptr [rax]", 0x48, 0x0F, 0xBF, 0x10 ); FCML_A64( "movsww (%rax),%edx", 0x66, 0x0f, 0xbf, 0x10 ); FCML_A64( "movswl (%rax),%edx", 0x0f, 0xbf, 0x10 ); FCML_A64( "movswl %ax,%eax", 0x0f, 0xbf, 0xc0 ); FCML_A64( "movswq (%rax),%rdx", 0x48, 0x0f, 0xbf, 0x10 ); FCML_I64( "movsxd rdx,dword ptr [rax]", 0x48, 0x63, 0x10 ); } void fcml_tf_instruction_MOVUPD(void) { FCML_I32( "movupd xmm2,xmmword ptr [eax]", 0x66, 0x0F, 0x10, 0x10 ); FCML_I32_M( "movupd xmm3,xmm0", 2, FCML_MI( 0x66, 0x0f, 0x11, 0xc3 ), FCML_MI( 0x66, 0x0f, 0x10, 0xd8 ) ); FCML_I64( "movupd xmm2,xmmword ptr [rax]", 0x66, 0x0F, 0x10, 0x10 ); FCML_I32( "movupd xmmword ptr [eax],xmm2", 0x66, 0x0F, 0x11, 0x10 ); FCML_I32_M( "movupd xmm0,xmm3", 2, FCML_MI( 0x66, 0x0f, 0x11, 0xd8 ), FCML_MI( 0x66, 0x0f, 0x10, 0xc3 ) ); FCML_I64( "movupd xmmword ptr [rax],xmm2", 0x66, 0x0F, 0x11, 0x10 ); FCML_I3264_M( "vmovupd xmm3,xmm0", 2, FCML_MI( 0xc5, 0xf9, 0x11, 0xc3 ), FCML_MI( 0xc5, 0xf9, 0x10, 0xd8 ) ); FCML_I32( "vmovupd xmm0,xmmword ptr [eax]", 0xc5, 0xf9, 0x10, 0x00 ); FCML_I64_M( "vmovupd xmm0,xmm3", 2, FCML_MI( 0xc5, 0xf9, 0x11, 0xd8 ), FCML_MI( 0xc5, 0xf9, 0x10, 0xc3 ) ); FCML_I32_M( "vmovupd xmm0,xmm3", 2, FCML_MI( 0xc5, 0xf9, 0x11, 0xd8 ), FCML_MI( 0xc5, 0xf9, 0x10, 0xc3 ) ); FCML_I32( "vmovupd xmmword ptr [eax],xmm0", 0xc5, 0xf9, 0x11, 0x00 ); FCML_A64( "movupd (%rax),%xmm2", 0x66, 0x0f, 0x10, 0x10 ); FCML_A64_M( "movupd %xmm3,%xmm0", 2, FCML_MI( 0x66, 0x0f, 0x11, 0xd8 ), FCML_MI( 0x66, 0x0f, 0x10, 0xc3 ) ); FCML_A64( "vmovupd (%rax),%xmm0", 0xc5, 0xf9, 0x10, 0x00 ); FCML_A64_M( "vmovupd %xmm3,%xmm0", 2, FCML_MI( 0xc5, 0xf9, 0x11, 0xd8 ), FCML_MI( 0xc5, 0xf9, 0x10, 0xc3 ) ); } void fcml_tf_instruction_MOVUPS(void) { FCML_I32( "movups xmm2,xmmword ptr [eax]", 0x0F, 0x10, 0x10 ); FCML_I32_M( "movups xmm3,xmm0", 2, FCML_MI( 0x0f, 0x11, 0xc3 ), FCML_MI( 0x0f, 0x10, 0xd8 ) ); FCML_I64( "movups xmm2,xmmword ptr [rax]",0x0F, 0x10, 0x10 ); FCML_I32( "movups xmmword ptr [eax],xmm2", 0x0F, 0x11, 0x10 ); FCML_I32_M( "movups xmm0,xmm3", 2, FCML_MI( 0x0f, 0x11, 0xd8 ), FCML_MI( 0x0f, 0x10, 0xc3 ) ); FCML_I64( "movups xmmword ptr [rax],xmm2", 0x0F, 0x11, 0x10 ); FCML_I3264_M( "vmovups xmm3,xmm0", 2, FCML_MI( 0xc5, 0xf8, 0x11, 0xc3 ), FCML_MI( 0xc5, 0xf8, 0x10, 0xd8 ) ); FCML_I32( "vmovups xmm0,xmmword ptr [eax]", 0xc5, 0xf8, 0x10, 0x00 ); FCML_I3264_M( "vmovups xmm0,xmm3", 2, FCML_MI( 0xc5, 0xf8, 0x11, 0xd8 ), FCML_MI( 0xc5, 0xf8, 0x10, 0xc3 ) ); FCML_I32( "vmovups xmmword ptr [eax],xmm0", 0xc5, 0xf8, 0x11, 0x00 ); FCML_A64( "movups (%rax),%xmm2", 0x0f, 0x10, 0x10 ); FCML_A64_M( "movups %xmm3,%xmm0", 2, FCML_MI( 0x0f, 0x11, 0xd8 ), FCML_MI( 0x0f, 0x10, 0xc3 ) ); FCML_A64( "vmovups (%rax),%xmm0", 0xc5, 0xf8, 0x10, 0x00 ); FCML_A64_M( "vmovups %xmm3,%xmm0", 2, FCML_MI( 0xc5, 0xf8, 0x11, 0xd8 ), FCML_MI( 0xc5, 0xf8, 0x10, 0xc3 ) ); } void fcml_tf_instruction_MOVZX(void) { FCML_I32( "movzx dx,byte ptr [eax]", 0x66, 0x0F, 0xB6, 0x10 ); FCML_I32( "movzx edx,byte ptr [eax]", 0x0F, 0xB6, 0x10 ); FCML_I64( "movzx dx,byte ptr [rax]", 0x66, 0x0F, 0xB6, 0x10 ); FCML_I64( "movzx edx,byte ptr [rax]", 0x0F, 0xB6, 0x10 ); FCML_I64( "movzx rdx,byte ptr [rax]", 0x48, 0x0F, 0xB6, 0x10 ); FCML_A64( "movzbw (%rax),%dx", 0x66, 0x0f, 0xb6, 0x10 ); FCML_A64( "movzbl (%rax),%edx", 0x0f, 0xb6, 0x10 ); FCML_A64( "movzbl %al,%eax", 0x0f, 0xb6, 0xc0 ); FCML_A64( "movzbq (%rax),%rdx", 0x48, 0x0f, 0xb6, 0x10 ); FCML_I32( "movzx edx,word ptr [eax]", 0x66, 0x0F, 0xB7, 0x10 ); FCML_I32( "movzx edx,word ptr [eax]", 0x0F, 0xB7, 0x10 ); FCML_I64( "movzx edx,word ptr [rax]", 0x66, 0x0F, 0xB7, 0x10 ); FCML_I64( "movzx rdx,word ptr [rax]", 0x48, 0x0F, 0xB7, 0x10 ); FCML_A64( "movzww (%rax),%edx", 0x66, 0x0f, 0xb7, 0x10 ); FCML_A64( "movzwl (%rax),%edx", 0x0f, 0xb7, 0x10 ); FCML_A64( "movzwl %ax,%eax", 0x0f, 0xb7, 0xc0 ); FCML_A64( "movzwq (%rax),%rdx", 0x48, 0x0f, 0xb7, 0x10 ); } void fcml_tf_instruction_MPSADBW(void) { FCML_I32( "mpsadbw xmm2,xmmword ptr [eax],20h", 0x66, 0x0F, 0x3A, 0x42, 0x10, 0x20 ); FCML_I32( "mpsadbw xmm2,xmm6,20h", 0x66, 0x0F, 0x3A, 0x42, 0xD6, 0x20 ); FCML_I64( "mpsadbw xmm2,xmmword ptr [rax],20h", 0x66, 0x0F, 0x3A, 0x42, 0x10, 0x20 ); FCML_I64( "mpsadbw xmm2,xmmword ptr [rax],20h", 0x66, 0x0F, 0x3A, 0x42, 0x10, 0x20 ); FCML_I32( "vmpsadbw xmm2,xmm6,xmmword ptr [ecx+eax],20h", 0xC4, 0xE3, 0x49, 0x42, 0x14, 0x01, 0x20 ); FCML_I64( "vmpsadbw xmm2,xmm6,xmmword ptr [rcx+rax],20h", 0xC4, 0xE3, 0x49, 0x42, 0x14, 0x01, 0x20 ); FCML_I32( "vmpsadbw ymm2,ymm6,ymmword ptr [ecx+eax],20h", 0xC4, 0xE3, 0x4D, 0x42, 0x14, 0x01, 0x20 ); FCML_I64( "vmpsadbw ymm2,ymm6,ymmword ptr [rcx+rax],20h", 0xC4, 0xE3, 0x4D, 0x42, 0x14, 0x01, 0x20 ); FCML_A64( "mpsadbw $0x20,(%rax),%xmm2", 0x66, 0x0f, 0x3a, 0x42, 0x10, 0x20 ); FCML_A64( "mpsadbw $0x20,%xmm6,%xmm2", 0x66, 0x0f, 0x3a, 0x42, 0xd6, 0x20 ); FCML_A64( "vmpsadbw $0x20,(%rcx,%rax),%xmm6,%xmm2", 0xc4, 0xe3, 0x49, 0x42, 0x14, 0x01, 0x20 ); FCML_A64( "vmpsadbw $0x20,(%rcx,%rax),%ymm6,%ymm2", 0xc4, 0xe3, 0x4d, 0x42, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_MUL(void) { FCML_I32_D( "mul byte ptr [eax]", 0x66, 0xF6, 0x20 ); FCML_I32( "mul byte ptr [eax]", 0xF6, 0x20 ); FCML_I64_D( "mul byte ptr [rax]", 0x66, 0xF6, 0x20 ); FCML_I64( "mul byte ptr [rax]", 0xF6, 0x20 ); FCML_I64_D( "mul byte ptr [rax]", 0x48, 0xF6, 0x20 ); FCML_I32_D( "mul word ptr [eax]", 0x66, 0xF7, 0x20 ); FCML_I32( "mul dword ptr [eax]", 0xF7, 0x20 ); FCML_I64_D( "mul word ptr [rax]", 0x66, 0xF7, 0x20 ); FCML_I64( "mul dword ptr [rax]", 0xF7, 0x20 ); FCML_I64_D( "mul qword ptr [rax]", 0x48, 0xF7, 0x20 ); FCML_A64( "mulb (%rax)", 0xf6, 0x20 ); FCML_A64_A( "mul %dl", 0xf6, 0xe2 ); FCML_A64( "mulw (%rax)", 0x66, 0xf7, 0x20 ); FCML_A64( "mull (%rax)", 0xf7, 0x20 ); FCML_A64( "mulq (%rax)", 0x48, 0xf7, 0x20 ); FCML_A64_A( "mul %edx", 0xf7, 0xe2 ); } void fcml_tf_instruction_MULPD(void) { FCML_I32( "mulpd xmm2,xmmword ptr [eax]", 0x66, 0x0F, 0x59, 0x10 ); FCML_I64( "vmulpd xmm3,xmm0,xmm0", 0xc5, 0xf9, 0x59, 0xd8 ); FCML_I64( "mulpd xmm2,xmmword ptr [rax]", 0x66, 0x0F, 0x59, 0x10 ); FCML_I64( "vmulpd xmm3,xmm0,xmm0", 0xc5, 0xf9, 0x59, 0xd8 ); FCML_I32( "vmulpd ymm3,ymm0,ymm0", 0xc5, 0xfd, 0x59, 0xd8 ); FCML_I32( "vmulpd ymm3,ymm3,ymmword ptr [eax]", 0xc5, 0xe5, 0x59, 0x18 ); FCML_A64( "mulpd (%rax),%xmm2", 0x66, 0x0f, 0x59, 0x10 ); FCML_A64( "vmulpd %xmm0,%xmm0,%xmm3", 0xc5, 0xf9, 0x59, 0xd8 ); FCML_A64( "vmulpd (%rax),%ymm3,%ymm3", 0xc5, 0xe5, 0x59, 0x18 ); } void fcml_tf_instruction_MULPS(void) { FCML_I32( "mulps xmm2,xmmword ptr [eax]", 0x0F, 0x59, 0x10 ); FCML_I32( "mulps xmm3,xmm0", 0x0F, 0x59, 0xD8 ); FCML_I64( "mulps xmm2,xmmword ptr [rax]", 0x0F, 0x59, 0x10 ); FCML_I64( "vmulps xmm3,xmm0,xmm0", 0xc5, 0xf8, 0x59, 0xd8 ); FCML_I32( "vmulps ymm3,ymm0,ymm0", 0xc5, 0xfc, 0x59, 0xd8 ); FCML_I32( "vmulps ymm3,ymm3,ymmword ptr [eax]", 0xc5, 0xe4, 0x59, 0x18 ); FCML_A64( "mulps (%rax),%xmm2", 0x0f, 0x59, 0x10 ); FCML_A64( "mulps %xmm0,%xmm3", 0x0f, 0x59, 0xd8 ); FCML_A64( "vmulps (%rax),%ymm3,%ymm3", 0xc5, 0xe4, 0x59, 0x18 ); } void fcml_tf_instruction_MULSD(void) { FCML_I32( "mulsd xmm2,mmword ptr [eax]", 0xF2, 0x0F, 0x59, 0x10 ); FCML_I32( "mulsd xmm3,xmm0", 0xF2, 0x0F, 0x59, 0xD8 ); FCML_I64( "mulsd xmm2,mmword ptr [rax]", 0xF2, 0x0F, 0x59, 0x10 ); FCML_I3264( "vmulsd xmm3,xmm3,xmm0", 0xc5, 0xe3, 0x59, 0xd8 ); FCML_I32( "vmulsd xmm3,xmm0,mmword ptr [eax]", 0xc5, 0xfb, 0x59, 0x18 ); FCML_A64( "mulsd (%rax),%xmm2", 0xf2, 0x0f, 0x59, 0x10 ); FCML_A64( "mulsd %xmm0,%xmm3", 0xf2, 0x0f, 0x59, 0xd8 ); FCML_A64( "vmulsd (%rax),%xmm0,%xmm3", 0xc5, 0xfb, 0x59, 0x18 ); } void fcml_tf_instruction_MULSS(void) { FCML_I32( "mulss xmm2,dword ptr [eax]", 0xF3, 0x0F, 0x59, 0x10 ); FCML_I32( "mulss xmm3,xmm0", 0xF3, 0x0F, 0x59, 0xD8 ); FCML_I64( "mulss xmm2,dword ptr [rax]", 0xF3, 0x0F, 0x59, 0x10 ); FCML_I3264( "vmulss xmm3,xmm7,xmm0", 0xc5, 0xc2, 0x59, 0xd8 ); FCML_I32( "vmulss xmm3,xmm0,dword ptr [eax]", 0xc5, 0xfa, 0x59, 0x18 ); FCML_A64( "mulss %xmm0,%xmm3", 0xf3, 0x0f, 0x59, 0xd8 ); FCML_A64( "mulss (%rax),%xmm2", 0xf3, 0x0f, 0x59, 0x10 ); FCML_A64( "vmulss (%rax),%xmm0,%xmm3", 0xc5, 0xfa, 0x59, 0x18 ); } void fcml_tf_instruction_MWAIT(void) { FCML_I3264( "mwait", 0x0F, 0x01, 0xC9 ); FCML_A64( "mwait", 0x0f, 0x01, 0xc9 ); } void fcml_tf_instruction_MULX(void) { FCML_I32( "mulx eax,edi,dword ptr [eax]", 0xC4, 0xE2, 0x43, 0xF6, 0x00 ); FCML_I32( "mulx eax,edi,eax", 0xC4, 0xE2, 0x43, 0xF6, 0xC0 ); FCML_I64( "mulx rax,rdi,qword ptr [rax]", 0xC4, 0xE2, 0xC3, 0xF6, 0x00 ); FCML_I64( "mulx rax,rdi,rax", 0xC4, 0xE2, 0xC3, 0xF6, 0xC0 ); FCML_A64( "mulx (%rax),%rdi,%rax", 0xc4, 0xe2, 0xc3, 0xf6, 0x00 ); FCML_A64( "mulx %rax,%rdi,%rax", 0xc4, 0xe2, 0xc3, 0xf6, 0xc0 ); } fcml_stf_test_case fctl_ti_instructions_m[] = { { "fcml_tf_instruction_MASKMOVQ", fcml_tf_instruction_MASKMOVQ }, { "fcml_tf_instruction_MASKMOVDQU", fcml_tf_instruction_MASKMOVDQU }, { "fcml_tf_instruction_MAXPD", fcml_tf_instruction_MAXPD }, { "fcml_tf_instruction_MAXPS", fcml_tf_instruction_MAXPS }, { "fcml_tf_instruction_MAXSD", fcml_tf_instruction_MAXSD }, { "fcml_tf_instruction_MAXSS", fcml_tf_instruction_MAXSS }, { "fcml_tf_instruction_MFENCE", fcml_tf_instruction_MFENCE }, { "fcml_tf_instruction_MINPD", fcml_tf_instruction_MINPD }, { "fcml_tf_instruction_MINPS", fcml_tf_instruction_MINPS }, { "fcml_tf_instruction_MINSD", fcml_tf_instruction_MINSD }, { "fcml_tf_instruction_MINSS", fcml_tf_instruction_MINSS }, { "fcml_tf_instruction_MONITOR", fcml_tf_instruction_MONITOR }, { "fcml_tf_instruction_MOV", fcml_tf_instruction_MOV }, { "fcml_tf_instruction_MOVAPD", fcml_tf_instruction_MOVAPD }, { "fcml_tf_instruction_MOVAPS", fcml_tf_instruction_MOVAPS }, { "fcml_tf_instruction_MOVBE", fcml_tf_instruction_MOVBE }, { "fcml_tf_instruction_MOVD", fcml_tf_instruction_MOVD }, { "fcml_tf_instruction_MOVQ", fcml_tf_instruction_MOVQ }, { "fcml_tf_instruction_MOVDDUP", fcml_tf_instruction_MOVDDUP }, { "fcml_tf_instruction_MOVDQA", fcml_tf_instruction_MOVDQA }, { "fcml_tf_instruction_MOVDQU", fcml_tf_instruction_MOVDQU }, { "fcml_tf_instruction_MOVDQ2Q", fcml_tf_instruction_MOVDQ2Q }, { "fcml_tf_instruction_MOVHLPS", fcml_tf_instruction_MOVHLPS }, { "fcml_tf_instruction_MOVHPD", fcml_tf_instruction_MOVHPD }, { "fcml_tf_instruction_MOVHPS", fcml_tf_instruction_MOVHPS }, { "fcml_tf_instruction_MOVLHPS", fcml_tf_instruction_MOVLHPS }, { "fcml_tf_instruction_MOVLPD", fcml_tf_instruction_MOVLPD }, { "fcml_tf_instruction_MOVLPS", fcml_tf_instruction_MOVLPS }, { "fcml_tf_instruction_MOVMSKPD", fcml_tf_instruction_MOVMSKPD }, { "fcml_tf_instruction_MOVMSKPS", fcml_tf_instruction_MOVMSKPS }, { "fcml_tf_instruction_MOVNTDQA", fcml_tf_instruction_MOVNTDQA }, { "fcml_tf_instruction_MOVNTDQ", fcml_tf_instruction_MOVNTDQ }, { "fcml_tf_instruction_MOVNTI", fcml_tf_instruction_MOVNTI }, { "fcml_tf_instruction_MOVNTPD", fcml_tf_instruction_MOVNTPD }, { "fcml_tf_instruction_MOVNTPS", fcml_tf_instruction_MOVNTPS }, { "fcml_tf_instruction_MOVNTSD", fcml_tf_instruction_MOVNTSD }, { "fcml_tf_instruction_MOVNTSS", fcml_tf_instruction_MOVNTSS }, { "fcml_tf_instruction_MOVNTQ", fcml_tf_instruction_MOVNTQ }, { "fcml_tf_instruction_MOVQ2DQ", fcml_tf_instruction_MOVQ2DQ }, { "fcml_tf_instruction_MOVS", fcml_tf_instruction_MOVS }, { "fcml_tf_instruction_MOVSD", fcml_tf_instruction_MOVSD }, { "fcml_tf_instruction_MOVSHDUP", fcml_tf_instruction_MOVSHDUP }, { "fcml_tf_instruction_MOVSLDUP", fcml_tf_instruction_MOVSLDUP }, { "fcml_tf_instruction_MOVSS", fcml_tf_instruction_MOVSS }, { "fcml_tf_instruction_MOVSX", fcml_tf_instruction_MOVSX }, { "fcml_tf_instruction_MOVUPD", fcml_tf_instruction_MOVUPD }, { "fcml_tf_instruction_MOVUPS", fcml_tf_instruction_MOVUPS }, { "fcml_tf_instruction_MOVZX", fcml_tf_instruction_MOVZX }, { "fcml_tf_instruction_MPSADBW", fcml_tf_instruction_MPSADBW }, { "fcml_tf_instruction_MUL", fcml_tf_instruction_MUL }, { "fcml_tf_instruction_MULPD", fcml_tf_instruction_MULPD }, { "fcml_tf_instruction_MULPS", fcml_tf_instruction_MULPS }, { "fcml_tf_instruction_MULSD", fcml_tf_instruction_MULSD }, { "fcml_tf_instruction_MULSS", fcml_tf_instruction_MULSS }, { "fcml_tf_instruction_MWAIT", fcml_tf_instruction_MWAIT }, { "fcml_tf_instruction_MULX", fcml_tf_instruction_MULX }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_m = { "suite-fctl_ti_instructions_m", fcml_tf_instructions_m_suite_init, fcml_tf_instructions_m_suite_cleanup, fctl_ti_instructions_m }; fcml-1.1.1/check/public-tests/instructions_i_t.c0000644000175000017500000003376612560745216016641 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "instructions_i_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_i_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_i_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_IDIV(void) { FCML_I32( "idiv ax,byte ptr [ebx]", 0xF6, 0x3B ); FCML_I32( "idiv ax,byte ptr [ebx]", 0x66, 0xF6, 0x3B ); FCML_I64( "idiv ax,sil", 0x40, 0xF6, 0xFE ); FCML_I64( "idiv ax,dh", 0xF6, 0xFE ); FCML_I32( "idiv eax,dword ptr [ebx]", 0xF7, 0x3B ); FCML_I32( "idiv ax,word ptr [ebx]", 0x66, 0xF7, 0x3B ); FCML_I64( "idiv rax,rsi", 0x48, 0xF7, 0xFE ); FCML_I64( "idiv eax,esi", 0xF7, 0xFE ); FCML_A64( "idivb (%rbx),%ax", 0xf6, 0x3b ); FCML_A64( "idivb %dh,%ax", 0xf6, 0xfe ); FCML_A64( "idivl (%rbx),%eax", 0xf7, 0x3b ); FCML_A64( "idivw (%rbx),%ax", 0x66, 0xf7, 0x3b ); FCML_A64( "idivl %esi,%eax", 0xf7, 0xfe ); FCML_A64_A( "idiv %esi,%eax", 0xf7, 0xfe ); FCML_A64( "idivq %rsi,%rax", 0x48, 0xf7, 0xfe ); FCML_A64_A( "idiv %rsi,%rax", 0x48, 0xf7, 0xfe ); } void fcml_tf_instruction_IMUL(void) { FCML_I32( "imul byte ptr [eax+00000020h]", 0xF6, 0x68, 0x20 ); FCML_I32( "imul byte ptr [eax+00000020h]", 0x66, 0xF6, 0x68, 0x20 ); FCML_I64( "imul byte ptr [rax+0000000000000020h]", 0xF6, 0x68, 0x20 ); FCML_A64( "imulb 0x0000000000000020(%rax)", 0xf6, 0x68, 0x20 ); FCML_I32( "imul dword ptr [eax+00000020h]", 0xF7, 0x68, 0x20 ); FCML_I32( "imul word ptr [eax+00000020h]", 0x66, 0xF7, 0x68, 0x20 ); FCML_I64( "imul dword ptr [rax+0000000000000020h]", 0xF7, 0x68, 0x20 ); FCML_I64( "imul word ptr [rax+0000000000000020h]", 0x66, 0xF7, 0x68, 0x20 ); FCML_I64( "imul qword ptr [rax+0000000000000020h]", 0x48, 0xF7, 0x68, 0x20 ); FCML_A64( "imull 0x0000000000000020(%rax)", 0xf7, 0x68, 0x20 ); FCML_A64( "imulw 0x0000000000000020(%rax)", 0x66, 0xf7, 0x68, 0x20 ); FCML_A64( "imulq 0x0000000000000020(%rax)", 0x48, 0xf7, 0x68, 0x20 ); FCML_I32( "imul ebp,dword ptr [eax+00000020h]", 0x0F, 0xAF, 0x68, 0x20 ); FCML_I32( "imul bp,word ptr [eax+00000020h]", 0x66, 0x0F, 0xAF, 0x68, 0x20 ); FCML_I64( "imul ebp,dword ptr [rax+0000000000000020h]", 0x0F, 0xAF, 0x68, 0x20 ); FCML_I64( "imul bp,word ptr [rax+0000000000000020h]", 0x66, 0x0F, 0xAF, 0x68, 0x20 ); FCML_I64( "imul rbp,qword ptr [rax+0000000000000020h]", 0x48, 0x0F, 0xAF, 0x68, 0x20 ); FCML_A64( "imull 0x0000000000000020(%rax),%ebp", 0x0f, 0xaf, 0x68, 0x20 ); FCML_A64( "imulw 0x0000000000000020(%rax),%bp", 0x66, 0x0f, 0xaf, 0x68, 0x20 ); FCML_A64( "imulq 0x0000000000000020(%rax),%rbp", 0x48, 0x0f, 0xaf, 0x68, 0x20 ); FCML_A64_A( "imul 0x0000000000000020(%rax),%ebp", 0x0f, 0xaf, 0x68, 0x20 ); FCML_A64_A( "imul 0x0000000000000020(%rax),%bp", 0x66, 0x0f, 0xaf, 0x68, 0x20 ); FCML_A64_A( "imul 0x0000000000000020(%rax),%rbp", 0x48, 0x0f, 0xaf, 0x68, 0x20 ); FCML_I32_M( "imul ebp,dword ptr [eax+00000020h],00000040h", 2, FCML_MI( 0x6B, 0x68, 0x20, 0x40 ), FCML_MI( 0x69, 0x68, 0x20, 0x40, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "imul bp,word ptr [eax+00000020h],0040h", 2, FCML_MI( 0x66, 0x6B, 0x68, 0x20, 0x40 ), FCML_MI( 0x66, 0x69, 0x68, 0x20, 0x40, 0x00 ) ); FCML_I64_M( "imul ebp,dword ptr [rax+0000000000000020h],00000040h", 2, FCML_MI( 0x6B, 0x68, 0x20, 0x40 ), FCML_MI( 0x69, 0x68, 0x20, 0x40, 0x00, 0x00, 0x00 ) ); FCML_I64_M( "imul bp,word ptr [rax+0000000000000020h],0040h", 2, FCML_MI( 0x66, 0x6B, 0x68, 0x20, 0x40 ), FCML_MI( 0x66, 0x69, 0x68, 0x20, 0x40, 0x00 ) ); FCML_I64_M( "imul rbp,qword ptr [rax+0000000000000020h],0000000000000040h", 2, FCML_MI( 0x48, 0x6B, 0x68, 0x20, 0x40 ), FCML_MI( 0x48, 0x69, 0x68, 0x20, 0x40, 0x00, 0x00, 0x00 ) ); FCML_A64_M( "imulq $0x0000000000000040,0x0000000000000020(%rax),%rbp", 2, FCML_MI( 0x48, 0x6B, 0x68, 0x20, 0x40 ), FCML_MI( 0x48, 0x69, 0x68, 0x20, 0x40, 0x00, 0x00, 0x00 ) ); FCML_I32( "imul ebp,dword ptr [eax+00000020h],70605040h", 0x69, 0x68, 0x20, 0x40, 0x50, 0x60, 0x70 ); FCML_I32( "imul bp,word ptr [eax+00000020h],5040h", 0x66, 0x69, 0x68, 0x20, 0x40, 0x50 ); FCML_I64( "imul ebp,dword ptr [rax+0000000000000020h],70605040h", 0x69, 0x68, 0x20, 0x40, 0x50, 0x60, 0x70 ); FCML_I64( "imul bp,word ptr [rax+0000000000000020h],5040h", 0x66, 0x69, 0x68, 0x20, 0x40, 0x50 ); FCML_A64( "imulw $0x5040,0x0000000000000020(%rax),%bp", 0x66, 0x69, 0x68, 0x20, 0x40, 0x50 ); FCML_A64_A( "imul $0x5040,0x0000000000000020(%rax),%bp", 0x66, 0x69, 0x68, 0x20, 0x40, 0x50 ); /* In this case value is not sign extended to 64 bits, so can not be treated as signed! */ FCML_I64_A_FAILED( "imul rbp,qword ptr [rax+0000000000000020h],0ffffffffff605040h", 0x48, 0x69, 0x68, 0x20, 0x40, 0x50, 0x60, 0xFF ); FCML_I64_D( "imul rbp,qword ptr [rax+0000000000000020h],0ff605040h", 0x48, 0x69, 0x68, 0x20, 0x40, 0x50, 0x60, 0xFF ); FCML_A64( "imulq $0xff605040,0x0000000000000020(%rax),%rbp", 0x48, 0x69, 0x68, 0x20, 0x40, 0x50, 0x60, 0xff ); } void fcml_tf_instruction_IN(void) { FCML_I32( "in al,20h", 0xE4, 0x20 ); FCML_I64( "in al,20h", 0x66, 0xE4, 0x20 ); FCML_I32( "in eax,20h", 0xE5, 0x20 ); FCML_I32( "in ax,20h", 0x66, 0xE5, 0x20 ); FCML_I64_D( "in eax,20h", 0x48, 0xE5, 0x20 ); FCML_I32( "in al,dx", 0xEC ); FCML_I64( "in al,dx", 0x66, 0xEC ); FCML_I32( "in eax,dx", 0xED ); FCML_I32( "in ax,dx", 0x66, 0xED ); FCML_I64_D( "in eax,dx", 0x48, 0xED ); FCML_A64( "in $0x20,%al", 0xe4, 0x20 ); FCML_A64( "in $0x20,%eax", 0xe5, 0x20 ); FCML_A64( "in $0x20,%ax", 0x66, 0xe5, 0x20 ); /* TODO: Gas also supports following form: "in (%dx),%eax" so it should be supported in the future. */ FCML_A64( "in %dx,%al", 0xec ); } void fcml_tf_instruction_INC(void) { FCML_I32_M( "inc eax", 2, FCML_MI( 0x40 ), FCML_MI( 0xff, 0xc0 ) ); FCML_I32_M( "inc ax", 2, FCML_MI( 0x66, 0x40 ), FCML_MI( 0x66, 0xff, 0xc0 ) ); FCML_I32_M( "inc ecx", 2, FCML_MI( 0x41 ), FCML_MI( 0xff, 0xc1 ) ); FCML_I32_M( "inc cx", 2, FCML_MI( 0x66, 0x41 ), FCML_MI( 0x66, 0xff, 0xc1 ) ); FCML_I32( "lock inc dword ptr [ebx]", 0xF0, 0xFF, 0x03 ); FCML_I32( "xacquire lock inc dword ptr [ebx]", 0xF2, 0xF0, 0xFF, 0x03 ); FCML_I32( "xrelease lock inc dword ptr [ebx]", 0xF3, 0xF0, 0xFF, 0x03 ); FCML_I32( "inc word ptr [ebx]", 0x66, 0xFF, 0x03 ); FCML_I64( "inc dword ptr [rbx]", 0xFF, 0x03 ); FCML_I64( "inc qword ptr [rbx]", 0x48, 0xFF, 0x03 ); FCML_I64_D( "inc word ptr [rbx]", 0x66, 0x40, 0xFF, 0x03 ); FCML_I64( "inc r12", 0x49, 0xFF, 0xC4 ); FCML_A64( "incw %ax", 0x66, 0xff, 0xc0 ); FCML_A64_A( "inc %ax", 0x66, 0xff, 0xc0 ); FCML_A64( "incl (%rax)", 0xff, 0x00 ); FCML_A64( "incw (%rax)", 0x66, 0xff, 0x00 ); FCML_A64( "incq (%rax)", 0x48, 0xff, 0x00 ); FCML_I32( "lock inc byte ptr [eax]", 0xF0, 0xFE, 0x00 ); FCML_I32( "xacquire lock inc byte ptr [eax]", 0xF2, 0xF0, 0xFE, 0x00 ); FCML_I32( "xrelease lock inc byte ptr [eax]", 0xF3, 0xF0, 0xFE, 0x00 ); FCML_I64( "inc byte ptr [rax]", 0xFE, 0x00 ); FCML_I64_D( "inc byte ptr [rax]", 0x48, 0xFE, 0x00 ); FCML_I64( "inc spl", 0x40, 0xFE, 0xC4 ); FCML_A64( "lock incb (%rax)", 0xf0, 0xfe, 0x00 ); FCML_A64( "incb (%rax)", 0xfe, 0x00 ); FCML_A64( "incb %spl", 0x40, 0xfe, 0xc4 ); FCML_A64_A( "inc %spl", 0x40, 0xfe, 0xc4 ); FCML_I32_M( "inc eax", 2, FCML_MI( 0x40 ), FCML_MI( 0xff, 0xc0 ) ); FCML_I32_M( "inc ecx", 2, FCML_MI( 0x41 ), FCML_MI( 0xff, 0xc1 ) ); FCML_I32_M( "inc dx", 2, FCML_MI( 0x66, 0x42 ), FCML_MI( 0x66, 0xff, 0xc2 ) ); FCML_A32_M( "inc %eax", 2, FCML_MI( 0x40 ), FCML_MI( 0xff, 0xc0 ) ); FCML_A32_M( "inc %ecx", 2, FCML_MI( 0x41 ), FCML_MI( 0xff, 0xc1 ) ); FCML_A32_M( "inc %dx", 2, FCML_MI( 0x66, 0x42 ), FCML_MI( 0x66, 0xff, 0xc2 ) ); } void fcml_tf_instruction_INS(void) { FCML_I32( "rep ins byte ptr [edi],dx", 0xF3, 0x6c ); FCML_I64( "ins byte ptr [rdi],dx", 0x6c ); FCML_I64( "ins byte ptr [edi],dx", 0x67, 0x6c ); FCML_I32( "rep ins dword ptr [edi],dx", 0xF3, 0x6D ); FCML_I64( "ins dword ptr [rdi],dx", 0x6D ); FCML_I64( "ins dword ptr [edi],dx", 0x67, 0x6D ); FCML_I64( "ins word ptr [edi],dx", 0x66, 0x67, 0x6D ); FCML_I64_D( "ins dword ptr [rdi],dx", 0x48, 0x6D ); FCML_I32_A( "insb", 0x6c ); FCML_I32_A( "insw", 0x66, 0x6D ); FCML_I32_A( "insd", 0x6D ); FCML_A64( "insb %dx,(%rdi)", 0x6c ); FCML_A64( "insb %dx,(%edi)", 0x67, 0x6c ); FCML_A64( "insl %dx,(%rdi)", 0x6d ); FCML_A64( "insl %dx,(%edi)", 0x67, 0x6d ); FCML_A64( "insw %dx,(%edi)", 0x66, 0x67, 0x6d ); } void fcml_tf_instruction_INSERTPS(void) { FCML_I32( "insertps xmm4,dword ptr [eax],40h", 0x66, 0x0F, 0x3A, 0x21, 0x20, 0x40 ); FCML_I64( "insertps xmm4,dword ptr [rax],40h", 0x66, 0x0F, 0x3A, 0x21, 0x20, 0x40 ); FCML_I64( "vinsertps xmm8,xmm14,dword ptr [r8],20h", 0xC4, 0x43, 0x09, 0x21, 0x00, 0x20 ); FCML_I32( "vinsertps xmm0,xmm6,dword ptr [eax],20h", 0xC4, 0xE3, 0x49, 0x21, 0x00, 0x20 ); FCML_I32( "vinsertps xmm0,xmm6,xmm0,20h", 0xC4, 0xE3, 0x49, 0x21, 0xC0, 0x20 ); FCML_A64( "insertps $0x40,(%rax),%xmm4", 0x66, 0x0f, 0x3a, 0x21, 0x20, 0x40 ); FCML_A64( "vinsertps $0x20,(%r8),%xmm14,%xmm8", 0xc4, 0x43, 0x09, 0x21, 0x00, 0x20 ); } void fcml_tf_instruction_INSERTQ(void) { FCML_I32( "insertq xmm3,xmm2,01h,02h", 0xF2, 0x0F, 0x78, 0xDA, 0x01, 0x02 ); FCML_I64( "insertq xmm3,xmm2,01h,02h", 0xF2, 0x0F, 0x78, 0xDA, 0x01, 0x02 ); FCML_I32( "insertq xmm3,xmm2", 0xF2, 0x0F, 0x79, 0xDA ); FCML_I64( "insertq xmm3,xmm2", 0xF2, 0x0F, 0x79, 0xDA ); FCML_A64( "insertq $0x02,$0x01,%xmm2,%xmm3", 0xf2, 0x0f, 0x78, 0xda, 0x01, 0x02 ); FCML_A64( "insertq %xmm2,%xmm3", 0xf2, 0x0f, 0x79, 0xda ); } void fcml_tf_instruction_INT(void) { FCML_I3264( "int3", 0xCC ); FCML_I3264( "int 20h", 0xcd, 0x20 ); FCML_I32( "into", 0xCE ); FCML_I64_FAILED( "into", 0xCE ); FCML_A64( "int3", 0xcc ); FCML_A64( "int $0x20", 0xcd, 0x20 ); FCML_A32( "into", 0xCE ); } void fcml_tf_instruction_INVD(void) { FCML_I3264( "invd", 0x0F, 0x08 ); } void fcml_tf_instruction_INVLPG(void) { FCML_I32( "invlpg [eax+00000020h]", 0x0F, 0x01, 0x78, 0x20 ); FCML_I64( "invlpg [rax+0000000000000020h]", 0x0F, 0x01, 0x78, 0x20 ); FCML_A64( "invlpg 0x0000000000000020(%rax)", 0x0f, 0x01, 0x78, 0x20 ); } void fcml_tf_instruction_INVLPGA(void) { FCML_I32( "invlpga eax,ecx", 0x0F, 0x01, 0xDF ); FCML_I32( "invlpga ax,ecx", 0x67, 0x0F, 0x01, 0xDF ); FCML_I64( "invlpga rax,ecx", 0x0F, 0x01, 0xDF ); FCML_I64( "invlpga eax,ecx", 0x67, 0x0F, 0x01, 0xDF ); FCML_A64( "invlpga %ecx,%rax", 0x0f, 0x01, 0xdf ); FCML_A64_A( "invlpga", 0x0f, 0x01, 0xdf ); } void fcml_tf_instruction_INVPCID(void) { FCML_I32( "invpcid edx,oword ptr [eax]", 0x66, 0x0F, 0x38, 0x82, 0x10 ); FCML_I64( "invpcid rdx,oword ptr [rax]", 0x66, 0x0F, 0x38, 0x82, 0x10 ); FCML_A64( "invpcid (%rax),%rdx", 0x66, 0x0f, 0x38, 0x82, 0x10 ); FCML_A64( "invpcid (%rax),%rdx", 0x66, 0x0f, 0x38, 0x82, 0x10 ); } void fcml_tf_instruction_IRET(void) { FCML_I32( "iretd", 0xCF ); FCML_I32( "iret", 0x66, 0xCF ); FCML_I64( "iretd", 0xCF ); FCML_I64( "iret", 0x66, 0xCF ); FCML_I64( "iretq", 0x48, 0xCF ); FCML_A64( "iret", 0xcf ); FCML_A64( "iretw", 0x66, 0xcf ); FCML_A64( "iretq", 0x48, 0xcf ); } void fcml_tf_instruction_INVEPT(void) { FCML_I32( "invept esp,oword ptr [eax]", 0x66, 0x0F, 0x38, 0x80, 0x20 ); FCML_I64( "invept rsp,oword ptr [rax]", 0x66, 0x0F, 0x38, 0x80, 0x20 ); FCML_I32_A( "invept esp,[eax]", 0x66, 0x0F, 0x38, 0x80, 0x20 ); FCML_I64_A( "invept rsp,[rax]", 0x66, 0x0F, 0x38, 0x80, 0x20 ); FCML_A64( "invept (%rax),%rsp", 0x66, 0x0f, 0x38, 0x80, 0x20 ); } void fcml_tf_instruction_INVVPID(void) { FCML_I32( "invvpid esp,oword ptr [eax]", 0x66, 0x0F, 0x38, 0x81, 0x20 ); FCML_I64( "invvpid rsp,oword ptr [rax]", 0x66, 0x0F, 0x38, 0x81, 0x20 ); FCML_I32_A( "invvpid esp,[eax]", 0x66, 0x0F, 0x38, 0x81, 0x20 ); FCML_I64_A( "invvpid rsp,[rax]", 0x66, 0x0F, 0x38, 0x81, 0x20 ); FCML_A64( "invvpid (%rax),%rsp", 0x66, 0x0f, 0x38, 0x81, 0x20 ); FCML_A64( "invvpid (%rax),%rsp", 0x66, 0x0f, 0x38, 0x81, 0x20 ); } fcml_stf_test_case fctl_ti_instructions_i[] = { { "fcml_tf_instruction_IDIV", fcml_tf_instruction_IDIV }, { "fcml_tf_instruction_IMUL", fcml_tf_instruction_IMUL }, { "fcml_tf_instruction_IN", fcml_tf_instruction_IN }, { "fcml_tf_instruction_INC", fcml_tf_instruction_INC }, { "fcml_tf_instruction_INS", fcml_tf_instruction_INS }, { "fcml_tf_instruction_INSERTPS", fcml_tf_instruction_INSERTPS }, { "fcml_tf_instruction_INSERTQ", fcml_tf_instruction_INSERTQ }, { "fcml_tf_instruction_INT", fcml_tf_instruction_INT }, { "fcml_tf_instruction_INVD", fcml_tf_instruction_INVD }, { "fcml_tf_instruction_INVLPG", fcml_tf_instruction_INVLPG }, { "fcml_tf_instruction_INVLPGA", fcml_tf_instruction_INVLPGA }, { "fcml_tf_instruction_INVPCID", fcml_tf_instruction_INVPCID }, { "fcml_tf_instruction_IRET", fcml_tf_instruction_IRET }, { "fcml_tf_instruction_INVEPT", fcml_tf_instruction_INVEPT }, { "fcml_tf_instruction_INVVPID", fcml_tf_instruction_INVVPID }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_i = { "suite-fctl_ti_instructions_i", fcml_tf_instructions_i_suite_init, fcml_tf_instructions_i_suite_cleanup, fctl_ti_instructions_i }; fcml-1.1.1/check/public-tests/instructions_b_t.c0000644000175000017500000005264212560745216016624 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "instructions_b_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_b_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_b_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_BLENDPD_VBLENDPD(void) { FCML_I32( "blendpd xmm2,xmmword ptr [ecx+eax],0ffh", 0x66, 0x0F, 0x3a, 0x0D, 0x14, 0x01, 0xFF ); FCML_I64( "blendpd xmm2,xmmword ptr [rcx+rax],0ffh", 0x66, 0x0F, 0x3a, 0x0D, 0x14, 0x01, 0xFF ); FCML_A64( "blendpd $0xff,(%rcx,%rax),%xmm2", 0x66, 0x0F, 0x3a, 0x0D, 0x14, 0x01, 0xFF ); FCML_I64( "vblendpd ymm10,ymm14,ymmword ptr [r9+rax],20h", 0xC4, 0x43, 0x0D, 0x0D, 0x14, 0x01, 0x20 ); FCML_I32_D( "vblendpd xmm2,xmm7,xmmword ptr [ecx+eax],20h", 0xC4, 0xC3, 0x41, 0x0D, 0x14, 0x01, 0x20 ); /* REX.B ignored in 32bit mode.*/ FCML_I32_D( "vblendpd xmm2,xmm2,xmmword ptr [ecx+eax],20h", 0xC4, 0xC3, 0x69, 0x0D, 0x14, 0x01, 0x20 ); /* REX.B ignored in 32bit mode.*/ FCML_I32( "vblendpd xmm2,xmm7,xmmword ptr [ecx+eax],20h", 0xC4, 0xE3, 0x41, 0x0D, 0x14, 0x01, 0x20 ); FCML_I32( "vblendpd xmm2,xmm2,xmmword ptr [ecx+eax],20h", 0xC4, 0xE3, 0x69, 0x0D, 0x14, 0x01, 0x20 ); FCML_A32( "vblendpd $0x20,(%ecx,%eax),%xmm2,%xmm2", 0xC4, 0xE3, 0x69, 0x0D, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_BLENDPS_VBLENDPS(void) { FCML_I32( "blendps xmm2,xmmword ptr [ecx+eax],0ffh", 0x66, 0x0F, 0x3a, 0x0C, 0x14, 0x01, 0xFF ); FCML_A64( "blendps $0xff,(%rcx,%rax),%xmm2", 0x66, 0x0F, 0x3a, 0x0C, 0x14, 0x01, 0xFF ); FCML_I64( "vblendps ymm10,ymm14,ymmword ptr [r9+rax],20h", 0xC4, 0x43, 0x0D, 0x0C, 0x14, 0x01, 0x20 ); FCML_I32( "vblendps xmm2,xmm7,xmmword ptr [ecx+eax],20h", 0xC4, 0xE3, 0x41, 0x0C, 0x14, 0x01, 0x20 ); FCML_I32( "vblendps xmm2,xmm2,xmmword ptr [ecx+eax],20h", 0xC4, 0xE3, 0x69, 0x0C, 0x14, 0x01, 0x20 ); FCML_A64( "vblendps $0x20,(%rcx,%rax),%xmm2,%xmm2", 0xC4, 0xE3, 0x69, 0x0C, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_BLENDVPD_VBLENDVPD(void) { FCML_I32( "blendvpd xmm2,xmmword ptr [ecx+eax],xmm0", 0x66, 0x0F, 0x38, 0x15, 0x14, 0x01 ); FCML_I64( "blendvpd xmm2,xmmword ptr [rcx+rax],xmm0", 0x66, 0x0F, 0x38, 0x15, 0x14, 0x01 ); FCML_A64( "blendvpd %xmm0,(%rcx,%rax),%xmm2", 0x66, 0x0F, 0x38, 0x15, 0x14, 0x01 ); FCML_I64( "vblendvpd ymm10,ymm14,ymmword ptr [r9+rax],ymm2", 0xC4, 0x43, 0x0D, 0x4B, 0x14, 0x01, 0x20 ); FCML_A64( "vblendvpd %ymm2,(%r9,%rax),%ymm14,%ymm10", 0xC4, 0x43, 0x0D, 0x4B, 0x14, 0x01, 0x20 ); FCML_I32( "vblendvpd xmm2,xmm7,xmmword ptr [ecx+eax],xmm2", 0xC4, 0xE3, 0x41, 0x4B, 0x14, 0x01, 0x20 ); FCML_I32_A( "vblendvpd xmm2,xmm7,[ecx+eax],xmm2", 0xC4, 0xE3, 0x41, 0x4B, 0x14, 0x01, 0x20 ); FCML_I32_D( "vblendvpd xmm2,xmm2,xmmword ptr [ecx+eax],xmm2", 0xC4, 0xE3, 0x69, 0x4B, 0x14, 0x01, 0xA0 ); FCML_I32( "vblendvpd xmm2,xmm2,xmmword ptr [ecx+eax],xmm2", 0xC4, 0xE3, 0x69, 0x4B, 0x14, 0x01, 0x20 ); FCML_A32( "vblendvpd %xmm2,(%ecx,%eax),%xmm2,%xmm2", 0xC4, 0xE3, 0x69, 0x4B, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_BLENDVPS_VBLENDVPS(void) { FCML_I32( "blendvps xmm2,xmmword ptr [ecx+eax],xmm0", 0x66, 0x0F, 0x38, 0x14, 0x14, 0x01 ); FCML_I64( "blendvps xmm2,xmmword ptr [rcx+rax],xmm0", 0x66, 0x0F, 0x38, 0x14, 0x14, 0x01 ); FCML_A64( "blendvps %xmm0,(%rcx,%rax),%xmm2", 0x66, 0x0F, 0x38, 0x14, 0x14, 0x01 ); FCML_I64( "vblendvps ymm10,ymm14,ymmword ptr [r9+rax],ymm2", 0xC4, 0x43, 0x0D, 0x4A, 0x14, 0x01, 0x20 ); FCML_I64_A( "vblendvps ymm10,ymm14,[r9+rax],ymm2", 0xC4, 0x43, 0x0D, 0x4A, 0x14, 0x01, 0x20 ); FCML_I32( "vblendvps xmm2,xmm7,xmmword ptr [ecx+eax],xmm2", 0xC4, 0xE3, 0x41, 0x4A, 0x14, 0x01, 0x20 ); FCML_I32_D( "vblendvps xmm2,xmm2,xmmword ptr [ecx+eax],xmm2", 0xC4, 0xC3, 0x69, 0x4A, 0x14, 0x01, 0xA0 ); FCML_A32( "vblendvps %xmm2,(%ecx,%eax),%xmm2,%xmm2", 0xC4, 0xE3, 0x69, 0x4A, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_BOUND(void) { FCML_I32( "bound esi,qword ptr [eax]", 0x62, 0x30 ); FCML_I32_A( "bound esi,[eax]", 0x62, 0x30 ); FCML_A32( "bound %esi,(%eax)", 0x62, 0x30 ); FCML_I32( "bound si,dword ptr [eax]", 0x66, 0x62, 0x30 ); FCML_I32( "bound si,dword ptr [bx+si]", 0x66, 0x67, 0x62, 0x30 ); /* Not supported in 64. */ FCML_I64_FAILED( "bound si,dword ptr [eax]", 0x62, 0x30 ); /* Addressing not supported, only memory addressing is allowed here. */ FCML_I64_FAILED( "bound si,dword ptr eax", 0x62, 0xc0 ); } void fcml_tf_instruction_BSF(void) { FCML_I32( "bsf esp,dword ptr [ebp+04030201h]", 0x0f, 0xbc, 0xa5, 0x01, 0x02, 0x03, 0x04 ); FCML_I32( "bsf sp,word ptr [di+0201h]", 0x66, 0x67, 0x0f, 0xbc, 0xa5, 0x01, 0x02 ); FCML_A32( "bsf 0x0201(%di),%sp", 0x66, 0x67, 0x0f, 0xbc, 0xa5, 0x01, 0x02 ); FCML_I32( "bsf esp,dword ptr [di+0201h]", 0x67, 0x0f, 0xbc, 0xa5, 0x01, 0x02 ); FCML_I64( "bsf r12,qword ptr [r9+rcx*4+0000000000000001h]", 0x4D, 0x0f, 0xbc, 0x64, 0x89, 0x01 ); FCML_A64( "bsf 0x0000000000000001(%r9,%rcx,4),%r12", 0x4D, 0x0f, 0xbc, 0x64, 0x89, 0x01 ); } void fcml_tf_instruction_BSR(void) { /* We can only assemble BSR instructions, because they are always disassembled to BSF. */ FCML_I32_A( "bsr esp,dword ptr [ebp+04030201h]", 0x0f, 0xbc, 0xa5, 0x01, 0x02, 0x03, 0x04 ); FCML_A32_A( "bsr 0x04030201(%ebp),%esp", 0x0f, 0xbc, 0xa5, 0x01, 0x02, 0x03, 0x04 ); FCML_I32_A( "bsr sp,word ptr [di+0201h]", 0x66, 0x67, 0x0f, 0xbc, 0xa5, 0x01, 0x02 ); FCML_I32_A( "bsr esp,dword ptr [di+0201h]", 0x67, 0x0f, 0xbc, 0xa5, 0x01, 0x02 ); FCML_I64_A( "bsr r12,qword ptr [r9+rcx*4+0000000000000001h]", 0x4D, 0x0f, 0xbc, 0x64, 0x89, 0x01 ); FCML_A64_A( "bsr 0x00000001(%r9,%rcx,4),%r12", 0x4D, 0x0f, 0xbc, 0x64, 0x89, 0x01 ); } void fcml_tf_instruction_BSWAP(void) { FCML_I3264( "bswap eax", 0x0f, 0xc8 ); FCML_I3264( "bswap ecx", 0x0f, 0xc9 ); FCML_I3264( "bswap edx", 0x0f, 0xca ); FCML_I3264( "bswap ebx", 0x0f, 0xcb ); FCML_I3264( "bswap esp", 0x0f, 0xcc ); FCML_I3264( "bswap ebp", 0x0f, 0xcd ); FCML_I3264( "bswap esi", 0x0f, 0xce ); FCML_I3264( "bswap edi", 0x0f, 0xcf ); FCML_I3264_D( "bswap eax", 0x66, 0x0f, 0xc8 ); FCML_A32_A( "bswap %eax", 0x0f, 0xc8 ); FCML_I3264_D( "bswap ecx", 0x66, 0x0f, 0xc9 ); FCML_I3264_D( "bswap edx", 0x66, 0x0f, 0xca ); FCML_I3264_D( "bswap ebx", 0x66, 0x0f, 0xcb ); FCML_I3264_D( "bswap esp", 0x66, 0x0f, 0xcc ); FCML_I3264_D( "bswap ebp", 0x66, 0x0f, 0xcd ); FCML_I3264_D( "bswap esi", 0x66, 0x0f, 0xce ); FCML_I3264_D( "bswap edi", 0x66, 0x0f, 0xcf ); FCML_I64( "bswap r8", 0x49, 0x0f, 0xc8 ); FCML_A64( "bswap %r8", 0x49, 0x0f, 0xc8 ); FCML_I64( "bswap r9", 0x49, 0x0f, 0xc9 ); FCML_I64( "bswap r10", 0x49, 0x0f, 0xca ); FCML_I64( "bswap r11", 0x49, 0x0f, 0xcb ); FCML_I64( "bswap r12", 0x49, 0x0f, 0xcc ); FCML_I64( "bswap r13", 0x49, 0x0f, 0xcd ); FCML_I64( "bswap r14", 0x49, 0x0f, 0xce ); FCML_I64( "bswap r15", 0x49, 0x0f, 0xcf ); } void fcml_tf_instruction_BT(void) { FCML_I32( "bt dword ptr [esi],eax", 0x0F, 0xA3, 0x06 ); FCML_A32( "bt %eax,(%esi)", 0x0F, 0xA3, 0x06 ); FCML_I32( "bt word ptr [esi],ax", 0x66, 0x0F, 0xA3, 0x06 ); FCML_I32( "bt dword ptr [0201h],eax", 0x67, 0x0F, 0xA3, 0x06, 0x01, 0x02 ); FCML_A32( "bt %eax,0x0201", 0x67, 0x0F, 0xA3, 0x06, 0x01, 0x02 ); FCML_I64( "bt dword ptr [rdi+0000000004030201h],05h", 0x0F, 0xBA, 0xA7, 0x01, 0x02, 0x03, 0x4, 0x05 ); FCML_A64( "btl $0x05,0x0000000004030201(%rdi)", 0x0F, 0xBA, 0xA7, 0x01, 0x02, 0x03, 0x4, 0x05 ); /* Memory data size has to be set. Default size is not supported (and probably won't be) like it is in GAS. */ FCML_A64_A_FAILED( "bt $0x05,0x0000000004030201(%rdi)", 0x0F, 0xBA, 0xA7, 0x01, 0x02, 0x03, 0x4, 0x05 ); FCML_I64( "bt dword ptr [edi+04030201h],05h", 0x67, 0x0F, 0xBA, 0xA7, 0x01, 0x02, 0x03, 0x4, 0x05 ); FCML_I32( "bt dword ptr [edi+04030201h],05h", 0x0f, 0xba, 0xa7, 0x01, 0x02, 0x03, 0x04, 0x05 ); FCML_I64( "bt qword ptr [rdi+0000000004030201h],05h", 0x48, 0x0F, 0xBA, 0xA7, 0x01, 0x02, 0x03, 0x4, 0x05 ); FCML_I64( "bt qword ptr [rdi+0000000004030201h],0ffh", 0x48, 0x0F, 0xBA, 0xA7, 0x01, 0x02, 0x03, 0x4, 0xff ); } void fcml_tf_instruction_BTC(void) { FCML_I32( "btc dword ptr [esi],eax", 0x0F, 0xBB, 0x06 ); FCML_A32( "btc %eax,(%esi)", 0x0F, 0xBB, 0x06 ); FCML_I32( "btc eax,eax", 0x0F, 0xBB, 0xC0 ); FCML_I32_A_FAILED( "lock btc eax,eax", 0xF0, 0x0F, 0xBB, 0xC0 ); /* Such addressing mode is supported but only by disassembler, assembler doesn't allow it. */ FCML_I32_D( "lock btc eax,eax", 0xF0, 0x0F, 0xBB, 0xC0 ); FCML_I32( "lock btc dword ptr [esi],eax", 0xF0, 0x0F, 0xBB, 0x06 ); FCML_I32( "xacquire lock btc dword ptr [esi],eax", 0xF2, 0xF0, 0x0F, 0xBB, 0x06 ); FCML_I32( "xrelease lock btc dword ptr [esi],eax", 0xF3, 0xF0, 0x0F, 0xBB, 0x06 ); FCML_I32( "btc word ptr [esi],ax", 0x66, 0x0F, 0xBB, 0x06 ); FCML_I32( "btc dword ptr [0201h],eax", 0x67, 0x0F, 0xBB, 0x06, 0x01, 0x02 ); FCML_I64( "btc dword ptr [rdi+0000000004030201h],05h", 0x0F, 0xBA, 0xBF, 0x01, 0x02, 0x03, 0x4, 0x05 ); FCML_A64( "btcl $0x05,0x0000000004030201(%rdi)", 0x0F, 0xBA, 0xBF, 0x01, 0x02, 0x03, 0x4, 0x05 ); FCML_I64( "btc dword ptr [edi+04030201h],05h", 0x67, 0x0F, 0xBA, 0xBF, 0x01, 0x02, 0x03, 0x4, 0x05 ); FCML_I64( "btc qword ptr [rdi+0000000004030201h],05h", 0x48, 0x0F, 0xBA, 0xBF, 0x01, 0x02, 0x03, 0x4, 0x05 ); FCML_I64( "btc qword ptr [rdi+0000000004030201h],0ffh", 0x48, 0x0F, 0xBA, 0xBF, 0x01, 0x02, 0x03, 0x4, 0xff ); FCML_I64( "lock btc qword ptr [rdi+0000000004030201h],0ffh", 0xF0, 0x48, 0x0F, 0xBA, 0xBF, 0x01, 0x02, 0x03, 0x4, 0xff ); FCML_I64( "xacquire lock btc qword ptr [rdi+0000000004030201h],0ffh", 0xF2, 0xF0, 0x48, 0x0F, 0xBA, 0xBF, 0x01, 0x02, 0x03, 0x4, 0xff ); FCML_I64( "xrelease lock btc qword ptr [rdi+0000000004030201h],0ffh", 0xF3, 0xF0, 0x48, 0x0F, 0xBA, 0xBF, 0x01, 0x02, 0x03, 0x4, 0xff ); } void fcml_tf_instruction_BTR(void) { FCML_I32( "btr dword ptr [esi],eax", 0x0F, 0xB3, 0x06 ); FCML_I32( "lock btr dword ptr [esi],eax", 0xF0, 0x0F, 0xB3, 0x06 ); FCML_I32( "xacquire lock btr dword ptr [esi],eax", 0xF2, 0xF0, 0x0F, 0xB3, 0x06 ); FCML_I32( "xrelease lock btr dword ptr [esi],eax", 0xF3, 0xF0, 0x0F, 0xB3, 0x06 ); FCML_I32( "btr word ptr [esi],ax", 0x66, 0x0F, 0xB3, 0x06 ); FCML_A32( "btr %ax,(%esi)", 0x66, 0x0F, 0xB3, 0x06 ); FCML_I32( "btr dword ptr [0201h],eax", 0x67, 0x0F, 0xB3, 0x06, 0x01, 0x02 ); FCML_I32_A( "btr [00000201h],eax", 0x0F, 0xB3, 0x05, 0x01, 0x02, 0x00, 0x00 ); FCML_I64( "btr dword ptr [rdi+0000000004030201h],05h", 0x0F, 0xBA, 0xB7, 0x01, 0x02, 0x03, 0x4, 0x05 ); FCML_A64( "btrl $0x05,0x0000000004030201(%rdi)", 0x0F, 0xBA, 0xB7, 0x01, 0x02, 0x03, 0x4, 0x05 ); FCML_A64( "btrq $0x05,0x0000000004030201(%rdi)", 0x48, 0x0f, 0xba, 0xb7, 0x01, 0x02, 0x03, 0x04, 0x05 ); FCML_A64( "btrw $0x05,0x0000000004030201(%rdi)", 0x66, 0x0f, 0xba, 0xb7, 0x01, 0x02, 0x03, 0x04, 0x05 ); FCML_I64( "btr dword ptr [edi+04030201h],05h", 0x67, 0x0F, 0xBA, 0xB7, 0x01, 0x02, 0x03, 0x4, 0x05 ); FCML_I64( "btr qword ptr [rdi+0000000004030201h],05h", 0x48, 0x0F, 0xBA, 0xB7, 0x01, 0x02, 0x03, 0x4, 0x05 ); FCML_I64( "btr qword ptr [rdi+0000000004030201h],0ffh", 0x48, 0x0F, 0xBA, 0xB7, 0x01, 0x02, 0x03, 0x4, 0xff ); FCML_I64( "lock btr qword ptr [rdi+0000000004030201h],0ffh", 0xF0, 0x48, 0x0F, 0xBA, 0xB7, 0x01, 0x02, 0x03, 0x4, 0xff ); FCML_I64( "xacquire lock btr qword ptr [rdi+0000000004030201h],0ffh", 0xF2, 0xF0, 0x48, 0x0F, 0xBA, 0xB7, 0x01, 0x02, 0x03, 0x4, 0xff ); FCML_I64( "xrelease lock btr qword ptr [rdi+0000000004030201h],0ffh", 0xF3, 0xF0, 0x48, 0x0F, 0xBA, 0xB7, 0x01, 0x02, 0x03, 0x4, 0xff ); } void fcml_tf_instruction_BTS(void) { FCML_I32( "bts dword ptr [esi],eax", 0x0F, 0xAB, 0x06 ); FCML_I32( "bts word ptr [esi],ax", 0x66, 0x0F, 0xAB, 0x06 ); FCML_I32( "bts dword ptr [0201h],eax", 0x67, 0x0F, 0xAB, 0x06, 0x01, 0x02 ); FCML_A32( "bts %eax,0x0201", 0x67, 0x0F, 0xAB, 0x06, 0x01, 0x02 ); FCML_I32( "lock bts dword ptr [0201h],eax", 0xF0, 0x67, 0x0F, 0xAB, 0x06, 0x01, 0x02 ); FCML_I32( "xacquire lock bts dword ptr [0201h],eax", 0xF2, 0xF0, 0x67, 0x0F, 0xAB, 0x06, 0x01, 0x02 ); FCML_I32( "xrelease lock bts dword ptr [0201h],eax", 0xF3, 0xF0, 0x67, 0x0F, 0xAB, 0x06, 0x01, 0x02 ); FCML_I64( "bts dword ptr [rdi+0000000004030201h],05h", 0x0F, 0xBA, 0xAF, 0x01, 0x02, 0x03, 0x4, 0x05 ); FCML_I64( "bts dword ptr [edi+04030201h],05h", 0x67, 0x0F, 0xBA, 0xAF, 0x01, 0x02, 0x03, 0x4, 0x05 ); FCML_A64( "btsl $0x05,0x04030201(%edi)", 0x67, 0x0F, 0xBA, 0xAF, 0x01, 0x02, 0x03, 0x4, 0x05 ); FCML_I64( "bts qword ptr [rdi+0000000004030201h],05h", 0x48, 0x0F, 0xBA, 0xAF, 0x01, 0x02, 0x03, 0x4, 0x05 ); FCML_I64( "lock bts qword ptr [rdi+0000000004030201h],0ffh", 0xF0, 0x48, 0x0F, 0xBA, 0xAF, 0x01, 0x02, 0x03, 0x4, 0xff ); FCML_I64( "xacquire lock bts qword ptr [rdi+0000000004030201h],0ffh", 0xF2, 0xF0, 0x48, 0x0F, 0xBA, 0xAF, 0x01, 0x02, 0x03, 0x4, 0xff ); FCML_I64( "xrelease lock bts qword ptr [rdi+0000000004030201h],0ffh", 0xF3, 0xF0, 0x48, 0x0F, 0xBA, 0xAF, 0x01, 0x02, 0x03, 0x4, 0xff ); } void fcml_tf_instruction_BEXR(void) { FCML_I32( "bexr eax,dword ptr [eax],edi", 0xC4, 0xE2, 0x40, 0xF7, 0x00 ); FCML_I32( "bexr eax,eax,edi", 0xC4, 0xE2, 0x40, 0xF7, 0xC0 ); FCML_I64( "bexr rax,qword ptr [rax],rdi", 0xC4, 0xE2, 0xC0, 0xF7, 0x00 ); FCML_I64( "bexr rax,rax,rdi", 0xC4, 0xE2, 0xC0, 0xF7, 0xC0 ); } void fcml_tf_instruction_BEXTR(void) { FCML_I32( "bextr eax,dword ptr [eax],04030201h", 0x8F, 0xEA, 0x78, 0x10, 0x00, 0x01, 0x02, 0x03, 0x04 ); FCML_A64( "bextr $0x04030201,(%rax),%eax", 0x8F, 0xEA, 0x78, 0x10, 0x00, 0x01, 0x02, 0x03, 0x04 ); FCML_I32( "bextr eax,eax,04030201h", 0x8F, 0xEA, 0x78, 0x10, 0xC0, 0x01, 0x02, 0x03, 0x04 ); FCML_I64( "bextr rax,qword ptr [rax],04030201h", 0x8F, 0xEA, 0xF8, 0x10, 0x00, 0x01, 0x02, 0x03, 0x04 ); FCML_A64( "bextr $0x04030201,(%rax),%rax", 0x8F, 0xEA, 0xF8, 0x10, 0x00, 0x01, 0x02, 0x03, 0x04 ); FCML_I64( "bextr rax,rax,04030201h", 0x8F, 0xEA, 0xF8, 0x10, 0xC0, 0x01, 0x02, 0x03, 0x04 ); FCML_A64( "bextr $0x04030201,(%rax),%eax", 0x8f, 0xea, 0x78, 0x10, 0x00, 0x01, 0x02, 0x03, 0x04 ); FCML_A64( "bextr $0x04030201,(%rax),%eax", 0x8f, 0xea, 0x78, 0x10, 0x00, 0x01, 0x02, 0x03, 0x04 ); FCML_A64( "bextr $0x04030201,%eax,%eax", 0x8f, 0xea, 0x78, 0x10, 0xc0, 0x01, 0x02, 0x03, 0x04 ); FCML_A64( "bextr $0x04030201,(%rax),%rax", 0x8f, 0xea, 0xf8, 0x10, 0x00, 0x01, 0x02, 0x03, 0x04 ); FCML_A64( "bextr $0x04030201,(%rax),%rax", 0x8f, 0xea, 0xf8, 0x10, 0x00, 0x01, 0x02, 0x03, 0x04 ); FCML_A64( "bextr $0x04030201,%rax,%rax", 0x8f, 0xea, 0xf8, 0x10, 0xc0, 0x01, 0x02, 0x03, 0x04 ); } void fcml_tf_instruction_BLCFILL(void) { FCML_I32( "blcfill ebx,dword ptr [eax]", 0x8F, 0xE9, 0x60, 0x01, 0x08 ); FCML_A32( "blcfill (%eax),%ebx", 0x8F, 0xE9, 0x60, 0x01, 0x08 ); FCML_I32( "blcfill ebx,eax", 0x8F, 0xE9, 0x60, 0x01, 0xC8 ); FCML_I64( "blcfill rbx,qword ptr [rax]", 0x8F, 0xE9, 0xE0, 0x01, 0x08 ); FCML_A64( "blcfill (%rax),%rbx", 0x8F, 0xE9, 0xE0, 0x01, 0x08 ); FCML_I64( "blcfill rbx,rax", 0x8F, 0xE9, 0xE0, 0x01, 0xC8 ); } void fcml_tf_instruction_BLCI(void) { FCML_I32( "blci ebx,dword ptr [eax]", 0x8F, 0xE9, 0x60, 0x02, 0x30 ); FCML_A64( "blci (%rax),%ebx", 0x8F, 0xE9, 0x60, 0x02, 0x30 ); FCML_I32( "blci ebx,eax", 0x8F, 0xE9, 0x60, 0x02, 0xF0 ); FCML_I64( "blci rbx,qword ptr [rax]", 0x8F, 0xE9, 0xE0, 0x02, 0x30 ); FCML_A64( "blci (%rax),%rbx", 0x8F, 0xE9, 0xE0, 0x02, 0x30 ); FCML_I64( "blci rbx,rax", 0x8F, 0xE9, 0xE0, 0x02, 0xF0 ); } void fcml_tf_instruction_BLCIC(void) { FCML_I32( "blcic ebx,dword ptr [eax]", 0x8F, 0xE9, 0x60, 0x01, 0x28 ); FCML_A64( "blcic (%rax),%ebx", 0x8F, 0xE9, 0x60, 0x01, 0x28 ); FCML_I32( "blcic ebx,eax", 0x8F, 0xE9, 0x60, 0x01, 0xE8 ); FCML_I64( "blcic rbx,qword ptr [rax]", 0x8F, 0xE9, 0xE0, 0x01, 0x28 ); FCML_I64( "blcic rbx,rax", 0x8F, 0xE9, 0xE0, 0x01, 0xE8 ); FCML_A64( "blcic %rax,%rbx", 0x8F, 0xE9, 0xE0, 0x01, 0xE8 ); } void fcml_tf_instruction_BLCMSK(void) { FCML_I32( "blcmsk ebx,dword ptr [eax]", 0x8F, 0xE9, 0x60, 0x02, 0x08 ); FCML_A64( "blcmsk (%rax),%ebx", 0x8F, 0xE9, 0x60, 0x02, 0x08 ); FCML_I32( "blcmsk ebx,eax", 0x8F, 0xE9, 0x60, 0x02, 0xC8 ); FCML_I64( "blcmsk rbx,qword ptr [rax]", 0x8F, 0xE9, 0xE0, 0x02, 0x08 ); FCML_A64( "blcmsk (%rax),%rbx", 0x8F, 0xE9, 0xE0, 0x02, 0x08 ); FCML_I64( "blcmsk rbx,rax", 0x8F, 0xE9, 0xE0, 0x02, 0xC8 ); } void fcml_tf_instruction_BLCS(void) { FCML_I32( "blcs ebx,dword ptr [eax]", 0x8F, 0xE9, 0x60, 0x01, 0x18 ); FCML_A64( "blcs (%rax),%ebx", 0x8F, 0xE9, 0x60, 0x01, 0x18 ); FCML_I32( "blcs ebx,eax", 0x8F, 0xE9, 0x60, 0x01, 0xD8 ); FCML_I64( "blcs rbx,qword ptr [rax]", 0x8F, 0xE9, 0xE0, 0x01, 0x18 ); FCML_A64( "blcs (%rax),%rbx", 0x8F, 0xE9, 0xE0, 0x01, 0x18 ); FCML_I64( "blcs rbx,rax", 0x8F, 0xE9, 0xE0, 0x01, 0xD8 ); } void fcml_tf_instruction_BLSFILL(void) { FCML_I32( "blsfill ebx,dword ptr [eax]", 0x8F, 0xE9, 0x60, 0x01, 0x10 ); FCML_A64( "blsfill (%rax),%ebx", 0x8F, 0xE9, 0x60, 0x01, 0x10 ); FCML_I32( "blsfill ebx,eax", 0x8F, 0xE9, 0x60, 0x01, 0xD0 ); FCML_I64( "blsfill rbx,qword ptr [rax]", 0x8F, 0xE9, 0xE0, 0x01, 0x10 ); FCML_I64( "blsfill rbx,rax", 0x8F, 0xE9, 0xE0, 0x01, 0xD0 ); FCML_A64( "blsfill %rax,%rbx", 0x8F, 0xE9, 0xE0, 0x01, 0xD0 ); } void fcml_tf_instruction_BLSI(void) { FCML_I32( "blsi edi,dword ptr [eax]", 0xC4, 0xE2, 0x40, 0xF3, 0x18 ); FCML_A64( "blsi (%rax),%edi", 0xC4, 0xE2, 0x40, 0xF3, 0x18 ); FCML_I32( "blsi edi,eax", 0xC4, 0xE2, 0x40, 0xF3, 0xD8 ); FCML_I64( "blsi rdi,qword ptr [rax]", 0xC4, 0xE2, 0xC0, 0xF3, 0x18 ); FCML_A64( "blsi (%rax),%rdi", 0xC4, 0xE2, 0xC0, 0xF3, 0x18 ); FCML_I64( "blsi rdi,rax", 0xC4, 0xE2, 0xC0, 0xF3, 0xD8 ); } void fcml_tf_instruction_BLSIC(void) { FCML_I32( "blsic ebx,dword ptr [eax]", 0x8F, 0xE9, 0x60, 0x01, 0x30 ); FCML_A64( "blsic (%rax),%ebx", 0x8F, 0xE9, 0x60, 0x01, 0x30 ); FCML_I32( "blsic ebx,eax", 0x8F, 0xE9, 0x60, 0x01, 0xF0 ); FCML_I64( "blsic rbx,qword ptr [rax]", 0x8F, 0xE9, 0xE0, 0x01, 0x30 ); FCML_I64( "blsic rbx,rax", 0x8F, 0xE9, 0xE0, 0x01, 0xF0 ); FCML_A64( "blsic %rax,%rbx", 0x8F, 0xE9, 0xE0, 0x01, 0xF0 ); } void fcml_tf_instruction_BLSMSK(void) { FCML_I32( "blsmsk edi,dword ptr [eax]", 0xC4, 0xE2, 0x40, 0xF3, 0x10 ); FCML_A64( "blsmsk (%rax),%edi", 0xC4, 0xE2, 0x40, 0xF3, 0x10 ); FCML_I32( "blsmsk edi,eax", 0xC4, 0xE2, 0x40, 0xF3, 0xD0 ); FCML_I64( "blsmsk rdi,qword ptr [rax]", 0xC4, 0xE2, 0xC0, 0xF3, 0x10 ); FCML_I64( "blsmsk rdi,rax", 0xC4, 0xE2, 0xC0, 0xF3, 0xD0 ); FCML_A64( "blsmsk %rax,%rdi", 0xC4, 0xE2, 0xC0, 0xF3, 0xD0 ); } void fcml_tf_instruction_BLSR(void) { FCML_I32( "blsr edi,dword ptr [eax]", 0xC4, 0xE2, 0x40, 0xF3, 0x08 ); FCML_A64( "blsr (%rax),%edi", 0xC4, 0xE2, 0x40, 0xF3, 0x08 ); FCML_I32( "blsr edi,eax", 0xC4, 0xE2, 0x40, 0xF3, 0xC8 ); FCML_I64( "blsr rdi,qword ptr [rax]", 0xC4, 0xE2, 0xC0, 0xF3, 0x08 ); FCML_I64( "blsr rdi,rax", 0xC4, 0xE2, 0xC0, 0xF3, 0xC8 ); FCML_A64( "blsr %rax,%rdi", 0xC4, 0xE2, 0xC0, 0xF3, 0xC8 ); } void fcml_tf_instruction_BZHI(void) { FCML_I32( "bzhi eax,dword ptr [eax],edi", 0xC4, 0xE2, 0x40, 0xF5, 0x00 ); FCML_A64( "bzhi %edi,(%rax),%eax", 0xC4, 0xE2, 0x40, 0xF5, 0x00 ); FCML_I32( "bzhi eax,eax,edi", 0xC4, 0xE2, 0x40, 0xF5, 0xC0 ); FCML_I64( "bzhi rax,qword ptr [rax],rdi", 0xC4, 0xE2, 0xC0, 0xF5, 0x00 ); FCML_I64( "bzhi rax,rax,rdi", 0xC4, 0xE2, 0xC0, 0xF5, 0xC0 ); FCML_A64( "bzhi %rdi,%rax,%rax", 0xC4, 0xE2, 0xC0, 0xF5, 0xC0 ); } fcml_stf_test_case fctl_ti_instructions_b[] = { { "fcml_tf_instruction_BLENDPD_VBLENDPD", fcml_tf_instruction_BLENDPD_VBLENDPD }, { "fcml_tf_instruction_BLENDPS_VBLENDPS", fcml_tf_instruction_BLENDPS_VBLENDPS }, { "fcml_tf_instruction_BLENDVPD_VBLENDVPD", fcml_tf_instruction_BLENDVPD_VBLENDVPD }, { "fcml_tf_instruction_BLENDVPS_VBLENDVPS", fcml_tf_instruction_BLENDVPS_VBLENDVPS }, { "fcml_tf_instruction_BOUND", fcml_tf_instruction_BOUND }, { "fcml_tf_instruction_BSF", fcml_tf_instruction_BSF }, { "fcml_tf_instruction_BSR", fcml_tf_instruction_BSR }, { "fcml_tf_instruction_BSWAP", fcml_tf_instruction_BSWAP }, { "fcml_tf_instruction_BT", fcml_tf_instruction_BT }, { "fcml_tf_instruction_BTC", fcml_tf_instruction_BTC }, { "fcml_tf_instruction_BTR", fcml_tf_instruction_BTR }, { "fcml_tf_instruction_BTS", fcml_tf_instruction_BTS }, { "fcml_tf_instruction_BEXR", fcml_tf_instruction_BEXR }, { "fcml_tf_instruction_BEXTR", fcml_tf_instruction_BEXTR }, { "fcml_tf_instruction_BLCFILL", fcml_tf_instruction_BLCFILL }, { "fcml_tf_instruction_BLCI", fcml_tf_instruction_BLCI }, { "fcml_tf_instruction_BLCIC", fcml_tf_instruction_BLCIC }, { "fcml_tf_instruction_BLCMSK", fcml_tf_instruction_BLCMSK }, { "fcml_tf_instruction_BLCS", fcml_tf_instruction_BLCS }, { "fcml_tf_instruction_BLSFILL", fcml_tf_instruction_BLSFILL }, { "fcml_tf_instruction_BLSI", fcml_tf_instruction_BLSI }, { "fcml_tf_instruction_BLSIC", fcml_tf_instruction_BLSIC }, { "fcml_tf_instruction_BLSMSK", fcml_tf_instruction_BLSMSK }, { "fcml_tf_instruction_BLSR", fcml_tf_instruction_BLSR }, { "fcml_tf_instruction_BZHI", fcml_tf_instruction_BZHI }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_b = { "suite-fctl_ti_instructions_b", fcml_tf_instructions_b_suite_init, fcml_tf_instructions_b_suite_cleanup, fctl_ti_instructions_b, }; fcml-1.1.1/check/public-tests/disassembler_t.c0000644000175000017500000001265612560761201016225 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 "disassembler_t.h" #include #include /* Test suite initialization. */ fcml_bool fcml_tf_disassembler_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_disassembler_suite_cleanup(void) { 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) { 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_stf_test_suite fcml_si_disassembler = { "suite-fcml-disassembler", fcml_tf_disassembler_suite_init, fcml_tf_disassembler_suite_cleanup, fcml_ti_disassembler }; fcml-1.1.1/check/public-tests/hints_t.h0000644000175000017500000000171112560745216014700 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 HINTS_T_H_ #define HINTS_T_H_ #include extern fcml_stf_test_suite fcml_si_hints; #endif /* HINTS_T_H_ */ fcml-1.1.1/check/public-tests/assembler_t.c0000644000175000017500000002020112560745216015516 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 "assembler_t.h" #include #include #include #include /* Test suite initialization. */ fcml_bool fcml_tf_assembler_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_assembler_suite_cleanup(void) { return FCML_TRUE; } /* Tests. */ void fcml_tf_assembler_db_imm8(void) { 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 Intel dialect."); return; } fcml_st_assembler *assembler; if( ( error = fcml_fn_assembler_init( dialect, &assembler ) ) ) { STF_FAIL("Can not initialize Intel assembler."); fcml_fn_dialect_free( dialect ); return; } fcml_st_instruction instruction = {0}; instruction.mnemonic = "db"; instruction.operands[0] = FCML_IMM8( 0x23 ); instruction.operands_count = 1; /* Prepares the result. */ fcml_st_assembler_result asm_result; fcml_fn_assembler_result_prepare( &asm_result ); fcml_st_assembler_context context = {0}; context.assembler = assembler; context.entry_point.ip = 0x401000; context.entry_point.op_mode = FCML_OM_32_BIT; /* Assembles the given instruction. */ if( ( error = fcml_fn_assemble( &context, &instruction, &asm_result ) ) ) { STF_FAIL("Can not assemble instruction."); fcml_fn_assembler_free( assembler ); fcml_fn_dialect_free( dialect ); return; } /* Prints the instruction code. */ if( asm_result.chosen_instruction ) { fcml_st_assembled_instruction *ins_code = asm_result.chosen_instruction; STF_ASSERT_EQUAL( 1, asm_result.number_of_instructions ); STF_ASSERT_EQUAL( 1, ins_code->code_length ); STF_ASSERT_EQUAL( 0x23, ins_code->code[0] ); STF_ASSERT_PTR_NULL( ins_code->next ); STF_ASSERT_PTR_NULL( ins_code->warnings.errors ); STF_ASSERT_PTR_NULL( ins_code->warnings.last_error ); } else { STF_FAIL("Can not assemble instruction."); } fcml_fn_assembler_result_free( &asm_result ); fcml_fn_assembler_free( assembler ); fcml_fn_dialect_free( dialect ); } void fcml_tf_assembler_byte_imm8(void) { fcml_ceh_error error; /* Initializes the Intel dialect instance. */ fcml_st_dialect *dialect; if( ( error = fcml_fn_dialect_init_gas( FCML_GAS_DIALECT_CF_DEFAULT, &dialect ) ) ) { STF_FAIL("Can not initialize Intel dialect."); return; } fcml_st_assembler *assembler; if( ( error = fcml_fn_assembler_init( dialect, &assembler ) ) ) { STF_FAIL("Can not initialize Intel assembler."); fcml_fn_dialect_free( dialect ); return; } fcml_st_instruction instruction = {0}; instruction.mnemonic = ".byte"; instruction.operands[0] = FCML_IMM8( 0x23 ); instruction.operands_count = 1; /* Prepares the result. */ fcml_st_assembler_result asm_result; fcml_fn_assembler_result_prepare( &asm_result ); fcml_st_assembler_context context = {0}; context.assembler = assembler; context.entry_point.ip = 0x401000; context.entry_point.op_mode = FCML_OM_32_BIT; /* Assembles the given instruction. */ if( ( error = fcml_fn_assemble( &context, &instruction, &asm_result ) ) ) { STF_FAIL("Can not assemble instruction."); fcml_fn_assembler_free( assembler ); fcml_fn_dialect_free( dialect ); return; } /* Prints the instruction code. */ if( asm_result.chosen_instruction ) { fcml_st_assembled_instruction *ins_code = asm_result.chosen_instruction; STF_ASSERT_EQUAL( 1, asm_result.number_of_instructions ); STF_ASSERT_EQUAL( 1, ins_code->code_length ); STF_ASSERT_EQUAL( 0x23, ins_code->code[0] ); STF_ASSERT_PTR_NULL( ins_code->next ); STF_ASSERT_PTR_NULL( ins_code->warnings.errors ); STF_ASSERT_PTR_NULL( ins_code->warnings.last_error ); } else { STF_FAIL("Can not assemble instruction."); } fcml_fn_assembler_result_free( &asm_result ); fcml_fn_assembler_free( assembler ); fcml_fn_dialect_free( dialect ); } void fcml_tf_assembler_db_imm32(void) { 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 Intel dialect."); return; } fcml_st_assembler *assembler; if( ( error = fcml_fn_assembler_init( dialect, &assembler ) ) ) { STF_FAIL("Can not initialize Intel assembler."); fcml_fn_dialect_free( dialect ); return; } fcml_st_instruction instruction = {0}; instruction.mnemonic = "db"; instruction.operands[0] = FCML_IMM32( 0x23 ); instruction.operands_count = 1; /* Prepares the result. */ fcml_st_assembler_result asm_result; fcml_fn_assembler_result_prepare( &asm_result ); fcml_st_assembler_context context = {0}; context.assembler = assembler; context.entry_point.ip = 0x401000; context.entry_point.op_mode = FCML_OM_32_BIT; /* Assembles the given instruction. */ if( ( error = fcml_fn_assemble( &context, &instruction, &asm_result ) ) ) { STF_FAIL("Can not assemble instruction."); fcml_fn_assembler_free( assembler ); fcml_fn_dialect_free( dialect ); return; } /* Prints the instruction code. */ if( asm_result.chosen_instruction ) { fcml_st_assembled_instruction *ins_code = asm_result.chosen_instruction; STF_ASSERT_EQUAL( 1, asm_result.number_of_instructions ); STF_ASSERT_EQUAL( 1, ins_code->code_length ); STF_ASSERT_EQUAL( 0x23, ins_code->code[0] ); STF_ASSERT_PTR_NULL( ins_code->next ); STF_ASSERT_PTR_NULL( ins_code->warnings.errors ); STF_ASSERT_PTR_NULL( ins_code->warnings.last_error ); } else { STF_FAIL("Can not assemble instruction."); } fcml_fn_assembler_result_free( &asm_result ); fcml_fn_assembler_free( assembler ); fcml_fn_dialect_free( dialect ); } void fcml_tf_assembler_db_imm32_value_out_of_bound(void) { 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 Intel dialect."); return; } fcml_st_assembler *assembler; if( ( error = fcml_fn_assembler_init( dialect, &assembler ) ) ) { STF_FAIL("Can not initialize Intel assembler."); fcml_fn_dialect_free( dialect ); return; } fcml_st_instruction instruction = {0}; instruction.mnemonic = "db"; instruction.operands[0] = FCML_IMM32( 0x2323 ); instruction.operands_count = 1; /* Prepares the result. */ fcml_st_assembler_result asm_result; fcml_fn_assembler_result_prepare( &asm_result ); fcml_st_assembler_context context = {0}; context.assembler = assembler; context.entry_point.ip = 0x401000; context.entry_point.op_mode = FCML_OM_32_BIT; /* Assembles the given instruction. */ error = fcml_fn_assemble( &context, &instruction, &asm_result ); STF_ASSERT_EQUAL( FCML_CEH_GEC_VALUE_OUT_OF_RANGE, error ); fcml_fn_assembler_result_free( &asm_result ); fcml_fn_assembler_free( assembler ); fcml_fn_dialect_free( dialect ); } fcml_stf_test_case fcml_ti_assembler[] = { { "fcml_tf_assembler_db_imm8", fcml_tf_assembler_db_imm8 }, { "fcml_tf_assembler_byte_imm8", fcml_tf_assembler_byte_imm8 }, { "fcml_tf_assembler_db_imm32", fcml_tf_assembler_db_imm32 }, { "fcml_tf_assembler_db_imm32_value_out_of_bound", fcml_tf_assembler_db_imm32_value_out_of_bound }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_assembler = { "suite-fcml-assembler", fcml_tf_assembler_suite_init, fcml_tf_assembler_suite_cleanup, fcml_ti_assembler }; fcml-1.1.1/check/public-tests/instructions_w_t.h0000644000175000017500000000171412560745216016650 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_W_H_ #define INS_W_H_ #include extern fcml_stf_test_suite fctl_si_instructions_w; #endif /* INS_W_H_ */ fcml-1.1.1/check/public-tests/instructions_d_t.h0000644000175000017500000000171412560745216016625 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_D_H_ #define INS_D_H_ #include extern fcml_stf_test_suite fctl_si_instructions_d; #endif /* INS_D_H_ */ fcml-1.1.1/check/public-tests/instructions_s_t.h0000644000175000017500000000171412560745216016644 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_S_H_ #define INS_S_H_ #include extern fcml_stf_test_suite fctl_si_instructions_s; #endif /* INS_S_H_ */ fcml-1.1.1/check/public-tests/instructions_j_t.c0000644000175000017500000002043312560745216016625 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include #include "instructions_j_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_j_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_j_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_JCXZ(void) { FCML_I64( "jrcxz 0000800000401001h", 0xe3, 0xff ); FCML_I32( "jecxz 00401001h", 0xe3, 0xff ); FCML_I64_D( "jrcxz 0000800000401002h", 0x66, 0xe3, 0xff ); FCML_I64_D( "jecxz 0000800000401003h", 0x66, 0x67, 0xe3, 0xff ); FCML_I64_D( "jrcxz 0000800000401002h", 0x48, 0xe3, 0xff ); FCML_I32_D( "jcxz 1003h", 0x66, 0x67, 0xe3, 0xff ); FCML_I32_D( "jcxz 00401002h", 0x67, 0xe3, 0xff ); FCML_A64( "jrcxz 0x0000800000401001", 0xe3, 0xff ); FCML_A32( "jecxz 0x00401001", 0xe3, 0xff ); FCML_A32( "jcxz 0x00401002", 0x67, 0xe3, 0xff ); } void fcml_tf_instruction_Jcc(void) { FCML_I64_D( "jnc 0000800000401002h", 0x66, 0x73, 0xff ); FCML_I64_D( "jnc 0000800000401003h", 0x66, 0x67, 0x73, 0xff ); FCML_I64_D( "jnc 0000800000401002h", 0x48, 0x73, 0xff ); FCML_I64_M( "jnc 0000800000401001h", 2, FCML_MI( 0x73, 0xff ), FCML_MI( 0x0f, 0x83, 0xfb, 0xff, 0xff, 0xff ) ); FCML_A64_M( "jnc 0x0000800000401001", 2, FCML_MI( 0x73, 0xff ), FCML_MI( 0x0f, 0x83, 0xfb, 0xff, 0xff, 0xff ) ); FCML_I32_D( "jnc 1003h", 0x66, 0x67, 0x73, 0xff ); FCML_I32_M( "jnc 1002h", 2, FCML_MI( 0x66, 0x73, 0xff ), FCML_MI( 0x66, 0x0f, 0x83, 0xfd, 0xff ) ); FCML_A32_M( "jnc 0x1002", 2, FCML_MI( 0x66, 0x73, 0xff ), FCML_MI( 0x66, 0x0f, 0x83, 0xfd, 0xff ) ); FCML_I32_D( "jnc 00401002h", 0x67, 0x73, 0xff ); FCML_I32_M( "jnc 00401001h", 2, FCML_MI( 0x73, 0xff ), FCML_MI( 0x0f, 0x83, 0xfb, 0xff, 0xff, 0xff ) ); FCML_I32( "jnc 003f3005h", 0x0f, 0x83, 0xff, 0x1f, 0xff, 0xff ); FCML_I32( "jnc 0204h", 0x66, 0x0f, 0x83, 0xff, 0xf1 ); FCML_I32( "branch jnc 003f3006h", 0x3E, 0x0f, 0x83, 0xff, 0x1f, 0xff, 0xff ); FCML_I32( "nobranch jnc 003f3006h", 0x2E, 0x0f, 0x83, 0xff, 0x1f, 0xff, 0xff ); } void fcml_tf_instruction_JMP(void) { /* NEAR, DIRECT */ /* JMP rel8/16/32 */ // 8 FCML_I32_M( "jmp 00401001h", 2, FCML_MI( 0xeb, 0xff ), FCML_MI( 0xe9, 0xfc, 0xff, 0xff, 0xff ) ); // 16 FCML_I16( "jmp 0001h", 0xe9, 0xfe, 0xef ); FCML_I16_D( "jmp 00401001h", 0x66, 0xeb, 0xfe ); FCML_I16_D( "jmp 00401001h", 0x66, 0xe9, 0xfb, 0xff, 0xff, 0xff ); FCML_I16_M_A( "jmp 00401001h", 2, FCML_MI( 0x66, 0xe9, 0xfb, 0xff, 0xff, 0xff ), FCML_MI( 0x66, 0xeb, 0xfe ) ); FCML_I16_M( "jmp 1001h", 2, FCML_MI( 0xe9, 0xfe, 0xff ), FCML_MI( 0xeb, 0xff ) ); FCML_I16_A( "jmp 00801001h", 0x66, 0xe9, 0xfb, 0xff, 0x3f, 0x00 ); // 32 FCML_I32( "jmp 0002h", 0x66, 0xe9, 0xfe, 0xef ); FCML_I32( "jmp 00801001h", 0xe9, 0xfc, 0xff, 0x3f, 0x00 ); FCML_A32( "jmp 0x00801001", 0xe9, 0xfc, 0xff, 0x3f, 0x00 ); FCML_A32_M( "jmp 0x00401001", 2, FCML_MI( 0xeb, 0xff ), FCML_MI( 0xe9, 0xfc, 0xff, 0xff, 0xff ) ); FCML_I32( "jmp 90d11004h", 0xe9, 0xff,0xff, 0x90, 0x90 ); // 64 FCML_A64( "jmpq 0x00007fff90d11004", 0xe9, 0xff,0xff, 0x90, 0x90 ); FCML_I32( "jmp 0a103h", 0x66, 0xe9, 0xff, 0x90 ); FCML_A32_D( "jmpw 0xa103", 0x66, 0xe9, 0xff, 0x90 ); FCML_I32_A( "jmp direct word ptr [0000a103h]", 0x66, 0xe9, 0xff, 0x90 ); FCML_A32_D( "jmpw *0x0000a103", 0x66, 0xff, 0x25, 0x03, 0xa1, 0x00, 0x00 ); FCML_I32_D( "jmp 0a103h", 0x66, 0xe9, 0xff, 0x90); FCML_I32( "jmp word ptr [0000a103h]", 0x66, 0xff, 0x25, 0x03, 0xa1, 0x00, 0x00 ); /* NEAR, INDIRECT */ /* JMP r/m16 */ /* JMP r/m32 */ /* JMP r/m64 */ // near by default. FCML_I32( "jmp dword ptr [00401001h]", 0xff, 0x25, 0x01, 0x10, 0x40, 0x00 ); FCML_I32_A( "jmp near dword [00401001h]", 0xff, 0x25, 0x01, 0x10, 0x40, 0x00 ); FCML_A32( "jmp *0x90d11004", 0xff, 0x25, 0x04, 0x10, 0xd1, 0x90 ); FCML_A32( "jmpw *0x90d11004", 0x66, 0xff, 0x25, 0x04, 0x10, 0xd1, 0x90 ); FCML_A32_A( "jmp 0x90d11004", 0xe9, 0xff, 0xff, 0x90, 0x90 ); FCML_A32_A( "jmp *0x90d11004", 0xff, 0x25, 0x04, 0x10, 0xd1, 0x90 ); FCML_A32_M_A( "jmp 0x00401001", 2, FCML_MI( 0xe9, 0xfc, 0xff, 0xff, 0xff ), FCML_MI( 0xeb, 0xff ) ); FCML_A64( "jmpq *(%rax)", 0xff, 0x20 ); FCML_I32_A( "jmp indirect near dword ptr [eax]", 0xff, 0x20 ); /* for Intel dialect, "indirect" hint is not rendered by default. */ FCML_I32_D_RF( "jmp indirect dword ptr [eax]", FCML_REND_FLAG_RENDER_INDIRECT_HINT, 0xff, 0x20 ); /* This instruction is ambiguous. */ FCML_I32_M( "jmp dword ptr [eax]", 2, FCML_MI( 0xff, 0x20 ), FCML_MI( 0x66, 0xff, 0x28 ) ); FCML_A32_A( "jmp *(%eax)", 0xff, 0x20 ); FCML_I32_A( "jmp far dword ptr [eax]", 0x66, 0xff, 0x28 ); FCML_I32( "jmp ebp", 0xff, 0xe5 ); FCML_I32( "jmp bp", 0x66, 0xff, 0xe5 ); FCML_I64_D( "jmp rbp", 0x66, 0x67, 0x40, 0xff, 0xe5 ); /* 32 bit mode doesn't not allow REX.*/ FCML_I64( "jmp rbp", 0xff, 0xe5 ); /* FAR, DIRECT */ /* JMP ptr16:16 */ /* JMP ptr16:32 */ FCML_I32( "jmp far 6655h:44332211h", 0xEA, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 ); FCML_I32( "jmp far 4433h:2211h", 0x66, 0xEA, 0x11, 0x22, 0x33, 0x44 ); FCML_I32_A( "jmp far 4433h:2211h", 0xea, 0x11, 0x22, 0x33, 0x44 ); FCML_A32( "ljmpl $0x6655,$0x44332211", 0xEA, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 ); FCML_A32( "ljmpw $0x4433,$0x2211", 0x66, 0xEA, 0x11, 0x22, 0x33, 0x44 ); /* FAR, INDIRECT */ /* JMP m16:16 */ /* JMP m16:32 */ /* JMP m16:64 */ FCML_I32( "jmp far fword ptr [ebx+00000001h]", 0xFF, 0x6B, 0x01 ); FCML_I32( "jmp far dword ptr [ebx+00000001h]", 0x66, 0xFF, 0x6B, 0x01 ); FCML_I64_D( "jmp far tbyte ptr [rbx+0000000000000001h]", 0x66, 0x48, 0xFF, 0x6B, 0x01 ); /* Verified.*/ FCML_I64( "jmp far tbyte ptr [rbx+0000000000000001h]", 0x48, 0xFF, 0x6B, 0x01 ); /* Verified.*/ FCML_I64_D( "jmp far dword ptr [rbx+0000000000000001h]", 0x66, 0x40, 0xFF, 0x6B, 0x01 ); /* Verified.*/ FCML_I64( "jmp far dword ptr [rbx+0000000000000001h]", 0x66, 0xFF, 0x6B, 0x01 ); /* Verified.*/ FCML_I64_D( "jmp far fword ptr [rbx+0000000000000001h]", 0x40, 0xFF, 0x6B, 0x01 ); FCML_I64( "jmp far fword ptr [rbx+0000000000000001h]", 0xFF, 0x6B, 0x01 ); FCML_I64_D( "jmp far dword ptr [ebx+00000001h]", 0x66, 0x67, 0x40, 0xFF, 0x6B, 0x01 ); FCML_I64( "jmp far dword ptr [ebx+00000001h]", 0x66, 0x67, 0xFF, 0x6B, 0x01 ); FCML_A32( "ljmpl *0x00000001(%ebx)", 0xFF, 0x6B, 0x01 ); FCML_A32( "ljmpw *0x00000001(%ebx)", 0x66, 0xFF, 0x6B, 0x01 ); FCML_A64( "ljmpw *0x0000000000000001(%rbx)", 0x66, 0xFF, 0x6B, 0x01 ); FCML_A64( "ljmpq *0x0000000000000001(%rbx)", 0x48, 0xFF, 0x6B, 0x01 ); /* GAS */ FCML_A32( "ljmpl *0x00000001(%ebx)", 0xFF, 0x6B, 0x01 ); FCML_A32( "ljmpw *0x00000001(%ebx)", 0x66, 0xFF, 0x6B, 0x01 ); FCML_A32( "ljmpl $0x6655,$0x44332211", 0xEA, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 ); FCML_A32( "ljmpw $0x4433,$0x2211", 0x66, 0xEA, 0x11, 0x22, 0x33, 0x44 ); FCML_A32_A( "jmpw 0x0000a103", 0x66, 0xe9, 0xff, 0x90 ); FCML_A32_A( "jmpw *0x0000a103", 0x66, 0xff, 0x25, 0x03, 0xa1, 0x00, 0x00 ); FCML_A32_D( "jmpw 0xa103", 0x66, 0xe9, 0xff, 0x90 ); FCML_A32_D( "jmpw *0x0000a103", 0x66, 0xff, 0x25, 0x03, 0xa1, 0x00, 0x00 ); } fcml_stf_test_case fctl_ti_instructions_j[] = { { "fcml_tf_instruction_JCXZ", fcml_tf_instruction_JCXZ }, { "fcml_tf_instruction_Jcc", fcml_tf_instruction_Jcc }, { "fcml_tf_instruction_JMP", fcml_tf_instruction_JMP }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_j = { "suite-fctl_ti_instructions_j", fcml_tf_instructions_j_suite_init, fcml_tf_instructions_j_suite_cleanup, fctl_ti_instructions_j }; fcml-1.1.1/check/public-tests/instructions_o_t.h0000644000175000017500000000171412560745216016640 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_O_H_ #define INS_O_H_ #include extern fcml_stf_test_suite fctl_si_instructions_o; #endif /* INS_O_H_ */ fcml-1.1.1/check/public-tests/instructions_c_t.c0000644000175000017500000014656312560745216016633 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include #include "instructions_c_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_c_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_c_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_CALL(void) { FCML_I64_FAILED( "FAIL", 0x48, 0x66, 0xFF, 0x57, 0x01 ); FCML_I32( "call far fword ptr [ebx+00000001h]", 0xFF, 0x5B, 0x01 ); FCML_I32_RF( "call far fword ptr cs:[ebx+00000001h]", FCML_REND_FLAG_RENDER_DEFAULT_SEG, 0xFF, 0x5B, 0x01 ); FCML_I32_D_RF( "call far fword ptr cs:[ebx+00000001h]", FCML_REND_FLAG_RENDER_DEFAULT_SEG, 0x64, 0xFF, 0x5B, 0x01 ); FCML_I32( "call far dword ptr [ebx+00000001h]", 0x66, 0xFF, 0x5B, 0x01 ); FCML_I64_D( "call far tbyte ptr [rbx+0000000000000001h]", 0x66, 0x48, 0xFF, 0x5B, 0x01 ); /* Verified.*/ FCML_I64_D( "call far dword ptr [rbx+0000000000000001h]", 0x66, 0x40, 0xFF, 0x5B, 0x01 ); /* Verified.*/ FCML_I64( "call far tbyte ptr [rbx+0000000000000001h]", 0x48, 0xFF, 0x5B, 0x01 ); /* Verified.*/ FCML_I64( "call far dword ptr [rbx+0000000000000001h]", 0x66, 0xFF, 0x5B, 0x01 ); /* Verified.*/ FCML_I64( "call far dword ptr [ebx+00000001h]", 0x66, 0x67, 0xFF, 0x5B, 0x01 ); FCML_I64( "call far fword ptr [rbx+0000000000000001h]", 0xFF, 0x5B, 0x01 ); FCML_I64_D( "call far fword ptr [rbx+0000000000000001h]", 0x40, 0xFF, 0x5B, 0x01 ); FCML_A32( "lcall *0x00000001(%ebx)", 0xFF, 0x5B, 0x01 ); FCML_A32( "lcallw *0x00000001(%ebx)", 0x66, 0xFF, 0x5B, 0x01 ); FCML_A64( "lcallq *0x0000000000000001(%rbx)", 0x48, 0xFF, 0x5B, 0x01 ); FCML_A64( "lcallq *0x00000000(%rip)", 0x48, 0xFF, 0x1d, 0x00,0x00,0x00,0x00 ); /* prt16:16 ptr16:32 */ // TODO: Support for "call dword 4433h:00002211h" counterpart to: lcallw $0x4433,$0x2211. FCML_I32( "call far 6655h:44332211h", 0x9A, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 ); FCML_I32( "call far 4433h:2211h", 0x66, 0x9A, 0x11, 0x22, 0x33, 0x44 ); FCML_I16( "call far 4433h:2211h", 0x9A, 0x11, 0x22, 0x33, 0x44 ); FCML_A32( "lcall $0x6655,$0x44332211", 0x9A, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 ); FCML_A32( "lcallw $0x4433,$0x2211", 0x66, 0x9A, 0x11, 0x22, 0x33, 0x44 ); FCML_I32_M( "call dword ptr [edi+00000001h]", 2, FCML_MI( 0xFF, 0x57, 0x01 ), FCML_MI( 0x66, 0xff, 0x5f, 0x01 ) ); FCML_I32_A( "call near dword ptr [edi+00000001h]", 0xFF, 0x57, 0x01 ); FCML_I32( "call word ptr [edi+00000001h]", 0x66, 0xFF, 0x57, 0x01 ); FCML_A32( "callw *0x00000001(%edi)", 0x66, 0xFF, 0x57, 0x01 ); FCML_I64_D( "call qword ptr [rdi+0000000000000001h]", 0x66, 0x48, 0xFF, 0x57, 0x01 ); FCML_I64_D( "call qword ptr [rdi+0000000000000001h]", 0x48, 0xFF, 0x57, 0x01 ); FCML_I64_D( "call qword ptr [rdi+0000000000000001h]", 0xFF, 0x57, 0x01 ); /* osa forced to 64 bits for all near branches */ FCML_A64( "callq *0x0000000000000001(%rdi)", 0xFF, 0x57, 0x01 ); FCML_A32( "call *0x00000001(%edi)", 0xFF, 0x57, 0x01 ); FCML_A32( "callw *0x00000001(%edi)", 0x66, 0xFF, 0x57, 0x01 ); FCML_I32( "call 1044h", 0x66, 0xE8, 0x40, 0x00 ); FCML_A32( "callw 0x1044", 0x66, 0xe8, 0x40, 0x00 ); FCML_I32( "call 1004h", 0x66, 0xE8, 0x00, 0x00 ); FCML_I32( "call 1003h", 0x66, 0xE8, 0xFF, 0xFF ); FCML_I32( "call 1084h", 0x66, 0xE8, 0x80, 0x00 ); FCML_I32( "call 9004h", 0x66, 0xE8, 0x00, 0x80 ); FCML_I32( "call 809dh", 0x66, 0xE8, 0x99, 0x70 ); FCML_I32( "call 0ff701005h", 0xE8, 0x00, 0x00, 0x30, 0xFF ); FCML_A32( "call 0xff701005", 0xe8, 0x00, 0x00, 0x30, 0xff ); FCML_I32( "call 00401004h", 0xE8, 0xFF, 0xFF, 0xFF, 0xFF ); FCML_I32( "call 00401006h", 0xE8, 0x01, 0x00, 0x00, 0x00 ); FCML_I32( "call 80401005h", 0xE8, 0x00, 0x00, 0x00, 0x80 ); FCML_I32( "call 79d9a99eh", 0xE8, 0x99, 0x99, 0x99, 0x79 ); FCML_I64_A_FAILED( "call 0000800500401005h", 0xE8, 0x00, 0x00, 0x00, 0x00 ); FCML_I64( "call 0000800000401004h", 0xE8, 0xFF, 0xFF, 0xFF, 0xFF ); FCML_I64( "call 00007fff80401005h", 0xE8, 0x00, 0x00, 0x00, 0x80 ); FCML_A64( "callq 0x00007fff80401005", 0xE8, 0x00, 0x00, 0x00, 0x80 ); FCML_I64( "call 0000800079d9a99eh", 0xE8, 0x99, 0x99, 0x99, 0x79 ); /* Segment register are shown only in case of effective addresses. */ FCML_I64_RF( "call 0000800079d9a99eh", FCML_REND_FLAG_RENDER_DEFAULT_SEG, 0xE8, 0x99, 0x99, 0x99, 0x79 ); } void fcml_tf_instruction_CBW_CWDE_CDQE(void) { FCML_I32( "cbw", 0x66, 0x98 ); FCML_I32( "cwde", 0x98 ); FCML_I64( "cdqe", 0x48, 0x98 ); FCML_A32( "cbtw", 0x66, 0x98 ); FCML_A32( "cwtl", 0x98 ); FCML_A64( "cltq", 0x48, 0x98 ); } void fcml_tf_instruction_CLC(void) { FCML_I32( "clc", 0xf8 ); FCML_I64( "clc", 0xf8 ); FCML_A32( "clc", 0xf8 ); FCML_A64( "clc", 0xf8 ); } void fcml_tf_instruction_CLD(void) { FCML_I3264( "cld", 0xfc ); FCML_A3264( "cld", 0xfc ); } void fcml_tf_instruction_CLFLUSH(void) { FCML_I32( "clflush byte ptr [esp+edx+00000020h]", 0x0F, 0xAE, 0x7C, 0x14, 0x20 ); FCML_A32( "clflush 0x00000020(%esp,%edx)", 0x0F, 0xAE, 0x7C, 0x14, 0x20 ); FCML_I32_D( "clflush byte ptr [esp+edx+00000020h]", 0x66, 0x0F, 0xAE, 0x7C, 0x14, 0x20 ); FCML_I64( "clflush byte ptr [rsp+rdx+0000000000000020h]", 0x0F, 0xAE, 0x7C, 0x14, 0x20 ); FCML_A64( "clflush 0x0000000000000020(%rsp,%rdx)", 0x0F, 0xAE, 0x7C, 0x14, 0x20 ); FCML_I64_D( "clflush byte ptr [rsp+rdx+0000000000000020h]", 0x66, 0x0F, 0xAE, 0x7C, 0x14, 0x20 ); FCML_I64( "clflush byte ptr [rbp+0000000000000001h]", 0x0F, 0xAE, 0x7D, 0x01 ); } void fcml_tf_instruction_CLI(void) { FCML_I3264( "cli", 0xfa ); FCML_A3264( "cli", 0xfa ); } void fcml_tf_instruction_CLGI(void) { FCML_I3264( "clgi", 0x0F, 0x01, 0xDD ); FCML_A3264( "clgi", 0x0F, 0x01, 0xDD ); } void fcml_tf_instruction_CLTS(void) { FCML_I3264( "clts", 0x0f, 0x06 ); FCML_A3264( "clts", 0x0f, 0x06 ); } void fcml_tf_instruction_CMC(void) { FCML_I3264( "cmc", 0xf5 ); FCML_A3264( "cmc", 0xf5 ); } void fcml_tf_instruction_CMOV(void) { FCML_I32( "cmovo esp,dword ptr [ebp+04030201h]", 0x0f, 0x40, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_A32( "cmovo 0x04030201(%ebp),%esp", 0x0f, 0x40, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "cmovo sp,word ptr [di+0201h]", 0x66, 0x67, 0x0f, 0x40, 0xa5, 0x01, 0x02 ); FCML_I32( "cmovo esp,dword ptr [di+0201h]", 0x67, 0x0f, 0x40, 0xa5, 0x01, 0x02 ); FCML_I64( "cmovo r12,qword ptr [r9+rcx*4+0000000000000001h]", 0x4D, 0x0f, 0x40, 0x64, 0x89, 0x01 ); FCML_I32( "cmovo esp,dword ptr [ebp+04030201h]", 0x0f, 0x40, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "cmovno esp,dword ptr [ebp+04030201h]", 0x0f, 0x41, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32_A( "cmovnae esp,dword ptr [ebp+04030201h]", 0x0f, 0x42, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32_A( "cmovb esp,dword ptr [ebp+04030201h]", 0x0f, 0x42, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "cmovc esp,dword ptr [ebp+04030201h]", 0x0f, 0x42, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32_A( "cmovnb esp,dword ptr [ebp+04030201h]", 0x0f, 0x43, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32_A( "cmovae esp,dword ptr [ebp+04030201h]", 0x0f, 0x43, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "cmovnc esp,dword ptr [ebp+04030201h]", 0x0f, 0x43, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_A32( "cmovnc 0x04030201(%ebp),%esp", 0x0f, 0x43, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32_A( "cmovz esp,dword ptr [ebp+04030201h]", 0x0f, 0x44, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "cmove esp,dword ptr [ebp+04030201h]", 0x0f, 0x44, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32_A( "cmovnz esp,dword ptr [ebp+04030201h]", 0x0f, 0x45, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "cmovne esp,dword ptr [ebp+04030201h]", 0x0f, 0x45, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32_A( "cmovna esp,dword ptr [ebp+04030201h]", 0x0f, 0x46, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "cmovbe esp,dword ptr [ebp+04030201h]", 0x0f, 0x46, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32_A( "cmova esp,dword ptr [ebp+04030201h]", 0x0f, 0x47, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "cmovnbe esp,dword ptr [ebp+04030201h]", 0x0f, 0x47, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "cmovs esp,dword ptr [ebp+04030201h]", 0x0f, 0x48, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "cmovns esp,dword ptr [ebp+04030201h]", 0x0f, 0x49, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32_A( "cmovpe esp,dword ptr [ebp+04030201h]", 0x0f, 0x4a, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "cmovp esp,dword ptr [ebp+04030201h]", 0x0f, 0x4a, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32_A( "cmovpo esp,dword ptr [ebp+04030201h]", 0x0f, 0x4b, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "cmovnp esp,dword ptr [ebp+04030201h]", 0x0f, 0x4b, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32_A( "cmovnge esp,dword ptr [ebp+04030201h]", 0x0f, 0x4c, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "cmovl esp,dword ptr [ebp+04030201h]", 0x0f, 0x4c, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32_A( "cmovge esp,dword ptr [ebp+04030201h]", 0x0f, 0x4d, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "cmovnl esp,dword ptr [ebp+04030201h]", 0x0f, 0x4d, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32_A( "cmovng esp,dword ptr [ebp+04030201h]", 0x0f, 0x4e, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "cmovle esp,dword ptr [ebp+04030201h]", 0x0f, 0x4e, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32_A( "cmovg esp,dword ptr [ebp+04030201h]", 0x0f, 0x4f, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "cmovnle esp,dword ptr [ebp+04030201h]", 0x0f, 0x4f, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_A32( "cmovnle 0x04030201(%ebp),%esp", 0x0f, 0x4f, 0xa5, 0x01, 0x02, 0x03, 04 ); } void fcml_tf_instruction_CMP(void) { FCML_I32_M( "cmp al,42h", 2, FCML_MI( 0x3C, 0x42 ), FCML_MI( 0x80, 0xF8, 0x42 ) ); FCML_I32_M( "cmp eax,40302010h", 2, FCML_MI( 0x3D, 0x10, 0x20, 0x30, 0x40 ), FCML_MI( 0x81, 0xf8, 0x10, 0x20, 0x30, 0x40 ) ); FCML_I32_M( "cmp ax,2010h", 2, FCML_MI( 0x66, 0x3D, 0x10, 0x20 ), FCML_MI( 0x66, 0x81, 0xf8, 0x10, 0x20 ) ); FCML_I64_M( "cmp rax,0000000040302010h", 2, FCML_MI( 0x48, 0x3D, 0x10, 0x20, 0x30, 0x40 ), FCML_MI( 0x48, 0x81, 0xf8, 0x10, 0x20, 0x30, 0x40 ) ); FCML_A64_M( "cmp $0x0000000040302010,%rax", 2, FCML_MI( 0x48, 0x3D, 0x10, 0x20, 0x30, 0x40 ), FCML_MI( 0x48, 0x81, 0xf8, 0x10, 0x20, 0x30, 0x40 ) ); FCML_I32( "cmp byte ptr [eax],20h", 0x80, 0x38, 0x20 ); FCML_A32( "cmpb $0x20,(%eax)", 0x80, 0x38, 0x20 ); FCML_I64_D( "cmp byte ptr [rax],20h", 0x48, 0x80, 0x38, 0x20 ); FCML_I32( "cmp dword ptr [eax],40302010h", 0x81, 0x38, 0x10, 0x20, 0x30, 0x40 ); FCML_A32( "cmpl $0x40302010,(%eax)", 0x81, 0x38, 0x10, 0x20, 0x30, 0x40 ); FCML_I32( "cmp word ptr [eax],2010h", 0x66, 0x81, 0x38, 0x10, 0x20 ); FCML_A32( "cmpw $0x2010,(%eax)", 0x66, 0x81, 0x38, 0x10, 0x20 ); FCML_I64( "cmp qword ptr [rax],0000000040302010h", 0x48, 0x81, 0x38, 0x10, 0x20, 0x30, 0x40 ); FCML_I32_M( "cmp dword ptr [eax],00000010h", 2, FCML_MI( 0x83, 0x38, 0x10 ), FCML_MI( 0x81, 0x38, 0x10, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "cmp word ptr [eax],0010h", 2, FCML_MI( 0x66, 0x83, 0x38, 0x10 ), FCML_MI( 0x66, 0x81, 0x38, 0x10, 0x00 ) ); FCML_I64_M( "cmp qword ptr [rax],0000000000000010h", 2, FCML_MI( 0x48, 0x83, 0x38, 0x10 ), FCML_MI( 0x48, 0x81, 0x38, 0x10, 0x00, 0x00, 0x00 ) ); FCML_A64_M( "cmpq $0x0000000000000010,(%rax)", 2, FCML_MI( 0x48, 0x83, 0x38, 0x10 ), FCML_MI( 0x48, 0x81, 0x38, 0x10, 0x00, 0x00, 0x00 ) ); FCML_I32( "cmp byte ptr [eax],dl", 0x38, 0x10 ); FCML_I64_D( "cmp byte ptr [rax],dl", 0x48, 0x38, 0x10 ); FCML_I32( "cmp dword ptr [eax],edx", 0x39, 0x10 ); FCML_I32( "cmp word ptr [eax],dx", 0x66, 0x39, 0x10 ); FCML_I64( "cmp qword ptr [rax],rdx", 0x48, 0x39, 0x10 ); FCML_I32( "cmp dl,byte ptr [eax]", 0x3A, 0x10 ); FCML_I64_D( "cmp dl,byte ptr [rax]", 0x48, 0x3A, 0x10 ); FCML_I32( "cmp edx,dword ptr [eax]", 0x3B, 0x10 ); FCML_I32( "cmp dx,word ptr [eax]", 0x66, 0x3B, 0x10 ); FCML_I64( "cmp rdx,qword ptr [rax]", 0x48, 0x3B, 0x10 ); FCML_A64( "cmp (%rax),%rdx", 0x48, 0x3B, 0x10 ); } void fcml_tf_instruction_CMPPD(void) { FCML_I32( "cmppd xmm2,xmmword ptr [ecx+eax],0ffh", 0x66, 0x0F, 0xC2, 0x14, 0x01, 0xFF ); FCML_I64( "cmppd xmm2,xmmword ptr [rcx+rax],0ffh", 0x66, 0x0F, 0xC2, 0x14, 0x01, 0xFF ); FCML_A64( "cmppd $0xff,(%rcx,%rax),%xmm2", 0x66, 0x0F, 0xC2, 0x14, 0x01, 0xFF ); FCML_I64( "vcmppd ymm10,ymm14,ymmword ptr [r9+rax],20h", 0xC4, 0x41, 0x0D, 0xC2, 0x14, 0x01, 0x20 ); FCML_A64( "vcmppd $0x20,(%r9,%rax),%ymm14,%ymm10", 0xC4, 0x41, 0x0D, 0xC2, 0x14, 0x01, 0x20 ); FCML_I32( "vcmppd xmm2,xmm7,xmmword ptr [ecx+eax],20h", 0xc5, 0xC1, 0xC2, 0x14, 0x01, 0x20 ); FCML_I32_D( "vcmppd xmm2,xmm7,xmmword ptr [ecx+eax],20h", 0xC4, 0xC1, 0x41, 0xC2, 0x14, 0x01, 0x20 ); FCML_I32( "vcmppd xmm2,xmm2,xmmword ptr [ecx+eax],20h", 0xC5, 0xE9, 0xC2, 0x14, 0x01, 0x20 ); FCML_I32_D( "vcmppd xmm2,xmm2,xmmword ptr [ecx+eax],20h", 0xC4, 0xC1, 0x69, 0xC2, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_CMPPS(void) { FCML_I32( "cmpps xmm2,xmmword ptr [ecx+eax],0ffh", 0x0F, 0xC2, 0x14, 0x01, 0xFF ); FCML_I64( "cmpps xmm2,xmmword ptr [rcx+rax],0ffh", 0x0F, 0xC2, 0x14, 0x01, 0xFF ); FCML_A64( "cmpps $0xff,(%rcx,%rax),%xmm2", 0x0F, 0xC2, 0x14, 0x01, 0xFF ); FCML_I64( "vcmpps ymm10,ymm14,ymmword ptr [r9+rax],20h", 0xC4, 0x41, 0x0C, 0xC2, 0x14, 0x01, 0x20 ); FCML_I64( "vcmpps xmm2,xmm14,xmmword ptr [r9+rax],20h", 0xC4, 0xC1, 0x08, 0xC2, 0x14, 0x01, 0x20 ); FCML_A64( "vcmpps $0x20,(%r9,%rax),%xmm14,%xmm2", 0xC4, 0xC1, 0x08, 0xC2, 0x14, 0x01, 0x20 ); FCML_I32( "vcmpps xmm2,xmm2,xmmword ptr [ecx+eax],20h", 0xC5, 0xE8, 0xC2, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_CMPS(void) { FCML_I32( "repne cmps byte ptr [si],byte ptr [di]", 0xF2, 0x67, 0xA6 ); FCML_I32( "cmps byte ptr [si],byte ptr [di]", 0x66, 0x67, 0xA6 ); FCML_I32( "cmps byte ptr [esi],byte ptr [edi]", 0xA6 ); FCML_I64_D( "cmps byte ptr [rsi],byte ptr [rdi]", 0x48, 0xA6 ); FCML_I64( "cmps byte ptr [rsi],byte ptr [rdi]", 0xA6 ); FCML_A64( "cmpsb (%rdi),(%rsi)", 0xA6 ); FCML_A64_D_SHORT( "cmpsb", 0xA6 ); FCML_I64_D( "cmps byte ptr [rsi],byte ptr [rdi]", 0x40, 0xA6 ); FCML_I64( "cmps byte ptr [rsi],byte ptr [rdi]", 0xA6 ); FCML_I64_D( "cmps byte ptr [esi],byte ptr [edi]", 0x67, 0x40, 0xA6 ); FCML_I64( "cmps byte ptr [esi],byte ptr [edi]", 0x67, 0xA6 ); FCML_I64_D( "cmps byte ptr [esi],byte ptr [edi]", 0x66, 0x67, 0x40, 0xA6 ); FCML_I64( "cmps byte ptr [esi],byte ptr [edi]", 0x66, 0x67, 0xA6 ); FCML_I32( "cmps dword ptr [si],dword ptr [di]", 0x67, 0xA7 ); FCML_I64_A_FAILED( "cmps dword ptr [si],dword ptr [di]", 0x67, 0xA7 ); FCML_I32( "cmps word ptr [si],word ptr [di]", 0x66, 0x67, 0xA7 ); FCML_A32( "cmpsw (%di),(%si)", 0x66, 0x67, 0xA7 ); FCML_A32_D_SHORT( "cmpsw", 0x66, 0x67, 0xA7 ); FCML_I32( "cmps dword ptr [esi],dword ptr [edi]", 0xA7 ); FCML_A32( "cmpsl (%edi),(%esi)", 0xA7 ); FCML_A32_D_SHORT( "cmpsl", 0xA7 ); FCML_I64( "cmps qword ptr [rsi],qword ptr [rdi]", 0x48, 0xA7 ); FCML_I64_D( "cmps dword ptr [rsi],dword ptr [rdi]", 0x40, 0xA7 ); FCML_I64( "cmps dword ptr [rsi],dword ptr [rdi]", 0xA7 ); FCML_A64( "cmpsq (%rdi),(%rsi)", 0x48, 0xA7 ); FCML_A64_D_SHORT( "cmpsq", 0x48, 0xA7 ); FCML_I64_D( "cmps dword ptr [esi],dword ptr [edi]", 0x67, 0x40, 0xA7 ); FCML_I64( "cmps dword ptr [esi],dword ptr [edi]", 0x67, 0xA7 ); FCML_I64_D( "cmps word ptr [esi],word ptr [edi]", 0x66, 0x67, 0x40, 0xA7 ); FCML_I64( "cmps word ptr [esi],word ptr [edi]", 0x66, 0x67, 0xA7 ); /* Segment override. */ /* ES cannot be overridden. */ FCML_I32_A_FAILED( "cmps dword ptr ds:[si],dword ptr cs:[di]", 0x67, 0xA7 ); FCML_I32_A_FAILED( "cmps dword ptr ds:[si],dword ptr ds:[di]", 0x67, 0xA7 ); FCML_I32_A( "cmps dword ptr ds:[si],dword ptr es:[di]", 0x67, 0xA7 ); /* DS can be. */ FCML_I32_A( "repne cmps dword ptr cs:[si],dword ptr es:[di]", 0xF2, 0x2E, 0x67, 0xA7 ); FCML_I32_A( "cmps dword ptr ss:[si],dword ptr es:[di]", 0x36, 0x67, 0xA7 ); FCML_I32_A( "cmps dword ptr es:[si],dword ptr es:[di]", 0x26, 0x67, 0xA7 ); FCML_I32_A( "cmps dword ptr fs:[si],dword ptr es:[di]", 0x64, 0x67, 0xA7 ); FCML_I32_A( "cmps dword ptr gs:[si],dword ptr es:[di]", 0x65, 0x67, 0xA7 ); /* Short forms. */ FCML_A64_A( "cmpsb", 0xA6 ); FCML_A32_A( "cmpsw", 0x66, 0xA7 ); FCML_A32_A( "cmpsl", 0xA7 ); FCML_A64_A( "cmpsq", 0x48, 0xA7 ); FCML_I32_D_SHORT( "repne cmpsb", 0xF2, 0xA6 ); FCML_I32_D_SHORT( "cmpsw", 0x66, 0xA7 ); FCML_I32_D_SHORT( "cmpsd", 0xA7 ); FCML_I64_D_SHORT( "cmpsq", 0x48, 0xA7 ); FCML_I32_A( "cmpsb", 0xA6 ); FCML_I32_A( "cmpsw", 0x66, 0xA7 ); FCML_I32_A( "cmpsd", 0xA7 ); FCML_I64_A( "cmpsq", 0x48, 0xA7 ); } void fcml_tf_instruction_CMPSD(void) { /* Wrong comparison predicate. */ FCML_I32_A_FAILED( "cmpsd xmm0,mmword ptr [eax+00000020h],08h", 0xF2, 0x0F, 0xC2, 0x40, 0x20, 0x08 ); FCML_I32( "cmpsd xmm0,mmword ptr [eax+00000020h],07h", 0xF2, 0x0F, 0xC2, 0x40, 0x20, 0x07 ); FCML_A32( "cmpsd $0x07,0x00000020(%eax),%xmm0", 0xF2, 0x0F, 0xC2, 0x40, 0x20, 0x07 ); FCML_I64( "cmpsd xmm0,mmword ptr [rax+0000000000000020h],06h", 0xF2, 0x0F, 0xC2, 0x40, 0x20, 0x06 ); FCML_A32( "cmpsd $0x06,0x00000020(%eax),%xmm0", 0xf2, 0x0f, 0xc2, 0x40, 0x20, 0x06 ); FCML_I32( "cmpsd xmm0,xmm1,00h", 0xf2, 0x0f, 0xc2, 0xc1, 0x00 ); FCML_A32( "cmpsd $0x00,%xmm1,%xmm0", 0xf2, 0x0f, 0xc2, 0xc1, 0x00 ); /* pseudo op. */ FCML_I3264_A( "cmpeqsd xmm0,xmm1", 0xf2, 0x0f, 0xc2, 0xc1, 0x00 ); FCML_A32_D_SHORT( "cmpeqsd (%eax),%xmm0", 0xf2, 0x0f, 0xc2, 0x00, 0x00 ); FCML_A3264_A( "cmpeqsd %xmm1,%xmm0", 0xf2, 0x0f, 0xc2, 0xc1, 0x00 ); FCML_I3264_A( "cmpltsd xmm0,xmm1", 0xf2, 0x0f, 0xc2, 0xc1, 0x01 ); FCML_I3264_A( "cmplesd xmm0,xmm1", 0xf2, 0x0f, 0xc2, 0xc1, 0x02 ); FCML_I3264_A( "cmpunordsd xmm0,xmm1", 0xf2, 0x0f, 0xc2, 0xc1, 0x03 ); FCML_A3264_A( "cmpunordsd %xmm1,%xmm0", 0xf2, 0x0f, 0xc2, 0xc1, 0x03 ); FCML_A32_A( "cmpunordsd (%ecx),%xmm0", 0xf2, 0x0f, 0xc2, 0x01, 0x03 ); FCML_A32_D_SHORT( "cmpunordsd (%ecx),%xmm0", 0xf2, 0x0f, 0xc2, 0x01, 0x03 ); FCML_I3264_A( "cmpneqsd xmm0,xmm1", 0xf2, 0x0f, 0xc2, 0xc1, 0x04 ); FCML_I3264_A( "cmpnltsd xmm0,xmm1", 0xf2, 0x0f, 0xc2, 0xc1, 0x05 ); FCML_I3264_A( "cmpnlesd xmm0,xmm1", 0xf2, 0x0f, 0xc2, 0xc1, 0x06 ); FCML_I3264_A( "cmpordsd xmm0,xmm1", 0xf2, 0x0f, 0xc2, 0xc1, 0x07 ); /* Disassembling. */ FCML_I32_D_SHORT( "cmpeqsd xmm0,xmm1", 0xf2, 0x0f, 0xc2, 0xc1, 0x00 ); FCML_I32_A_FAILED( "vcmpsd xmm2,xmm7,mmword ptr [ecx+eax],20h", 0xc5, 0xc3, 0xc2, 0x14, 0x01, 0x20 ); FCML_I32( "vcmpsd xmm2,xmm7,mmword ptr [ecx+eax],0fh", 0xc5, 0xc3, 0xc2, 0x14, 0x01, 0x0F ); FCML_I64( "vcmpsd xmm10,xmm14,mmword ptr [r9+rax],00h", 0xC4, 0x41, 0x0B, 0xC2, 0x14, 0x01, 0x00 ); /* pseudo op. */ FCML_I3264_A( "vcmpeqsd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x00 ); FCML_I3264_A( "vcmpltsd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x01 ); FCML_I3264_A( "vcmplesd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x02 ); FCML_I3264_A( "vcmpunordsd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x03 ); FCML_I3264_A( "vcmpneqsd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x04 ); FCML_I3264_A( "vcmpnltsd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x05 ); FCML_I3264_A( "vcmpnlesd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x06 ); FCML_I3264_A( "vcmpordsd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x07 ); FCML_I3264_A( "vcmpeq_uqsd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x08 ); FCML_I3264_A( "vcmpngesd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x09 ); FCML_I3264_A( "vcmpngtsd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x0A ); FCML_I3264_A( "vcmpfalsesd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x0B ); FCML_I3264_A( "vcmpneq_oqsd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x0C ); FCML_I3264_A( "vcmpgesd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x0D ); FCML_I3264_A( "vcmpgtsd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x0E ); FCML_I3264_A( "vcmptruesd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x0F ); FCML_I3264_A( "vcmpeq_ossd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x10 ); FCML_I3264_A( "vcmplt_oqsd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x11 ); FCML_I3264_A( "vcmple_oqsd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x12 ); FCML_I3264_A( "vcmpunord_ssd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x13 ); FCML_I3264_A( "vcmpneq_ussd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x14 ); FCML_I3264_A( "vcmpnlt_uqsd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x15 ); FCML_I3264_A( "vcmpnle_uqsd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x16 ); FCML_I3264_A( "vcmpord_ssd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x17 ); FCML_I3264_A( "vcmpeq_ussd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x18 ); FCML_I3264_A( "vcmpnge_uqsd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x19 ); FCML_I3264_A( "vcmpngt_uqsd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x1A ); FCML_I3264_A( "vcmpfalse_ossd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x1B ); FCML_I3264_A( "vcmpneq_ossd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x1C ); FCML_I3264_A( "vcmpge_oqsd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x1D ); FCML_I3264_A( "vcmpgt_oqsd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x1E ); FCML_I3264_A( "vcmptrue_ussd xmm0,xmm1,xmm2", 0xc5, 0xf3, 0xc2, 0xc2, 0x1F ); FCML_I3264_A_FAILED( "vcmptrue_ussd xmm0,xmm1,xmm2,01fh", 0xc5, 0xf3, 0xc2, 0xc2, 0x1F ); FCML_A32_A( "vcmpord_ssd 0x14(%ecx),%xmm1,%xmm0", 0xc5, 0xf3, 0xc2, 0x41, 0x14, 0x17 ); FCML_I32( "vcmpsd xmm2,xmm7,mmword ptr [ecx+eax],0fh", 0xc5, 0xc3, 0xc2, 0x14, 0x01, 0x0F ); FCML_A32( "vcmpsd $0x0f,(%ecx,%eax),%xmm7,%xmm2", 0xc5, 0xc3, 0xc2, 0x14, 0x01, 0x0F ); } void fcml_tf_instruction_CMPSS(void) { /* Wrong comparison predicate. */ FCML_I32_A_FAILED( "cmpss xmm0,dword ptr [eax+00000020h],08h", 0xf3, 0x0f, 0xc2, 0x40, 0x20, 0x08 ); FCML_I32( "cmpss xmm0,dword ptr [eax+00000020h],07h", 0xf3, 0x0f, 0xc2, 0x40, 0x20, 0x07 ); FCML_I64( "cmpss xmm0,dword ptr [rax+0000000000000020h],06h", 0xf3, 0x0f, 0xc2, 0x40, 0x20, 0x06 ); FCML_A64( "cmpss $0x06,0x0000000000000020(%rax),%xmm0", 0xf3, 0x0f, 0xc2, 0x40, 0x20, 0x06 ); FCML_I3264_A( "cmpeqss xmm0,xmm1", 0xf3, 0x0f, 0xc2, 0xc1, 0x00 ); FCML_I3264_A( "cmpltss xmm0,xmm1", 0xf3, 0x0f, 0xc2, 0xc1, 0x01 ); FCML_I3264_A( "cmpless xmm0,xmm1", 0xf3, 0x0f, 0xc2, 0xc1, 0x02 ); FCML_I3264_A( "cmpunordss xmm0,xmm1", 0xf3, 0x0f, 0xc2, 0xc1, 0x03 ); FCML_A3264_A( "cmpunordss %xmm1,%xmm0", 0xf3, 0x0f, 0xc2, 0xc1, 0x03 ); FCML_I3264_A( "cmpneqss xmm0,xmm1", 0xf3, 0x0f, 0xc2, 0xc1, 0x04 ); FCML_I3264_A( "cmpnltss xmm0,xmm1", 0xf3, 0x0f, 0xc2, 0xc1, 0x05 ); FCML_I3264_A( "cmpnless xmm0,xmm1", 0xf3, 0x0f, 0xc2, 0xc1, 0x06 ); FCML_I3264_A( "cmpordss xmm0,xmm1", 0xf3, 0x0f, 0xc2, 0xc1, 0x07 ); /* pseudo opcode out of range. */ FCML_I32_A_FAILED( "vcmpss xmm2,xmm7,dword ptr [ecx+eax],20h", 0xc5, 0xc2, 0xc2, 0x14, 0x01, 0x20 ); FCML_I32( "vcmpss xmm2,xmm7,dword ptr [ecx+eax],0fh", 0xc5, 0xc2, 0xc2, 0x14, 0x01, 0x0F ); FCML_I64( "vcmpss xmm10,xmm14,dword ptr [r9+rax],00h", 0xC4, 0x41, 0x0A, 0xC2, 0x14, 0x01, 0x00 ); /* pseudo op. */ FCML_I3264_A( "vcmpeqss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x00 ); FCML_I3264_A( "vcmpltss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x01 ); FCML_I3264_A( "vcmpless xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x02 ); FCML_I3264_A( "vcmpunordss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x03 ); FCML_I3264_A( "vcmpneqss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x04 ); FCML_I3264_A( "vcmpnltss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x05 ); FCML_I3264_A( "vcmpnless xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x06 ); FCML_I3264_A( "vcmpordss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x07 ); FCML_I3264_A( "vcmpeq_uqss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x08 ); FCML_I3264_A( "vcmpngess xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x09 ); FCML_I3264_A( "vcmpngtss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x0A ); FCML_I3264_A( "vcmpfalsess xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x0B ); FCML_I3264_A( "vcmpneq_oqss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x0C ); FCML_I3264_A( "vcmpgess xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x0D ); FCML_I3264_A( "vcmpgtss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x0E ); FCML_I3264_A( "vcmptruess xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x0F ); FCML_I3264_A( "vcmpeq_osss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x10 ); FCML_I3264_A( "vcmplt_oqss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x11 ); FCML_I3264_A( "vcmple_oqss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x12 ); FCML_I3264_A( "vcmpunord_sss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x13 ); FCML_I3264_A( "vcmpneq_usss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x14 ); FCML_I3264_A( "vcmpnlt_uqss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x15 ); FCML_I3264_A( "vcmpnle_uqss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x16 ); FCML_I3264_A( "vcmpord_sss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x17 ); FCML_I3264_A( "vcmpeq_usss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x18 ); FCML_I3264_A( "vcmpnge_uqss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x19 ); FCML_I3264_A( "vcmpngt_uqss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x1A ); FCML_I3264_A( "vcmpfalse_osss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x1B ); FCML_I3264_A( "vcmpneq_osss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x1C ); FCML_I3264_A( "vcmpge_oqss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x1D ); FCML_I3264_A( "vcmpgt_oqss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x1E ); FCML_I3264_A( "vcmptrue_usss xmm0,xmm1,xmm2", 0xc5, 0xf2, 0xc2, 0xc2, 0x1F ); FCML_I3264_A_FAILED( "vcmptrue_usss xmm0,xmm1,xmm2,01fh", 0xc5, 0xf2, 0xc2, 0xc2, 0x1F ); } void fcml_tf_instruction_CMPXCHG(void) { FCML_I32( "lock cmpxchg byte ptr [eax],dl", 0xF0, 0x0F, 0xB0, 0x10 ); FCML_A32( "lock cmpxchg %dl,(%eax)", 0xF0, 0x0F, 0xB0, 0x10 ); FCML_I32( "xacquire lock cmpxchg byte ptr [eax],dl", 0xF2, 0xF0, 0x0F, 0xB0, 0x10 ); FCML_I32( "xrelease lock cmpxchg byte ptr [eax],dl", 0xF3, 0xF0, 0x0F, 0xB0, 0x10 ); FCML_A32( "xrelease lock cmpxchg %dl,(%eax)", 0xF3, 0xF0, 0x0F, 0xB0, 0x10 ); FCML_I64( "cmpxchg byte ptr [rax],dl", 0x0F, 0xB0, 0x10 ); FCML_A64( "cmpxchg %dl,(%rax)", 0x0F, 0xB0, 0x10 ); FCML_I64_D( "cmpxchg byte ptr [rax],dl", 0x48, 0x0F, 0xB0, 0x10 ); FCML_I32( "cmpxchg dword ptr [eax],edx", 0x0F, 0xB1, 0x10 ); FCML_A32( "cmpxchg %edx,(%eax)", 0x0F, 0xB1, 0x10 ); FCML_I32( "cmpxchg word ptr [eax],dx", 0x66, 0x0F, 0xB1, 0x10 ); FCML_I64( "lock cmpxchg qword ptr [rax],rdx", 0xF0, 0x48, 0x0F, 0xB1, 0x10 ); FCML_I64( "xacquire lock cmpxchg qword ptr [rax],rdx", 0xF2, 0xF0, 0x48, 0x0F, 0xB1, 0x10 ); FCML_I64( "xrelease lock cmpxchg qword ptr [rax],rdx", 0xF3, 0xF0, 0x48, 0x0F, 0xB1, 0x10 ); FCML_A64( "xrelease lock cmpxchg %rdx,(%rax)", 0xF3, 0xF0, 0x48, 0x0F, 0xB1, 0x10 ); } void fcml_tf_instruction_CMPXCHG16B_CMPXCHG8B(void) { FCML_I64( "cmpxchg16b oword ptr [rcx+0ffffffffffffffffh]", 0x48, 0x0F, 0xC7, 0x49, 0xFF ); FCML_A64( "cmpxchg16b 0xffffffffffffffff(%rcx)", 0x48, 0x0F, 0xC7, 0x49, 0xFF ); FCML_I64( "lock cmpxchg16b oword ptr [rcx+0ffffffffffffffffh]", 0xF0, 0x48, 0x0F, 0xC7, 0x49, 0xFF ); FCML_I64_D_FAILED( "xacquire lock cmpxchg16b oword ptr [rcx+0ffffffffffffffffh]", 0xF2, 0xF0, 0x48, 0x0F, 0xC7, 0x49, 0xFF ); FCML_I64_D_FAILED( "xrelease lock cmpxchg16b oword ptr [rcx+0ffffffffffffffffh]", 0xF3, 0xF0, 0x48, 0x0F, 0xC7, 0x49, 0xFF ); FCML_A64_A_FAILED( "xrelease lock cmpxchg16b 0xffffffffffffffff(%rcx)", 0xF3, 0xF0, 0x48, 0x0F, 0xC7, 0x49, 0xFF ); FCML_I64( "cmpxchg8b qword ptr [rcx+0ffffffffffffffffh]", 0x0F, 0xC7, 0x49, 0xFF ); FCML_I32( "lock cmpxchg8b qword ptr [ecx+0ffffffffh]", 0xF0, 0x0F, 0xC7, 0x49, 0xFF ); FCML_I32( "xacquire lock cmpxchg8b qword ptr [ecx+0ffffffffh]", 0xF2, 0xF0, 0x0F, 0xC7, 0x49, 0xFF ); FCML_I32( "xrelease lock cmpxchg8b qword ptr [ecx+0ffffffffh]", 0xF3, 0xF0, 0x0F, 0xC7, 0x49, 0xFF ); FCML_A32( "xrelease lock cmpxchg8b 0xffffffff(%ecx)", 0xF3, 0xF0, 0x0F, 0xC7, 0x49, 0xFF ); } void fcml_tf_instruction_CPUID(void) { FCML_I3264( "cpuid", 0x0F, 0xA2 ); FCML_A3264( "cpuid", 0x0F, 0xA2 ); } void fcml_tf_instruction_CRC32(void) { FCML_I64_D( "crc32 eax,byte ptr [rax+0000000000000020h]", 0xF2, 0x40, 0x0F, 0x38, 0xF0, 0x40, 0x20 ); FCML_I64_D( "crc32 eax,byte ptr [rax+0000000000000020h]", 0x66, 0xF2, 0x0F, 0x38, 0xF0, 0x40, 0x20 ); FCML_I64( "crc32 eax,byte ptr [rax+0000000000000020h]", 0xF2, 0x0F, 0x38, 0xF0, 0x40, 0x20 ); FCML_I32( "crc32 eax,byte ptr [eax+00000020h]", 0xF2, 0x0F, 0x38, 0xF0, 0x40, 0x20 ); FCML_A32( "crc32b 0x00000020(%eax),%eax", 0xF2, 0x0F, 0x38, 0xF0, 0x40, 0x20 ); FCML_I64( "crc32 rax,byte ptr [rax+0000000000000020h]", 0xF2, 0x48, 0x0F, 0x38, 0xF0, 0x40, 0x20 ); FCML_A32( "crc32w 0x00000020(%eax),%eax", 0x66, 0xf2, 0x0f, 0x38, 0xf1, 0x40, 0x20 ); FCML_A32( "crc32l 0x00000020(%eax),%eax", 0xf2, 0x0f, 0x38, 0xf1, 0x40, 0x20 ); FCML_A64( "crc32q 0x0000000000000020(%rax),%rax", 0xf2, 0x48, 0x0f, 0x38, 0xf1, 0x40, 0x20 ); } void fcml_tf_instruction_CVTDQ2PD(void) { FCML_I64( "cvtdq2pd xmm0,mmword ptr [rax+0000000000000020h]", 0xF3, 0x0F, 0xE6, 0x40, 0x20 ); FCML_A64( "cvtdq2pd 0x0000000000000020(%rax),%xmm0", 0xF3, 0x0F, 0xE6, 0x40, 0x20 ); FCML_I32( "cvtdq2pd xmm0,xmm2", 0xF3, 0x0F, 0xE6, 0xC2 ); FCML_I32( "cvtdq2pd xmm0,mmword ptr [eax+00000020h]", 0xF3, 0x0F, 0xE6, 0x40, 0x20 ); FCML_A32( "cvtdq2pd 0x00000020(%eax),%xmm0", 0xF3, 0x0F, 0xE6, 0x40, 0x20 ); FCML_I32( "vcvtdq2pd xmm2,mmword ptr [ecx+eax]", 0xc5, 0xfa, 0xe6, 0x14, 0x01 ); FCML_I64( "vcvtdq2pd xmm10,mmword ptr [r9+rax]", 0xC4, 0x41, 0x7A, 0xE6, 0x14, 0x01 ); FCML_A64( "vcvtdq2pd (%rcx,%rax),%xmm2", 0xc5, 0xfa, 0xe6, 0x14, 0x01 ); FCML_A64( "vcvtdq2pd %xmm1,%xmm0", 0xc5, 0xfa, 0xe6, 0xc1 ); FCML_I32( "vcvtdq2pd ymm2,xmmword ptr [ecx+eax]", 0xc5, 0xfe, 0xe6, 0x14, 0x01 ); FCML_I64( "vcvtdq2pd ymm10,xmmword ptr [r9+rax]", 0xC4, 0x41, 0x7E, 0xE6, 0x14, 0x01 ); FCML_A64( "vcvtdq2pd (%r9,%rax),%ymm10", 0xC4, 0x41, 0x7E, 0xE6, 0x14, 0x01 ); FCML_A64( "vcvtdq2pd %xmm1,%ymm0", 0xc5, 0xfe, 0xe6, 0xc1 ); } void fcml_tf_instruction_CVTDQ2PS(void) { FCML_I64( "cvtdq2ps xmm0,xmmword ptr [rax+0000000000000020h]", 0x0F, 0x5b, 0x40, 0x20 ); FCML_A64( "cvtdq2ps 0x0000000000000020(%rax),%xmm0", 0x0F, 0x5b, 0x40, 0x20 ); FCML_I32( "cvtdq2ps xmm0,xmm2", 0x0F, 0x5b, 0xC2 ); FCML_I32( "cvtdq2ps xmm0,xmmword ptr [eax+00000020h]", 0x0F, 0x5b, 0x40, 0x20 ); FCML_I32( "vcvtdq2ps xmm2,xmmword ptr [ecx+eax]", 0xc5, 0xf8, 0x5b, 0x14, 0x01 ); FCML_A64( "vcvtdq2ps (%rcx,%rax),%ymm2", 0xc5, 0xfc, 0x5b, 0x14, 0x01 ); } void fcml_tf_instruction_CVTPD2DQ(void) { FCML_I64( "cvtpd2dq xmm0,xmmword ptr [rax+0000000000000020h]", 0xF2, 0x0F, 0xE6, 0x40, 0x20 ); FCML_A64( "cvtpd2dq 0x0000000000000020(%rax),%xmm0", 0xF2, 0x0F, 0xE6, 0x40, 0x20 ); FCML_I32( "cvtpd2dq xmm0,xmm2", 0xF2, 0x0F, 0xE6, 0xC2 ); FCML_I32( "cvtpd2dq xmm0,xmmword ptr [eax+00000020h]", 0xF2, 0x0F, 0xE6, 0x40, 0x20 ); FCML_I32( "vcvtpd2dq xmm2,xmmword ptr [ecx+eax]", 0xc5, 0xfb, 0xe6, 0x14, 0x01 ); FCML_I64( "vcvtpd2dq ymm2,ymmword ptr [rcx+rax]", 0xc5, 0xff, 0xe6, 0x14, 0x01 ); FCML_A64( "vcvtpd2dq (%rcx,%rax),%ymm2", 0xc5, 0xff, 0xe6, 0x14, 0x01 ); } void fcml_tf_instruction_CVTPD2PI(void) { FCML_I64( "cvtpd2pi mm0,xmmword ptr [rax+0000000000000020h]", 0x66, 0x0F, 0x2D, 0x40, 0x20 ); FCML_A64( "cvtpd2pi 0x0000000000000020(%rax),%mm0", 0x66, 0x0F, 0x2D, 0x40, 0x20 ); FCML_I32( "cvtpd2pi mm0,xmm2", 0x66, 0x0F, 0x2D, 0xC2 ); FCML_I32( "cvtpd2pi mm0,xmmword ptr [eax+00000020h]", 0x66, 0x0F, 0x2D, 0x40, 0x20 ); } void fcml_tf_instruction_CVTPD2PS(void) { FCML_I64( "cvtpd2ps xmm0,xmmword ptr [rax+0000000000000020h]", 0x66, 0x0F, 0x5A, 0x40, 0x20 ); FCML_I32( "cvtpd2ps xmm0,xmm2", 0x66, 0x0F, 0x5A, 0xC2 ); FCML_I32( "cvtpd2ps xmm0,xmmword ptr [eax+00000020h]", 0x66, 0x0F, 0x5A, 0x40, 0x20 ); FCML_I32( "vcvtpd2ps xmm0,xmm1", 0xc5, 0xf9, 0x5a, 0xc1 ); FCML_I32_D( "vcvtpd2ps xmm2,xmmword ptr [ecx+eax]", 0xC4, 0xE1, 0x79, 0x5A, 0x14, 0x01 ); FCML_I64_D( "vcvtpd2ps xmm2,ymmword ptr [rcx+rax]", 0xC4, 0xE1, 0x7D, 0x5A, 0x14, 0x01 ); FCML_I32( "vcvtpd2ps xmm2,xmmword ptr [ecx+eax]", 0xc5, 0xf9, 0x5a, 0x14, 0x01 ); FCML_I64( "vcvtpd2ps xmm2,ymmword ptr [rcx+rax]", 0xc5, 0xfd, 0x5a, 0x14, 0x01 ); FCML_A32( "vcvtpd2psx %xmm1,%xmm0", 0xc5, 0xf9, 0x5a, 0xc1 ); FCML_A64( "vcvtpd2psx (%rcx,%rax),%xmm2", 0xc5, 0xf9, 0x5a, 0x14, 0x01 ); FCML_A64( "vcvtpd2psy (%rcx,%rax),%xmm2", 0xc5, 0xfd, 0x5a, 0x14, 0x01 ); } void fcml_tf_instruction_CVTPI2PD(void) { FCML_I64( "cvtpi2pd xmm0,mmword ptr [rax+0000000000000020h]", 0x66, 0x0F, 0x2A, 0x40, 0x20 ); FCML_A64( "cvtpi2pd 0x0000000000000020(%rax),%xmm0", 0x66, 0x0F, 0x2A, 0x40, 0x20 ); FCML_I32( "cvtpi2pd xmm0,mm2", 0x66, 0x0F, 0x2A, 0xC2 ); FCML_I32( "cvtpi2pd xmm0,mmword ptr [eax+00000020h]", 0x66, 0x0F, 0x2A, 0x40, 0x20 ); } void fcml_tf_instruction_CVTPI2PS(void) { FCML_I64( "cvtpi2ps xmm0,mmword ptr [rax+0000000000000020h]", 0x0F, 0x2A, 0x40, 0x20 ); FCML_A64( "cvtpi2ps 0x0000000000000020(%rax),%xmm0", 0x0F, 0x2A, 0x40, 0x20 ); FCML_I32( "cvtpi2ps xmm0,mm2", 0x0F, 0x2A, 0xC2 ); FCML_I32( "cvtpi2ps xmm0,mmword ptr [eax+00000020h]", 0x0F, 0x2A, 0x40, 0x20 ); } void fcml_tf_instruction_CVTPS2DQ(void) { FCML_I64( "cvtps2dq xmm0,xmmword ptr [rax+0000000000000020h]", 0x66, 0x0F, 0x5B, 0x40, 0x20 ); FCML_A64( "cvtps2dq 0x0000000000000020(%rax),%xmm0", 0x66, 0x0F, 0x5B, 0x40, 0x20 ); FCML_I32( "cvtps2dq xmm0,xmm2", 0x66, 0x0F, 0x5B, 0xC2 ); FCML_I32( "cvtps2dq xmm0,xmmword ptr [eax+00000020h]", 0x66, 0x0F, 0x5B, 0x40, 0x20 ); FCML_I32_D( "vcvtps2dq xmm2,xmmword ptr [ecx+eax]", 0xC4, 0xE1, 0x79, 0x5B, 0x14, 0x01 ); FCML_I64_D( "vcvtps2dq ymm2,ymmword ptr [rcx+rax]", 0xC4, 0xE1, 0x7D, 0x5B, 0x14, 0x01 ); FCML_I32( "vcvtps2dq xmm2,xmmword ptr [ecx+eax]", 0xc5, 0xf9, 0x5b, 0x14, 0x01 ); FCML_I64( "vcvtps2dq ymm2,ymmword ptr [rcx+rax]", 0xc5, 0xfd, 0x5b, 0x14, 0x01 ); FCML_A64( "vcvtps2dq (%rcx,%rax),%ymm2", 0xc5, 0xfd, 0x5b, 0x14, 0x01 ); } void fcml_tf_instruction_CVTPS2PD(void) { FCML_I64( "cvtps2pd xmm0,mmword ptr [rax+0000000000000020h]", 0x0F, 0x5A, 0x40, 0x20 ); FCML_A64( "cvtps2pd 0x0000000000000020(%rax),%xmm0", 0x0F, 0x5A, 0x40, 0x20 ); FCML_I32( "cvtps2pd xmm0,xmm2", 0x0F, 0x5A, 0xC2 ); FCML_I32( "cvtps2pd xmm0,mmword ptr [eax+00000020h]", 0x0F, 0x5A, 0x40, 0x20 ); FCML_I32_D( "vcvtps2pd xmm2,xmmword ptr [ecx+eax]", 0xC4, 0xE1, 0x78, 0x5A, 0x14, 0x01 ); FCML_I64_D( "vcvtps2pd ymm2,ymmword ptr [rcx+rax]", 0xC4, 0xE1, 0x7C, 0x5A, 0x14, 0x01 ); FCML_I32( "vcvtps2pd xmm2,xmmword ptr [ecx+eax]", 0xc5, 0xf8, 0x5a, 0x14, 0x01 ); FCML_I64( "vcvtps2pd ymm2,ymmword ptr [rcx+rax]", 0xc5, 0xfc, 0x5a, 0x14, 0x01 ); FCML_A64( "vcvtps2pd (%rcx,%rax),%ymm2", 0xc5, 0xfc, 0x5a, 0x14, 0x01 ); } void fcml_tf_instruction_CVTPS2PI(void) { FCML_I64( "cvtps2pi mm0,mmword ptr [rax+0000000000000020h]", 0x0F, 0x2D, 0x40, 0x20 ); FCML_A64( "cvtps2pi 0x0000000000000020(%rax),%mm0", 0x0F, 0x2D, 0x40, 0x20 ); FCML_I32( "cvtps2pi mm0,xmm2", 0x0F, 0x2D, 0xC2 ); FCML_I32( "cvtps2pi mm0,mmword ptr [eax+00000020h]", 0x0F, 0x2D, 0x40, 0x20 ); } void fcml_tf_instruction_CVTSD2SI(void) { FCML_I64( "cvtsd2si eax,mmword ptr [rax+0000000000000020h]", 0xF2, 0x0F, 0x2D, 0x40, 0x20 ); FCML_A64( "cvtsd2si 0x0000000000000020(%rax),%eax", 0xF2, 0x0F, 0x2D, 0x40, 0x20 ); FCML_I32( "cvtsd2si eax,xmm2", 0xF2, 0x0F, 0x2D, 0xC2 ); FCML_I32( "cvtsd2si eax,mmword ptr [eax+00000020h]", 0xF2, 0x0F, 0x2D, 0x40, 0x20 ); FCML_I64( "cvtsd2si rax,mmword ptr [rax+0000000000000020h]", 0xF2, 0x48, 0x0F, 0x2D, 0x40, 0x20 ); FCML_I32_D( "vcvtsd2si edx,mmword ptr [ecx+eax]", 0xC4, 0xE1, 0x7B, 0x2D, 0x14, 0x01 ); FCML_I64_D( "vcvtsd2si edx,mmword ptr [rcx+rax]", 0xC4, 0xE1, 0x7B, 0x2D, 0x14, 0x01 ); FCML_I32( "vcvtsd2si edx,mmword ptr [ecx+eax]", 0xc5, 0xfb, 0x2d, 0x14, 0x01 ); FCML_I64( "vcvtsd2si edx,mmword ptr [rcx+rax]", 0xc5, 0xfb, 0x2d, 0x14, 0x01 ); FCML_I64( "vcvtsd2si rdx,mmword ptr [rcx+rax]", 0xC4, 0xE1, 0xFB, 0x2D, 0x14, 0x01 ); FCML_A64( "vcvtsd2si (%rcx,%rax),%rdx", 0xC4, 0xE1, 0xFB, 0x2D, 0x14, 0x01 ); } void fcml_tf_instruction_CVTSD2SS(void) { FCML_I64( "cvtsd2ss xmm0,mmword ptr [rax+0000000000000020h]", 0xF2, 0x0F, 0x5A, 0x40, 0x20 ); FCML_A64( "cvtsd2ss 0x0000000000000020(%rax),%xmm0", 0xF2, 0x0F, 0x5A, 0x40, 0x20 ); FCML_I32( "cvtsd2ss xmm0,xmm2", 0xF2, 0x0F, 0x5A, 0xC2 ); FCML_I32( "cvtsd2ss xmm0,mmword ptr [eax+00000020h]", 0xF2, 0x0F, 0x5A, 0x40, 0x20 ); FCML_I32_D( "vcvtsd2ss xmm2,xmm6,mmword ptr [ecx+eax]", 0xC4, 0xE1, 0x4B, 0x5A, 0x14, 0x01 ); FCML_I64_D( "vcvtsd2ss xmm2,xmm6,mmword ptr [rcx+rax]", 0xC4, 0xE1, 0x4B, 0x5A, 0x14, 0x01 ); FCML_I32( "vcvtsd2ss xmm2,xmm6,mmword ptr [ecx+eax]", 0xc5, 0xcb, 0x5a, 0x14, 0x01 ); FCML_I64( "vcvtsd2ss xmm2,xmm6,mmword ptr [rcx+rax]", 0xc5, 0xcb, 0x5a, 0x14, 0x01 ); FCML_A64( "vcvtsd2ss (%rcx,%rax),%xmm6,%xmm2", 0xc5, 0xcb, 0x5a, 0x14, 0x01 ); } void fcml_tf_instruction_CVTSI2SD(void) { FCML_I64( "cvtsi2sd xmm0,dword ptr [rax+0000000000000020h]", 0xF2, 0x0F, 0x2A, 0x40, 0x20 ); FCML_A64( "cvtsi2sdl 0x0000000000000020(%rax),%xmm0", 0xF2, 0x0F, 0x2A, 0x40, 0x20 ); FCML_I32( "cvtsi2sd xmm0,edx", 0xF2, 0x0F, 0x2A, 0xC2 ); FCML_I32( "cvtsi2sd xmm0,dword ptr [eax+00000020h]", 0xF2, 0x0F, 0x2A, 0x40, 0x20 ); FCML_I64( "cvtsi2sd xmm0,dword ptr [rax+0000000000000020h]", 0xF2, 0x0F, 0x2A, 0x40, 0x20 ); FCML_I64( "cvtsi2sd xmm0,edx", 0xF2, 0x0F, 0x2A, 0xC2 ); FCML_I64( "cvtsi2sd xmm0,rdx", 0xF2, 0x48, 0x0F, 0x2A, 0xC2 ); FCML_I32( "vcvtsi2sd xmm2,xmm7,dword ptr [ecx+eax]", 0xc5, 0xc3, 0x2a, 0x14, 0x01 ); FCML_A32( "vcvtsi2sdl (%ecx,%eax),%xmm7,%xmm2", 0xc5, 0xc3, 0x2a, 0x14, 0x01 ); FCML_I64( "vcvtsi2sd xmm2,xmm7,dword ptr [rcx+rax]", 0xc5, 0xc3, 0x2a, 0x14, 0x01 ); FCML_I64( "vcvtsi2sd xmm2,xmm7,qword ptr [rcx+rax]", 0xC4, 0xE1, 0xC3, 0x2A, 0x14, 0x01 ); FCML_A64( "vcvtsi2sdq (%rcx,%rax),%xmm7,%xmm2", 0xC4, 0xE1, 0xC3, 0x2A, 0x14, 0x01 ); } void fcml_tf_instruction_CVTSI2SS(void) { FCML_I64( "cvtsi2ss xmm0,rdx", 0xF3, 0x48, 0x0F, 0x2A, 0xC2 ); FCML_I64( "cvtsi2ss xmm0,dword ptr [rax+0000000000000020h]", 0xF3, 0x0F, 0x2A, 0x40, 0x20 ); FCML_A64( "cvtsi2ssl 0x0000000000000020(%rax),%xmm0", 0xF3, 0x0F, 0x2A, 0x40, 0x20 ); FCML_I32( "cvtsi2ss xmm0,edx", 0xF3, 0x0F, 0x2A, 0xC2 ); FCML_I32( "cvtsi2ss xmm0,dword ptr [eax+00000020h]", 0xF3, 0x0F, 0x2A, 0x40, 0x20 ); FCML_I64( "cvtsi2ss xmm0,dword ptr [rax+0000000000000020h]", 0xF3, 0x0F, 0x2A, 0x40, 0x20 ); FCML_I64( "cvtsi2ss xmm0,edx", 0xF3, 0x0F, 0x2A, 0xC2 ); FCML_I32_D( "vcvtsi2ss xmm2,xmm7,dword ptr [ecx+eax]", 0xC4, 0xE1, 0x42, 0x2A, 0x14, 0x01 ); FCML_I64_D( "vcvtsi2ss xmm2,xmm7,dword ptr [rcx+rax]", 0xC4, 0xE1, 0x42, 0x2A, 0x14, 0x01 ); FCML_I32( "vcvtsi2ss xmm2,xmm7,dword ptr [ecx+eax]", 0xc5, 0xc2, 0x2a, 0x14, 0x01 ); FCML_I64( "vcvtsi2ss xmm2,xmm7,dword ptr [rcx+rax]", 0xc5, 0xc2, 0x2a, 0x14, 0x01 ); FCML_I64( "vcvtsi2ss xmm2,xmm7,qword ptr [rcx+rax]", 0xC4, 0xE1, 0xC2, 0x2A, 0x14, 0x01 ); FCML_A64( "vcvtsi2ssq (%rcx,%rax),%xmm7,%xmm2", 0xC4, 0xE1, 0xC2, 0x2A, 0x14, 0x01 ); } void fcml_tf_instruction_CVTSS2SD(void) { FCML_I64( "cvtss2sd xmm0,dword ptr [rax+0000000000000020h]", 0xF3, 0x0F, 0x5A, 0x40, 0x20 ); FCML_A64( "cvtss2sd 0x0000000000000020(%rax),%xmm0", 0xF3, 0x0F, 0x5A, 0x40, 0x20 ); FCML_I32( "cvtss2sd xmm0,xmm2", 0xF3, 0x0F, 0x5A, 0xC2 ); FCML_I32( "cvtss2sd xmm0,dword ptr [eax+00000020h]", 0xF3, 0x0F, 0x5A, 0x40, 0x20 ); FCML_I32_D( "vcvtss2sd xmm2,xmm1,dword ptr [ecx+eax]", 0xC4, 0xE1, 0x72, 0x5A, 0x14, 0x01 ); FCML_I64_D( "vcvtss2sd xmm2,xmm3,dword ptr [rcx+rax]", 0xC4, 0xE1, 0x62, 0x5A, 0x14, 0x01 ); FCML_I32( "vcvtss2sd xmm2,xmm1,dword ptr [ecx+eax]", 0xc5, 0xf2, 0x5a, 0x14, 0x01 ); FCML_A64( "vcvtss2sd (%rcx,%rax),%xmm3,%xmm2", 0xc5, 0xe2, 0x5a, 0x14, 0x01 ); } void fcml_tf_instruction_CVTSS2SI(void) { FCML_I64( "cvtss2si rax,xmm2", 0xF3, 0x48, 0x0F, 0x2D, 0xC2 ); FCML_I64( "cvtss2si eax,dword ptr [rax+0000000000000020h]", 0xF3, 0x0F, 0x2D, 0x40, 0x20 ); FCML_A64( "cvtss2si 0x0000000000000020(%rax),%eax", 0xF3, 0x0F, 0x2D, 0x40, 0x20 ); FCML_I32( "cvtss2si eax,xmm2", 0xF3, 0x0F, 0x2D, 0xC2 ); FCML_I32( "cvtss2si eax,dword ptr [eax+00000020h]", 0xF3, 0x0F, 0x2D, 0x40, 0x20 ); FCML_I64( "cvtss2si eax,dword ptr [rax+0000000000000020h]", 0xF3, 0x0F, 0x2D, 0x40, 0x20 ); FCML_I64( "cvtss2si eax,xmm2", 0xF3, 0x0F, 0x2D, 0xC2 ); FCML_I32_D( "vcvtss2si edx,dword ptr [ecx+eax]", 0xC4, 0xE1, 0x7A, 0x2D, 0x14, 0x01 ); FCML_I64_D( "vcvtss2si edx,dword ptr [rcx+rax]", 0xC4, 0xE1, 0x7A, 0x2D, 0x14, 0x01 ); FCML_I32( "vcvtss2si edx,dword ptr [ecx+eax]", 0xc5, 0xfa, 0x2d, 0x14, 0x01 ); FCML_I64( "vcvtss2si edx,dword ptr [rcx+rax]", 0xc5, 0xfa, 0x2d, 0x14, 0x01 ); FCML_I64( "vcvtss2si rdx,dword ptr [rcx+rax]", 0xC4, 0xE1, 0xFA, 0x2D, 0x14, 0x01 ); FCML_A64( "vcvtss2si (%rcx,%rax),%rdx", 0xC4, 0xE1, 0xFA, 0x2D, 0x14, 0x01 ); } void fcml_tf_instruction_CVTTPD2DQ(void) { FCML_I64( "cvttpd2dq xmm0,xmmword ptr [rax+0000000000000020h]", 0x66, 0x0F, 0xE6, 0x40, 0x20 ); FCML_A64( "cvttpd2dq 0x0000000000000020(%rax),%xmm0", 0x66, 0x0F, 0xE6, 0x40, 0x20 ); FCML_I32( "cvttpd2dq xmm0,xmm2", 0x66, 0x0F, 0xE6, 0xC2 ); FCML_I32( "cvttpd2dq xmm0,xmmword ptr [eax+00000020h]", 0x66, 0x0F, 0xE6, 0x40, 0x20 ); FCML_I32_D( "vcvttpd2dq xmm2,xmmword ptr [ecx+eax]", 0xC4, 0xE1, 0x79, 0xE6, 0x14, 0x01 ); FCML_I64_D( "vcvttpd2dq xmm2,ymmword ptr [rcx+rax]", 0xC4, 0xE1, 0x7D, 0xE6, 0x14, 0x01 ); FCML_I32( "vcvttpd2dq xmm2,xmmword ptr [ecx+eax]", 0xc5, 0xf9, 0xe6, 0x14, 0x01 ); FCML_I64( "vcvttpd2dq xmm2,ymmword ptr [rcx+rax]", 0xc5, 0xfd, 0xe6, 0x14, 0x01 ); FCML_A64( "vcvttpd2dqx (%rcx,%rax),%xmm2", 0xc5, 0xf9, 0xe6, 0x14, 0x01 ); FCML_A64( "vcvttpd2dqy (%rcx,%rax),%xmm2", 0xc5, 0xfd, 0xe6, 0x14, 0x01 ); } void fcml_tf_instruction_CVTTPD2PI(void) { FCML_I64( "cvttpd2pi mm0,xmmword ptr [rax+0000000000000020h]", 0x66, 0x0F, 0x2C, 0x40, 0x20 ); FCML_A64( "cvttpd2pi 0x0000000000000020(%rax),%mm0", 0x66, 0x0F, 0x2C, 0x40, 0x20 ); FCML_I32( "cvttpd2pi mm0,xmm2", 0x66, 0x0F, 0x2C, 0xC2 ); FCML_I32( "cvttpd2pi mm0,xmmword ptr [eax+00000020h]", 0x66, 0x0F, 0x2C, 0x40, 0x20 ); } void fcml_tf_instruction_CVTTPS2DQ(void) { FCML_I64( "cvttps2dq xmm0,xmmword ptr [rax+0000000000000020h]", 0xF3, 0x0F, 0x5B, 0x40, 0x20 ); FCML_A64( "cvttps2dq 0x0000000000000020(%rax),%xmm0", 0xF3, 0x0F, 0x5B, 0x40, 0x20 ); FCML_I32( "cvttps2dq xmm0,xmm2", 0xF3, 0x0F, 0x5B, 0xC2 ); FCML_I32( "cvttps2dq xmm0,xmmword ptr [eax+00000020h]", 0xF3, 0x0F, 0x5B, 0x40, 0x20 ); FCML_I32_D( "vcvttps2dq xmm2,xmmword ptr [ecx+eax]", 0xC4, 0xE1, 0x7A, 0x5B, 0x14, 0x01 ); FCML_I64_D( "vcvttps2dq ymm2,ymmword ptr [rcx+rax]", 0xC4, 0xE1, 0x7E, 0x5B, 0x14, 0x01 ); FCML_I32( "vcvttps2dq xmm2,xmmword ptr [ecx+eax]", 0xc5, 0xfa, 0x5b, 0x14, 0x01 ); FCML_A32( "vcvttps2dq (%ecx,%eax),%xmm2", 0xc5, 0xfa, 0x5b, 0x14, 0x01 ); FCML_I64( "vcvttps2dq ymm2,ymmword ptr [rcx+rax]", 0xc5, 0xfe, 0x5b, 0x14, 0x01 ); FCML_A64( "vcvttps2dq (%rcx,%rax),%ymm2", 0xc5, 0xfe, 0x5b, 0x14, 0x01 ); } void fcml_tf_instruction_CVTTPS2PI(void) { FCML_I64( "cvttps2pi mm0,mmword ptr [rax+0000000000000020h]", 0x0F, 0x2C, 0x40, 0x20 ); FCML_A64( "cvttps2pi 0x0000000000000020(%rax),%mm0", 0x0F, 0x2C, 0x40, 0x20 ); FCML_I32( "cvttps2pi mm0,xmm2", 0x0F, 0x2C, 0xC2 ); FCML_I32( "cvttps2pi mm0,mmword ptr [eax+00000020h]", 0x0F, 0x2C, 0x40, 0x20 ); } void fcml_tf_instruction_CVTTSD2SI(void) { FCML_I64( "cvttsd2si rax,xmm2", 0xF2, 0x48, 0x0F, 0x2C, 0xC2 ); FCML_A64( "cvttsd2si %xmm2,%rax", 0xF2, 0x48, 0x0F, 0x2C, 0xC2 ); FCML_I64( "cvttsd2si eax,mmword ptr [rax+0000000000000020h]", 0xF2, 0x0F, 0x2C, 0x40, 0x20 ); FCML_A64( "cvttsd2si 0x0000000000000020(%rax),%eax", 0xF2, 0x0F, 0x2C, 0x40, 0x20 ); FCML_I32( "cvttsd2si eax,xmm2", 0xF2, 0x0F, 0x2C, 0xC2 ); FCML_I32( "cvttsd2si eax,mmword ptr [eax+00000020h]", 0xF2, 0x0F, 0x2C, 0x40, 0x20 ); FCML_I64( "cvttsd2si eax,mmword ptr [rax+0000000000000020h]", 0xF2, 0x0F, 0x2C, 0x40, 0x20 ); FCML_I64( "cvttsd2si eax,xmm2", 0xF2, 0x0F, 0x2C, 0xC2 ); FCML_I32_D( "vcvttsd2si edx,mmword ptr [ecx+eax]", 0xC4, 0xE1, 0x7B, 0x2C, 0x14, 0x01 ); FCML_I64_D( "vcvttsd2si edx,mmword ptr [rcx+rax]", 0xC4, 0xE1, 0x7B, 0x2C, 0x14, 0x01 ); FCML_I32( "vcvttsd2si edx,mmword ptr [ecx+eax]", 0xc5, 0xfb, 0x2c, 0x14, 0x01 ); FCML_I64( "vcvttsd2si edx,mmword ptr [rcx+rax]", 0xc5, 0xfb, 0x2c, 0x14, 0x01 ); FCML_A64( "vcvttsd2si (%rcx,%rax),%edx", 0xc5, 0xfb, 0x2c, 0x14, 0x01 ); FCML_I64( "vcvttsd2si rdx,mmword ptr [rcx+rax]", 0xC4, 0xE1, 0xFB, 0x2C, 0x14, 0x01 ); } void fcml_tf_instruction_CVTTSS2SI(void) { FCML_I64( "cvttss2si rax,xmm2", 0xF3, 0x48, 0x0F, 0x2C, 0xC2 ); FCML_I64( "cvttss2si eax,dword ptr [rax+0000000000000020h]", 0xF3, 0x0F, 0x2C, 0x40, 0x20 ); FCML_A64( "cvttss2si 0x0000000000000020(%rax),%eax", 0xF3, 0x0F, 0x2C, 0x40, 0x20 ); FCML_I32( "cvttss2si eax,xmm2", 0xF3, 0x0F, 0x2C, 0xC2 ); FCML_I32( "cvttss2si eax,dword ptr [eax+00000020h]", 0xF3, 0x0F, 0x2C, 0x40, 0x20 ); FCML_I64( "cvttss2si eax,dword ptr [rax+0000000000000020h]", 0xF3, 0x0F, 0x2C, 0x40, 0x20 ); FCML_I64( "cvttss2si eax,xmm2", 0xF3, 0x0F, 0x2C, 0xC2 ); FCML_I32_D( "vcvttss2si edx,dword ptr [ecx+eax]", 0xC4, 0xE1, 0x7A, 0x2C, 0x14, 0x01 ); FCML_I64_D( "vcvttss2si edx,dword ptr [rcx+rax]", 0xC4, 0xE1, 0x7A, 0x2C, 0x14, 0x01 ); FCML_I32( "vcvttss2si edx,dword ptr [ecx+eax]", 0xc5, 0xfa, 0x2c, 0x14, 0x01 ); FCML_I64( "vcvttss2si edx,dword ptr [rcx+rax]", 0xc5, 0xfa, 0x2c, 0x14, 0x01 ); FCML_I64( "vcvttss2si rdx,dword ptr [rcx+rax]", 0xC4, 0xE1, 0xFA, 0x2C, 0x14, 0x01 ); FCML_A64( "vcvttss2si (%rcx,%rax),%rdx", 0xC4, 0xE1, 0xFA, 0x2C, 0x14, 0x01 ); } void fcml_tf_instruction_CWD_CDQ_CQO(void) { FCML_I32( "cdq", 0x99 ); FCML_I32( "cwd", 0x66, 0x99 ); FCML_I64( "cdq", 0x99 ); FCML_I64( "cwd", 0x66, 0x99 ); FCML_I64_D( "cqo", 0x66, 0x48, 0x99 ); FCML_I64( "cqo", 0x48, 0x99 ); FCML_I64_D( "cdq", 0x40, 0x99 ); FCML_I64( "cdq", 0x99 ); FCML_A32( "cltd", 0x99 ); FCML_A32( "cwtd", 0x66, 0x99 ); FCML_A64( "cqto", 0x48, 0x99 ); } void fcml_tf_instruction_CLAC(void) { FCML_I3264( "clac", 0x0F, 0x01, 0xCA ); FCML_A3264( "clac", 0x0F, 0x01, 0xCA ); } void fcml_tf_instruction_COMISD() { FCML_I64( "comisd xmm0,xmm2", 0x66, 0x0F, 0x2F, 0xC2 ); FCML_I64( "comisd xmm0,mmword ptr [rax+0000000000000020h]", 0x66, 0x0F, 0x2F, 0x40, 0x20 ); FCML_A64( "comisd 0x0000000000000020(%rax),%xmm0", 0x66, 0x0F, 0x2F, 0x40, 0x20 ); FCML_I32( "comisd xmm0,xmm2", 0x66, 0x0F, 0x2F, 0xC2 ); FCML_I32( "comisd xmm0,mmword ptr [eax+00000020h]", 0x66, 0x0F, 0x2F, 0x40, 0x20 ); FCML_I32( "vcomisd xmm2,mmword ptr [ecx+eax]", 0xc5, 0xf9, 0x2f, 0x14, 0x01 ); FCML_I64( "vcomisd xmm10,mmword ptr [r9+rax]", 0xC4, 0x41, 0x79, 0x2F, 0x14, 0x01 ); FCML_A64( "vcomisd (%r9,%rax),%xmm10", 0xC4, 0x41, 0x79, 0x2F, 0x14, 0x01 ); } void fcml_tf_instruction_COMISS() { FCML_I64( "comiss xmm0,xmm2", 0x0F, 0x2F, 0xC2 ); FCML_I64( "comiss xmm0,dword ptr [rax+0000000000000020h]", 0x0F, 0x2F, 0x40, 0x20 ); FCML_A64( "comiss 0x0000000000000020(%rax),%xmm0", 0x0F, 0x2F, 0x40, 0x20 ); FCML_I32( "comiss xmm0,xmm2", 0x0F, 0x2F, 0xC2 ); FCML_I32( "comiss xmm0,dword ptr [eax+00000020h]", 0x0F, 0x2F, 0x40, 0x20 ); FCML_I32( "vcomiss xmm2,mmword ptr [ecx+eax]", 0xc5, 0xf8, 0x2f, 0x14, 0x01 ); FCML_I64( "vcomiss xmm10,mmword ptr [r9+rax]", 0xC4, 0x41, 0x78, 0x2F, 0x14, 0x01 ); FCML_A64( "vcomiss (%r9,%rax),%xmm10", 0xC4, 0x41, 0x78, 0x2F, 0x14, 0x01 ); } fcml_stf_test_case fctl_ti_instructions_c[] = { { "fcml_tf_instruction_CALL", fcml_tf_instruction_CALL }, { "fcml_tf_instruction_CBW_CWDE_CDQE", fcml_tf_instruction_CBW_CWDE_CDQE }, { "fcml_tf_instruction_CLC", fcml_tf_instruction_CLC }, { "fcml_tf_instruction_CLD", fcml_tf_instruction_CLD }, { "fcml_tf_instruction_CLFLUSH", fcml_tf_instruction_CLFLUSH }, { "fcml_tf_instruction_CLI", fcml_tf_instruction_CLI }, { "fcml_tf_instruction_CLGI", fcml_tf_instruction_CLGI }, { "fcml_tf_instruction_CLTS", fcml_tf_instruction_CLTS }, { "fcml_tf_instruction_CMC", fcml_tf_instruction_CMC }, { "fcml_tf_instruction_CMOV", fcml_tf_instruction_CMOV }, { "fcml_tf_instruction_CMP", fcml_tf_instruction_CMP }, { "fcml_tf_instruction_CMPPD", fcml_tf_instruction_CMPPD }, { "fcml_tf_instruction_CMPPS", fcml_tf_instruction_CMPPS }, { "fcml_tf_instruction_CMPS", fcml_tf_instruction_CMPS }, { "fcml_tf_instruction_CMPSD", fcml_tf_instruction_CMPSD }, { "fcml_tf_instruction_CMPSS", fcml_tf_instruction_CMPSS }, { "fcml_tf_instruction_CMPXCHG", fcml_tf_instruction_CMPXCHG }, { "fcml_tf_instruction_CMPXCHG16B_CMPXCHG8B", fcml_tf_instruction_CMPXCHG16B_CMPXCHG8B }, { "fcml_tf_instruction_CPUID", fcml_tf_instruction_CPUID }, { "fcml_tf_instruction_CRC32", fcml_tf_instruction_CRC32 }, { "fcml_tf_instruction_CVTDQ2PD", fcml_tf_instruction_CVTDQ2PD }, { "fcml_tf_instruction_CVTDQ2PS", fcml_tf_instruction_CVTDQ2PS }, { "fcml_tf_instruction_CVTPD2DQ", fcml_tf_instruction_CVTPD2DQ }, { "fcml_tf_instruction_CVTPD2PI", fcml_tf_instruction_CVTPD2PI }, { "fcml_tf_instruction_CVTPD2PS", fcml_tf_instruction_CVTPD2PS }, { "fcml_tf_instruction_CVTPI2PD", fcml_tf_instruction_CVTPI2PD }, { "fcml_tf_instruction_CVTPI2PS", fcml_tf_instruction_CVTPI2PS }, { "fcml_tf_instruction_CVTPS2DQ", fcml_tf_instruction_CVTPS2DQ }, { "fcml_tf_instruction_CVTPS2PD", fcml_tf_instruction_CVTPS2PD }, { "fcml_tf_instruction_CVTPS2PI", fcml_tf_instruction_CVTPS2PI }, { "fcml_tf_instruction_CVTSD2SI", fcml_tf_instruction_CVTSD2SI }, { "fcml_tf_instruction_CVTSD2SS", fcml_tf_instruction_CVTSD2SS }, { "fcml_tf_instruction_CVTSI2SD", fcml_tf_instruction_CVTSI2SD }, { "fcml_tf_instruction_CVTSI2SS", fcml_tf_instruction_CVTSI2SS }, { "fcml_tf_instruction_CVTSS2SD", fcml_tf_instruction_CVTSS2SD }, { "fcml_tf_instruction_CVTSS2SI", fcml_tf_instruction_CVTSS2SI }, { "fcml_tf_instruction_CVTTPD2DQ", fcml_tf_instruction_CVTTPD2DQ }, { "fcml_tf_instruction_CVTTPD2PI", fcml_tf_instruction_CVTTPD2PI }, { "fcml_tf_instruction_CVTTPS2DQ", fcml_tf_instruction_CVTTPS2DQ }, { "fcml_tf_instruction_CVTTPS2PI", fcml_tf_instruction_CVTTPS2PI }, { "fcml_tf_instruction_CVTTSD2SI", fcml_tf_instruction_CVTTSD2SI }, { "fcml_tf_instruction_CVTTSS2SI", fcml_tf_instruction_CVTTSS2SI }, { "fcml_tf_instruction_CWD_CDQ_CQO", fcml_tf_instruction_CWD_CDQ_CQO }, { "fcml_tf_instruction_CLAC", fcml_tf_instruction_CLAC }, { "fcml_tf_instruction_COMISD", fcml_tf_instruction_COMISD }, { "fcml_tf_instruction_COMISS", fcml_tf_instruction_COMISS }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_c = { "suite-fctl_ti_instructions_c", fcml_tf_instructions_c_suite_init, fcml_tf_instructions_c_suite_cleanup, fctl_ti_instructions_c }; fcml-1.1.1/check/public-tests/instructions_b_t.h0000644000175000017500000000171412560745216016623 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_B_H_ #define INS_B_H_ #include extern fcml_stf_test_suite fctl_si_instructions_b; #endif /* INS_B_H_ */ fcml-1.1.1/check/public-tests/chooser_t.h0000644000175000017500000000174012560745216015217 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_CHOOSER_T_H_ #define FCML_CHOOSER_T_H_ #include extern fcml_stf_test_suite fcml_si_chooser; #endif /* FCML_CHOOSER_T_H_ */ fcml-1.1.1/check/public-tests/instructions_r_t.h0000644000175000017500000000171412560745216016643 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_R_H_ #define INS_R_H_ #include extern fcml_stf_test_suite fctl_si_instructions_r; #endif /* INS_R_H_ */ fcml-1.1.1/check/public-tests/instructions_t_t.c0000644000175000017500000001235312560745216016641 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "instructions_t_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_t_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_t_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_TEST(void) { FCML_I32_M( "test al,20h", 2, FCML_MI( 0xf6, 0xc0, 0x20 ), FCML_MI( 0xa8, 0x20 ) ); FCML_I64_M( "test al,20h", 2, FCML_MI( 0xf6, 0xc0, 0x20 ), FCML_MI( 0xa8, 0x20 ) ); FCML_A64( "testb $0x20,%al", 0xf6, 0xc0, 0x20 ); FCML_I32_M( "test eax,00104020h", 2, FCML_MI( 0xf7, 0xc0, 0x20, 0x40, 0x10, 0x00 ), FCML_MI( 0xa9, 0x20, 0x40, 0x10, 0x00 ) ); FCML_I32_M( "test ax,0020h", 2, FCML_MI( 0x66, 0xf7, 0xc0, 0x20, 0x00 ), FCML_MI( 0x66, 0xa9, 0x20, 0x00 ) ); FCML_A64_M( "test $0x0000000000104020,%rax", 2, FCML_MI( 0x48, 0xf7, 0xc0, 0x20, 0x40, 0x10, 0x00 ), FCML_MI( 0x48, 0xa9, 0x20, 0x40, 0x10, 0x00 ) ); FCML_A64_M( "test $0x4020,%ax", 2, FCML_MI( 0x66, 0xf7, 0xc0, 0x20, 0x40 ), FCML_MI( 0x66, 0xa9, 0x20, 0x40 ) ); FCML_A64_M( "test $0x00104020,%eax", 2, FCML_MI( 0xf7, 0xc0, 0x20, 0x40, 0x10, 0x00 ), FCML_MI( 0xa9, 0x20, 0x40, 0x10, 0x00 ) ); FCML_I64_M( "test rax,0ffffffffff104020h", 2, FCML_MI( 0x48, 0xf7, 0xc0, 0x20, 0x40, 0x10, 0xff ), FCML_MI( 0x48, 0xa9, 0x20, 0x40, 0x10, 0xff ) ); FCML_I32( "test byte ptr [eax],0ffh", 0xF6, 0x00, 0xFF ); FCML_I64_D( "test byte ptr [rax],0ffh", 0x48, 0xF6, 0x00, 0xFF ); FCML_A64( "testb $0xff,(%rax)", 0xf6, 0x00, 0xff ); FCML_I32( "test dword ptr [eax],0ff001040h", 0xF7, 0x00, 0x40, 0x10, 0x00, 0xFF ); FCML_I32( "test word ptr [eax],0ff00h", 0x66, 0xF7, 0x00, 0x00, 0xff ); FCML_A64( "testl $0xff001040,(%rax)", 0xf7, 0x00, 0x40, 0x10, 0x00, 0xff ); FCML_A64( "testw $0x1040,(%rax)", 0x66, 0xf7, 0x00, 0x40, 0x10 ); FCML_A64( "testq $0x0000000000001040,(%rax)", 0x48, 0xf7, 0x00, 0x40, 0x10, 0x00, 0x00 ); FCML_I64( "test qword ptr [rax],0000000011ff1040h", 0x48, 0xF7, 0x00, 0x40, 0x10, 0xFF, 0x11 ); FCML_I32( "test byte ptr [eax],al", 0x84, 0x00 ); FCML_I64_D( "test byte ptr [rax],al", 0x48, 0x84, 0x00 ); FCML_I32( "test word ptr [eax],ax", 0x66, 0x85, 0x00 ); FCML_I64( "test qword ptr [rax],rax", 0x48, 0x85, 0x00 ); } void fcml_tf_instruction_TZCNT(void) { FCML_I32( "tzcnt eax,dword ptr [eax]", 0xF3, 0x0F, 0xBC, 0x00 ); FCML_I32( "tzcnt ax,word ptr [eax]", 0x66, 0xF3, 0x0F, 0xBC, 0x00 ); FCML_I32( "tzcnt ax,ax", 0x66, 0xF3, 0x0F, 0xBC, 0xC0 ); FCML_I64( "tzcnt rax,qword ptr [rax]", 0xF3, 0x48, 0x0F, 0xBC, 0x00 ); FCML_A64( "tzcnt (%rax),%eax", 0xf3, 0x0f, 0xbc, 0x00 ); FCML_A64( "tzcnt (%rax),%ax", 0x66, 0xf3, 0x0f, 0xbc, 0x00 ); FCML_A64( "tzcnt %ax,%ax", 0x66, 0xf3, 0x0f, 0xbc, 0xc0 ); FCML_A64( "tzcnt (%rax),%rax", 0xf3, 0x48, 0x0f, 0xbc, 0x00 ); } void fcml_tf_instruction_TZMSK(void) { FCML_I32( "tzmsk ebx,dword ptr [eax]", 0x8F, 0xE9, 0x60, 0x01, 0x20 ); FCML_I32( "tzmsk ebx,eax", 0x8F, 0xE9, 0x60, 0x01, 0xE0 ); FCML_I64( "tzmsk rbx,qword ptr [rax]", 0x8F, 0xE9, 0xE0, 0x01, 0x20 ); FCML_I64( "tzmsk rbx,rax", 0x8F, 0xE9, 0xE0, 0x01, 0xE0 ); FCML_A64( "tzmsk (%rax),%ebx", 0x8f, 0xe9, 0x60, 0x01, 0x20 ); FCML_A64( "tzmsk %eax,%ebx", 0x8f, 0xe9, 0x60, 0x01, 0xe0 ); FCML_A64( "tzmsk (%rax),%rbx", 0x8f, 0xe9, 0xe0, 0x01, 0x20 ); FCML_A64( "tzmsk %rax,%rbx", 0x8f, 0xe9, 0xe0, 0x01, 0xe0 ); } void fcml_tf_instruction_T1MSKC(void) { FCML_I32( "t1mskc ebx,dword ptr [eax]", 0x8F, 0xE9, 0x60, 0x01, 0x38 ); FCML_I32( "t1mskc ebx,eax", 0x8F, 0xE9, 0x60, 0x01, 0xF8 ); FCML_I64( "t1mskc rbx,qword ptr [rax]", 0x8F, 0xE9, 0xE0, 0x01, 0x38 ); FCML_I64( "t1mskc rbx,rax", 0x8F, 0xE9, 0xE0, 0x01, 0xF8 ); FCML_A64( "t1mskc (%rax),%ebx", 0x8f, 0xe9, 0x60, 0x01, 0x38 ); FCML_A64( "t1mskc %eax,%ebx", 0x8f, 0xe9, 0x60, 0x01, 0xf8 ); FCML_A64( "t1mskc (%rax),%rbx", 0x8f, 0xe9, 0xe0, 0x01, 0x38 ); FCML_A64( "t1mskc %rax,%rbx", 0x8f, 0xe9, 0xe0, 0x01, 0xf8 ); } fcml_stf_test_case fctl_ti_instructions_t[] = { { "fcml_tf_instruction_TEST", fcml_tf_instruction_TEST }, { "fcml_tf_instruction_TZCNT", fcml_tf_instruction_TZCNT }, { "fcml_tf_instruction_TZMSK", fcml_tf_instruction_TZMSK }, { "fcml_tf_instruction_T1MSKC", fcml_tf_instruction_T1MSKC }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_t = { "suite-fctl_ti_instructions_t", fcml_tf_instructions_t_suite_init, fcml_tf_instructions_t_suite_cleanup, fctl_ti_instructions_t }; fcml-1.1.1/check/public-tests/error_handling_t.c0000644000175000017500000000775712560745216016563 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 "error_handling_t.h" #include #include "instructions_base_t.h" #include #include /* Helper methods */ fcml_st_assembler_context fcml_ifn_prepare_context( fcml_en_operating_mode op_mode ) { fcml_st_assembler_context context = {0}; context.assembler = assembler_intel; context.entry_point.op_mode = op_mode; context.entry_point.ip = 0x00401000; context.configuration.enable_error_messages = FCML_TRUE; return context; } fcml_bool fcml_check_error_message( fcml_st_ceh_error_container errors, fcml_string message, fcml_ceh_error error_code ) { fcml_bool result = FCML_FALSE; fcml_st_ceh_error_info *error = errors.errors; while( error ) { if( error->code == error_code && strcmp( error->message, message ) == 0 ) { result = FCML_TRUE; break; } error = error->next_error; } return result; } fcml_bool fcml_tf_check_errors( fcml_string mnemonic, fcml_string message, fcml_ceh_error message_error_code, fcml_ceh_error error_code ) { fcml_bool result = FCML_TRUE; fcml_st_assembler_context context = fcml_ifn_prepare_context( FCML_OM_32_BIT ); fcml_st_parser_result parsed_instruction; fcml_fn_parser_result_prepare( &parsed_instruction ); fcml_st_assembler_result assembler_result; fcml_fn_assembler_result_prepare( &assembler_result ); fcml_st_parser_context parser_context = {0}; parser_context.dialect = dialect_intel; while( FCML_TRUE ) { if( fcml_fn_parse( &parser_context, mnemonic, &parsed_instruction ) ) { STF_FAIL("Parsing failed."); break; } fcml_ceh_error error = fcml_fn_assemble( &context, parsed_instruction.instruction, &assembler_result ); if( error != error_code ) { result = FCML_FALSE; } else { result = fcml_check_error_message( assembler_result.errors, message, message_error_code ); } break; } fcml_fn_parser_result_free( &parsed_instruction ); fcml_fn_assembler_result_free( &assembler_result ); fcml_fn_symbol_table_free( parser_context.symbol_table ); return result; } /* Test suite initialization. */ fcml_bool fcml_tf_error_handling_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_error_handling_suite_cleanup(void) { return FCML_TRUE; } /* Tests. */ void fcml_tf_error_handling_explicit_reg_addressing(void) { STF_ASSERT( fcml_tf_check_errors( "repne cmps dword ptr [si],byte ptr cs:[di]", FCML_TEXT("Invalid operand size."), FCML_CEH_GEC_INVALID_OPPERAND_SIZE, FCML_CEH_GEC_INVALID_OPPERAND_SIZE ) ); STF_ASSERT( fcml_tf_check_errors( "repne cmps byte ptr [si],byte ptr cs:[di]", FCML_TEXT("Segment register can not be overridden."), FCML_CEH_MEC_ERROR_ILLEGAL_SEG_REG_OVERRIDE, FCML_CEH_GEC_INVALID_REGISTER ) ); STF_ASSERT( fcml_tf_check_errors( "repne cmps byte ptr [si],byte ptr [edi]", FCML_TEXT("Invalid address size."), FCML_CEH_GEC_INVALID_ADDRESS_SIZE, FCML_CEH_GEC_INVALID_ADDRESS_SIZE ) ); } fcml_stf_test_case fcml_ti_error_handling[] = { { "fcml_tf_error_handling_explicit_reg_addressing", fcml_tf_error_handling_explicit_reg_addressing }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_error_handling = { "suite-fcml-error-handling", fcml_tf_error_handling_suite_init, fcml_tf_error_handling_suite_cleanup, fcml_ti_error_handling }; fcml-1.1.1/check/public-tests/Makefile.in0000644000175000017500000032750712561443455015143 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # 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, # 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. @SET_MAKE@ VPATH = @srcdir@ 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 \ ?) ;; \ *) 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@ pkglibexecdir = $(libexecdir)/@PACKAGE@ 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 = @build@ host_triplet = @host@ noinst_PROGRAMS = fcml_public_check$(EXEEXT) TESTS = $(am__EXEEXT_1) subdir = check/public-tests 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 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.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 = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_fcml_public_check_OBJECTS = fcml_public_check-main.$(OBJEXT) \ fcml_public_check-error_handling_t.$(OBJEXT) \ fcml_public_check-hints_t.$(OBJEXT) \ fcml_public_check-instructions_a_t.$(OBJEXT) \ fcml_public_check-instructions_base_t.$(OBJEXT) \ fcml_public_check-instructions_b_t.$(OBJEXT) \ fcml_public_check-instructions_c_t.$(OBJEXT) \ fcml_public_check-instructions_d_t.$(OBJEXT) \ fcml_public_check-instructions_e_t.$(OBJEXT) \ fcml_public_check-instructions_f_t.$(OBJEXT) \ fcml_public_check-instructions_g_t.$(OBJEXT) \ fcml_public_check-instructions_h_t.$(OBJEXT) \ fcml_public_check-instructions_i_t.$(OBJEXT) \ fcml_public_check-instructions_j_t.$(OBJEXT) \ fcml_public_check-instructions_l_t.$(OBJEXT) \ fcml_public_check-instructions_m_t.$(OBJEXT) \ fcml_public_check-instructions_n_t.$(OBJEXT) \ fcml_public_check-instructions_o_t.$(OBJEXT) \ fcml_public_check-instructions_p_t.$(OBJEXT) \ fcml_public_check-instructions_r_t.$(OBJEXT) \ fcml_public_check-instructions_s_t.$(OBJEXT) \ fcml_public_check-instructions_t_t.$(OBJEXT) \ fcml_public_check-instructions_u_t.$(OBJEXT) \ fcml_public_check-instructions_v_t.$(OBJEXT) \ fcml_public_check-instructions_w_t.$(OBJEXT) \ fcml_public_check-instructions_x_t.$(OBJEXT) \ fcml_public_check-prefixes_t.$(OBJEXT) \ fcml_public_check-segment_reg_t.$(OBJEXT) \ fcml_public_check-chooser_t.$(OBJEXT) \ fcml_public_check-render_t.$(OBJEXT) \ fcml_public_check-disassembler_t.$(OBJEXT) \ fcml_public_check-assembler_t.$(OBJEXT) \ fcml_public_check-general_usage_t.$(OBJEXT) fcml_public_check_OBJECTS = $(am_fcml_public_check_OBJECTS) fcml_public_check_DEPENDENCIES = $(top_srcdir)/src/libfcml.la \ $(top_srcdir)/check/stf/libstf.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = 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)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=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 = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=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 = SOURCES = $(fcml_public_check_SOURCES) DIST_SOURCES = $(fcml_public_check_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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 am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck am__EXEEXT_1 = fcml_public_check$(EXEEXT) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) 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@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FCML_IMPORT_LIB = @FCML_IMPORT_LIB@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ 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@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ 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@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ fcml_public_check_SOURCES = main.c \ error_handling_t.c \ error_handling_t.h \ hints_t.c \ hints_t.h \ instructions_a_t.c \ instructions_a_t.h \ instructions_base_t.c \ instructions_base_t.h \ instructions_b_t.c \ instructions_b_t.h \ instructions_c_t.c \ instructions_c_t.h \ instructions_d_t.c \ instructions_d_t.h \ instructions_e_t.c \ instructions_e_t.h \ instructions_f_t.c \ instructions_f_t.h \ instructions_g_t.c \ instructions_g_t.h \ instructions_h_t.c \ instructions_h_t.h \ instructions_i_t.c \ instructions_i_t.h \ instructions_j_t.c \ instructions_j_t.h \ instructions_l_t.c \ instructions_l_t.h \ instructions_m_t.c \ instructions_m_t.h \ instructions_n_t.c \ instructions_n_t.h \ instructions_o_t.c \ instructions_o_t.h \ instructions_p_t.c \ instructions_p_t.h \ instructions_r_t.c \ instructions_r_t.h \ instructions_s_t.c \ instructions_s_t.h \ instructions_t_t.c \ instructions_t_t.h \ instructions_u_t.c \ instructions_u_t.h \ instructions_v_t.c \ instructions_v_t.h \ instructions_w_t.c \ instructions_w_t.h \ instructions_x_t.c \ instructions_x_t.h \ prefixes_t.c \ prefixes_t.h \ segment_reg_t.c \ segment_reg_t.h \ chooser_t.c \ chooser_t.h \ render_t.h \ render_t.c \ disassembler_t.c \ disassembler_t.h \ assembler_t.c \ assembler_t.h \ general_usage_t.h \ general_usage_t.c fcml_public_check_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/check/stf @FCML_IMPORT_LIB@ fcml_public_check_LDADD = $(top_srcdir)/src/libfcml.la $(top_srcdir)/check/stf/libstf.la check_SCRIPTS = fcml_public_check all: all-am .SUFFIXES: .SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: $(srcdir)/Makefile.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) --gnu check/public-tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu check/public-tests/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_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-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list fcml_public_check$(EXEEXT): $(fcml_public_check_OBJECTS) $(fcml_public_check_DEPENDENCIES) $(EXTRA_fcml_public_check_DEPENDENCIES) @rm -f fcml_public_check$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fcml_public_check_OBJECTS) $(fcml_public_check_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-assembler_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-chooser_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-disassembler_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-error_handling_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-general_usage_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-hints_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_a_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_b_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_base_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_c_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_d_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_e_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_f_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_g_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_h_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_i_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_j_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_l_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_m_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_n_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_o_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_p_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_r_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_s_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_t_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_u_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_v_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_w_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-instructions_x_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-prefixes_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-render_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_public_check-segment_reg_t.Po@am__quote@ .c.o: @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@ $(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 -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< fcml_public_check-main.o: main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-main.o -MD -MP -MF $(DEPDIR)/fcml_public_check-main.Tpo -c -o fcml_public_check-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-main.Tpo $(DEPDIR)/fcml_public_check-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='fcml_public_check-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c fcml_public_check-main.obj: main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-main.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-main.Tpo -c -o fcml_public_check-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-main.Tpo $(DEPDIR)/fcml_public_check-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='fcml_public_check-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` fcml_public_check-error_handling_t.o: error_handling_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-error_handling_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-error_handling_t.Tpo -c -o fcml_public_check-error_handling_t.o `test -f 'error_handling_t.c' || echo '$(srcdir)/'`error_handling_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-error_handling_t.Tpo $(DEPDIR)/fcml_public_check-error_handling_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='error_handling_t.c' object='fcml_public_check-error_handling_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-error_handling_t.o `test -f 'error_handling_t.c' || echo '$(srcdir)/'`error_handling_t.c fcml_public_check-error_handling_t.obj: error_handling_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-error_handling_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-error_handling_t.Tpo -c -o fcml_public_check-error_handling_t.obj `if test -f 'error_handling_t.c'; then $(CYGPATH_W) 'error_handling_t.c'; else $(CYGPATH_W) '$(srcdir)/error_handling_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-error_handling_t.Tpo $(DEPDIR)/fcml_public_check-error_handling_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='error_handling_t.c' object='fcml_public_check-error_handling_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-error_handling_t.obj `if test -f 'error_handling_t.c'; then $(CYGPATH_W) 'error_handling_t.c'; else $(CYGPATH_W) '$(srcdir)/error_handling_t.c'; fi` fcml_public_check-hints_t.o: hints_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-hints_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-hints_t.Tpo -c -o fcml_public_check-hints_t.o `test -f 'hints_t.c' || echo '$(srcdir)/'`hints_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-hints_t.Tpo $(DEPDIR)/fcml_public_check-hints_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hints_t.c' object='fcml_public_check-hints_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-hints_t.o `test -f 'hints_t.c' || echo '$(srcdir)/'`hints_t.c fcml_public_check-hints_t.obj: hints_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-hints_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-hints_t.Tpo -c -o fcml_public_check-hints_t.obj `if test -f 'hints_t.c'; then $(CYGPATH_W) 'hints_t.c'; else $(CYGPATH_W) '$(srcdir)/hints_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-hints_t.Tpo $(DEPDIR)/fcml_public_check-hints_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hints_t.c' object='fcml_public_check-hints_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-hints_t.obj `if test -f 'hints_t.c'; then $(CYGPATH_W) 'hints_t.c'; else $(CYGPATH_W) '$(srcdir)/hints_t.c'; fi` fcml_public_check-instructions_a_t.o: instructions_a_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_a_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_a_t.Tpo -c -o fcml_public_check-instructions_a_t.o `test -f 'instructions_a_t.c' || echo '$(srcdir)/'`instructions_a_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_a_t.Tpo $(DEPDIR)/fcml_public_check-instructions_a_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_a_t.c' object='fcml_public_check-instructions_a_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_a_t.o `test -f 'instructions_a_t.c' || echo '$(srcdir)/'`instructions_a_t.c fcml_public_check-instructions_a_t.obj: instructions_a_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_a_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_a_t.Tpo -c -o fcml_public_check-instructions_a_t.obj `if test -f 'instructions_a_t.c'; then $(CYGPATH_W) 'instructions_a_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_a_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_a_t.Tpo $(DEPDIR)/fcml_public_check-instructions_a_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_a_t.c' object='fcml_public_check-instructions_a_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_a_t.obj `if test -f 'instructions_a_t.c'; then $(CYGPATH_W) 'instructions_a_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_a_t.c'; fi` fcml_public_check-instructions_base_t.o: instructions_base_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_base_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_base_t.Tpo -c -o fcml_public_check-instructions_base_t.o `test -f 'instructions_base_t.c' || echo '$(srcdir)/'`instructions_base_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_base_t.Tpo $(DEPDIR)/fcml_public_check-instructions_base_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_base_t.c' object='fcml_public_check-instructions_base_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_base_t.o `test -f 'instructions_base_t.c' || echo '$(srcdir)/'`instructions_base_t.c fcml_public_check-instructions_base_t.obj: instructions_base_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_base_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_base_t.Tpo -c -o fcml_public_check-instructions_base_t.obj `if test -f 'instructions_base_t.c'; then $(CYGPATH_W) 'instructions_base_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_base_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_base_t.Tpo $(DEPDIR)/fcml_public_check-instructions_base_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_base_t.c' object='fcml_public_check-instructions_base_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_base_t.obj `if test -f 'instructions_base_t.c'; then $(CYGPATH_W) 'instructions_base_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_base_t.c'; fi` fcml_public_check-instructions_b_t.o: instructions_b_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_b_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_b_t.Tpo -c -o fcml_public_check-instructions_b_t.o `test -f 'instructions_b_t.c' || echo '$(srcdir)/'`instructions_b_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_b_t.Tpo $(DEPDIR)/fcml_public_check-instructions_b_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_b_t.c' object='fcml_public_check-instructions_b_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_b_t.o `test -f 'instructions_b_t.c' || echo '$(srcdir)/'`instructions_b_t.c fcml_public_check-instructions_b_t.obj: instructions_b_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_b_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_b_t.Tpo -c -o fcml_public_check-instructions_b_t.obj `if test -f 'instructions_b_t.c'; then $(CYGPATH_W) 'instructions_b_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_b_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_b_t.Tpo $(DEPDIR)/fcml_public_check-instructions_b_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_b_t.c' object='fcml_public_check-instructions_b_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_b_t.obj `if test -f 'instructions_b_t.c'; then $(CYGPATH_W) 'instructions_b_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_b_t.c'; fi` fcml_public_check-instructions_c_t.o: instructions_c_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_c_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_c_t.Tpo -c -o fcml_public_check-instructions_c_t.o `test -f 'instructions_c_t.c' || echo '$(srcdir)/'`instructions_c_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_c_t.Tpo $(DEPDIR)/fcml_public_check-instructions_c_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_c_t.c' object='fcml_public_check-instructions_c_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_c_t.o `test -f 'instructions_c_t.c' || echo '$(srcdir)/'`instructions_c_t.c fcml_public_check-instructions_c_t.obj: instructions_c_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_c_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_c_t.Tpo -c -o fcml_public_check-instructions_c_t.obj `if test -f 'instructions_c_t.c'; then $(CYGPATH_W) 'instructions_c_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_c_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_c_t.Tpo $(DEPDIR)/fcml_public_check-instructions_c_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_c_t.c' object='fcml_public_check-instructions_c_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_c_t.obj `if test -f 'instructions_c_t.c'; then $(CYGPATH_W) 'instructions_c_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_c_t.c'; fi` fcml_public_check-instructions_d_t.o: instructions_d_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_d_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_d_t.Tpo -c -o fcml_public_check-instructions_d_t.o `test -f 'instructions_d_t.c' || echo '$(srcdir)/'`instructions_d_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_d_t.Tpo $(DEPDIR)/fcml_public_check-instructions_d_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_d_t.c' object='fcml_public_check-instructions_d_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_d_t.o `test -f 'instructions_d_t.c' || echo '$(srcdir)/'`instructions_d_t.c fcml_public_check-instructions_d_t.obj: instructions_d_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_d_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_d_t.Tpo -c -o fcml_public_check-instructions_d_t.obj `if test -f 'instructions_d_t.c'; then $(CYGPATH_W) 'instructions_d_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_d_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_d_t.Tpo $(DEPDIR)/fcml_public_check-instructions_d_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_d_t.c' object='fcml_public_check-instructions_d_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_d_t.obj `if test -f 'instructions_d_t.c'; then $(CYGPATH_W) 'instructions_d_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_d_t.c'; fi` fcml_public_check-instructions_e_t.o: instructions_e_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_e_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_e_t.Tpo -c -o fcml_public_check-instructions_e_t.o `test -f 'instructions_e_t.c' || echo '$(srcdir)/'`instructions_e_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_e_t.Tpo $(DEPDIR)/fcml_public_check-instructions_e_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_e_t.c' object='fcml_public_check-instructions_e_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_e_t.o `test -f 'instructions_e_t.c' || echo '$(srcdir)/'`instructions_e_t.c fcml_public_check-instructions_e_t.obj: instructions_e_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_e_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_e_t.Tpo -c -o fcml_public_check-instructions_e_t.obj `if test -f 'instructions_e_t.c'; then $(CYGPATH_W) 'instructions_e_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_e_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_e_t.Tpo $(DEPDIR)/fcml_public_check-instructions_e_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_e_t.c' object='fcml_public_check-instructions_e_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_e_t.obj `if test -f 'instructions_e_t.c'; then $(CYGPATH_W) 'instructions_e_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_e_t.c'; fi` fcml_public_check-instructions_f_t.o: instructions_f_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_f_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_f_t.Tpo -c -o fcml_public_check-instructions_f_t.o `test -f 'instructions_f_t.c' || echo '$(srcdir)/'`instructions_f_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_f_t.Tpo $(DEPDIR)/fcml_public_check-instructions_f_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_f_t.c' object='fcml_public_check-instructions_f_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_f_t.o `test -f 'instructions_f_t.c' || echo '$(srcdir)/'`instructions_f_t.c fcml_public_check-instructions_f_t.obj: instructions_f_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_f_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_f_t.Tpo -c -o fcml_public_check-instructions_f_t.obj `if test -f 'instructions_f_t.c'; then $(CYGPATH_W) 'instructions_f_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_f_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_f_t.Tpo $(DEPDIR)/fcml_public_check-instructions_f_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_f_t.c' object='fcml_public_check-instructions_f_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_f_t.obj `if test -f 'instructions_f_t.c'; then $(CYGPATH_W) 'instructions_f_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_f_t.c'; fi` fcml_public_check-instructions_g_t.o: instructions_g_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_g_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_g_t.Tpo -c -o fcml_public_check-instructions_g_t.o `test -f 'instructions_g_t.c' || echo '$(srcdir)/'`instructions_g_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_g_t.Tpo $(DEPDIR)/fcml_public_check-instructions_g_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_g_t.c' object='fcml_public_check-instructions_g_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_g_t.o `test -f 'instructions_g_t.c' || echo '$(srcdir)/'`instructions_g_t.c fcml_public_check-instructions_g_t.obj: instructions_g_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_g_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_g_t.Tpo -c -o fcml_public_check-instructions_g_t.obj `if test -f 'instructions_g_t.c'; then $(CYGPATH_W) 'instructions_g_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_g_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_g_t.Tpo $(DEPDIR)/fcml_public_check-instructions_g_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_g_t.c' object='fcml_public_check-instructions_g_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_g_t.obj `if test -f 'instructions_g_t.c'; then $(CYGPATH_W) 'instructions_g_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_g_t.c'; fi` fcml_public_check-instructions_h_t.o: instructions_h_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_h_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_h_t.Tpo -c -o fcml_public_check-instructions_h_t.o `test -f 'instructions_h_t.c' || echo '$(srcdir)/'`instructions_h_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_h_t.Tpo $(DEPDIR)/fcml_public_check-instructions_h_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_h_t.c' object='fcml_public_check-instructions_h_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_h_t.o `test -f 'instructions_h_t.c' || echo '$(srcdir)/'`instructions_h_t.c fcml_public_check-instructions_h_t.obj: instructions_h_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_h_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_h_t.Tpo -c -o fcml_public_check-instructions_h_t.obj `if test -f 'instructions_h_t.c'; then $(CYGPATH_W) 'instructions_h_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_h_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_h_t.Tpo $(DEPDIR)/fcml_public_check-instructions_h_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_h_t.c' object='fcml_public_check-instructions_h_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_h_t.obj `if test -f 'instructions_h_t.c'; then $(CYGPATH_W) 'instructions_h_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_h_t.c'; fi` fcml_public_check-instructions_i_t.o: instructions_i_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_i_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_i_t.Tpo -c -o fcml_public_check-instructions_i_t.o `test -f 'instructions_i_t.c' || echo '$(srcdir)/'`instructions_i_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_i_t.Tpo $(DEPDIR)/fcml_public_check-instructions_i_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_i_t.c' object='fcml_public_check-instructions_i_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_i_t.o `test -f 'instructions_i_t.c' || echo '$(srcdir)/'`instructions_i_t.c fcml_public_check-instructions_i_t.obj: instructions_i_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_i_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_i_t.Tpo -c -o fcml_public_check-instructions_i_t.obj `if test -f 'instructions_i_t.c'; then $(CYGPATH_W) 'instructions_i_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_i_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_i_t.Tpo $(DEPDIR)/fcml_public_check-instructions_i_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_i_t.c' object='fcml_public_check-instructions_i_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_i_t.obj `if test -f 'instructions_i_t.c'; then $(CYGPATH_W) 'instructions_i_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_i_t.c'; fi` fcml_public_check-instructions_j_t.o: instructions_j_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_j_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_j_t.Tpo -c -o fcml_public_check-instructions_j_t.o `test -f 'instructions_j_t.c' || echo '$(srcdir)/'`instructions_j_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_j_t.Tpo $(DEPDIR)/fcml_public_check-instructions_j_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_j_t.c' object='fcml_public_check-instructions_j_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_j_t.o `test -f 'instructions_j_t.c' || echo '$(srcdir)/'`instructions_j_t.c fcml_public_check-instructions_j_t.obj: instructions_j_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_j_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_j_t.Tpo -c -o fcml_public_check-instructions_j_t.obj `if test -f 'instructions_j_t.c'; then $(CYGPATH_W) 'instructions_j_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_j_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_j_t.Tpo $(DEPDIR)/fcml_public_check-instructions_j_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_j_t.c' object='fcml_public_check-instructions_j_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_j_t.obj `if test -f 'instructions_j_t.c'; then $(CYGPATH_W) 'instructions_j_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_j_t.c'; fi` fcml_public_check-instructions_l_t.o: instructions_l_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_l_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_l_t.Tpo -c -o fcml_public_check-instructions_l_t.o `test -f 'instructions_l_t.c' || echo '$(srcdir)/'`instructions_l_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_l_t.Tpo $(DEPDIR)/fcml_public_check-instructions_l_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_l_t.c' object='fcml_public_check-instructions_l_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_l_t.o `test -f 'instructions_l_t.c' || echo '$(srcdir)/'`instructions_l_t.c fcml_public_check-instructions_l_t.obj: instructions_l_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_l_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_l_t.Tpo -c -o fcml_public_check-instructions_l_t.obj `if test -f 'instructions_l_t.c'; then $(CYGPATH_W) 'instructions_l_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_l_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_l_t.Tpo $(DEPDIR)/fcml_public_check-instructions_l_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_l_t.c' object='fcml_public_check-instructions_l_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_l_t.obj `if test -f 'instructions_l_t.c'; then $(CYGPATH_W) 'instructions_l_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_l_t.c'; fi` fcml_public_check-instructions_m_t.o: instructions_m_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_m_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_m_t.Tpo -c -o fcml_public_check-instructions_m_t.o `test -f 'instructions_m_t.c' || echo '$(srcdir)/'`instructions_m_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_m_t.Tpo $(DEPDIR)/fcml_public_check-instructions_m_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_m_t.c' object='fcml_public_check-instructions_m_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_m_t.o `test -f 'instructions_m_t.c' || echo '$(srcdir)/'`instructions_m_t.c fcml_public_check-instructions_m_t.obj: instructions_m_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_m_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_m_t.Tpo -c -o fcml_public_check-instructions_m_t.obj `if test -f 'instructions_m_t.c'; then $(CYGPATH_W) 'instructions_m_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_m_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_m_t.Tpo $(DEPDIR)/fcml_public_check-instructions_m_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_m_t.c' object='fcml_public_check-instructions_m_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_m_t.obj `if test -f 'instructions_m_t.c'; then $(CYGPATH_W) 'instructions_m_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_m_t.c'; fi` fcml_public_check-instructions_n_t.o: instructions_n_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_n_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_n_t.Tpo -c -o fcml_public_check-instructions_n_t.o `test -f 'instructions_n_t.c' || echo '$(srcdir)/'`instructions_n_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_n_t.Tpo $(DEPDIR)/fcml_public_check-instructions_n_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_n_t.c' object='fcml_public_check-instructions_n_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_n_t.o `test -f 'instructions_n_t.c' || echo '$(srcdir)/'`instructions_n_t.c fcml_public_check-instructions_n_t.obj: instructions_n_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_n_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_n_t.Tpo -c -o fcml_public_check-instructions_n_t.obj `if test -f 'instructions_n_t.c'; then $(CYGPATH_W) 'instructions_n_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_n_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_n_t.Tpo $(DEPDIR)/fcml_public_check-instructions_n_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_n_t.c' object='fcml_public_check-instructions_n_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_n_t.obj `if test -f 'instructions_n_t.c'; then $(CYGPATH_W) 'instructions_n_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_n_t.c'; fi` fcml_public_check-instructions_o_t.o: instructions_o_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_o_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_o_t.Tpo -c -o fcml_public_check-instructions_o_t.o `test -f 'instructions_o_t.c' || echo '$(srcdir)/'`instructions_o_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_o_t.Tpo $(DEPDIR)/fcml_public_check-instructions_o_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_o_t.c' object='fcml_public_check-instructions_o_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_o_t.o `test -f 'instructions_o_t.c' || echo '$(srcdir)/'`instructions_o_t.c fcml_public_check-instructions_o_t.obj: instructions_o_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_o_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_o_t.Tpo -c -o fcml_public_check-instructions_o_t.obj `if test -f 'instructions_o_t.c'; then $(CYGPATH_W) 'instructions_o_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_o_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_o_t.Tpo $(DEPDIR)/fcml_public_check-instructions_o_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_o_t.c' object='fcml_public_check-instructions_o_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_o_t.obj `if test -f 'instructions_o_t.c'; then $(CYGPATH_W) 'instructions_o_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_o_t.c'; fi` fcml_public_check-instructions_p_t.o: instructions_p_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_p_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_p_t.Tpo -c -o fcml_public_check-instructions_p_t.o `test -f 'instructions_p_t.c' || echo '$(srcdir)/'`instructions_p_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_p_t.Tpo $(DEPDIR)/fcml_public_check-instructions_p_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_p_t.c' object='fcml_public_check-instructions_p_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_p_t.o `test -f 'instructions_p_t.c' || echo '$(srcdir)/'`instructions_p_t.c fcml_public_check-instructions_p_t.obj: instructions_p_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_p_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_p_t.Tpo -c -o fcml_public_check-instructions_p_t.obj `if test -f 'instructions_p_t.c'; then $(CYGPATH_W) 'instructions_p_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_p_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_p_t.Tpo $(DEPDIR)/fcml_public_check-instructions_p_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_p_t.c' object='fcml_public_check-instructions_p_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_p_t.obj `if test -f 'instructions_p_t.c'; then $(CYGPATH_W) 'instructions_p_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_p_t.c'; fi` fcml_public_check-instructions_r_t.o: instructions_r_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_r_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_r_t.Tpo -c -o fcml_public_check-instructions_r_t.o `test -f 'instructions_r_t.c' || echo '$(srcdir)/'`instructions_r_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_r_t.Tpo $(DEPDIR)/fcml_public_check-instructions_r_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_r_t.c' object='fcml_public_check-instructions_r_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_r_t.o `test -f 'instructions_r_t.c' || echo '$(srcdir)/'`instructions_r_t.c fcml_public_check-instructions_r_t.obj: instructions_r_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_r_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_r_t.Tpo -c -o fcml_public_check-instructions_r_t.obj `if test -f 'instructions_r_t.c'; then $(CYGPATH_W) 'instructions_r_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_r_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_r_t.Tpo $(DEPDIR)/fcml_public_check-instructions_r_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_r_t.c' object='fcml_public_check-instructions_r_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_r_t.obj `if test -f 'instructions_r_t.c'; then $(CYGPATH_W) 'instructions_r_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_r_t.c'; fi` fcml_public_check-instructions_s_t.o: instructions_s_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_s_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_s_t.Tpo -c -o fcml_public_check-instructions_s_t.o `test -f 'instructions_s_t.c' || echo '$(srcdir)/'`instructions_s_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_s_t.Tpo $(DEPDIR)/fcml_public_check-instructions_s_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_s_t.c' object='fcml_public_check-instructions_s_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_s_t.o `test -f 'instructions_s_t.c' || echo '$(srcdir)/'`instructions_s_t.c fcml_public_check-instructions_s_t.obj: instructions_s_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_s_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_s_t.Tpo -c -o fcml_public_check-instructions_s_t.obj `if test -f 'instructions_s_t.c'; then $(CYGPATH_W) 'instructions_s_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_s_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_s_t.Tpo $(DEPDIR)/fcml_public_check-instructions_s_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_s_t.c' object='fcml_public_check-instructions_s_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_s_t.obj `if test -f 'instructions_s_t.c'; then $(CYGPATH_W) 'instructions_s_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_s_t.c'; fi` fcml_public_check-instructions_t_t.o: instructions_t_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_t_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_t_t.Tpo -c -o fcml_public_check-instructions_t_t.o `test -f 'instructions_t_t.c' || echo '$(srcdir)/'`instructions_t_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_t_t.Tpo $(DEPDIR)/fcml_public_check-instructions_t_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_t_t.c' object='fcml_public_check-instructions_t_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_t_t.o `test -f 'instructions_t_t.c' || echo '$(srcdir)/'`instructions_t_t.c fcml_public_check-instructions_t_t.obj: instructions_t_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_t_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_t_t.Tpo -c -o fcml_public_check-instructions_t_t.obj `if test -f 'instructions_t_t.c'; then $(CYGPATH_W) 'instructions_t_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_t_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_t_t.Tpo $(DEPDIR)/fcml_public_check-instructions_t_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_t_t.c' object='fcml_public_check-instructions_t_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_t_t.obj `if test -f 'instructions_t_t.c'; then $(CYGPATH_W) 'instructions_t_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_t_t.c'; fi` fcml_public_check-instructions_u_t.o: instructions_u_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_u_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_u_t.Tpo -c -o fcml_public_check-instructions_u_t.o `test -f 'instructions_u_t.c' || echo '$(srcdir)/'`instructions_u_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_u_t.Tpo $(DEPDIR)/fcml_public_check-instructions_u_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_u_t.c' object='fcml_public_check-instructions_u_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_u_t.o `test -f 'instructions_u_t.c' || echo '$(srcdir)/'`instructions_u_t.c fcml_public_check-instructions_u_t.obj: instructions_u_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_u_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_u_t.Tpo -c -o fcml_public_check-instructions_u_t.obj `if test -f 'instructions_u_t.c'; then $(CYGPATH_W) 'instructions_u_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_u_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_u_t.Tpo $(DEPDIR)/fcml_public_check-instructions_u_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_u_t.c' object='fcml_public_check-instructions_u_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_u_t.obj `if test -f 'instructions_u_t.c'; then $(CYGPATH_W) 'instructions_u_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_u_t.c'; fi` fcml_public_check-instructions_v_t.o: instructions_v_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_v_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_v_t.Tpo -c -o fcml_public_check-instructions_v_t.o `test -f 'instructions_v_t.c' || echo '$(srcdir)/'`instructions_v_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_v_t.Tpo $(DEPDIR)/fcml_public_check-instructions_v_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_v_t.c' object='fcml_public_check-instructions_v_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_v_t.o `test -f 'instructions_v_t.c' || echo '$(srcdir)/'`instructions_v_t.c fcml_public_check-instructions_v_t.obj: instructions_v_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_v_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_v_t.Tpo -c -o fcml_public_check-instructions_v_t.obj `if test -f 'instructions_v_t.c'; then $(CYGPATH_W) 'instructions_v_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_v_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_v_t.Tpo $(DEPDIR)/fcml_public_check-instructions_v_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_v_t.c' object='fcml_public_check-instructions_v_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_v_t.obj `if test -f 'instructions_v_t.c'; then $(CYGPATH_W) 'instructions_v_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_v_t.c'; fi` fcml_public_check-instructions_w_t.o: instructions_w_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_w_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_w_t.Tpo -c -o fcml_public_check-instructions_w_t.o `test -f 'instructions_w_t.c' || echo '$(srcdir)/'`instructions_w_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_w_t.Tpo $(DEPDIR)/fcml_public_check-instructions_w_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_w_t.c' object='fcml_public_check-instructions_w_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_w_t.o `test -f 'instructions_w_t.c' || echo '$(srcdir)/'`instructions_w_t.c fcml_public_check-instructions_w_t.obj: instructions_w_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_w_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_w_t.Tpo -c -o fcml_public_check-instructions_w_t.obj `if test -f 'instructions_w_t.c'; then $(CYGPATH_W) 'instructions_w_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_w_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_w_t.Tpo $(DEPDIR)/fcml_public_check-instructions_w_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_w_t.c' object='fcml_public_check-instructions_w_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_w_t.obj `if test -f 'instructions_w_t.c'; then $(CYGPATH_W) 'instructions_w_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_w_t.c'; fi` fcml_public_check-instructions_x_t.o: instructions_x_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_x_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_x_t.Tpo -c -o fcml_public_check-instructions_x_t.o `test -f 'instructions_x_t.c' || echo '$(srcdir)/'`instructions_x_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_x_t.Tpo $(DEPDIR)/fcml_public_check-instructions_x_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_x_t.c' object='fcml_public_check-instructions_x_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_x_t.o `test -f 'instructions_x_t.c' || echo '$(srcdir)/'`instructions_x_t.c fcml_public_check-instructions_x_t.obj: instructions_x_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-instructions_x_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-instructions_x_t.Tpo -c -o fcml_public_check-instructions_x_t.obj `if test -f 'instructions_x_t.c'; then $(CYGPATH_W) 'instructions_x_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_x_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-instructions_x_t.Tpo $(DEPDIR)/fcml_public_check-instructions_x_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instructions_x_t.c' object='fcml_public_check-instructions_x_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-instructions_x_t.obj `if test -f 'instructions_x_t.c'; then $(CYGPATH_W) 'instructions_x_t.c'; else $(CYGPATH_W) '$(srcdir)/instructions_x_t.c'; fi` fcml_public_check-prefixes_t.o: prefixes_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-prefixes_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-prefixes_t.Tpo -c -o fcml_public_check-prefixes_t.o `test -f 'prefixes_t.c' || echo '$(srcdir)/'`prefixes_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-prefixes_t.Tpo $(DEPDIR)/fcml_public_check-prefixes_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='prefixes_t.c' object='fcml_public_check-prefixes_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-prefixes_t.o `test -f 'prefixes_t.c' || echo '$(srcdir)/'`prefixes_t.c fcml_public_check-prefixes_t.obj: prefixes_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-prefixes_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-prefixes_t.Tpo -c -o fcml_public_check-prefixes_t.obj `if test -f 'prefixes_t.c'; then $(CYGPATH_W) 'prefixes_t.c'; else $(CYGPATH_W) '$(srcdir)/prefixes_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-prefixes_t.Tpo $(DEPDIR)/fcml_public_check-prefixes_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='prefixes_t.c' object='fcml_public_check-prefixes_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-prefixes_t.obj `if test -f 'prefixes_t.c'; then $(CYGPATH_W) 'prefixes_t.c'; else $(CYGPATH_W) '$(srcdir)/prefixes_t.c'; fi` fcml_public_check-segment_reg_t.o: segment_reg_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-segment_reg_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-segment_reg_t.Tpo -c -o fcml_public_check-segment_reg_t.o `test -f 'segment_reg_t.c' || echo '$(srcdir)/'`segment_reg_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-segment_reg_t.Tpo $(DEPDIR)/fcml_public_check-segment_reg_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='segment_reg_t.c' object='fcml_public_check-segment_reg_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-segment_reg_t.o `test -f 'segment_reg_t.c' || echo '$(srcdir)/'`segment_reg_t.c fcml_public_check-segment_reg_t.obj: segment_reg_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-segment_reg_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-segment_reg_t.Tpo -c -o fcml_public_check-segment_reg_t.obj `if test -f 'segment_reg_t.c'; then $(CYGPATH_W) 'segment_reg_t.c'; else $(CYGPATH_W) '$(srcdir)/segment_reg_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-segment_reg_t.Tpo $(DEPDIR)/fcml_public_check-segment_reg_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='segment_reg_t.c' object='fcml_public_check-segment_reg_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-segment_reg_t.obj `if test -f 'segment_reg_t.c'; then $(CYGPATH_W) 'segment_reg_t.c'; else $(CYGPATH_W) '$(srcdir)/segment_reg_t.c'; fi` fcml_public_check-chooser_t.o: chooser_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-chooser_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-chooser_t.Tpo -c -o fcml_public_check-chooser_t.o `test -f 'chooser_t.c' || echo '$(srcdir)/'`chooser_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-chooser_t.Tpo $(DEPDIR)/fcml_public_check-chooser_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='chooser_t.c' object='fcml_public_check-chooser_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-chooser_t.o `test -f 'chooser_t.c' || echo '$(srcdir)/'`chooser_t.c fcml_public_check-chooser_t.obj: chooser_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-chooser_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-chooser_t.Tpo -c -o fcml_public_check-chooser_t.obj `if test -f 'chooser_t.c'; then $(CYGPATH_W) 'chooser_t.c'; else $(CYGPATH_W) '$(srcdir)/chooser_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-chooser_t.Tpo $(DEPDIR)/fcml_public_check-chooser_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='chooser_t.c' object='fcml_public_check-chooser_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-chooser_t.obj `if test -f 'chooser_t.c'; then $(CYGPATH_W) 'chooser_t.c'; else $(CYGPATH_W) '$(srcdir)/chooser_t.c'; fi` fcml_public_check-render_t.o: render_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-render_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-render_t.Tpo -c -o fcml_public_check-render_t.o `test -f 'render_t.c' || echo '$(srcdir)/'`render_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-render_t.Tpo $(DEPDIR)/fcml_public_check-render_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='render_t.c' object='fcml_public_check-render_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-render_t.o `test -f 'render_t.c' || echo '$(srcdir)/'`render_t.c fcml_public_check-render_t.obj: render_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-render_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-render_t.Tpo -c -o fcml_public_check-render_t.obj `if test -f 'render_t.c'; then $(CYGPATH_W) 'render_t.c'; else $(CYGPATH_W) '$(srcdir)/render_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-render_t.Tpo $(DEPDIR)/fcml_public_check-render_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='render_t.c' object='fcml_public_check-render_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-render_t.obj `if test -f 'render_t.c'; then $(CYGPATH_W) 'render_t.c'; else $(CYGPATH_W) '$(srcdir)/render_t.c'; fi` fcml_public_check-disassembler_t.o: disassembler_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-disassembler_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-disassembler_t.Tpo -c -o fcml_public_check-disassembler_t.o `test -f 'disassembler_t.c' || echo '$(srcdir)/'`disassembler_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-disassembler_t.Tpo $(DEPDIR)/fcml_public_check-disassembler_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='disassembler_t.c' object='fcml_public_check-disassembler_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-disassembler_t.o `test -f 'disassembler_t.c' || echo '$(srcdir)/'`disassembler_t.c fcml_public_check-disassembler_t.obj: disassembler_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-disassembler_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-disassembler_t.Tpo -c -o fcml_public_check-disassembler_t.obj `if test -f 'disassembler_t.c'; then $(CYGPATH_W) 'disassembler_t.c'; else $(CYGPATH_W) '$(srcdir)/disassembler_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-disassembler_t.Tpo $(DEPDIR)/fcml_public_check-disassembler_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='disassembler_t.c' object='fcml_public_check-disassembler_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-disassembler_t.obj `if test -f 'disassembler_t.c'; then $(CYGPATH_W) 'disassembler_t.c'; else $(CYGPATH_W) '$(srcdir)/disassembler_t.c'; fi` fcml_public_check-assembler_t.o: assembler_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-assembler_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-assembler_t.Tpo -c -o fcml_public_check-assembler_t.o `test -f 'assembler_t.c' || echo '$(srcdir)/'`assembler_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-assembler_t.Tpo $(DEPDIR)/fcml_public_check-assembler_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='assembler_t.c' object='fcml_public_check-assembler_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-assembler_t.o `test -f 'assembler_t.c' || echo '$(srcdir)/'`assembler_t.c fcml_public_check-assembler_t.obj: assembler_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-assembler_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-assembler_t.Tpo -c -o fcml_public_check-assembler_t.obj `if test -f 'assembler_t.c'; then $(CYGPATH_W) 'assembler_t.c'; else $(CYGPATH_W) '$(srcdir)/assembler_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-assembler_t.Tpo $(DEPDIR)/fcml_public_check-assembler_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='assembler_t.c' object='fcml_public_check-assembler_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-assembler_t.obj `if test -f 'assembler_t.c'; then $(CYGPATH_W) 'assembler_t.c'; else $(CYGPATH_W) '$(srcdir)/assembler_t.c'; fi` fcml_public_check-general_usage_t.o: general_usage_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-general_usage_t.o -MD -MP -MF $(DEPDIR)/fcml_public_check-general_usage_t.Tpo -c -o fcml_public_check-general_usage_t.o `test -f 'general_usage_t.c' || echo '$(srcdir)/'`general_usage_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-general_usage_t.Tpo $(DEPDIR)/fcml_public_check-general_usage_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='general_usage_t.c' object='fcml_public_check-general_usage_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-general_usage_t.o `test -f 'general_usage_t.c' || echo '$(srcdir)/'`general_usage_t.c fcml_public_check-general_usage_t.obj: general_usage_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_public_check-general_usage_t.obj -MD -MP -MF $(DEPDIR)/fcml_public_check-general_usage_t.Tpo -c -o fcml_public_check-general_usage_t.obj `if test -f 'general_usage_t.c'; then $(CYGPATH_W) 'general_usage_t.c'; else $(CYGPATH_W) '$(srcdir)/general_usage_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_public_check-general_usage_t.Tpo $(DEPDIR)/fcml_public_check-general_usage_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='general_usage_t.c' object='fcml_public_check-general_usage_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_public_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_public_check-general_usage_t.obj `if test -f 'general_usage_t.c'; then $(CYGPATH_W) 'general_usage_t.c'; else $(CYGPATH_W) '$(srcdir)/general_usage_t.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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 # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all $(check_SCRIPTS) @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? fcml_public_check.log: fcml_public_check$(EXEEXT) @p='fcml_public_check$(EXEEXT)'; \ b='fcml_public_check'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) 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 $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(PROGRAMS) 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: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: 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." clean: clean-am clean-am: clean-generic clean-libtool 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 \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ clean-generic clean-libtool clean-noinstPROGRAMS cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool 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 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. .NOEXPORT: fcml-1.1.1/check/public-tests/hints_t.c0000644000175000017500000001475012560745216014702 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 "hints_t.h" #include #include "instructions_base_t.h" fcml_bool fcml_tf_hints_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_hints_suite_cleanup(void) { return FCML_TRUE; } void fcml_fn_hints_sib(void) { FCML_I32( "add dword ptr [eax+00000001h],eax", 0x01, 0x40, 0x01 ); FCML_A32( "add %eax,0x00000001(%eax)", 0x01, 0x40, 0x01 ); FCML_I32_A( "add dword ptr [sib eax+00000001h],eax", 0x01, 0x44, 0x20, 0x01 ); FCML_A32_D( "add %eax,0x00000001(%eax)", 0x01, 0x44, 0x20, 0x01 ); FCML_I32( "add dword ptr [eax],eax", 0x01, 0x00 ); FCML_I32_A( "add dword ptr [sib eax],eax", 0x01, 0x04, 0x20 ); } void fcml_fn_hints_rip(void) { /* RIP enabled by default.*/ FCML_I64_RIP_A( "rcl byte ptr [0000800000401007h],03h", 0xC0, 0x15, 0x00, 0x00, 0x00, 0x00, 0x03 ); /* RIP by default, absolute forced, take into account that SIB encoding was used to encode it.*/ FCML_I64_RIP_A( "rcl byte ptr [abs 0000000000401007h],03h", 0xc0, 0x14, 0x25, 0x07, 0x10, 0x40, 0x00, 0x03 ); /* Offset is too big to be encoded as absolute offset.*/ FCML_I64_A_FAILED( "rcl byte ptr [0000800000401007h],03h", 0xC0, 0x15, 0x00, 0x00, 0x00, 0x00, 0x03 ); /* Absolute offset enabled by default.*/ FCML_I64( "rcl byte ptr [0000000000401007h],03h", 0xc0, 0x14, 0x25, 0x07, 0x10, 0x40, 0x00, 0x03 ); /* In 32 bit mode, SIB is not needed, so it is not used by default, but...*/ FCML_I32( "rcl byte ptr [00401007h],03h", 0xc0, 0x15, 0x07, 0x10, 0x40, 0x00, 0x03 ); /* we can force it.*/ FCML_I32_A( "rcl byte ptr [sib 00401007h],03h", 0xc0, 0x14, 0x25, 0x07, 0x10, 0x40, 0x00, 0x03 ); /* It's interesting combination. RIP should be used by default, but SIB hint was used. Hints have higher precedence*/ /* so it forced absolute address to be used (Because absolute offset is encoded using SIB). In this case SIB hint works like the ABS one.*/ FCML_I64_RIP_A( "rcl byte ptr [sib 00401007h],03h", 0xc0, 0x14, 0x25, 0x07, 0x10, 0x40, 0x00, 0x03 ); /* Absolute by default but RIP forced.*/ FCML_I64_A( "rcl byte ptr [rel 0000800000401007h],03h", 0xc0, 0x15, 0x00, 0x00, 0x00, 0x00, 0x03 ); /* Hints rendering.*/ FCML_I64_RF( "rcl byte ptr [rel 0000800000401007h],03h", FCML_REND_FLAG_RENDER_REL_HINT, 0xc0, 0x15, 0x00, 0x00, 0x00, 0x00, 0x03 ); FCML_I64_RF( "rcl byte ptr [abs 0000000000401007h],03h", FCML_REND_FLAG_RENDER_ABS_HINT, 0xc0, 0x14, 0x25, 0x07, 0x10, 0x40, 0x00, 0x03 ); } void fcml_fn_hints_indirect_addressing(void) { /* 1: 0xFF, 0x25, 0x01, 0x10, 0x40, 0x00 (jmp dword [00401001h]) * By default indirect addressing is chosen. */ fcml_st_assembler_context context = {0}; context.assembler = assembler_intel; context.entry_point.op_mode = FCML_OM_32_BIT; context.entry_point.ip = 0x00401000; fcml_st_instruction instruction = {0}; instruction.mnemonic = "jmp"; instruction.operands[0].type = FCML_OT_ADDRESS; instruction.operands[0].address.address_form = FCML_AF_OFFSET; instruction.operands[0].address.size_operator = FCML_DS_32; instruction.operands[0].address.offset.off32 = 0x00401001; instruction.operands[0].address.offset.size = FCML_DS_32; instruction.operands_count = 1; fcml_st_assembler_result result; fcml_fn_assembler_result_prepare( &result ); fcml_ceh_error error; if( !( error = fcml_fn_assemble( &context, &instruction, &result ) ) ) { STF_ASSERT_PTR_NOT_NULL( result.chosen_instruction ); if( result.chosen_instruction ) { STF_ASSERT_EQUAL( 6, result.chosen_instruction->code_length ); if( result.chosen_instruction->code_length == 6 ) { STF_ASSERT_EQUAL( 0xFF, result.chosen_instruction->code[0] ); STF_ASSERT_EQUAL( 0x25, result.chosen_instruction->code[1] ); STF_ASSERT_EQUAL( 0x01, result.chosen_instruction->code[2] ); STF_ASSERT_EQUAL( 0x10, result.chosen_instruction->code[3] ); STF_ASSERT_EQUAL( 0x40, result.chosen_instruction->code[4] ); STF_ASSERT_EQUAL( 0x00, result.chosen_instruction->code[5] ); } } fcml_fn_assembler_result_free( &result ); } else { STF_FAIL("Can not assemble instruction."); } } void fcml_fn_hints_direct_addressing(void) { /* 1: 0xeb, 0xff (jmp 00401001h) * Forcing indirect addressing. */ fcml_st_assembler_context context = {0}; context.assembler = assembler_intel; context.entry_point.op_mode = FCML_OM_32_BIT; context.entry_point.ip = 0x00401000; fcml_st_instruction instruction = {0}; instruction.mnemonic = "jmp"; instruction.operands[0].type = FCML_OT_ADDRESS; instruction.operands[0].address.address_form = FCML_AF_OFFSET; instruction.operands[0].address.offset.off32 = 0x00401001; instruction.operands[0].address.offset.size = FCML_DS_32; instruction.hints |= FCML_HINT_DIRECT_POINTER; instruction.operands_count = 1; fcml_st_assembler_result result; fcml_fn_assembler_result_prepare( &result ); fcml_ceh_error error; if( !( error = fcml_fn_assemble( &context, &instruction, &result ) ) ) { STF_ASSERT_PTR_NOT_NULL( result.chosen_instruction ); if( result.chosen_instruction ) { STF_ASSERT_EQUAL( 2, result.chosen_instruction->code_length ); if( result.chosen_instruction->code_length == 2 ) { STF_ASSERT_EQUAL( 0xEB, result.chosen_instruction->code[0] ); STF_ASSERT_EQUAL( 0xFF, result.chosen_instruction->code[1] ); } } fcml_fn_assembler_result_free( &result ); } else { STF_FAIL("Can not assemble instruction."); } } fcml_stf_test_case fcml_ti_hints[] = { { "fcml_fn_hints_sib", fcml_fn_hints_sib }, { "fcml_fn_hints_rip", fcml_fn_hints_rip }, { "fcml_fn_hints_indirect_addressing", fcml_fn_hints_indirect_addressing }, { "fcml_fn_hints_direct_addressing", fcml_fn_hints_direct_addressing }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_hints = { "suite-fcml-hints", fcml_tf_hints_suite_init, fcml_tf_hints_suite_cleanup, fcml_ti_hints }; fcml-1.1.1/check/public-tests/instructions_s_t.c0000644000175000017500000012441612560745216016644 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include #include "instructions_s_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_s_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_s_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_SAHF(void) { FCML_I3264( "sahf", 0x9E ); FCML_A64( "sahf", 0x9e ); } void fcml_tf_instruction_SHL(void) { FCML_I32_M( "shl byte ptr [eax],01h", 2, FCML_MI( 0xc0, 0x20, 0x01 ), FCML_MI( 0xd0, 0x20 ) ); FCML_I32_M( "shl al,01h", 2, FCML_MI( 0xc0, 0xe0, 0x01 ), FCML_MI( 0xd0, 0xe0 ) ); FCML_I64_D( "shl al,01h", 0x48, 0xD0, 0xE0 ); FCML_A64_M( "shlb $0x01,(%rax)", 2, FCML_MI( 0xc0, 0x20, 0x01 ), FCML_MI( 0xd0, 0x20 ) ); FCML_A64_M( "shl $0x01,%al", 2, FCML_MI( 0xc0, 0xe0, 0x01 ), FCML_MI( 0xd0, 0xe0 ) ); FCML_I32( "shl byte ptr [eax],cl", 0xD2, 0x20 ); FCML_I32( "shl al,cl", 0xD2, 0xE0 ); FCML_I64_D( "shl al,cl", 0x48, 0xD2, 0xE0 ); FCML_A64( "shlb %cl,(%rax)", 0xd2, 0x20 ); FCML_A64( "shl %cl,%al", 0xd2, 0xe0 ); FCML_I32( "shl byte ptr [eax],0ffh", 0xC0, 0x20, 0xFF ); FCML_I32( "shl al,0ffh", 0xC0, 0xE0, 0xFF ); FCML_I64_D( "shl al,0ffh", 0x48, 0xC0, 0xE0, 0xFF ); FCML_A64( "shlb $0xff,(%rax)", 0xc0, 0x20, 0xff ); FCML_A64( "shl $0xff,%al", 0xc0, 0xe0, 0xff ); FCML_I32_M( "shl dword ptr [eax],01h", 2, FCML_MI( 0xc1, 0x20, 0x01 ), FCML_MI( 0xd1, 0x20 ) ); FCML_I32_M( "shl eax,01h", 2, FCML_MI( 0xc1, 0xe0, 0x01 ), FCML_MI( 0xd1, 0xe0 ) ); FCML_I64_M( "shl rax,01h", 2, FCML_MI( 0x48, 0xc1, 0xe0, 0x01 ), FCML_MI( 0x48, 0xd1, 0xe0 ) ); FCML_A64_M( "shll $0x01,(%rax)", 2, FCML_MI( 0xc1, 0x20, 0x01 ), FCML_MI( 0xd1, 0x20 ) ); FCML_A32_M( "shll $0x01,(%eax)", 2, FCML_MI( 0xc1, 0x20, 0x01 ), FCML_MI( 0xd1, 0x20 ) ); FCML_A64_M( "shlw $0x01,(%rax)", 2, FCML_MI( 0x66, 0xc1, 0x20, 0x01 ), FCML_MI( 0x66, 0xd1, 0x20 ) ); FCML_A64_M( "shlq $0x01,(%rax)", 2, FCML_MI( 0x48, 0xc1, 0x20, 0x01 ), FCML_MI( 0x48, 0xd1, 0x20 ) ); FCML_A64_M( "shl $0x01,%eax", 2, FCML_MI( 0xc1, 0xe0, 0x01 ), FCML_MI( 0xd1, 0xe0 ) ); FCML_A64_M( "shl $0x01,%rax", 2, FCML_MI( 0x48, 0xc1, 0xe0, 0x01 ), FCML_MI( 0x48, 0xd1, 0xe0 ) ); FCML_A64_M( "shl $0x01,%ax", 2, FCML_MI( 0x66, 0xc1, 0xe0, 0x01 ), FCML_MI( 0x66, 0xd1, 0xe0 ) ); FCML_I32( "shl dword ptr [eax],cl", 0xD3, 0x20 ); FCML_I32( "shl eax,cl", 0xD3, 0xE0 ); FCML_I64( "shl rax,cl", 0x48, 0xD3, 0xE0 ); FCML_A64( "shll %cl,(%rax)", 0xd3, 0x20 ); FCML_A64( "shl %cl,%eax", 0xd3, 0xe0 ); FCML_A64( "shl %cl,%rax", 0x48, 0xd3, 0xe0 ); FCML_I32( "shl dword ptr [eax],0ffh", 0xC1, 0x20, 0xff ); FCML_I32( "shl eax,0ffh", 0xC1, 0xE0, 0xff ); FCML_I64( "shl rax,0ffh", 0x48, 0xC1, 0xE0, 0xff ); FCML_A64( "shll $0xff,(%rax)", 0xc1, 0x20, 0xff ); FCML_A64( "shl $0xff,%eax", 0xc1, 0xe0, 0xff ); FCML_A64( "shl $0xff,%rax", 0x48, 0xc1, 0xe0, 0xff ); } void fcml_tf_instruction_SAL(void) { FCML_I32_M_A( "sal byte ptr [eax],01h", 2, FCML_MI( 0xc0, 0x20, 0x01 ), FCML_MI( 0xd0, 0x20 ) ); FCML_I32_M_A( "sal al,01h", 2, FCML_MI( 0xc0, 0xe0, 0x01 ), FCML_MI( 0xd0, 0xe0 ) ); FCML_A64_M( "shlb $0x01,(%rax)", 2, FCML_MI( 0xc0, 0x20, 0x01 ), FCML_MI( 0xd0, 0x20 ) ); FCML_A64_M( "shl $0x01,%al", 2, FCML_MI( 0xc0, 0xe0, 0x01 ), FCML_MI( 0xd0, 0xe0 ) ); FCML_I32_A( "sal byte ptr [eax],cl", 0xD2, 0x20 ); FCML_I32_A( "sal al,cl", 0xD2, 0xE0 ); FCML_A64( "shlb %cl,(%rax)", 0xd2, 0x20 ); FCML_A64( "shl %cl,%al", 0xd2, 0xe0 ); FCML_I32_A( "sal byte ptr [eax],0ffh", 0xC0, 0x20, 0xFF ); FCML_I32_A( "sal al,0ffh", 0xC0, 0xE0, 0xFF ); FCML_A64( "shlb $0xff,(%rax)", 0xc0, 0x20, 0xff ); FCML_A64( "shl $0xff,%al", 0xc0, 0xe0, 0xff ); FCML_I32_M_A( "sal dword ptr [eax],01h", 2, FCML_MI( 0xc1, 0x20, 0x01 ), FCML_MI( 0xd1, 0x20 ) ); FCML_I32_M_A( "sal eax,01h", 2, FCML_MI( 0xc1, 0xe0, 0x01 ), FCML_MI( 0xd1, 0xe0 ) ); FCML_I64_M_A( "sal rax,01h", 2, FCML_MI( 0x48, 0xc1, 0xe0, 0x01 ), FCML_MI( 0x48, 0xd1, 0xe0 ) ); FCML_A64_M_A( "shl $0x01,%rax", 2, FCML_MI( 0x48, 0xc1, 0xe0, 0x01 ), FCML_MI( 0x48, 0xd1, 0xe0 ) ); FCML_I32_A( "sal dword ptr [eax],cl", 0xD3, 0x20 ); FCML_I32_A( "sal eax,cl", 0xD3, 0xE0 ); FCML_I64_A( "sal rax,cl", 0x48, 0xD3, 0xE0 ); FCML_A64( "shll %cl,(%rax)", 0xd3, 0x20 ); FCML_A64( "shl %cl,%eax", 0xd3, 0xe0 ); FCML_A64( "shl %cl,%rax", 0x48, 0xd3, 0xe0 ); FCML_I32_A( "sal dword ptr [eax],0ffh", 0xC1, 0x20, 0xff ); FCML_I32_A( "sal eax,0ffh", 0xC1, 0xE0, 0xff ); FCML_I64_A( "sal rax,0ffh", 0x48, 0xC1, 0xE0, 0xff ); FCML_A64( "shll $0xff,(%rax)", 0xc1, 0x20, 0xff ); FCML_A64( "shl $0xff,%eax", 0xc1, 0xe0, 0xff ); FCML_A64( "shl $0xff,%rax", 0x48, 0xc1, 0xe0, 0xff ); } void fcml_tf_instruction_SAR(void) { FCML_I32_M( "sar byte ptr [eax],01h", 2, FCML_MI( 0xc0, 0x38, 0x01 ), FCML_MI( 0xd0, 0x38 ) ); FCML_I32_M( "sar al,01h", 2, FCML_MI( 0xc0, 0xf8, 0x01 ), FCML_MI( 0xd0, 0xf8 ) ); FCML_I64_D( "sar al,01h", 0x48, 0xD0, 0xF8 ); FCML_A64_M( "sarb $0x01,(%rax)", 2, FCML_MI( 0xc0, 0x38, 0x01 ), FCML_MI( 0xd0, 0x38 ) ); FCML_A64_M( "sar $0x01,%al", 2, FCML_MI( 0xc0, 0xf8, 0x01 ), FCML_MI( 0xd0, 0xf8 ) ); FCML_I32( "sar byte ptr [eax],cl", 0xD2, 0x38 ); FCML_I32( "sar al,cl", 0xD2, 0xF8 ); FCML_I64_D( "sar al,cl", 0x48, 0xD2, 0xF8 ); FCML_A64( "sarb %cl,(%rax)", 0xd2, 0x38 ); FCML_A64( "sar %cl,%al", 0xd2, 0xf8 ); FCML_I32( "sar byte ptr [eax],0ffh", 0xC0, 0x38, 0xFF ); FCML_I32( "sar al,0ffh", 0xC0, 0xF8, 0xFF ); FCML_I64_D( "sar al,0ffh", 0x48, 0xC0, 0xF8, 0xFF ); FCML_A64( "sarb $0xff,(%rax)", 0xc0, 0x38, 0xff ); FCML_A64( "sar $0xff,%al", 0xc0, 0xf8, 0xff ); FCML_I32_M( "sar dword ptr [eax],01h", 2, FCML_MI( 0xc1, 0x38, 0x01 ), FCML_MI( 0xd1, 0x38 ) ); FCML_I32_M( "sar eax,01h", 2, FCML_MI( 0xc1, 0xf8, 0x01 ), FCML_MI( 0xd1, 0xf8 ) ); FCML_I64_M( "sar rax,01h", 2, FCML_MI( 0x48, 0xc1, 0xf8, 0x01 ), FCML_MI( 0x48, 0xd1, 0xf8 ) ); FCML_A64_M( "sarl $0x01,(%rax)", 2, FCML_MI( 0xc1, 0x38, 0x01 ), FCML_MI( 0xd1, 0x38 ) ); FCML_A64_M( "sar $0x01,%eax", 2, FCML_MI( 0xc1, 0xf8, 0x01 ), FCML_MI( 0xd1, 0xf8 ) ); FCML_A64_M( "sar $0x01,%rax", 2, FCML_MI( 0x48, 0xc1, 0xf8, 0x01 ), FCML_MI( 0x48, 0xd1, 0xf8 ) ); FCML_I32( "sar dword ptr [eax],cl", 0xD3, 0x38 ); FCML_I32( "sar eax,cl", 0xD3, 0xF8 ); FCML_I64( "sar rax,cl", 0x48, 0xD3, 0xF8 ); FCML_A64( "sarl %cl,(%rax)", 0xd3, 0x38 ); FCML_A64( "sar %cl,%eax", 0xd3, 0xf8 ); FCML_A64( "sar %cl,%rax", 0x48, 0xd3, 0xf8 ); FCML_I32( "sar dword ptr [eax],0ffh", 0xC1, 0x38, 0xff ); FCML_I32( "sar eax,0ffh", 0xC1, 0xF8, 0xff ); FCML_I64( "sar rax,0ffh", 0x48, 0xC1, 0xF8, 0xff ); FCML_A64( "sarl $0xff,(%rax)", 0xc1, 0x38, 0xff ); FCML_A64( "sar $0xff,%eax", 0xc1, 0xf8, 0xff ); FCML_A64( "sar $0xff,%rax", 0x48, 0xc1, 0xf8, 0xff ); } void fcml_tf_instruction_SHR(void) { FCML_I32_M( "shr byte ptr [eax],01h", 2, FCML_MI( 0xc0, 0x28, 0x01 ), FCML_MI( 0xd0, 0x28 ) ); FCML_I32_M( "shr al,01h", 2, FCML_MI( 0xc0, 0xe8, 0x01 ), FCML_MI( 0xd0, 0xe8 ) ); FCML_I64_D( "shr al,01h", 0x48, 0xD0, 0xE8 ); FCML_A64_M( "shrb $0x01,(%rax)", 2, FCML_MI( 0xc0, 0x28, 0x01 ), FCML_MI( 0xd0, 0x28 ) ); FCML_A64_M( "shr $0x01,%al", 2, FCML_MI( 0xc0, 0xe8, 0x01 ), FCML_MI( 0xd0, 0xe8 ) ); FCML_I32( "shr byte ptr [eax],cl", 0xD2, 0x28 ); FCML_I32( "shr al,cl", 0xD2, 0xE8 ); FCML_I64_D( "shr al,cl", 0x48, 0xD2, 0xE8 ); FCML_A64( "shrb %cl,(%rax)", 0xd2, 0x28 ); FCML_A64( "shr %cl,%al", 0xd2, 0xe8 ); FCML_I32( "shr byte ptr [eax],0ffh", 0xC0, 0x28, 0xFF ); FCML_I32( "shr al,0ffh", 0xC0, 0xE8, 0xFF ); FCML_I64_D( "shr al,0ffh", 0x48, 0xC0, 0xE8, 0xFF ); FCML_A64( "shrb $0xff,(%rax)", 0xc0, 0x28, 0xff ); FCML_A64( "shr $0xff,%al", 0xc0, 0xe8, 0xff ); FCML_I32_M( "shr dword ptr [eax],01h", 2, FCML_MI( 0xc1, 0x28, 0x01 ), FCML_MI( 0xd1, 0x28 ) ); FCML_I32_M( "shr eax,01h", 2, FCML_MI( 0xc1, 0xe8, 0x01 ), FCML_MI( 0xd1, 0xe8 ) ); FCML_I64_M( "shr rax,01h", 2, FCML_MI( 0x48, 0xc1, 0xe8, 0x01 ), FCML_MI( 0x48, 0xd1, 0xe8 ) ); FCML_A64_M( "shrl $0x01,(%rax)", 2, FCML_MI( 0xc1, 0x28, 0x01 ), FCML_MI( 0xd1, 0x28 ) ); FCML_A64_M( "shr $0x01,%eax", 2, FCML_MI( 0xc1, 0xe8, 0x01 ), FCML_MI( 0xd1, 0xe8 ) ); FCML_I32( "shr dword ptr [eax],cl", 0xD3, 0x28 ); FCML_I32( "shr eax,cl", 0xD3, 0xE8 ); FCML_I64( "shr rax,cl", 0x48, 0xD3, 0xE8 ); FCML_A64( "shrl %cl,(%rax)", 0xd3, 0x28 ); FCML_A64( "shrq %cl,(%rax)", 0x48, 0xd3, 0x28 ); FCML_A64( "shrw %cl,(%rax)", 0x66, 0xd3, 0x28 ); FCML_A64( "shr %cl,%eax", 0xd3, 0xe8 ); FCML_A64( "shr %cl,%rax", 0x48, 0xd3, 0xe8 ); FCML_I32( "shr dword ptr [eax],0ffh", 0xC1, 0x28, 0xff ); FCML_I32( "shr eax,0ffh", 0xC1, 0xE8, 0xff ); FCML_I64( "shr rax,0ffh", 0x48, 0xC1, 0xE8, 0xff ); FCML_A64( "shrl $0xff,(%rax)", 0xc1, 0x28, 0xff ); FCML_A64( "shr $0xff,%rax", 0x48, 0xc1, 0xe8, 0xff ); } void fcml_tf_instruction_SBB(void) { FCML_I32_M( "sbb al,42h", 2, FCML_MI( 0x80, 0xd8, 0x42 ), FCML_MI( 0x1c, 0x42 ) ); FCML_I32_A_FAILED( "sbb al,42h", 0xF0, 0x80, 0xd8, 0x42 ); FCML_I32_M( "sbb ax,8042h", 2, FCML_MI( 0x66, 0x81, 0xd8, 0x42, 0x80 ), FCML_MI( 0x66, 0x1d, 0x42, 0x80 ) ); FCML_I32_M( "sbb eax,42806521h", 2, FCML_MI( 0x81, 0xd8, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x1d, 0x21, 0x65, 0x80, 0x42 ) ); FCML_I64_M( "sbb ax,6521h", 2, FCML_MI( 0x66, 0x81, 0xd8, 0x21, 0x65 ), FCML_MI( 0x66, 0x1d, 0x21, 0x65 ) ); FCML_I64_M( "sbb rax,0000000042806521h", 2, FCML_MI( 0x48, 0x81, 0xd8, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x48, 0x1d, 0x21, 0x65, 0x80, 0x42 ) ); FCML_I32( "lock sbb byte ptr [eax],0ffh", 0xF0, 0x80, 0x18, 0xff ); FCML_I32( "xacquire lock sbb byte ptr [eax],0ffh", 0xF2, 0xF0, 0x80, 0x18, 0xff ); FCML_I32( "xrelease lock sbb byte ptr [eax],0ffh", 0xF3, 0xF0, 0x80, 0x18, 0xff ); FCML_I32_M( "sbb al,0ffh", 2, FCML_MI( 0x80, 0xd8, 0xff ), FCML_MI( 0x1c, 0xff ) ); FCML_I64_D( "sbb byte ptr [rax],0ffh", 0x48, 0x80, 0x18, 0xff ); FCML_I64( "sbb byte ptr [rax],0ffh", 0x80, 0x18, 0xff ); FCML_I32( "sbb ebp,04030201h", 0x81, 0xDD, 0x01, 0x02, 0x03, 0x04 ); FCML_I32( "sbb bp,0201h", 0x66, 0x81, 0xDD, 0x01, 0x02 ); FCML_I64_D( "sbb bp,0201h", 0x67, 0x66, 0x40, 0x81, 0xDD, 0x01, 0x02 ); /* 32 bit mode doesn't not allow REX.*/ FCML_I64( "sbb rbp,0000000004030201h", 0x48, 0x81, 0xDD, 0x01, 0x02, 0x03, 0x04 ); FCML_I32_M( "lock sbb dword ptr [eax],0ffffffffh", 2, FCML_MI( 0xF0, 0x83, 0x18, 0xff ), FCML_MI( 0xF0, 0x81, 0x18, 0xff, 0xff, 0xff, 0xff ) ); FCML_I32_M( "xacquire lock sbb dword ptr [eax],0ffffffffh", 2, FCML_MI( 0xF2, 0xF0, 0x83, 0x18, 0xff ), FCML_MI( 0xF2, 0xF0, 0x81, 0x18, 0xff, 0xff, 0xff, 0xff ) ); FCML_I32_M( "xrelease lock sbb dword ptr [eax],0ffffffffh", 2, FCML_MI( 0xF3, 0xF0, 0x83, 0x18, 0xff ), FCML_MI( 0xF3, 0xF0, 0x81, 0x18, 0xff, 0xff, 0xff, 0xff ) ); FCML_I32_M( "sbb word ptr [eax],0ffffh", 2, FCML_MI( 0x66, 0x83, 0x18, 0xff ), FCML_MI( 0x66, 0x81, 0x18, 0xff, 0xff ) ); FCML_I32_M( "sbb eax,0ffffffffh", 3, FCML_MI( 0x83, 0xd8, 0xff ), FCML_MI( 0x81, 0xd8, 0xff, 0xff, 0xff, 0xff ), FCML_MI( 0x1d, 0xff, 0xff, 0xff, 0xff ) ); FCML_I64_M( "lock sbb qword ptr [rdi+0000000004030201h],0000000000000005h", 2, FCML_MI( 0xF0, 0x48, 0x83, 0x9f, 0x01, 0x02, 0x03, 0x04, 0x05 ), FCML_MI( 0xF0, 0x48, 0x81, 0x9f, 0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00 ) ); FCML_I64_M( "xacquire lock sbb qword ptr [rdi+0000000004030201h],0000000000000005h", 2, FCML_MI( 0xF2, 0xF0, 0x48, 0x83, 0x9f, 0x01, 0x02, 0x03, 0x04, 0x05 ), FCML_MI( 0xF2, 0xF0, 0x48, 0x81, 0x9f, 0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00 ) ); FCML_I64_M( "xrelease lock sbb qword ptr [rdi+0000000004030201h],0000000000000005h", 2, FCML_MI( 0xF3, 0xF0, 0x48, 0x83, 0x9f, 0x01, 0x02, 0x03, 0x04, 0x05 ), FCML_MI( 0xF3, 0xF0, 0x48, 0x81, 0x9f, 0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00 ) ); FCML_I64_M( "sbb qword ptr [rdi+0000000004030201h],0ffffffffffffffffh", 2, FCML_MI( 0x48, 0x83, 0x9f, 0x01, 0x02, 0x03, 0x04, 0xff ), FCML_MI( 0x48, 0x81, 0x9f, 0x01, 0x02, 0x03, 0x04, 0xff, 0xff, 0xff, 0xff ) ); FCML_I32( "sbb byte ptr [ebp+04030201h],ah", 0x18, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I64( "sbb byte ptr [rbp+0000000004030201h],spl", 0x40, 0x18, 0xa5, 0x01, 0x02, 0x03, 0x04 ); FCML_I64( "sbb byte ptr [rbp+0000000000000001h],spl", 0x40, 0x18, 0x65, 0x01 ); FCML_I32( "lock sbb dword ptr [ebp+04030201h],esp", 0xF0, 0x19, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "xacquire lock sbb dword ptr [ebp+04030201h],esp", 0xF2, 0xF0, 0x19, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "xrelease lock sbb dword ptr [ebp+04030201h],esp", 0xF3, 0xF0, 0x19, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "sbb word ptr [di+0201h],sp", 0x66, 0x67, 0x19, 0xa5, 0x01, 0x02 ); FCML_I32( "sbb dword ptr [di+0201h],esp", 0x67, 0x19, 0xa5, 0x01, 0x02 ); FCML_I64( "sbb qword ptr [r9+rcx*4+0000000000000001h],r12", 0x4D, 0x19, 0x64, 0x89, 0x01 ); FCML_I32( "sbb ah,byte ptr [ebp+04030201h]", 0x1A, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I64( "sbb spl,byte ptr [rbp+0000000004030201h]", 0x40, 0x1a, 0xa5, 0x01, 0x02, 0x03, 0x04 ); FCML_I64( "sbb spl,byte ptr [rbp+0000000000000001h]", 0x40, 0x1a, 0x65, 0x01 ); FCML_I32( "sbb esp,dword ptr [ebp+04030201h]", 0x1B, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "sbb sp,word ptr [di+0201h]", 0x66, 0x67, 0x1b, 0xa5, 0x01, 0x02 ); FCML_I32( "sbb esp,dword ptr [di+0201h]", 0x67, 0x1B, 0xa5, 0x01, 0x02 ); FCML_I64( "sbb r12,qword ptr [r9+rcx*4+0000000000000001h]", 0x4D, 0x1B, 0x64, 0x89, 0x01 ); FCML_A64_M( "sbb $0x8042,%ax", 2, FCML_MI( 0x66, 0x81, 0xd8, 0x42, 0x80 ), FCML_MI( 0x66, 0x1d, 0x42, 0x80 ) ); FCML_A64( "lock sbbb $0xff,(%rax)", 0xf0, 0x80, 0x18, 0xff ); FCML_A64_M( "sbbw $0xffff,(%rax)", 2, FCML_MI( 0x66, 0x83, 0x18, 0xff ), FCML_MI( 0x66, 0x81, 0x18, 0xff, 0xff ) ); FCML_A64_M( "sbb $0xffffffff,%eax", 3, FCML_MI( 0x83, 0xd8, 0xff ), FCML_MI( 0x81, 0xd8, 0xff, 0xff, 0xff, 0xff ), FCML_MI( 0x1d, 0xff, 0xff, 0xff, 0xff ) ); FCML_A64( "sbb %sp,0x194d0201(%ebp)", 0x66, 0x67, 0x19, 0xa5, 0x01, 0x02, 0x4d, 0x19 ); FCML_A64( "mov %eax,%fs:(%rcx)", 0x64, 0x89, 0x01 ); } void fcml_tf_instruction_SCAS(void) { FCML_I32( "repne scas byte ptr [edi]", 0xf2, 0xAE ); FCML_I32( "scas dword ptr [edi]", 0xAF ); FCML_I32( "scas word ptr [edi]", 0x66, 0xAF ); FCML_I64( "scas qword ptr [rdi]", 0x48, 0xAF ); FCML_I32_A( "repne scasb", 0xf2, 0xAE ); FCML_I32_A( "repnz scasb", 0xf2, 0xAE ); FCML_I32_A( "scasw", 0x66, 0xAF ); FCML_I32_A( "scasd", 0xAF ); FCML_I64_A( "scasq", 0x48, 0xAF ); FCML_I32_D_RF( "repne scas byte ptr [edi]", FCML_REND_FLAG_REP_PREFIX_GROUP_1, 0xf2, 0xAE ); FCML_I32_D_RF( "repnz scas byte ptr [edi]", FCML_REND_FLAG_REP_PREFIX_GROUP_2, 0xf2, 0xAE ); FCML_A64( "scasl (%rdi)", 0xaf ); FCML_A64( "scasw (%rdi)", 0x66, 0xaf ); FCML_A64( "scasq (%rdi)", 0x48, 0xaf ); FCML_A64_A( "scasl", 0xaf ); FCML_A64_A( "scasw", 0x66, 0xaf ); FCML_A64_A( "scasq", 0x48, 0xaf ); } void fcml_tf_instruction_SETcc(void) { FCML_I32( "setnbe byte ptr [eax]", 0x0F, 0x97, 0x00 ); FCML_I32( "setnbe al", 0x0F, 0x97, 0xC0 ); FCML_I32( "setc al", 0x0F, 0x92, 0xC0 ); FCML_I32_A( "setb al", 0x0F, 0x92, 0xC0 ); FCML_I64_D( "setnbe al", 0x40, 0x0F, 0x97, 0xC0 ); FCML_A64_A( "seta (%rax)", 0x0f, 0x97, 0x00 ); FCML_A64_A( "seta %al", 0x0f, 0x97, 0xc0 ); FCML_A64_A( "setb %al", 0x0f, 0x92, 0xc0 ); } void fcml_tf_instruction_SFENCE(void) { FCML_I3264( "sfence", 0x0f, 0xae, 0xf8 ); FCML_A64( "sfence", 0x0f, 0xae, 0xf8 ); } void fcml_tf_instruction_SGDT(void) { FCML_I32( "sgdt [eax]", 0x0f, 0x01, 0x00 ); FCML_I64( "sgdt [rax]", 0x0f, 0x01, 0x00 ); FCML_A64( "sgdt (%rax)", 0x0f, 0x01, 0x00 ); FCML_A64( "sgdt (%rax)", 0x0f, 0x01, 0x00 ); } void fcml_tf_instruction_SHLD(void) { FCML_I32( "shld dword ptr [eax],eax,0ffh", 0x0f, 0xA4, 0x00, 0xFF ); FCML_I32( "shld word ptr [eax],ax,0ffh", 0x66, 0x0f, 0xA4, 0x00, 0xFF ); FCML_I64( "shld qword ptr [rax],rax,0ffh", 0x48, 0x0f, 0xA4, 0x00, 0xFF ); FCML_I32( "shld dword ptr [eax],eax,cl", 0x0f, 0xA5, 0x00 ); FCML_I32( "shld word ptr [eax],ax,cl", 0x66, 0x0f, 0xA5, 0x00 ); FCML_I64( "shld qword ptr [rax],rax,cl", 0x48, 0x0f, 0xA5, 0x00 ); FCML_A64( "shld $0xff,%eax,(%rax)", 0x0f, 0xa4, 0x00, 0xff ); FCML_A64( "shld $0xff,%ax,(%rax)", 0x66, 0x0f, 0xa4, 0x00, 0xff ); FCML_A64( "shld $0xff,%rax,(%rax)", 0x48, 0x0f, 0xa4, 0x00, 0xff ); FCML_A64( "shld %cl,%eax,(%rax)", 0x0f, 0xa5, 0x00 ); FCML_A64( "shld %cl,%ax,(%rax)", 0x66, 0x0f, 0xa5, 0x00 ); FCML_A64( "shld %cl,%rax,(%rax)", 0x48, 0x0f, 0xa5, 0x00 ); } void fcml_tf_instruction_SHRD(void) { FCML_I32( "shrd dword ptr [eax],eax,0ffh", 0x0f, 0xAC, 0x00, 0xFF ); FCML_I32( "shrd word ptr [eax],ax,0ffh", 0x66, 0x0f, 0xAC, 0x00, 0xFF ); FCML_I64( "shrd qword ptr [rax],rax,0ffh", 0x48, 0x0f, 0xAC, 0x00, 0xFF ); FCML_I32( "shrd dword ptr [eax],eax,cl", 0x0f, 0xAD, 0x00 ); FCML_I32( "shrd word ptr [eax],ax,cl", 0x66, 0x0f, 0xAD, 0x00 ); FCML_I64( "shrd qword ptr [rax],rax,cl", 0x48, 0x0f, 0xAD, 0x00 ); FCML_A64( "shrd $0xff,%eax,(%rax)", 0x0f, 0xac, 0x00, 0xff ); FCML_A64( "shrd $0xff,%ax,(%rax)", 0x66, 0x0f, 0xac, 0x00, 0xff ); FCML_A64( "shrd $0xff,%rax,(%rax)", 0x48, 0x0f, 0xac, 0x00, 0xff ); FCML_A64( "shrd %cl,%eax,(%rax)", 0x0f, 0xad, 0x00 ); FCML_A64( "shrd %cl,%ax,(%rax)", 0x66, 0x0f, 0xad, 0x00 ); FCML_A64( "shrd %cl,%rax,(%rax)", 0x48, 0x0f, 0xad, 0x00 ); } void fcml_tf_instruction_SKINIT(void) { FCML_I32( "skinit eax", 0x0F, 0x01, 0xDE ); FCML_I64( "skinit eax", 0x0F, 0x01, 0xDE ); FCML_A64_A( "skinit", 0x0f, 0x01, 0xde ); FCML_A64_A( "skinit", 0x0f, 0x01, 0xde ); } void fcml_tf_instruction_SLWPCB(void) { FCML_I32_D( "slwpcb eax", 0x8F, 0xE9, 0x60, 0x12, 0xC8 ); FCML_I32( "slwpcb eax", 0x8F, 0xE9, 0x78, 0x12, 0xC8 ); FCML_I64_D( "slwpcb rax", 0x8F, 0xE9, 0xE0, 0x12, 0xC8 ); FCML_I64( "slwpcb rax", 0x8F, 0xE9, 0xF8, 0x12, 0xC8 ); FCML_A32( "slwpcb %eax", 0x8f, 0xe9, 0x78, 0x12, 0xc8 ); FCML_A64( "slwpcb %rax", 0x8f, 0xe9, 0xf8, 0x12, 0xc8 ); } void fcml_tf_instruction_SHUFPD(void) { FCML_I32( "shufpd xmm2,xmmword ptr [ecx+eax],0ffh", 0x66, 0x0F, 0xC6, 0x14, 0x01, 0xFF ); FCML_I64( "shufpd xmm2,xmmword ptr [rcx+rax],0ffh", 0x66, 0x0F, 0xC6, 0x14, 0x01, 0xFF ); FCML_I32( "vshufpd xmm2,xmm6,xmmword ptr [ecx+eax],20h", 0xc5, 0xc9, 0xc6, 0x14, 0x01, 0x20 ); FCML_I64( "vshufpd xmm2,xmm6,xmmword ptr [rcx+rax],20h", 0xc5, 0xc9, 0xc6, 0x14, 0x01, 0x20 ); FCML_A64( "shufpd $0xff,(%rcx,%rax),%xmm2", 0x66, 0x0f, 0xc6, 0x14, 0x01, 0xff ); FCML_A64( "shufpd $0xff,(%rcx,%rax),%xmm2", 0x66, 0x0f, 0xc6, 0x14, 0x01, 0xff ); FCML_A64( "vshufpd $0x20,(%rcx,%rax),%xmm6,%xmm2", 0xc5, 0xc9, 0xc6, 0x14, 0x01, 0x20 ); FCML_A64( "vshufpd $0x20,(%rcx,%rax),%xmm6,%xmm2", 0xc5, 0xc9, 0xc6, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_SHUFPS(void) { FCML_I32( "shufps xmm2,xmmword ptr [ecx+eax],0ffh", 0x0F, 0xC6, 0x14, 0x01, 0xFF ); FCML_I64( "shufps xmm2,xmmword ptr [rcx+rax],0ffh", 0x0F, 0xC6, 0x14, 0x01, 0xFF ); FCML_I32( "vshufps xmm2,xmm6,xmmword ptr [ecx+eax],20h", 0xc5, 0xc8, 0xc6, 0x14, 0x01, 0x20 ); FCML_I64( "vshufps xmm2,xmm6,xmmword ptr [rcx+rax],20h", 0xc5, 0xc8, 0xc6, 0x14, 0x01, 0x20 ); FCML_A64( "shufps $0xff,(%rcx,%rax),%xmm2", 0x0f, 0xc6, 0x14, 0x01, 0xff ); FCML_A64( "shufps $0xff,(%rcx,%rax),%xmm2", 0x0f, 0xc6, 0x14, 0x01, 0xff ); FCML_A64( "vshufps $0x20,(%rcx,%rax),%xmm6,%xmm2", 0xc5, 0xc8, 0xc6, 0x14, 0x01, 0x20 ); FCML_A64( "vshufps $0x20,(%rcx,%rax),%xmm6,%xmm2", 0xc5, 0xc8, 0xc6, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_SIDT(void) { FCML_I32( "sidt [eax]", 0x0f, 0x01, 0x08 ); FCML_I64( "sidt [rax]", 0x0f, 0x01, 0x08 ); FCML_A32( "sidt (%eax)", 0x0f, 0x01, 0x08 ); FCML_A64( "sidt (%rax)", 0x0f, 0x01, 0x08 ); } void fcml_tf_instruction_SLDT(void) { FCML_I32( "sldt word ptr [eax]", 0x0f, 0x00, 0x00 ); FCML_I32_D( "sldt word ptr [eax]", 0x66, 0x0f, 0x00, 0x00 ); FCML_I64_D( "sldt word ptr [rax]", 0x48, 0x0f, 0x00, 0x00 ); FCML_I64( "sldt ax", 0x66, 0x0f, 0x00, 0xC0 ); FCML_I64( "sldt eax", 0x0f, 0x00, 0xC0 ); FCML_I64( "sldt rax", 0x48, 0x0f, 0x00, 0xC0 ); FCML_I32( "sldt ax", 0x66, 0x0f, 0x00, 0xC0 ); FCML_I32( "sldt eax", 0x0f, 0x00, 0xC0 ); FCML_A64( "sldt %ax", 0x66, 0x0f, 0x00, 0xc0 ); FCML_A64( "sldt %eax", 0x0f, 0x00, 0xc0 ); FCML_A64( "sldt %rax", 0x48, 0x0f, 0x00, 0xc0 ); FCML_A64( "sldt (%rax)", 0x0f, 0x00, 0x00 ); } void fcml_tf_instruction_SMSW(void) { FCML_I32( "smsw word ptr [eax]", 0x0f, 0x01, 0x20 ); FCML_I32( "smsw eax", 0x0f, 0x01, 0xE0 ); FCML_I32( "smsw word ptr [eax]", 0x66, 0x0f, 0x01, 0x20 ); FCML_I32( "smsw ax", 0x66, 0x0f, 0x01, 0xE0 ); FCML_I64_D( "smsw word ptr [rax]", 0x48, 0x0f, 0x01, 0x20 ); FCML_I64( "smsw rax", 0x48, 0x0f, 0x01, 0xE0 ); FCML_A64( "smsw (%rax)", 0x0f, 0x01, 0x20 ); FCML_A64( "smsw %eax", 0x0f, 0x01, 0xe0 ); FCML_A64( "smsw %ax", 0x66, 0x0f, 0x01, 0xe0 ); FCML_A64( "smsw %rax", 0x48, 0x0f, 0x01, 0xe0 ); } void fcml_tf_instruction_SQRTPD(void) { FCML_I64( "sqrtpd xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x51, 0x00 ); FCML_I32( "sqrtpd xmm0,xmm1", 0x66, 0x0F, 0x51, 0xC1 ); FCML_I64( "vsqrtpd xmm3,xmm0", 0xc5, 0xf9, 0x51, 0xd8 ); FCML_I32( "vsqrtpd xmm3,xmm0", 0xc5, 0xf9, 0x51, 0xd8 ); FCML_I32( "vsqrtpd ymm0,ymmword ptr [eax]", 0xc5, 0xfd, 0x51, 0x00 ); FCML_A64( "sqrtpd (%rax),%xmm0", 0x66, 0x0f, 0x51, 0x00 ); FCML_A64( "sqrtpd %xmm1,%xmm0", 0x66, 0x0f, 0x51, 0xc1 ); FCML_A64( "vsqrtpd %xmm0,%xmm3", 0xc5, 0xf9, 0x51, 0xd8 ); FCML_A64( "vsqrtpd %xmm0,%xmm3", 0xc5, 0xf9, 0x51, 0xd8 ); FCML_A64( "vsqrtpd (%rax),%ymm0", 0xc5, 0xfd, 0x51, 0x00 ); } void fcml_tf_instruction_SQRTPS(void) { FCML_I64( "sqrtps xmm0,xmmword ptr [rax]", 0x0F, 0x51, 0x00 ); FCML_I32( "sqrtps xmm0,xmm1", 0x0F, 0x51, 0xC1 ); FCML_I64( "vsqrtps xmm3,xmm0", 0xc5, 0xf8, 0x51, 0xd8 ); FCML_I32( "vsqrtps xmm3,xmm0", 0xc5, 0xf8, 0x51, 0xd8 ); FCML_I32( "vsqrtps ymm0,ymmword ptr [eax]", 0xc5, 0xfc, 0x51, 0x00 ); FCML_A64( "sqrtps (%rax),%xmm0", 0x0f, 0x51, 0x00 ); FCML_A64( "sqrtps %xmm1,%xmm0", 0x0f, 0x51, 0xc1 ); FCML_A64( "vsqrtps %xmm0,%xmm3", 0xc5, 0xf8, 0x51, 0xd8 ); FCML_A64( "vsqrtps %xmm0,%xmm3", 0xc5, 0xf8, 0x51, 0xd8 ); FCML_A64( "vsqrtps (%rax),%ymm0", 0xc5, 0xfc, 0x51, 0x00 ); } void fcml_tf_instruction_SQRTSD(void) { FCML_I32( "sqrtsd xmm2,mmword ptr [ecx+eax]", 0xF2, 0x0F, 0x51, 0x14, 0x01 ); FCML_I64( "sqrtsd xmm2,mmword ptr [rcx+rax]", 0xF2, 0x0F, 0x51, 0x14, 0x01 ); FCML_I32( "vsqrtsd xmm2,xmm5,mmword ptr [ecx+eax]", 0xc5, 0xd3, 0x51, 0x14, 0x01 ); FCML_I32( "vsqrtsd xmm2,xmm4,mmword ptr [ecx+eax]", 0xC5, 0xDB, 0x51, 0x14, 0x01 ); FCML_A64( "sqrtsd (%rcx,%rax),%xmm2", 0xf2, 0x0f, 0x51, 0x14, 0x01 ); FCML_A64( "sqrtsd (%rcx,%rax),%xmm2", 0xf2, 0x0f, 0x51, 0x14, 0x01 ); FCML_A64( "vsqrtsd (%rcx,%rax),%xmm5,%xmm2", 0xc5, 0xd3, 0x51, 0x14, 0x01 ); FCML_A64( "vsqrtsd (%rcx,%rax),%xmm4,%xmm2", 0xc5, 0xdb, 0x51, 0x14, 0x01 ); } void fcml_tf_instruction_SQRTSS(void) { FCML_I32( "sqrtss xmm2,dword ptr [ecx+eax]", 0xF3, 0x0F, 0x51, 0x14, 0x01 ); FCML_I64( "sqrtss xmm2,dword ptr [rcx+rax]", 0xF3, 0x0F, 0x51, 0x14, 0x01 ); FCML_I64( "sqrtss xmm0,xmm0", 0xF3, 0x0F, 0x51, 0xC0 ); FCML_I32( "vsqrtss xmm2,xmm5,dword ptr [ecx+eax]", 0xc5, 0xd2, 0x51, 0x14, 0x01 ); FCML_I32( "vsqrtss xmm2,xmm4,dword ptr [ecx+eax]", 0xC5, 0xDA, 0x51, 0x14, 0x01 ); FCML_A64( "sqrtss (%rcx,%rax),%xmm2", 0xf3, 0x0f, 0x51, 0x14, 0x01 ); FCML_A64( "sqrtss (%rcx,%rax),%xmm2", 0xf3, 0x0f, 0x51, 0x14, 0x01 ); FCML_A64( "sqrtss %xmm0,%xmm0", 0xf3, 0x0f, 0x51, 0xc0 ); FCML_A64( "vsqrtss (%rcx,%rax),%xmm5,%xmm2", 0xc5, 0xd2, 0x51, 0x14, 0x01 ); FCML_A64( "vsqrtss (%rcx,%rax),%xmm4,%xmm2", 0xc5, 0xda, 0x51, 0x14, 0x01 ); } void fcml_tf_instruction_STC(void) { FCML_I3264( "stc", 0xF9 ); FCML_A64( "stc", 0xf9 ); } void fcml_tf_instruction_STD(void) { FCML_I3264( "std", 0xFD ); FCML_A64( "std", 0xfd ); } void fcml_tf_instruction_STGI(void) { FCML_I3264( "stgi", 0x0F, 0x01, 0xDC ); FCML_A64( "stgi", 0x0f, 0x01, 0xdc ); } void fcml_tf_instruction_STI(void) { FCML_I3264( "sti", 0xFB ); FCML_A64( "sti", 0xfb ); } void fcml_tf_instruction_STMXCSR(void) { FCML_I32( "stmxcsr dword ptr [eax+00000020h]", 0x0F, 0xAE, 0x58, 0x20 ); FCML_I64( "stmxcsr dword ptr [rax+0000000000000020h]", 0x0F, 0xAE, 0x58, 0x20 ); FCML_I64( "vstmxcsr dword ptr [r8]", 0xC4, 0xC1, 0x78, 0xAE, 0x18 ); FCML_I32( "vstmxcsr dword ptr [eax]", 0xc5, 0xf8, 0xae, 0x18 ); FCML_I32( "vstmxcsr dword ptr [eax]", 0xC5, 0xF8, 0xAE, 0x18 ); FCML_A64( "stmxcsr 0x0000000000000020(%rax)", 0x0f, 0xae, 0x58, 0x20 ); FCML_A64( "stmxcsr 0x0000000000000020(%rax)", 0x0f, 0xae, 0x58, 0x20 ); FCML_A64( "vstmxcsr (%r8)", 0xc4, 0xc1, 0x78, 0xae, 0x18 ); FCML_A64( "vstmxcsr (%rax)", 0xc5, 0xf8, 0xae, 0x18 ); FCML_A64( "vstmxcsr (%rax)", 0xc5, 0xf8, 0xae, 0x18 ); } void fcml_tf_instruction_STOS(void) { FCML_I32( "stos byte ptr [di]", 0x67, 0xAA ); FCML_I32( "rep stos byte ptr [di]", 0xF3, 0x67, 0xAA ); FCML_I32_D( "stos byte ptr [di]", 0x66, 0x67, 0xAA ); FCML_I32( "stos byte ptr [edi]", 0xAA ); FCML_I64_D( "stos byte ptr [rdi]", 0x48, 0xAA ); FCML_I64_D( "stos byte ptr [rdi]", 0x40, 0xAA ); FCML_I64_D( "stos byte ptr [edi]", 0x67, 0x40, 0xAA ); FCML_I64_D( "stos byte ptr [edi]", 0x66, 0x67, 0x40, 0xAA ); FCML_I32( "rep stos dword ptr [di]", 0xF3, 0x67, 0xAB ); FCML_I32( "stos word ptr [di]", 0x66, 0x67, 0xAB ); FCML_I32( "stos dword ptr [edi]", 0xAB ); FCML_I64( "stos qword ptr [rdi]", 0x48, 0xAB ); FCML_I64_D( "stos dword ptr [rdi]", 0x40, 0xAB ); FCML_I64_D( "stos dword ptr [edi]", 0x67, 0x40, 0xAB ); FCML_I64_D( "stos word ptr [edi]", 0x66, 0x67, 0x40, 0xAB ); FCML_I32_A( "stosb", 0xAA ); FCML_I32_A( "stosw", 0x66, 0xAB ); FCML_I32_A( "stosd", 0xAB ); FCML_I64_A( "stosq", 0x48, 0xAB ); FCML_A64( "stosb (%rdi)", 0xaa ); FCML_A64( "stosw (%rdi)", 0x66, 0xab ); FCML_A64( "stosl (%rdi)", 0xab ); FCML_A64( "stosq (%rdi)", 0x48, 0xab ); FCML_A64_A( "stosb", 0xaa ); FCML_A64_A( "stosw", 0x66, 0xab ); FCML_A64_A( "stosl", 0xab ); FCML_A64_A( "stosq", 0x48, 0xab ); } void fcml_tf_instruction_STR(void) { FCML_I32( "str word ptr [eax]", 0x0F, 0x00, 0x08 ); FCML_I64( "str word ptr [rax]", 0x0F, 0x00, 0x08 ); FCML_A32( "str (%eax)", 0x0f, 0x00, 0x08 ); FCML_A64( "str (%rax)", 0x0f, 0x00, 0x08 ); } void fcml_tf_instruction_SUB(void) { FCML_I32_M( "sub al,42h", 2, FCML_MI( 0x80, 0xe8, 0x42 ), FCML_MI( 0x2c, 0x42 ) ); FCML_I32_A_FAILED( "lock sub al,42h", 0xF0, 0x80, 0xe8, 0x42 ); FCML_I32_M( "sub ax,8042h", 2, FCML_MI( 0x66, 0x81, 0xe8, 0x42, 0x80 ), FCML_MI( 0x66, 0x2d, 0x42, 0x80 ) ); FCML_I32_M( "sub eax,42806521h", 2, FCML_MI( 0x81, 0xe8, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x2d, 0x21, 0x65, 0x80, 0x42 ) ); FCML_I64_M( "sub eax,42806521h", 2, FCML_MI( 0x81, 0xe8, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x2d, 0x21, 0x65, 0x80, 0x42 ) ); FCML_I64_M( "sub ax,6521h", 2, FCML_MI( 0x66, 0x81, 0xe8, 0x21, 0x65 ), FCML_MI( 0x66, 0x2d, 0x21, 0x65 ) ); FCML_I64_M( "sub rax,0000000042806521h", 2, FCML_MI( 0x48, 0x81, 0xe8, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x48, 0x2d, 0x21, 0x65, 0x80, 0x42 ) ); FCML_I64_M( "sub rax,0ffffffffffffffffh", 3, FCML_MI( 0x48, 0x83, 0xe8, 0xff ), FCML_MI( 0x48, 0x81, 0xe8, 0xff, 0xff, 0xff, 0xff ), FCML_MI( 0x48, 0x2d, 0xff, 0xff, 0xff, 0xff ) ); FCML_I32( "lock sub byte ptr [04030201h],0ffh", 0xF0, 0x80, 0x2D, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "xacquire lock sub byte ptr [04030201h],0ffh", 0xF2, 0xF0, 0x80, 0x2D, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "xrelease lock sub byte ptr [04030201h],0ffh", 0xF3, 0xF0, 0x80, 0x2D, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "sub byte ptr [esi+04030201h],0ffh", 0x80, 0xae, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_I32( "sub byte ptr [ecx+eax+00000002h],03h", 0x80, 0x6C, 0x01, 0x02, 0x03 ); FCML_I32( "sub ebp,04030201h", 0x81, 0xED, 0x01, 0x02, 0x03, 0x04 ); FCML_I32( "sub bp,0201h", 0x66, 0x81, 0xED, 0x01, 0x02 ); FCML_I64_D( "sub bp,0201h", 0x67, 0x66, 0x40, 0x81, 0xED, 0x01, 0x02 ); /* 32 bit mode doesn't not allow REX.*/ FCML_I64( "sub rbp,0000000004030201h", 0x48, 0x81, 0xed, 0x01, 0x02, 0x03, 0x04 ); FCML_I64_M( "sub rbp,0ffffffffffffffffh", 2, FCML_MI( 0x48, 0x83, 0xed, 0xff ), FCML_MI( 0x48, 0x81, 0xed, 0xff, 0xff, 0xff, 0xff ) ); FCML_I32_M( "lock sub dword ptr [esi],00000001h", 2, FCML_MI( 0xF0, 0x83, 0x2e, 0x01 ), FCML_MI( 0xF0, 0x81, 0x2e, 0x01, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "xacquire lock sub dword ptr [esi],00000001h", 2, FCML_MI( 0xF2, 0xF0, 0x83, 0x2e, 0x01 ), FCML_MI( 0xF2, 0xF0, 0x81, 0x2e, 0x01, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "xrelease lock sub dword ptr [esi],00000001h", 2, FCML_MI( 0xF3, 0xF0, 0x83, 0x2e, 0x01 ), FCML_MI( 0xF3, 0xF0, 0x81, 0x2e, 0x01, 0x00, 0x00, 0x00 ) ); FCML_I32_M( "sub word ptr [esi],0001h", 2, FCML_MI( 0x66, 0x83, 0x2e, 0x01 ), FCML_MI( 0x66, 0x81, 0x2e, 0x01, 0x00 ) ); FCML_I32_M( "sub dword ptr [0201h],00000003h", 2, FCML_MI( 0x67, 0x83, 0x2e, 0x01, 0x02, 0x03 ), FCML_MI( 0x67, 0x81, 0x2e, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00 ) ); FCML_I64_M( "lock sub qword ptr [rdi+0000000004030201h],0000000000000005h", 2, FCML_MI( 0xF0, 0x48, 0x83, 0xaf, 0x01, 0x02, 0x03, 0x04, 0x05 ), FCML_MI( 0xF0, 0x48, 0x81, 0xaf, 0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00 ) ); FCML_I64_M( "xacquire lock sub qword ptr [rdi+0000000004030201h],0000000000000005h", 2, FCML_MI( 0xF2, 0xF0, 0x48, 0x83, 0xaf, 0x01, 0x02, 0x03, 0x04, 0x05 ), FCML_MI( 0xF2, 0xF0, 0x48, 0x81, 0xaf, 0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00 ) ); FCML_I64_M( "xrelease lock sub qword ptr [rdi+0000000004030201h],0000000000000005h", 2, FCML_MI( 0xF3, 0xF0, 0x48, 0x83, 0xaf, 0x01, 0x02, 0x03, 0x04, 0x05 ), FCML_MI( 0xF3, 0xF0, 0x48, 0x81, 0xaf, 0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00 ) ); FCML_I64_M( "sub qword ptr [rdi+0000000004030201h],0ffffffffffffffffh", 2, FCML_MI( 0x48, 0x83, 0xaf, 0x01, 0x02, 0x03, 0x04, 0xff ), FCML_MI( 0x48, 0x81, 0xaf, 0x01, 0x02, 0x03, 0x04, 0xff, 0xff, 0xff, 0xff ) ); FCML_I32( "lock sub byte ptr [ebp+04030201h],ah", 0xF0, 0x28, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "xacquire lock sub byte ptr [ebp+04030201h],ah", 0xF2, 0xF0, 0x28, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "xrelease lock sub byte ptr [ebp+04030201h],ah", 0xF3, 0xF0, 0x28, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I64( "sub byte ptr [rbp+0000000004030201h],spl", 0x40, 0x28, 0xa5, 0x01, 0x02, 0x03, 0x04 ); FCML_I64( "sub byte ptr [rbp+0000000000000001h],spl", 0x40, 0x28, 0x65, 0x01 ); FCML_I32( "lock sub dword ptr [ebp+04030201h],esp", 0xF0, 0x29, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "xacquire lock sub dword ptr [ebp+04030201h],esp", 0xF2, 0xF0, 0x29, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "xrelease lock sub dword ptr [ebp+04030201h],esp", 0xF3, 0xF0, 0x29, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "sub word ptr [di+0201h],sp", 0x66, 0x67, 0x29, 0xa5, 0x01, 0x02 ); FCML_I32( "sub dword ptr [di+0201h],esp", 0x67, 0x29, 0xa5, 0x01, 0x02 ); FCML_I64( "sub qword ptr [r9+rcx*4+0000000000000001h],r12", 0x4D, 0x29, 0x64, 0x89, 0x01 ); FCML_I64( "sub dword ptr [rcx+rax*4+0000000000000001h],esp", 0x29, 0x64, 0x81, 0x01 ); FCML_I32_A_FAILED( "lock sub ah,byte ptr [ebp+04030201h]", 0xF0, 0x2A, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "sub ah,byte ptr [ebp+04030201h]", 0x2A, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I64( "sub spl,byte ptr [rbp+0000000004030201h]", 0x40, 0x2a, 0xa5, 0x01, 0x02, 0x03, 0x04 ); FCML_I64( "sub spl,byte ptr [rbp+0000000000000001h]", 0x40, 0x2a, 0x65, 0x01 ); FCML_I32_A_FAILED( "lock sub esp,dword ptr [ebp+04030201h]", 0xF0, 0x2b, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "sub esp,dword ptr [ebp+04030201h]", 0x2b, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_I32( "sub sp,word ptr [di+0201h]", 0x66, 0x67, 0x2b, 0xa5, 0x01, 0x02 ); FCML_I32( "sub esp,dword ptr [di+0201h]", 0x67, 0x2b, 0xa5, 0x01, 0x02 ); FCML_I64( "sub r12,qword ptr [r9+rcx*4+0000000000000001h]", 0x4D, 0x2b, 0x64, 0x89, 0x01 ); FCML_A32( "sub 0x0201(%di),%sp", 0x66, 0x67, 0x2b, 0xa5, 0x01, 0x02 ); FCML_A32( "sub 0x04030201(%ebp),%esp", 0x2b, 0xa5, 0x01, 0x02, 0x03, 04 ); FCML_A64_M( "sub $0x42806521,%eax", 2, FCML_MI( 0x81, 0xe8, 0x21, 0x65, 0x80, 0x42 ), FCML_MI( 0x2d, 0x21, 0x65, 0x80, 0x42 ) ); FCML_A64( "lock subb $0xff,0x04030201(%rip)", 0xf0, 0x80, 0x2d, 0x01, 0x02, 0x03, 0x04, 0xff ); FCML_A64( "sub $0x04030201,%ebp", 0x81, 0xed, 0x01, 0x02, 0x03, 0x04 ); FCML_A64_M( "lock subq $0x0000000000000005,0x0000000004030201(%rdi)", 2, FCML_MI( 0xf0, 0x48, 0x83, 0xaf, 0x01, 0x02, 0x03, 0x04, 0x05 ), FCML_MI( 0xf0, 0x48, 0x81, 0xaf, 0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x00, 0x00 ) ); FCML_A64( "xrelease lock sub %ah,0x0000000004030201(%rbp)", 0xf3, 0xf0, 0x28, 0xa5, 0x01, 0x02, 0x03, 0x04 ); } void fcml_tf_instruction_SUBPD(void) { FCML_I32( "subpd xmm0,xmmword ptr [eax]", 0x66, 0x0F, 0x5C, 0x00 ); FCML_I32( "subpd xmm0,xmm0", 0x66, 0x0F, 0x5C, 0xC0 ); FCML_I64( "subpd xmm0,xmmword ptr [rax]", 0x66, 0x0F, 0x5C, 0x00 ); FCML_I32( "vsubpd xmm0,xmm6,xmmword ptr [eax]", 0xc5, 0xc9, 0x5c, 0x00 ); FCML_I32( "vsubpd xmm0,xmm6,xmm0", 0xc5, 0xc9, 0x5c, 0xc0 ); FCML_I64( "vsubpd xmm0,xmm6,xmmword ptr [rax]", 0xc5, 0xc9, 0x5c, 0x00 ); FCML_A64( "subpd (%rax),%xmm0", 0x66, 0x0f, 0x5c, 0x00 ); FCML_A64( "subpd %xmm0,%xmm0", 0x66, 0x0f, 0x5c, 0xc0 ); FCML_A64( "subpd (%rax),%xmm0", 0x66, 0x0f, 0x5c, 0x00 ); FCML_A64( "vsubpd (%rax),%xmm6,%xmm0", 0xc5, 0xc9, 0x5c, 0x00 ); FCML_A64( "vsubpd %xmm0,%xmm6,%xmm0", 0xc5, 0xc9, 0x5c, 0xc0 ); FCML_A64( "vsubpd (%rax),%xmm6,%xmm0", 0xc5, 0xc9, 0x5c, 0x00 ); } void fcml_tf_instruction_SUBPS(void) { FCML_I32( "subps xmm0,xmmword ptr [eax]", 0x0F, 0x5C, 0x00 ); FCML_I32( "subps xmm0,xmm0", 0x0F, 0x5C, 0xC0 ); FCML_I64( "subps xmm0,xmmword ptr [rax]", 0x0F, 0x5C, 0x00 ); FCML_I32( "vsubps xmm0,xmm6,xmmword ptr [eax]", 0xc5, 0xc8, 0x5c, 0x00 ); FCML_I32( "vsubps xmm0,xmm6,xmm0", 0xc5, 0xc8, 0x5c, 0xc0 ); FCML_I64( "vsubps xmm0,xmm6,xmmword ptr [rax]", 0xc5, 0xc8, 0x5c, 0x00 ); FCML_A64( "subps (%rax),%xmm0", 0x0f, 0x5c, 0x00 ); FCML_A64( "subps %xmm0,%xmm0", 0x0f, 0x5c, 0xc0 ); FCML_A64( "subps (%rax),%xmm0", 0x0f, 0x5c, 0x00 ); FCML_A64( "vsubps (%rax),%xmm6,%xmm0", 0xc5, 0xc8, 0x5c, 0x00 ); FCML_A64( "vsubps %xmm0,%xmm6,%xmm0", 0xc5, 0xc8, 0x5c, 0xc0 ); FCML_A64( "vsubps (%rax),%xmm6,%xmm0", 0xc5, 0xc8, 0x5c, 0x00 ); } void fcml_tf_instruction_SUBSD(void) { FCML_I32( "subsd xmm2,mmword ptr [ecx+eax]", 0xF2, 0x0F, 0x5C, 0x14, 0x01 ); FCML_I64( "subsd xmm2,mmword ptr [rcx+rax]", 0xF2, 0x0F, 0x5C, 0x14, 0x01 ); FCML_I32( "vsubsd xmm2,xmm5,mmword ptr [ecx+eax]", 0xc5, 0xd3, 0x5c, 0x14, 0x01 ); FCML_I32( "vsubsd xmm2,xmm4,mmword ptr [ecx+eax]", 0xC5, 0xDB, 0x5C, 0x14, 0x01 ); FCML_A64( "subsd (%rcx,%rax),%xmm2", 0xf2, 0x0f, 0x5c, 0x14, 0x01 ); FCML_A64( "subsd (%rcx,%rax),%xmm2", 0xf2, 0x0f, 0x5c, 0x14, 0x01 ); FCML_A64( "vsubsd (%rcx,%rax),%xmm5,%xmm2", 0xc5, 0xd3, 0x5c, 0x14, 0x01 ); FCML_A64( "vsubsd (%rcx,%rax),%xmm4,%xmm2", 0xc5, 0xdb, 0x5c, 0x14, 0x01 ); } void fcml_tf_instruction_SUBSS(void) { FCML_I32( "subss xmm2,dword ptr [ecx+eax]", 0xF3, 0x0F, 0x5C, 0x14, 0x01 ); FCML_I64( "subss xmm2,dword ptr [rcx+rax]", 0xF3, 0x0F, 0x5C, 0x14, 0x01 ); FCML_I32( "vsubss xmm2,xmm5,dword ptr [ecx+eax]", 0xc5, 0xd2, 0x5c, 0x14, 0x01 ); FCML_I32( "vsubss xmm2,xmm4,dword ptr [ecx+eax]", 0xC5, 0xDA, 0x5C, 0x14, 0x01 ); FCML_A64( "subss (%rcx,%rax),%xmm2", 0xf3, 0x0f, 0x5c, 0x14, 0x01 ); FCML_A64( "subss (%rcx,%rax),%xmm2", 0xf3, 0x0f, 0x5c, 0x14, 0x01 ); FCML_A64( "vsubss (%rcx,%rax),%xmm5,%xmm2", 0xc5, 0xd2, 0x5c, 0x14, 0x01 ); FCML_A64( "vsubss (%rcx,%rax),%xmm4,%xmm2", 0xc5, 0xda, 0x5c, 0x14, 0x01 ); } void fcml_tf_instruction_SWAPGS(void) { FCML_I64( "swapgs", 0x0F, 0x01, 0xF8 ); FCML_I32_FAILED( "swapgs", 0x0F, 0x01, 0xF8 ); FCML_A64( "swapgs", 0x0f, 0x01, 0xf8 ); } void fcml_tf_instruction_SYSCALL(void) { FCML_I64( "syscall", 0x0F, 0x05 ); FCML_I32_FAILED( "syscall", 0x0F, 0x05 ); FCML_A64( "syscall", 0x0f, 0x05 ); } void fcml_tf_instruction_SYSENTER(void) { FCML_I3264( "sysenter", 0x0F, 0x34 ); FCML_A64( "sysenter", 0x0f, 0x34 ); } void fcml_tf_instruction_SYSEXIT(void) { FCML_I32( "sysexit", 0x0F, 0x35 ); FCML_I64( "sysexit", 0x0F, 0x35 ); FCML_I64_D( "sysexit", 0x48, 0x0F, 0x35 ); FCML_A32( "sysexit", 0x0f, 0x35 ); FCML_A64( "sysexit", 0x0f, 0x35 ); } void fcml_tf_instruction_SYSRET(void) { FCML_I32_FAILED( "sysret", 0x0F, 0x07 ); FCML_I64( "sysret", 0x0F, 0x07 ); FCML_I64_D( "sysret", 0x48, 0x0F, 0x07 ); FCML_A64( "sysret", 0x0f, 0x07 ); } void fcml_tf_instruction_SHLX_SHRX_SARX(void) { FCML_I32( "shlx eax,dword ptr [eax],edi", 0xC4, 0xE2, 0x41, 0xF7, 0x00 ); FCML_I32( "shlx eax,eax,edi", 0xC4, 0xE2, 0x41, 0xF7, 0xC0 ); FCML_I64( "shlx rax,qword ptr [rax],rdi", 0xC4, 0xE2, 0xC1, 0xF7, 0x00 ); FCML_I64( "shlx rax,rax,rdi", 0xC4, 0xE2, 0xC1, 0xF7, 0xC0 ); FCML_I32( "shrx eax,dword ptr [eax],edi", 0xC4, 0xE2, 0x43, 0xF7, 0x00 ); FCML_I32( "shrx eax,eax,edi", 0xC4, 0xE2, 0x43, 0xF7, 0xC0 ); FCML_I64( "shrx rax,qword ptr [rax],rdi", 0xC4, 0xE2, 0xC3, 0xF7, 0x00 ); FCML_I64( "shrx rax,rax,rdi", 0xC4, 0xE2, 0xC3, 0xF7, 0xC0 ); FCML_I32( "sarx eax,dword ptr [eax],edi", 0xC4, 0xE2, 0x42, 0xF7, 0x00 ); FCML_I32( "sarx eax,eax,edi", 0xC4, 0xE2, 0x42, 0xF7, 0xC0 ); FCML_I64( "sarx rax,qword ptr [rax],rdi", 0xC4, 0xE2, 0xC2, 0xF7, 0x00 ); FCML_I64( "sarx rax,rax,rdi", 0xC4, 0xE2, 0xC2, 0xF7, 0xC0 ); FCML_A64( "shlx %edi,(%rax),%eax", 0xc4, 0xe2, 0x41, 0xf7, 0x00 ); FCML_A64( "shlx %edi,%eax,%eax", 0xc4, 0xe2, 0x41, 0xf7, 0xc0 ); FCML_A64( "shlx %rdi,(%rax),%rax", 0xc4, 0xe2, 0xc1, 0xf7, 0x00 ); FCML_A64( "shlx %rdi,%rax,%rax", 0xc4, 0xe2, 0xc1, 0xf7, 0xc0 ); FCML_A64( "shrx %edi,(%rax),%eax", 0xc4, 0xe2, 0x43, 0xf7, 0x00 ); FCML_A64( "shrx %edi,%eax,%eax", 0xc4, 0xe2, 0x43, 0xf7, 0xc0 ); FCML_A64( "shrx %rdi,(%rax),%rax", 0xc4, 0xe2, 0xc3, 0xf7, 0x00 ); FCML_A64( "shrx %rdi,%rax,%rax", 0xc4, 0xe2, 0xc3, 0xf7, 0xc0 ); FCML_A64( "sarx %edi,(%rax),%eax", 0xc4, 0xe2, 0x42, 0xf7, 0x00 ); FCML_A64( "sarx %edi,%eax,%eax", 0xc4, 0xe2, 0x42, 0xf7, 0xc0 ); FCML_A64( "sarx %rdi,(%rax),%rax", 0xc4, 0xe2, 0xc2, 0xf7, 0x00 ); FCML_A64( "sarx %rdi,%rax,%rax", 0xc4, 0xe2, 0xc2, 0xf7, 0xc0 ); } void fcml_tf_instruction_STAC(void) { FCML_I3264( "stac", 0x0F, 0x01, 0xCB ); FCML_A3264( "stac", 0x0F, 0x01, 0xCB ); } fcml_stf_test_case fctl_ti_instructions_s[] = { { "fcml_tf_instruction_SAHF", fcml_tf_instruction_SAHF }, { "fcml_tf_instruction_SHL", fcml_tf_instruction_SHL }, { "fcml_tf_instruction_SAL", fcml_tf_instruction_SAL }, { "fcml_tf_instruction_SAR", fcml_tf_instruction_SAR }, { "fcml_tf_instruction_SHR", fcml_tf_instruction_SHR }, { "fcml_tf_instruction_SBB", fcml_tf_instruction_SBB }, { "fcml_tf_instruction_SCAS", fcml_tf_instruction_SCAS }, { "fcml_tf_instruction_SETcc", fcml_tf_instruction_SETcc }, { "fcml_tf_instruction_SFENCE", fcml_tf_instruction_SFENCE }, { "fcml_tf_instruction_SGDT", fcml_tf_instruction_SGDT }, { "fcml_tf_instruction_SHLD", fcml_tf_instruction_SHLD }, { "fcml_tf_instruction_SHRD", fcml_tf_instruction_SHRD }, { "fcml_tf_instruction_SKINIT", fcml_tf_instruction_SKINIT }, { "fcml_tf_instruction_SLWPCB", fcml_tf_instruction_SLWPCB }, { "fcml_tf_instruction_SHUFPD", fcml_tf_instruction_SHUFPD }, { "fcml_tf_instruction_SHUFPS", fcml_tf_instruction_SHUFPS }, { "fcml_tf_instruction_SIDT", fcml_tf_instruction_SIDT }, { "fcml_tf_instruction_SLDT", fcml_tf_instruction_SLDT }, { "fcml_tf_instruction_SMSW", fcml_tf_instruction_SMSW }, { "fcml_tf_instruction_SQRTPD", fcml_tf_instruction_SQRTPD }, { "fcml_tf_instruction_SQRTPS", fcml_tf_instruction_SQRTPS }, { "fcml_tf_instruction_SQRTSD", fcml_tf_instruction_SQRTSD }, { "fcml_tf_instruction_SQRTSS", fcml_tf_instruction_SQRTSS }, { "fcml_tf_instruction_STC", fcml_tf_instruction_STC }, { "fcml_tf_instruction_STD", fcml_tf_instruction_STD }, { "fcml_tf_instruction_STGI", fcml_tf_instruction_STGI }, { "fcml_tf_instruction_STI", fcml_tf_instruction_STI }, { "fcml_tf_instruction_STMXCSR", fcml_tf_instruction_STMXCSR }, { "fcml_tf_instruction_STOS", fcml_tf_instruction_STOS }, { "fcml_tf_instruction_STR", fcml_tf_instruction_STR }, { "fcml_tf_instruction_SUB", fcml_tf_instruction_SUB }, { "fcml_tf_instruction_SUBPD", fcml_tf_instruction_SUBPD }, { "fcml_tf_instruction_SUBPS", fcml_tf_instruction_SUBPS }, { "fcml_tf_instruction_SUBSD", fcml_tf_instruction_SUBSD }, { "fcml_tf_instruction_SUBSS", fcml_tf_instruction_SUBSS }, { "fcml_tf_instruction_SWAPGS", fcml_tf_instruction_SWAPGS }, { "fcml_tf_instruction_SYSCALL", fcml_tf_instruction_SYSCALL }, { "fcml_tf_instruction_SYSENTER", fcml_tf_instruction_SYSENTER }, { "fcml_tf_instruction_SYSEXIT", fcml_tf_instruction_SYSEXIT }, { "fcml_tf_instruction_SYSRET", fcml_tf_instruction_SYSRET }, { "fcml_tf_instruction_SHLX_SHRX_SARX", fcml_tf_instruction_SHLX_SHRX_SARX }, { "fcml_tf_instruction_STAC", fcml_tf_instruction_STAC }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_s = { "suite-fctl_ti_instructions_s", fcml_tf_instructions_s_suite_init, fcml_tf_instructions_s_suite_cleanup, fctl_ti_instructions_s }; fcml-1.1.1/check/public-tests/segment_reg_t.h0000644000175000017500000000174112560745216016055 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 SEGMENT_REG_T_H_ #define SEGMENT_REG_T_H_ #include extern fcml_stf_test_suite fcml_si_segment_reg; #endif /* SEGMENT_REG_T_H_ */ fcml-1.1.1/check/public-tests/instructions_p_t.h0000644000175000017500000000171412560745216016641 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_P_H_ #define INS_P_H_ #include extern fcml_stf_test_suite fctl_si_instructions_p; #endif /* INS_P_H_ */ fcml-1.1.1/check/public-tests/instructions_h_t.h0000644000175000017500000000171412560745216016631 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INS_H_H_ #define INS_H_H_ #include extern fcml_stf_test_suite fctl_si_instructions_h; #endif /* INS_H_H_ */ fcml-1.1.1/check/public-tests/instructions_v_t.c0000644000175000017500000034621312560745216016650 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "instructions_v_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_v_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_v_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_VBROADCASTSS(void) { FCML_I32( "vbroadcastss xmm2,dword ptr [ecx+eax]", 0xc4, 0xe2, 0x79, 0x18, 0x14, 0x01 ); FCML_I32( "vbroadcastss ymm2,dword ptr [ecx+eax]", 0xc4, 0xe2, 0x7d, 0x18, 0x14, 0x01 ); FCML_I32_FAILED( "FAIL", 0xC4, 0xE2, 0x49, 0x19, 0x14, 0x01 ); FCML_I32( "vbroadcastsd ymm2,mmword ptr [ecx+eax]", 0xC4, 0xE2, 0x7D, 0x19, 0x14, 0x01 ); FCML_I32( "vbroadcastf128 ymm2,oword ptr [ecx+eax]", 0xC4, 0xE2, 0x7D, 0x1A, 0x14, 0x01 ); FCML_I32( "vbroadcasti128 ymm2,oword ptr [ecx+eax]", 0xC4, 0xE2, 0x7D, 0x5A, 0x14, 0x01 ); FCML_I32( "vbroadcastss xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x18, 0xC1 ); FCML_I32( "vbroadcastss ymm0,xmm1", 0xC4, 0xE2, 0x7D, 0x18, 0xC1 ); FCML_I32( "vbroadcastsd ymm0,xmm1", 0xC4, 0xE2, 0x7D, 0x19, 0xC1 ); FCML_A64( "vbroadcastss (%rcx,%rax),%xmm2", 0xc4, 0xe2, 0x79, 0x18, 0x14, 0x01 ); FCML_A64( "vbroadcastss (%rcx,%rax),%ymm2", 0xc4, 0xe2, 0x7d, 0x18, 0x14, 0x01 ); FCML_A64( "vbroadcastsd (%rcx,%rax),%ymm2", 0xc4, 0xe2, 0x7d, 0x19, 0x14, 0x01 ); FCML_A64( "vbroadcastf128 (%rcx,%rax),%ymm2", 0xc4, 0xe2, 0x7d, 0x1a, 0x14, 0x01 ); FCML_A64( "vbroadcasti128 (%rcx,%rax),%ymm2", 0xc4, 0xe2, 0x7d, 0x5a, 0x14, 0x01 ); FCML_A64( "vbroadcastss %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x18, 0xc1 ); FCML_A64( "vbroadcastss %xmm1,%ymm0", 0xc4, 0xe2, 0x7d, 0x18, 0xc1 ); FCML_A64( "vbroadcastsd %xmm1,%ymm0", 0xc4, 0xe2, 0x7d, 0x19, 0xc1 ); } void fcml_tf_instruction_VPBROADCASTB(void) { FCML_I32( "vpbroadcastb xmm0,byte ptr [eax]", 0xC4, 0xE2, 0x79, 0x78, 0x00 ); FCML_I32( "vpbroadcastb ymm0,byte ptr [eax]", 0xC4, 0xE2, 0x7D, 0x78, 0x00 ); FCML_I64( "vpbroadcastb xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x78, 0xC1 ); FCML_I64( "vpbroadcastb ymm0,xmm1", 0xC4, 0xE2, 0x7D, 0x78, 0xC1 ); FCML_I32( "vpbroadcastw xmm0,word ptr [eax]", 0xC4, 0xE2, 0x79, 0x79, 0x00 ); FCML_I32( "vpbroadcastw ymm0,word ptr [eax]", 0xC4, 0xE2, 0x7D, 0x79, 0x00 ); FCML_I64( "vpbroadcastw xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x79, 0xC1 ); FCML_I64( "vpbroadcastw ymm0,xmm1", 0xC4, 0xE2, 0x7D, 0x79, 0xC1 ); FCML_I32( "vpbroadcastd xmm0,dword ptr [eax]", 0xC4, 0xE2, 0x79, 0x58, 0x00 ); FCML_I32( "vpbroadcastd ymm0,dword ptr [eax]", 0xC4, 0xE2, 0x7D, 0x58, 0x00 ); FCML_I64( "vpbroadcastd xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x58, 0xC1 ); FCML_I64( "vpbroadcastd ymm0,xmm1", 0xC4, 0xE2, 0x7D, 0x58, 0xC1 ); FCML_I32( "vpbroadcastq xmm0,mmword ptr [eax]", 0xC4, 0xE2, 0x79, 0x59, 0x00 ); FCML_I32( "vpbroadcastq ymm0,mmword ptr [eax]", 0xC4, 0xE2, 0x7D, 0x59, 0x00 ); FCML_I64( "vpbroadcastq xmm0,xmm1", 0xC4, 0xE2, 0x79, 0x59, 0xC1 ); FCML_I64( "vpbroadcastq ymm0,xmm1", 0xC4, 0xE2, 0x7D, 0x59, 0xC1 ); FCML_A64( "vpbroadcastb %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x78, 0xc1 ); FCML_A64( "vpbroadcastb %xmm1,%ymm0", 0xc4, 0xe2, 0x7d, 0x78, 0xc1 ); FCML_A64( "vpbroadcastw %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x79, 0xc1 ); FCML_A64( "vpbroadcastw %xmm1,%ymm0", 0xc4, 0xe2, 0x7d, 0x79, 0xc1 ); FCML_A64( "vpbroadcastd %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x58, 0xc1 ); FCML_A64( "vpbroadcastd %xmm1,%ymm0", 0xc4, 0xe2, 0x7d, 0x58, 0xc1 ); FCML_A64( "vpbroadcastq %xmm1,%xmm0", 0xc4, 0xe2, 0x79, 0x59, 0xc1 ); FCML_A64( "vpbroadcastq %xmm1,%ymm0", 0xc4, 0xe2, 0x7d, 0x59, 0xc1 ); FCML_A64( "vpbroadcastb (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x78, 0x00 ); FCML_A64( "vpbroadcastb (%rax),%ymm0", 0xc4, 0xe2, 0x7d, 0x78, 0x00 ); } void fcml_tf_instruction_VEXTRACTF128(void) { FCML_I32( "vextractf128 xmmword ptr [ecx+eax],ymm2,20h", 0xC4, 0xE3, 0x7D, 0x19, 0x14, 0x01, 0x20 ); FCML_I64( "vextractf128 xmm0,ymm0,20h", 0xC4, 0xE3, 0x7D, 0x19, 0xC0, 0x20 ); FCML_A64( "vextractf128 $0x20,%ymm2,(%rcx,%rax)", 0xc4, 0xe3, 0x7d, 0x19, 0x14, 0x01, 0x20 ); FCML_A64( "vextractf128 $0x20,%ymm0,%xmm0", 0xc4, 0xe3, 0x7d, 0x19, 0xc0, 0x20 ); } void fcml_tf_instruction_VINSERTF128(void) { FCML_I64( "vinsertf128 ymm8,ymm14,xmmword ptr [r8],20h", 0xC4, 0x43, 0x0D, 0x18, 0x00, 0x20 ); FCML_I32( "vinsertf128 ymm0,ymm6,xmmword ptr [eax],20h", 0xC4, 0xE3, 0x4D, 0x18, 0x00, 0x20 ); FCML_I32( "vinsertf128 ymm0,ymm6,xmm0,20h", 0xC4, 0xE3, 0x4D, 0x18, 0xC0, 0x20 ); FCML_A64( "vinsertf128 $0x20,(%r8),%ymm14,%ymm8", 0xc4, 0x43, 0x0d, 0x18, 0x00, 0x20 ); FCML_A64( "vinsertf128 $0x20,%xmm0,%ymm6,%ymm0", 0xc4, 0xe3, 0x4d, 0x18, 0xc0, 0x20 ); } void fcml_tf_instruction_VMASKMOVPS_VMASKMOVPD(void) { FCML_I64( "vmaskmovps xmm3,xmm2,xmmword ptr [rax]", 0xC4, 0xE2, 0x69, 0x2C, 0x18 ); FCML_I32( "vmaskmovps ymm3,ymm2,ymmword ptr [eax]", 0xC4, 0xE2, 0x6D, 0x2C, 0x18 ); FCML_A64( "vmaskmovps (%rax),%xmm2,%xmm3", 0xc4, 0xe2, 0x69, 0x2c, 0x18 ); FCML_I64( "vmaskmovpd xmm3,xmm2,xmmword ptr [rax]", 0xC4, 0xE2, 0x69, 0x2D, 0x18 ); FCML_I32( "vmaskmovpd ymm3,ymm2,ymmword ptr [eax]", 0xC4, 0xE2, 0x6D, 0x2D, 0x18 ); FCML_A64( "vmaskmovpd (%rax),%xmm2,%xmm3", 0xc4, 0xe2, 0x69, 0x2d, 0x18 ); FCML_I64( "vmaskmovps xmmword ptr [rax],xmm2,xmm3", 0xC4, 0xE2, 0x69, 0x2E, 0x18 ); FCML_I32( "vmaskmovps ymmword ptr [eax],ymm2,ymm3", 0xC4, 0xE2, 0x6D, 0x2E, 0x18 ); FCML_A64( "vmaskmovps %xmm3,%xmm2,(%rax)", 0xc4, 0xe2, 0x69, 0x2e, 0x18 ); FCML_I64( "vmaskmovpd xmmword ptr [rax],xmm2,xmm3", 0xC4, 0xE2, 0x69, 0x2F, 0x18 ); FCML_I32( "vmaskmovpd ymmword ptr [eax],ymm2,ymm3", 0xC4, 0xE2, 0x6D, 0x2F, 0x18 ); FCML_A64( "vmaskmovpd %xmm3,%xmm2,(%rax)", 0xc4, 0xe2, 0x69, 0x2f, 0x18 ); } void fcml_tf_instruction_VPMASKMOVD_VPMASKMOVQ(void) { FCML_I64( "vpmaskmovd xmm3,xmm2,xmmword ptr [rax]", 0xC4, 0xE2, 0x69, 0x8C, 0x18 ); FCML_I32( "vpmaskmovd ymm3,ymm2,ymmword ptr [eax]", 0xC4, 0xE2, 0x6D, 0x8C, 0x18 ); FCML_I64( "vpmaskmovq xmm3,xmm2,xmmword ptr [rax]", 0xC4, 0xE2, 0xE9, 0x8C, 0x18 ); FCML_I64( "vpmaskmovq ymm3,ymm2,ymmword ptr [rax]", 0xC4, 0xE2, 0xED, 0x8C, 0x18 ); FCML_A64( "vpmaskmovq (%rax),%xmm2,%xmm3", 0xc4, 0xe2, 0xe9, 0x8c, 0x18 ); FCML_A64( "vpmaskmovq (%rax),%ymm2,%ymm3", 0xc4, 0xe2, 0xed, 0x8c, 0x18 ); FCML_I64( "vpmaskmovd xmmword ptr [rax],xmm2,xmm3", 0xC4, 0xE2, 0x69, 0x8E, 0x18 ); FCML_I32( "vpmaskmovd ymmword ptr [eax],ymm2,ymm3", 0xC4, 0xE2, 0x6D, 0x8E, 0x18 ); FCML_I64( "vpmaskmovq xmmword ptr [rax],xmm2,xmm3", 0xC4, 0xE2, 0xE9, 0x8E, 0x18 ); FCML_I64( "vpmaskmovq ymmword ptr [rax],ymm2,ymm3", 0xC4, 0xE2, 0xED, 0x8E, 0x18 ); FCML_A64( "vpmaskmovq %xmm3,%xmm2,(%rax)", 0xc4, 0xe2, 0xe9, 0x8e, 0x18 ); FCML_A64( "vpmaskmovq %ymm3,%ymm2,(%rax)", 0xc4, 0xe2, 0xed, 0x8e, 0x18 ); } void fcml_tf_instruction_VPBLENDD(void) { FCML_I64( "vpblendd xmm0,xmm0,xmmword ptr [rax],0ffh", 0xC4, 0xE3, 0x79, 0x02, 0x00, 0xFF ); FCML_I32( "vpblendd xmm0,xmm0,xmm1,0ffh", 0xC4, 0xE3, 0x79, 0x02, 0xC1, 0xFF ); FCML_I64( "vpblendd ymm0,ymm0,ymmword ptr [rax],0ffh", 0xC4, 0xE3, 0x7D, 0x02, 0x00, 0xFF ); FCML_I32( "vpblendd ymm0,ymm0,ymm1,0ffh", 0xC4, 0xE3, 0x7D, 0x02, 0xC1, 0xFF ); FCML_A64( "vpblendd $0xff,(%rax),%xmm0,%xmm0", 0xc4, 0xe3, 0x79, 0x02, 0x00, 0xff ); FCML_A64( "vpblendd $0xff,%xmm1,%xmm0,%xmm0", 0xc4, 0xe3, 0x79, 0x02, 0xc1, 0xff ); FCML_A64( "vpblendd $0xff,(%rax),%ymm0,%ymm0", 0xc4, 0xe3, 0x7d, 0x02, 0x00, 0xff ); FCML_A64( "vpblendd $0xff,%ymm1,%ymm0,%ymm0", 0xc4, 0xe3, 0x7d, 0x02, 0xc1, 0xff ); } void fcml_tf_instruction_VCVTPH2PS(void) { FCML_I32( "vcvtph2ps xmm0,mmword ptr [eax]", 0xC4, 0xE2, 0x79, 0x13, 0x00 ); FCML_I32( "vcvtph2ps xmm0,xmm0", 0xC4, 0xE2, 0x79, 0x13, 0xC0 ); FCML_I32( "vcvtph2ps ymm0,xmmword ptr [eax]", 0xC4, 0xE2, 0x7D, 0x13, 0x00 ); FCML_I64( "vcvtph2ps ymm0,xmm0", 0xC4, 0xE2, 0x7D, 0x13, 0xC0 ); FCML_A64( "vcvtph2ps (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x13, 0x00 ); FCML_A64( "vcvtph2ps %xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x13, 0xc0 ); FCML_A64( "vcvtph2ps (%rax),%ymm0", 0xc4, 0xe2, 0x7d, 0x13, 0x00 ); FCML_A64( "vcvtph2ps %xmm0,%ymm0", 0xc4, 0xe2, 0x7d, 0x13, 0xc0 ); } void fcml_tf_instruction_VCVTPS2PH(void) { FCML_I32( "vcvtps2ph mmword ptr [eax],xmm0,0ffh", 0xC4, 0xE3, 0x79, 0x1D, 0x00, 0xFF ); FCML_I32( "vcvtps2ph xmm0,xmm0,0ffh", 0xC4, 0xE3, 0x79, 0x1D, 0xC0, 0xFF ); FCML_I32( "vcvtps2ph xmmword ptr [eax],ymm0,0ffh", 0xC4, 0xE3, 0x7D, 0x1D, 0x00, 0xFF ); FCML_I64( "vcvtps2ph xmm0,ymm0,0ffh", 0xC4, 0xE3, 0x7D, 0x1D, 0xC0, 0xFF ); FCML_A64( "vcvtps2ph $0xff,%xmm0,(%rax)", 0xc4, 0xe3, 0x79, 0x1d, 0x00, 0xff ); FCML_A64( "vcvtps2ph $0xff,%xmm0,%xmm0", 0xc4, 0xe3, 0x79, 0x1d, 0xc0, 0xff ); FCML_A64( "vcvtps2ph $0xff,%ymm0,(%rax)", 0xc4, 0xe3, 0x7d, 0x1d, 0x00, 0xff ); FCML_A64( "vcvtps2ph $0xff,%ymm0,%xmm0", 0xc4, 0xe3, 0x7d, 0x1d, 0xc0, 0xff ); } void fcml_tf_instruction_VERR(void) { FCML_I32( "verr word ptr [eax]", 0x0F, 0x00, 0x20 ); FCML_I32( "verr ax", 0x0F, 0x00, 0xE0 ); FCML_I32( "verr ax", 0x66, 0x0F, 0x00, 0xE0 ); FCML_I64( "verr word ptr [rax]", 0x0F, 0x00, 0x20 ); FCML_I32( "verw word ptr [eax]", 0x0F, 0x00, 0x28 ); FCML_I32( "verw ax", 0x0F, 0x00, 0xE8 ); FCML_I32( "verw ax", 0x66, 0x0F, 0x00, 0xE8 ); FCML_I64( "verw word ptr [rax]", 0x0F, 0x00, 0x28 ); FCML_A64( "verr (%rax)", 0x0f, 0x00, 0x20 ); FCML_A64( "verw (%rax)", 0x0f, 0x00, 0x28 ); } void fcml_tf_instruction_VMLOAD(void) { FCML_I32( "vmload eax", 0x0F, 0x01, 0xDA ); FCML_I32( "vmload ax", 0x67, 0x0F, 0x01, 0xDA ); FCML_I64( "vmload rax", 0x0F, 0x01, 0xDA ); FCML_I64( "vmload eax", 0x67, 0x0F, 0x01, 0xDA ); FCML_A32( "vmload %eax", 0x0F, 0x01, 0xDA ); FCML_A32_A( "vmload", 0x0F, 0x01, 0xDA ); } void fcml_tf_instruction_VMMCALL(void) { FCML_I32( "vmmcall", 0x0F, 0x01, 0xD9 ); FCML_I64( "vmmcall", 0x0F, 0x01, 0xD9 ); FCML_A64( "vmmcall", 0x0f, 0x01, 0xd9 ); } void fcml_tf_instruction_VMRUN(void) { FCML_I32( "vmrun eax", 0x0F, 0x01, 0xD8 ); FCML_I32( "vmrun ax", 0x67, 0x0F, 0x01, 0xD8 ); FCML_I64( "vmrun rax", 0x0F, 0x01, 0xD8 ); FCML_I64( "vmrun eax", 0x67, 0x0F, 0x01, 0xD8 ); FCML_A64( "vmrun %rax", 0x0f, 0x01, 0xd8 ); FCML_A64_A( "vmrun", 0x0f, 0x01, 0xd8 ); } void fcml_tf_instruction_VMSAVE(void) { FCML_I32( "vmsave eax", 0x0F, 0x01, 0xDB ); FCML_I32( "vmsave ax", 0x67, 0x0F, 0x01, 0xDB ); FCML_I64( "vmsave rax", 0x0F, 0x01, 0xDB ); FCML_I64( "vmsave eax", 0x67, 0x0F, 0x01, 0xDB ); FCML_A32( "vmsave %eax", 0x0F, 0x01, 0xDB ); FCML_A32_A( "vmsave", 0x0F, 0x01, 0xDB ); } void fcml_tf_instruction_VPERMILPD(void) { FCML_I32( "vpermilpd xmm0,xmm6,xmmword ptr [eax]", 0xC4, 0xE2, 0x49, 0x0D, 0x00 ); FCML_I32( "vpermilpd xmm0,xmm6,xmm0", 0xC4, 0xE2, 0x49, 0x0D, 0xC0 ); FCML_I64( "vpermilpd ymm0,ymm6,ymmword ptr [rax]", 0xC4, 0xE2, 0x4D, 0x0D, 0x00 ); FCML_I32( "vpermilpd xmm0,xmmword ptr [eax],0ffh", 0xc4, 0xe3, 0x79, 0x05, 0x00, 0xff ); FCML_I32( "vpermilpd xmm0,xmm0,0ffh", 0xc4, 0xe3, 0x79, 0x05, 0xc0, 0xff ); FCML_I64( "vpermilpd ymm0,ymmword ptr [rax],0ffh", 0xc4, 0xe3, 0x7d, 0x05, 0x00, 0xff ); FCML_A64( "vpermilpd (%rax),%xmm6,%xmm0", 0xc4, 0xe2, 0x49, 0x0d, 0x00 ); FCML_A64( "vpermilpd %xmm0,%xmm6,%xmm0", 0xc4, 0xe2, 0x49, 0x0d, 0xc0 ); FCML_A64( "vpermilpd (%rax),%ymm6,%ymm0", 0xc4, 0xe2, 0x4d, 0x0d, 0x00 ); FCML_A64( "vpermilpd $0xff,(%rax),%xmm0", 0xc4, 0xe3, 0x79, 0x05, 0x00, 0xff ); FCML_A64( "vpermilpd $0xff,%xmm0,%xmm0", 0xc4, 0xe3, 0x79, 0x05, 0xc0, 0xff ); FCML_A64( "vpermilpd $0xff,(%rax),%ymm0", 0xc4, 0xe3, 0x7d, 0x05, 0x00, 0xff ); } void fcml_tf_instruction_VPERMILPS(void) { FCML_I32( "vpermilps xmm0,xmm6,xmmword ptr [eax]", 0xC4, 0xE2, 0x49, 0x0C, 0x00 ); FCML_I32( "vpermilps xmm0,xmm6,xmm0", 0xC4, 0xE2, 0x49, 0x0C, 0xC0 ); FCML_I64( "vpermilps ymm0,ymm6,ymmword ptr [rax]", 0xC4, 0xE2, 0x4D, 0x0C, 0x00 ); FCML_I32( "vpermilps xmm0,xmmword ptr [eax],0ffh", 0xc4, 0xe3, 0x79, 0x04, 0x00, 0xff ); FCML_I32( "vpermilps xmm0,xmm0,0ffh", 0xc4, 0xe3, 0x79, 0x04, 0xc0, 0xff ); FCML_I64( "vpermilps ymm0,ymmword ptr [rax],0ffh", 0xc4, 0xe3, 0x7d, 0x04, 0x00, 0xff ); FCML_A64( "vpermilps (%rax),%xmm6,%xmm0", 0xc4, 0xe2, 0x49, 0x0c, 0x00 ); FCML_A64( "vpermilps %xmm0,%xmm6,%xmm0", 0xc4, 0xe2, 0x49, 0x0c, 0xc0 ); FCML_A64( "vpermilps (%rax),%ymm6,%ymm0", 0xc4, 0xe2, 0x4d, 0x0c, 0x00 ); FCML_A64( "vpermilps $0xff,(%rax),%xmm0", 0xc4, 0xe3, 0x79, 0x04, 0x00, 0xff ); FCML_A64( "vpermilps $0xff,%xmm0,%xmm0", 0xc4, 0xe3, 0x79, 0x04, 0xc0, 0xff ); FCML_A64( "vpermilps $0xff,(%rax),%ymm0", 0xc4, 0xe3, 0x7d, 0x04, 0x00, 0xff ); } void fcml_tf_instruction_VPSLLVD(void) { FCML_I32( "vpsllvd xmm0,xmm6,xmmword ptr [eax]", 0xC4, 0xE2, 0x49, 0x47, 0x00 ); FCML_I32( "vpsllvd ymm0,ymm6,ymmword ptr [eax]", 0xC4, 0xE2, 0x4D, 0x47, 0x00 ); FCML_I32( "vpsllvd ymm0,ymm6,ymm0", 0xC4, 0xE2, 0x4D, 0x47, 0xC0 ); FCML_I64( "vpsllvq xmm0,xmm6,xmmword ptr [rax]", 0xC4, 0xE2, 0xC9, 0x47, 0x00 ); FCML_I64( "vpsllvq ymm0,ymm6,ymmword ptr [rax]", 0xC4, 0xE2, 0xCD, 0x47, 0x00 ); FCML_I64( "vpsllvq ymm0,ymm6,ymm0", 0xC4, 0xE2, 0xCD, 0x47, 0xC0 ); FCML_A64( "vpsllvd (%rax),%xmm6,%xmm0", 0xc4, 0xe2, 0x49, 0x47, 0x00 ); FCML_A64( "vpsllvd (%rax),%ymm6,%ymm0", 0xc4, 0xe2, 0x4d, 0x47, 0x00 ); FCML_A64( "vpsllvd %ymm0,%ymm6,%ymm0", 0xc4, 0xe2, 0x4d, 0x47, 0xc0 ); FCML_A64( "vpsllvq (%rax),%xmm6,%xmm0", 0xc4, 0xe2, 0xc9, 0x47, 0x00 ); FCML_A64( "vpsllvq (%rax),%ymm6,%ymm0", 0xc4, 0xe2, 0xcd, 0x47, 0x00 ); FCML_A64( "vpsllvq %ymm0,%ymm6,%ymm0", 0xc4, 0xe2, 0xcd, 0x47, 0xc0 ); } void fcml_tf_instruction_VPSRLVD(void) { FCML_I32( "vpsrlvd xmm0,xmm6,xmmword ptr [eax]", 0xC4, 0xE2, 0x49, 0x45, 0x00 ); FCML_I32( "vpsrlvd ymm0,ymm6,ymmword ptr [eax]", 0xC4, 0xE2, 0x4D, 0x45, 0x00 ); FCML_I32( "vpsrlvd ymm0,ymm6,ymm0", 0xC4, 0xE2, 0x4D, 0x45, 0xC0 ); FCML_I64( "vpsrlvq xmm0,xmm6,xmmword ptr [rax]", 0xC4, 0xE2, 0xC9, 0x45, 0x00 ); FCML_I64( "vpsrlvq ymm0,ymm6,ymmword ptr [rax]", 0xC4, 0xE2, 0xCD, 0x45, 0x00 ); FCML_I64( "vpsrlvq ymm0,ymm6,ymm0", 0xC4, 0xE2, 0xCD, 0x45, 0xC0 ); FCML_A64( "vpsrlvd (%rax),%xmm6,%xmm0", 0xc4, 0xe2, 0x49, 0x45, 0x00 ); FCML_A64( "vpsrlvd (%rax),%ymm6,%ymm0", 0xc4, 0xe2, 0x4d, 0x45, 0x00 ); FCML_A64( "vpsrlvd %ymm0,%ymm6,%ymm0", 0xc4, 0xe2, 0x4d, 0x45, 0xc0 ); FCML_A64( "vpsrlvq (%rax),%xmm6,%xmm0", 0xc4, 0xe2, 0xc9, 0x45, 0x00 ); FCML_A64( "vpsrlvq (%rax),%ymm6,%ymm0", 0xc4, 0xe2, 0xcd, 0x45, 0x00 ); FCML_A64( "vpsrlvq %ymm0,%ymm6,%ymm0", 0xc4, 0xe2, 0xcd, 0x45, 0xc0 ); } void fcml_tf_instruction_VPSRAVD(void) { FCML_I32( "vpsravd xmm0,xmm6,xmmword ptr [eax]", 0xC4, 0xE2, 0x49, 0x46, 0x00 ); FCML_I32( "vpsravd ymm0,ymm6,ymmword ptr [eax]", 0xC4, 0xE2, 0x4D, 0x46, 0x00 ); FCML_I32( "vpsravd ymm0,ymm6,ymm0", 0xC4, 0xE2, 0x4D, 0x46, 0xC0 ); FCML_A64( "vpsravd (%rax),%xmm6,%xmm0", 0xc4, 0xe2, 0x49, 0x46, 0x00 ); FCML_A64( "vpsravd (%rax),%ymm6,%ymm0", 0xc4, 0xe2, 0x4d, 0x46, 0x00 ); FCML_A64( "vpsravd %ymm0,%ymm6,%ymm0", 0xc4, 0xe2, 0x4d, 0x46, 0xc0 ); } void fcml_tf_instruction_VPERMD(void) { FCML_I32( "vpermd ymm0,ymm6,ymmword ptr [eax]", 0xC4, 0xE2, 0x4D, 0x36, 0x00 ); FCML_I32( "vpermd ymm0,ymm6,ymm0", 0xC4, 0xE2, 0x4D, 0x36, 0xC0 ); FCML_I64( "vpermd ymm0,ymm6,ymmword ptr [rax]", 0xC4, 0xE2, 0x4D, 0x36, 0x00 ); FCML_A64( "vpermd (%rax),%ymm6,%ymm0", 0xc4, 0xe2, 0x4d, 0x36, 0x00 ); FCML_A64( "vpermd %ymm0,%ymm6,%ymm0", 0xc4, 0xe2, 0x4d, 0x36, 0xc0 ); FCML_A64( "vpermd (%rax),%ymm6,%ymm0", 0xc4, 0xe2, 0x4d, 0x36, 0x00 ); } void fcml_tf_instruction_VPERMPD(void) { FCML_I64( "vpermpd ymm0,ymmword ptr [rax],0ffh", 0xC4, 0xE3, 0xFD, 0x01, 0x00, 0xFF ); FCML_I64( "vpermpd ymm0,ymm0,0ffh", 0xC4, 0xE3, 0xFD, 0x01, 0xC0, 0xFF ); FCML_A64( "vpermpd $0xff,(%rax),%ymm0", 0xc4, 0xe3, 0xfd, 0x01, 0x00, 0xff ); FCML_A64( "vpermpd $0xff,%ymm0,%ymm0", 0xc4, 0xe3, 0xfd, 0x01, 0xc0, 0xff ); } void fcml_tf_instruction_VPERMQ(void) { FCML_I64( "vpermq ymm0,ymmword ptr [rax],0ffh", 0xC4, 0xE3, 0xFD, 0x00, 0x00, 0xFF ); FCML_I64( "vpermq ymm0,ymm0,0ffh", 0xC4, 0xE3, 0xFD, 0x00, 0xC0, 0xFF ); FCML_A64( "vpermq $0xff,(%rax),%ymm0", 0xc4, 0xe3, 0xfd, 0x00, 0x00, 0xff ); FCML_A64( "vpermq $0xff,%ymm0,%ymm0", 0xc4, 0xe3, 0xfd, 0x00, 0xc0, 0xff ); } void fcml_tf_instruction_VPERMPS(void) { FCML_I32( "vpermps ymm0,ymm6,ymmword ptr [eax]", 0xC4, 0xE2, 0x4D, 0x16, 0x00 ); FCML_I32( "vpermps ymm0,ymm6,ymm0", 0xC4, 0xE2, 0x4D, 0x16, 0xC0 ); FCML_I64( "vpermps ymm0,ymm6,ymmword ptr [rax]", 0xC4, 0xE2, 0x4D, 0x16, 0x00 ); FCML_A64( "vpermps (%rax),%ymm6,%ymm0", 0xc4, 0xe2, 0x4d, 0x16, 0x00 ); FCML_A64( "vpermps %ymm0,%ymm6,%ymm0", 0xc4, 0xe2, 0x4d, 0x16, 0xc0 ); FCML_A64( "vpermps (%rax),%ymm6,%ymm0", 0xc4, 0xe2, 0x4d, 0x16, 0x00 ); } void fcml_tf_instruction_VPERM2F128(void) { FCML_I32( "vperm2f128 ymm0,ymm6,ymmword ptr [eax],0ffh", 0xC4, 0xE3, 0x4D, 0x06, 0x00, 0xFF ); FCML_I32( "vperm2f128 ymm0,ymm6,ymm0,0ffh", 0xC4, 0xE3, 0x4D, 0x06, 0xC0, 0xFF ); FCML_I64( "vperm2f128 ymm0,ymm6,ymmword ptr [rax],0ffh", 0xC4, 0xE3, 0x4D, 0x06, 0x00, 0xFF ); FCML_A64( "vperm2f128 $0xff,(%rax),%ymm6,%ymm0", 0xc4, 0xe3, 0x4d, 0x06, 0x00, 0xff ); FCML_A64( "vperm2f128 $0xff,%ymm0,%ymm6,%ymm0", 0xc4, 0xe3, 0x4d, 0x06, 0xc0, 0xff ); FCML_A64( "vperm2f128 $0xff,(%rax),%ymm6,%ymm0", 0xc4, 0xe3, 0x4d, 0x06, 0x00, 0xff ); } void fcml_tf_instruction_VPERM2I128(void) { FCML_I32( "vperm2i128 ymm0,ymm6,ymmword ptr [eax],0ffh", 0xC4, 0xE3, 0x4D, 0x46, 0x00, 0xFF ); FCML_I32( "vperm2i128 ymm0,ymm6,ymm0,0ffh", 0xC4, 0xE3, 0x4D, 0x46, 0xC0, 0xFF ); FCML_I64( "vperm2i128 ymm0,ymm6,ymmword ptr [rax],0ffh", 0xC4, 0xE3, 0x4D, 0x46, 0x00, 0xFF ); FCML_A64( "vperm2i128 $0xff,(%rax),%ymm6,%ymm0", 0xc4, 0xe3, 0x4d, 0x46, 0x00, 0xff ); FCML_A64( "vperm2i128 $0xff,%ymm0,%ymm6,%ymm0", 0xc4, 0xe3, 0x4d, 0x46, 0xc0, 0xff ); FCML_A64( "vperm2i128 $0xff,(%rax),%ymm6,%ymm0", 0xc4, 0xe3, 0x4d, 0x46, 0x00, 0xff ); } void fcml_tf_instruction_VEXTRACTI128(void) { FCML_I32( "vextracti128 xmmword ptr [eax],ymm0,0ffh", 0xC4, 0xE3, 0x7D, 0x39, 0x00, 0xFF ); FCML_I64( "vextracti128 xmm0,ymm0,0ffh", 0xC4, 0xE3, 0x7D, 0x39, 0xC0, 0xFF ); FCML_A64( "vextracti128 $0xff,%ymm0,(%rax)", 0xc4, 0xe3, 0x7d, 0x39, 0x00, 0xff ); FCML_A64( "vextracti128 $0xff,%ymm0,%xmm0", 0xc4, 0xe3, 0x7d, 0x39, 0xc0, 0xff ); } void fcml_tf_instruction_VINSERTI128(void) { FCML_I32( "vinserti128 ymm0,ymm6,xmmword ptr [eax],0ffh", 0xC4, 0xE3, 0x4D, 0x38, 0x00, 0xFF ); FCML_I32( "vinserti128 ymm0,ymm6,xmm0,0ffh", 0xC4, 0xE3, 0x4D, 0x38, 0xC0, 0xFF ); FCML_I64( "vinserti128 ymm0,ymm6,xmmword ptr [rax],0ffh", 0xC4, 0xE3, 0x4D, 0x38, 0x00, 0xFF ); FCML_A64( "vinserti128 $0xff,(%rax),%ymm6,%ymm0", 0xc4, 0xe3, 0x4d, 0x38, 0x00, 0xff ); FCML_A64( "vinserti128 $0xff,%xmm0,%ymm6,%ymm0", 0xc4, 0xe3, 0x4d, 0x38, 0xc0, 0xff ); FCML_A64( "vinserti128 $0xff,(%rax),%ymm6,%ymm0", 0xc4, 0xe3, 0x4d, 0x38, 0x00, 0xff ); } void fcml_tf_instruction_VTESTPS(void) { FCML_I64( "vtestps xmm1,xmm0", 0xC4, 0xE2, 0x79, 0x0E, 0xC8 ); FCML_I32( "vtestps xmm1,xmm0", 0xC4, 0xE2, 0x79, 0x0E, 0xC8 ); FCML_I32( "vtestps xmm0,xmmword ptr [eax]", 0xC4, 0xE2, 0x79, 0x0E, 0x00 ); FCML_I32( "vtestps ymm0,ymmword ptr [eax]", 0xC4, 0xE2, 0x7D, 0x0E, 0x00 ); FCML_I64( "vtestpd xmm0,xmm0", 0xC4, 0xE2, 0x79, 0x0f, 0xC0 ); FCML_I32( "vtestpd xmm0,xmm0", 0xC4, 0xE2, 0x79, 0x0f, 0xC0 ); FCML_I32( "vtestpd xmm0,xmmword ptr [eax]", 0xC4, 0xE2, 0x79, 0x0F, 0x00 ); FCML_I32( "vtestpd ymm0,ymmword ptr [eax]", 0xC4, 0xE2, 0x7D, 0x0F, 0x00 ); FCML_A64( "vtestps %xmm0,%xmm1", 0xc4, 0xe2, 0x79, 0x0e, 0xc8 ); FCML_A64( "vtestps (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x0e, 0x00 ); FCML_A64( "vtestps (%rax),%ymm0", 0xc4, 0xe2, 0x7d, 0x0e, 0x00 ); FCML_A64( "vtestpd %xmm0,%xmm0", 0xc4, 0xe2, 0x79, 0x0f, 0xc0 ); FCML_A64( "vtestpd (%rax),%xmm0", 0xc4, 0xe2, 0x79, 0x0f, 0x00 ); FCML_A64( "vtestpd (%rax),%ymm0", 0xc4, 0xe2, 0x7d, 0x0f, 0x00 ); } void fcml_tf_instruction_VGATHERDPD(void) { FCML_I64( "vgatherdpd xmm0,dword ptr [rax+xmm5],xmm0", 0xC4, 0xE2, 0xF9, 0x92, 0x04, 0x28 ); FCML_I64_D_FAILED( "vgatherdpd xmm0,dword ptr [rax+ymm5],xmm0", 0xC4, 0xE2, 0xF9, 0x92, 0x04, 0x28 ); FCML_I64_A_FAILED( "vgatherdpd xmm0,dword ptr [rax+ymm5],xmm0", 0xC4, 0xE2, 0xF9, 0x92, 0x04, 0x28 ); FCML_I64( "vgatherdpd ymm0,dword ptr [rax+xmm5],ymm0", 0xC4, 0xE2, 0xFD, 0x92, 0x04, 0x28 ); FCML_I64( "vgatherqpd xmm0,qword ptr [rax+xmm5],xmm0", 0xC4, 0xE2, 0xF9, 0x93, 0x04, 0x28 ); FCML_I64( "vgatherqpd ymm0,qword ptr [rax+ymm5],ymm0", 0xC4, 0xE2, 0xFD, 0x93, 0x04, 0x28 ); FCML_A64( "vgatherdpd %xmm0,(%rax,%xmm5),%xmm0", 0xc4, 0xe2, 0xf9, 0x92, 0x04, 0x28 ); FCML_A64( "vgatherdpd %xmm0,(%rax,%xmm5),%xmm0", 0xc4, 0xe2, 0xf9, 0x92, 0x04, 0x28 ); FCML_A64( "vgatherdpd %xmm0,(%rax,%xmm5),%xmm0", 0xc4, 0xe2, 0xf9, 0x92, 0x04, 0x28 ); FCML_A64( "vgatherdpd %ymm0,(%rax,%xmm5),%ymm0", 0xc4, 0xe2, 0xfd, 0x92, 0x04, 0x28 ); FCML_A64( "vgatherqpd %xmm0,(%rax,%xmm5),%xmm0", 0xc4, 0xe2, 0xf9, 0x93, 0x04, 0x28 ); FCML_A64( "vgatherqpd %ymm0,(%rax,%ymm5),%ymm0", 0xc4, 0xe2, 0xfd, 0x93, 0x04, 0x28 ); } void fcml_tf_instruction_VGATHERDPS(void) { FCML_I32( "vgatherdps xmm0,dword ptr [eax+xmm5],xmm0", 0xC4, 0xE2, 0x79, 0x92, 0x04, 0x28 ); FCML_I32( "vgatherdps ymm0,dword ptr [eax+ymm5],ymm0", 0xC4, 0xE2, 0x7D, 0x92, 0x04, 0x28 ); FCML_I32( "vgatherqps xmm0,qword ptr [eax+xmm5],xmm0", 0xC4, 0xE2, 0x79, 0x93, 0x04, 0x28 ); FCML_I32( "vgatherqps xmm0,qword ptr [eax+ymm5],xmm0", 0xC4, 0xE2, 0x7D, 0x93, 0x04, 0x28 ); FCML_A64( "vgatherdps %xmm0,(%rax,%xmm5),%xmm0", 0xc4, 0xe2, 0x79, 0x92, 0x04, 0x28 ); FCML_A64( "vgatherdps %ymm0,(%rax,%ymm5),%ymm0", 0xc4, 0xe2, 0x7d, 0x92, 0x04, 0x28 ); FCML_A64( "vgatherqps %xmm0,(%rax,%xmm5),%xmm0", 0xc4, 0xe2, 0x79, 0x93, 0x04, 0x28 ); FCML_A64( "vgatherqps %xmm0,(%rax,%ymm5),%xmm0", 0xc4, 0xe2, 0x7d, 0x93, 0x04, 0x28 ); } void fcml_tf_instruction_VPGATHERDD(void) { FCML_I32( "vpgatherdd xmm0,dword ptr [eax+xmm5],xmm0", 0xC4, 0xE2, 0x79, 0x90, 0x04, 0x28 ); FCML_I32( "vpgatherdd ymm0,dword ptr [eax+ymm5],ymm0", 0xC4, 0xE2, 0x7D, 0x90, 0x04, 0x28 ); FCML_I32( "vpgatherqd xmm0,qword ptr [eax+xmm5],xmm0", 0xC4, 0xE2, 0x79, 0x91, 0x04, 0x28 ); FCML_I32( "vpgatherqd xmm0,qword ptr [eax+ymm5],xmm0", 0xC4, 0xE2, 0x7D, 0x91, 0x04, 0x28 ); FCML_A64( "vpgatherdd %xmm0,(%rax,%xmm5),%xmm0", 0xc4, 0xe2, 0x79, 0x90, 0x04, 0x28 ); FCML_A64( "vpgatherdd %ymm0,(%rax,%ymm5),%ymm0", 0xc4, 0xe2, 0x7d, 0x90, 0x04, 0x28 ); FCML_A64( "vpgatherqd %xmm0,(%rax,%xmm5),%xmm0", 0xc4, 0xe2, 0x79, 0x91, 0x04, 0x28 ); FCML_A64( "vpgatherqd %xmm0,(%rax,%ymm5),%xmm0", 0xc4, 0xe2, 0x7d, 0x91, 0x04, 0x28 ); } void fcml_tf_instruction_VPGATHERDQ(void) { FCML_I64( "vpgatherdq xmm0,dword ptr [rax+xmm5],xmm0", 0xC4, 0xE2, 0xF9, 0x90, 0x04, 0x28 ); FCML_I64( "vpgatherdq ymm0,dword ptr [rax+xmm5],ymm0", 0xC4, 0xE2, 0xFD, 0x90, 0x04, 0x28 ); FCML_I64( "vpgatherqq xmm0,qword ptr [rax+xmm5],xmm0", 0xC4, 0xE2, 0xF9, 0x91, 0x04, 0x28 ); FCML_I64( "vpgatherqq ymm0,qword ptr [rax+ymm5],ymm0", 0xC4, 0xE2, 0xFD, 0x91, 0x04, 0x28 ); FCML_A64( "vpgatherdq %xmm0,(%rax,%xmm5),%xmm0", 0xc4, 0xe2, 0xf9, 0x90, 0x04, 0x28 ); FCML_A64( "vpgatherdq %ymm0,(%rax,%xmm5),%ymm0", 0xc4, 0xe2, 0xfd, 0x90, 0x04, 0x28 ); FCML_A64( "vpgatherqq %xmm0,(%rax,%xmm5),%xmm0", 0xc4, 0xe2, 0xf9, 0x91, 0x04, 0x28 ); FCML_A64( "vpgatherqq %ymm0,(%rax,%ymm5),%ymm0", 0xc4, 0xe2, 0xfd, 0x91, 0x04, 0x28 ); } void fcml_tf_instruction_VZEROALL(void) { FCML_I64( "vzeroall", 0xc5, 0xfc, 0x77 ); FCML_I32( "vzeroall", 0xc5, 0xfc, 0x77 ); FCML_A32( "vzeroall", 0xc5, 0xfc, 0x77 ); FCML_A64( "vzeroall", 0xc5, 0xfc, 0x77 ); } void fcml_tf_instruction_VZEROUPPER(void) { FCML_I64( "vzeroupper", 0xc5, 0xf8, 0x77 ); FCML_I32( "vzeroupper", 0xc5, 0xf8, 0x77 ); FCML_A32( "vzeroupper", 0xc5, 0xf8, 0x77 ); FCML_A64( "vzeroupper", 0xc5, 0xf8, 0x77 ); } void fcml_tf_instruction_VFMADDPD(void) { FCML_I64( "vfmadd132pd xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0x98, 0x00 ); FCML_I64( "vfmadd132pd ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0xE5, 0x98, 0x00 ); FCML_I64( "vfmadd132pd ymm0,ymm3,ymm0", 0xC4, 0xE2, 0xE5, 0x98, 0xC0 ); FCML_I64( "vfmadd213pd xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xA8, 0x00 ); FCML_I64( "vfmadd213pd ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0xE5, 0xA8, 0x00 ); FCML_I64( "vfmadd213pd ymm0,ymm3,ymm0", 0xC4, 0xE2, 0xE5, 0xA8, 0xC0 ); FCML_I64( "vfmadd231pd xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xB8, 0x00 ); FCML_I64( "vfmadd231pd ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0xE5, 0xB8, 0x00 ); FCML_I64( "vfmadd231pd ymm0,ymm3,ymm0", 0xC4, 0xE2, 0xE5, 0xB8, 0xC0 ); FCML_I32( "vfmaddpd xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0xC4, 0xE3, 0x51, 0x69, 0x14, 0x01, 0x20 ); FCML_I64( "vfmaddpd ymm2,ymm5,ymmword ptr [rcx+rax],ymm2", 0xC4, 0xE3, 0x55, 0x69, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmaddpd ymm0,ymm5,ymm0,ymm2", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x69, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x69, 0xc0, 0x20 ) ); FCML_I64( "vfmaddpd xmm2,xmm5,xmm2,xmmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x69, 0x14, 0x01, 0x20 ); FCML_I64( "vfmaddpd ymm2,ymm5,ymm2,ymmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD5, 0x69, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmaddpd ymm0,ymm5,ymm2,ymm0", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x69, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x69, 0xc2, 0x00 ) ); FCML_A64( "vfmadd132pd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0x98, 0x00 ); FCML_A64( "vfmadd132pd (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0x98, 0x00 ); FCML_A64( "vfmadd132pd %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0x98, 0xc0 ); FCML_A64( "vfmadd213pd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xa8, 0x00 ); FCML_A64( "vfmadd213pd (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xa8, 0x00 ); FCML_A64( "vfmadd213pd %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xa8, 0xc0 ); FCML_A64( "vfmadd231pd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xb8, 0x00 ); FCML_A64( "vfmadd231pd (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xb8, 0x00 ); FCML_A64( "vfmadd231pd %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xb8, 0xc0 ); FCML_A64( "vfmaddpd %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x69, 0x14, 0x01, 0x20 ); FCML_A64( "vfmaddpd %ymm2,(%rcx,%rax),%ymm5,%ymm2", 0xc4, 0xe3, 0x55, 0x69, 0x14, 0x01, 0x20 ); FCML_A64( "vfmaddpd (%rcx,%rax),%xmm2,%xmm5,%xmm2", 0xc4, 0xe3, 0xd1, 0x69, 0x14, 0x01, 0x20 ); FCML_A64( "vfmaddpd (%rcx,%rax),%ymm2,%ymm5,%ymm2", 0xc4, 0xe3, 0xd5, 0x69, 0x14, 0x01, 0x20 ); FCML_A64_M( "vfmaddpd %ymm2,%ymm0,%ymm5,%ymm0", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x69, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x69, 0xc0, 0x20 ) ); FCML_A64_M( "vfmaddpd %ymm2,%ymm0,%ymm5,%ymm0", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x69, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x69, 0xc0, 0x20 ) ); FCML_A64_M( "vfmaddpd %ymm0,%ymm2,%ymm5,%ymm0", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x69, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x69, 0xc2, 0x00 ) ); FCML_A64_M( "vfmaddpd %ymm0,%ymm2,%ymm5,%ymm0", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x69, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x69, 0xc2, 0x00 ) ); } void fcml_tf_instruction_VFMADDPS(void) { FCML_I32( "vfmadd132ps xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0x98, 0x00 ); FCML_I64( "vfmadd132ps ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0x65, 0x98, 0x00 ); FCML_I32( "vfmadd132ps ymm0,ymm3,ymm0", 0xC4, 0xE2, 0x65, 0x98, 0xC0 ); FCML_I32( "vfmadd213ps xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0xA8, 0x00 ); FCML_I64( "vfmadd213ps ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0x65, 0xA8, 0x00 ); FCML_I32( "vfmadd213ps ymm0,ymm3,ymm0", 0xC4, 0xE2, 0x65, 0xA8, 0xC0 ); FCML_I32( "vfmadd231ps xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0xB8, 0x00 ); FCML_I64( "vfmadd231ps ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0x65, 0xB8, 0x00 ); FCML_I32( "vfmadd231ps ymm0,ymm3,ymm0", 0xC4, 0xE2, 0x65, 0xB8, 0xC0 ); FCML_I64( "vfmaddps xmm2,xmm5,xmmword ptr [rcx+rax],xmm2", 0xC4, 0xE3, 0x51, 0x68, 0x14, 0x01, 0x20 ); FCML_I64( "vfmaddps ymm2,ymm5,ymmword ptr [rcx+rax],ymm2", 0xC4, 0xE3, 0x55, 0x68, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmaddps ymm0,ymm5,ymm0,ymm2", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x68, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x68, 0xc0, 0x20 ) ); FCML_I64( "vfmaddps xmm2,xmm5,xmm2,xmmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x68, 0x14, 0x01, 0x20 ); FCML_I64( "vfmaddps ymm2,ymm5,ymm2,ymmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD5, 0x68, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmaddps ymm0,ymm5,ymm0,ymm2", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x68, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x68, 0xc0, 0x20 ) ); FCML_A64( "vfmadd132ps (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0x98, 0x00 ); FCML_A64( "vfmadd132ps (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0x98, 0x00 ); FCML_A64( "vfmadd132ps %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0x98, 0xc0 ); FCML_A64( "vfmadd213ps (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xa8, 0x00 ); FCML_A64( "vfmadd213ps (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xa8, 0x00 ); FCML_A64( "vfmadd213ps %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xa8, 0xc0 ); FCML_A64( "vfmadd231ps (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xb8, 0x00 ); FCML_A64( "vfmadd231ps (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xb8, 0x00 ); FCML_A64( "vfmadd231ps %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xb8, 0xc0 ); FCML_A64( "vfmaddps %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x68, 0x14, 0x01, 0x20 ); FCML_A64( "vfmaddps %ymm2,(%rcx,%rax),%ymm5,%ymm2", 0xc4, 0xe3, 0x55, 0x68, 0x14, 0x01, 0x20 ); FCML_A64( "vfmaddps (%rcx,%rax),%xmm2,%xmm5,%xmm2", 0xc4, 0xe3, 0xd1, 0x68, 0x14, 0x01, 0x20 ); FCML_A64( "vfmaddps (%rcx,%rax),%ymm2,%ymm5,%ymm2", 0xc4, 0xe3, 0xd5, 0x68, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VFMADDSD(void) { FCML_I64( "vfmadd132sd xmm0,xmm3,mmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0x99, 0x00 ); FCML_I64( "vfmadd132sd xmm0,xmm3,xmm0", 0xC4, 0xE2, 0xE1, 0x99, 0xC0 ); FCML_I64( "vfmadd213sd xmm0,xmm3,mmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xA9, 0x00 ); FCML_I64( "vfmadd213sd xmm0,xmm3,xmm0", 0xC4, 0xE2, 0xE1, 0xA9, 0xC0 ); FCML_I64( "vfmadd231sd xmm0,xmm3,mmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xB9, 0x00 ); FCML_I64( "vfmadd231sd xmm0,xmm3,xmm0", 0xC4, 0xE2, 0xE1, 0xB9, 0xC0 ); FCML_I64( "vfmaddsd xmm2,xmm5,xmmword ptr [rcx+rax],xmm2", 0xC4, 0xE3, 0x51, 0x6B, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmaddsd xmm0,xmm5,xmm0,xmm2", 2, FCML_MI( 0xc4, 0xe3, 0xd1, 0x6b, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x51, 0x6b, 0xc0, 0x20 ) ); FCML_I64( "vfmaddsd xmm2,xmm5,xmm2,xmmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x6B, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmaddsd xmm0,xmm5,xmm2,xmm0", 2, FCML_MI( 0xc4, 0xe3, 0xd1, 0x6b, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x51, 0x6b, 0xc2, 0x00 ) ); FCML_A64( "vfmadd132sd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0x99, 0x00 ); FCML_A64( "vfmadd132sd %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0x99, 0xc0 ); FCML_A64( "vfmadd213sd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xa9, 0x00 ); FCML_A64( "vfmadd213sd %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xa9, 0xc0 ); FCML_A64( "vfmadd231sd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xb9, 0x00 ); FCML_A64( "vfmadd231sd %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xb9, 0xc0 ); FCML_A64( "vfmaddsd %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x6b, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VFMADDSS(void) { FCML_I32( "vfmadd132ss xmm0,xmm3,dword ptr [eax]", 0xC4, 0xE2, 0x61, 0x99, 0x00 ); FCML_I64( "vfmadd132ss xmm0,xmm3,xmm0", 0xC4, 0xE2, 0x61, 0x99, 0xC0 ); FCML_I32( "vfmadd213ss xmm0,xmm3,dword ptr [eax]", 0xC4, 0xE2, 0x61, 0xA9, 0x00 ); FCML_I64( "vfmadd213ss xmm0,xmm3,xmm0", 0xC4, 0xE2, 0x61, 0xA9, 0xC0 ); FCML_I32( "vfmadd231ss xmm0,xmm3,dword ptr [eax]", 0xC4, 0xE2, 0x61, 0xB9, 0x00 ); FCML_I64( "vfmadd231ss xmm0,xmm3,xmm0", 0xC4, 0xE2, 0x61, 0xB9, 0xC0 ); FCML_I64( "vfmaddss xmm2,xmm5,dword ptr [rcx+rax],xmm2", 0xC4, 0xE3, 0x51, 0x6A, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmaddss xmm0,xmm5,xmm0,xmm2", 2, FCML_MI( 0xc4, 0xe3, 0xd1, 0x6a, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x51, 0x6a, 0xc0, 0x20 ) ); FCML_I64( "vfmaddss xmm2,xmm5,xmm2,dword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x6A, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmaddss xmm0,xmm5,xmm2,xmm0", 2, FCML_MI( 0xc4, 0xe3, 0xd1, 0x6a, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x51, 0x6a, 0xc2, 0x00 ) ); FCML_A64( "vfmadd132ss (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0x99, 0x00 ); FCML_A64( "vfmadd132ss %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0x99, 0xc0 ); FCML_A64( "vfmadd213ss (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xa9, 0x00 ); FCML_A64( "vfmadd213ss %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xa9, 0xc0 ); FCML_A64( "vfmadd231ss (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xb9, 0x00 ); FCML_A64( "vfmadd231ss %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xb9, 0xc0 ); FCML_A64( "vfmaddss %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x6a, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VFMADDSUBPD(void) { FCML_I64( "vfmaddsub132pd xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0x96, 0x00 ); FCML_I64( "vfmaddsub132pd ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0xE5, 0x96, 0x00 ); FCML_I64( "vfmaddsub132pd ymm0,ymm3,ymm0", 0xC4, 0xE2, 0xE5, 0x96, 0xC0 ); FCML_I64( "vfmaddsub213pd xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xA6, 0x00 ); FCML_I64( "vfmaddsub213pd ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0xE5, 0xA6, 0x00 ); FCML_I64( "vfmaddsub213pd ymm0,ymm3,ymm0", 0xC4, 0xE2, 0xE5, 0xA6, 0xC0 ); FCML_I64( "vfmaddsub231pd xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xB6, 0x00 ); FCML_I64( "vfmaddsub231pd ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0xE5, 0xB6, 0x00 ); FCML_I64( "vfmaddsub231pd ymm0,ymm3,ymm0", 0xC4, 0xE2, 0xE5, 0xB6, 0xC0 ); FCML_I32( "vfmaddsubpd xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0xC4, 0xE3, 0x51, 0x5D, 0x14, 0x01, 0x20 ); FCML_I64( "vfmaddsubpd ymm2,ymm5,ymmword ptr [rcx+rax],ymm2", 0xC4, 0xE3, 0x55, 0x5D, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmaddsubpd ymm0,ymm5,ymm0,ymm2", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x5d, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x5d, 0xc0, 0x20 ) ); FCML_I64( "vfmaddsubpd xmm2,xmm5,xmm2,xmmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x5D, 0x14, 0x01, 0x20 ); FCML_I64( "vfmaddsubpd ymm2,ymm5,ymm2,ymmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD5, 0x5D, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmaddsubpd ymm0,ymm5,ymm2,ymm0", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x5d, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x5d, 0xc2, 0x00 ) ); FCML_A64( "vfmaddsub132pd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0x96, 0x00 ); FCML_A64( "vfmaddsub132pd (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0x96, 0x00 ); FCML_A64( "vfmaddsub132pd %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0x96, 0xc0 ); FCML_A64( "vfmaddsub213pd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xa6, 0x00 ); FCML_A64( "vfmaddsub213pd (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xa6, 0x00 ); FCML_A64( "vfmaddsub213pd %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xa6, 0xc0 ); FCML_A64( "vfmaddsub231pd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xb6, 0x00 ); FCML_A64( "vfmaddsub231pd (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xb6, 0x00 ); FCML_A64( "vfmaddsub231pd %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xb6, 0xc0 ); FCML_A64( "vfmaddsubpd %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x5d, 0x14, 0x01, 0x20 ); FCML_A64( "vfmaddsubpd %ymm2,(%rcx,%rax),%ymm5,%ymm2", 0xc4, 0xe3, 0x55, 0x5d, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VFMADDSUBPS(void) { FCML_I32( "vfmaddsub132ps xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0x96, 0x00 ); FCML_I64( "vfmaddsub132ps ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0x65, 0x96, 0x00 ); FCML_I32( "vfmaddsub132ps ymm0,ymm3,ymm0", 0xC4, 0xE2, 0x65, 0x96, 0xC0 ); FCML_I32( "vfmaddsub213ps xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0xA6, 0x00 ); FCML_I64( "vfmaddsub213ps ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0x65, 0xA6, 0x00 ); FCML_I32( "vfmaddsub213ps ymm0,ymm3,ymm0", 0xC4, 0xE2, 0x65, 0xA6, 0xC0 ); FCML_I32( "vfmaddsub231ps xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0xB6, 0x00 ); FCML_I64( "vfmaddsub231ps ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0x65, 0xB6, 0x00 ); FCML_I32( "vfmaddsub231ps ymm0,ymm3,ymm0", 0xC4, 0xE2, 0x65, 0xB6, 0xC0 ); FCML_I64( "vfmaddsubps xmm2,xmm5,xmmword ptr [rcx+rax],xmm2", 0xC4, 0xE3, 0x51, 0x5C, 0x14, 0x01, 0x20 ); FCML_I64( "vfmaddsubps ymm2,ymm5,ymmword ptr [rcx+rax],ymm2", 0xC4, 0xE3, 0x55, 0x5C, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmaddsubps ymm0,ymm5,ymm0,ymm2", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x5c, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x5c, 0xc0, 0x20 ) ); FCML_I64( "vfmaddsubps xmm2,xmm5,xmm2,xmmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x5C, 0x14, 0x01, 0x20 ); FCML_I64( "vfmaddsubps ymm2,ymm5,ymm2,ymmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD5, 0x5C, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmaddsubps ymm0,ymm5,ymm2,ymm0", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x5c, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x5c, 0xc2, 0x00 ) ); FCML_A64( "vfmaddsub132ps (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0x96, 0x00 ); FCML_A64( "vfmaddsub132ps (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0x96, 0x00 ); FCML_A64( "vfmaddsub132ps %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0x96, 0xc0 ); FCML_A64( "vfmaddsub213ps (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xa6, 0x00 ); FCML_A64( "vfmaddsub213ps (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xa6, 0x00 ); FCML_A64( "vfmaddsub213ps %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xa6, 0xc0 ); FCML_A64( "vfmaddsub231ps (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xb6, 0x00 ); FCML_A64( "vfmaddsub231ps (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xb6, 0x00 ); FCML_A64( "vfmaddsub231ps %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xb6, 0xc0 ); FCML_A64( "vfmaddsubps %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x5c, 0x14, 0x01, 0x20 ); FCML_A64( "vfmaddsubps %ymm2,(%rcx,%rax),%ymm5,%ymm2", 0xc4, 0xe3, 0x55, 0x5c, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VFMSUBADDPD(void) { FCML_I64( "vfmsubadd132pd xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0x97, 0x00 ); FCML_I64( "vfmsubadd132pd ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0xE5, 0x97, 0x00 ); FCML_I64( "vfmsubadd132pd ymm0,ymm3,ymm0", 0xC4, 0xE2, 0xE5, 0x97, 0xC0 ); FCML_I64( "vfmsubadd213pd xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xA7, 0x00 ); FCML_I64( "vfmsubadd213pd ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0xE5, 0xA7, 0x00 ); FCML_I64( "vfmsubadd213pd ymm0,ymm3,ymm0", 0xC4, 0xE2, 0xE5, 0xA7, 0xC0 ); FCML_I64( "vfmsubadd231pd xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xB7, 0x00 ); FCML_I64( "vfmsubadd231pd ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0xE5, 0xB7, 0x00 ); FCML_I64( "vfmsubadd231pd ymm0,ymm3,ymm0", 0xC4, 0xE2, 0xE5, 0xB7, 0xC0 ); FCML_I32( "vfmsubaddpd xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0xC4, 0xE3, 0x51, 0x5F, 0x14, 0x01, 0x20 ); FCML_I64( "vfmsubaddpd ymm2,ymm5,ymmword ptr [rcx+rax],ymm2", 0xC4, 0xE3, 0x55, 0x5F, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmsubaddpd ymm0,ymm5,ymm0,ymm2", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x5f, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x5f, 0xc0, 0x20 ) ); FCML_I64( "vfmsubaddpd xmm2,xmm5,xmm2,xmmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x5F, 0x14, 0x01, 0x20 ); FCML_I64( "vfmsubaddpd ymm2,ymm5,ymm2,ymmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD5, 0x5F, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmsubaddpd ymm0,ymm5,ymm2,ymm0", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x5f, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x5f, 0xc2, 0x00 ) ); FCML_A64( "vfmsubadd132pd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0x97, 0x00 ); FCML_A64( "vfmsubadd132pd (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0x97, 0x00 ); FCML_A64( "vfmsubadd132pd %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0x97, 0xc0 ); FCML_A64( "vfmsubadd213pd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xa7, 0x00 ); FCML_A64( "vfmsubadd213pd (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xa7, 0x00 ); FCML_A64( "vfmsubadd213pd %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xa7, 0xc0 ); FCML_A64( "vfmsubadd231pd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xb7, 0x00 ); FCML_A64( "vfmsubadd231pd (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xb7, 0x00 ); FCML_A64( "vfmsubadd231pd %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xb7, 0xc0 ); FCML_A64( "vfmsubaddpd %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x5f, 0x14, 0x01, 0x20 ); FCML_A64( "vfmsubaddpd %ymm2,(%rcx,%rax),%ymm5,%ymm2", 0xc4, 0xe3, 0x55, 0x5f, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VFMSUBADDPS(void) { FCML_I32( "vfmsubadd132ps xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0x97, 0x00 ); FCML_I64( "vfmsubadd132ps ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0x65, 0x97, 0x00 ); FCML_I32( "vfmsubadd132ps ymm0,ymm3,ymm0", 0xC4, 0xE2, 0x65, 0x97, 0xC0 ); FCML_I32( "vfmsubadd213ps xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0xA7, 0x00 ); FCML_I64( "vfmsubadd213ps ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0x65, 0xA7, 0x00 ); FCML_I32( "vfmsubadd213ps ymm0,ymm3,ymm0", 0xC4, 0xE2, 0x65, 0xA7, 0xC0 ); FCML_I32( "vfmsubadd231ps xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0xB7, 0x00 ); FCML_I64( "vfmsubadd231ps ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0x65, 0xB7, 0x00 ); FCML_I32( "vfmsubadd231ps ymm0,ymm3,ymm0", 0xC4, 0xE2, 0x65, 0xB7, 0xC0 ); FCML_I64( "vfmsubaddps xmm2,xmm5,xmmword ptr [rcx+rax],xmm2", 0xC4, 0xE3, 0x51, 0x5E, 0x14, 0x01, 0x20 ); FCML_I64( "vfmsubaddps ymm2,ymm5,ymmword ptr [rcx+rax],ymm2", 0xC4, 0xE3, 0x55, 0x5E, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmsubaddps ymm0,ymm5,ymm0,ymm2", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x5e, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x5e, 0xc0, 0x20 ) ); FCML_I64( "vfmsubaddps xmm2,xmm5,xmm2,xmmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x5E, 0x14, 0x01, 0x20 ); FCML_I64( "vfmsubaddps ymm2,ymm5,ymm2,ymmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD5, 0x5E, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmsubaddps ymm0,ymm5,ymm2,ymm0", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x5e, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x5e, 0xc2, 0x00 ) ); FCML_A64( "vfmsubadd132ps (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0x97, 0x00 ); FCML_A64( "vfmsubadd132ps (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0x97, 0x00 ); FCML_A64( "vfmsubadd132ps %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0x97, 0xc0 ); FCML_A64( "vfmsubadd213ps (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xa7, 0x00 ); FCML_A64( "vfmsubadd213ps (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xa7, 0x00 ); FCML_A64( "vfmsubadd213ps %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xa7, 0xc0 ); FCML_A64( "vfmsubadd231ps (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xb7, 0x00 ); FCML_A64( "vfmsubadd231ps (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xb7, 0x00 ); FCML_A64( "vfmsubadd231ps %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xb7, 0xc0 ); FCML_A64( "vfmsubaddps %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x5e, 0x14, 0x01, 0x20 ); FCML_A64( "vfmsubaddps %ymm2,(%rcx,%rax),%ymm5,%ymm2", 0xc4, 0xe3, 0x55, 0x5e, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VFMSUBPD(void) { FCML_I64( "vfmsub132pd xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0x9A, 0x00 ); FCML_I64( "vfmsub132pd ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0xE5, 0x9A, 0x00 ); FCML_I64( "vfmsub132pd ymm0,ymm3,ymm0", 0xC4, 0xE2, 0xE5, 0x9A, 0xC0 ); FCML_I64( "vfmsub213pd xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xAA, 0x00 ); FCML_I64( "vfmsub213pd ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0xE5, 0xAA, 0x00 ); FCML_I64( "vfmsub213pd ymm0,ymm3,ymm0", 0xC4, 0xE2, 0xE5, 0xAA, 0xC0 ); FCML_I64( "vfmsub231pd xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xBA, 0x00 ); FCML_I64( "vfmsub231pd ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0xE5, 0xBA, 0x00 ); FCML_I64( "vfmsub231pd ymm0,ymm3,ymm0", 0xC4, 0xE2, 0xE5, 0xBA, 0xC0 ); FCML_I32( "vfmsubpd xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0xC4, 0xE3, 0x51, 0x6D, 0x14, 0x01, 0x20 ); FCML_I64( "vfmsubpd ymm2,ymm5,ymmword ptr [rcx+rax],ymm2", 0xC4, 0xE3, 0x55, 0x6D, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmsubpd ymm0,ymm5,ymm0,ymm2", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x6d, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x6d, 0xc0, 0x20 ) ); FCML_I64( "vfmsubpd xmm2,xmm5,xmm2,xmmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x6D, 0x14, 0x01, 0x20 ); FCML_I64( "vfmsubpd ymm2,ymm5,ymm2,ymmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD5, 0x6D, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmsubpd ymm0,ymm5,ymm2,ymm0", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x6d, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x6d, 0xc2, 0x00 ) ); FCML_A64( "vfmsub132pd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0x9a, 0x00 ); FCML_A64( "vfmsub132pd (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0x9a, 0x00 ); FCML_A64( "vfmsub132pd %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0x9a, 0xc0 ); FCML_A64( "vfmsub213pd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xaa, 0x00 ); FCML_A64( "vfmsub213pd (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xaa, 0x00 ); FCML_A64( "vfmsub213pd %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xaa, 0xc0 ); FCML_A64( "vfmsub231pd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xba, 0x00 ); FCML_A64( "vfmsub231pd (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xba, 0x00 ); FCML_A64( "vfmsub231pd %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xba, 0xc0 ); FCML_A64( "vfmsubpd %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x6d, 0x14, 0x01, 0x20 ); FCML_A64( "vfmsubpd %ymm2,(%rcx,%rax),%ymm5,%ymm2", 0xc4, 0xe3, 0x55, 0x6d, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VFMSUBPS(void) { FCML_I32( "vfmsub132ps xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0x9A, 0x00 ); FCML_I64( "vfmsub132ps ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0x65, 0x9A, 0x00 ); FCML_I32( "vfmsub132ps ymm0,ymm3,ymm0", 0xC4, 0xE2, 0x65, 0x9A, 0xC0 ); FCML_I32( "vfmsub213ps xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0xAA, 0x00 ); FCML_I64( "vfmsub213ps ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0x65, 0xAA, 0x00 ); FCML_I32( "vfmsub213ps ymm0,ymm3,ymm0", 0xC4, 0xE2, 0x65, 0xAA, 0xC0 ); FCML_I32( "vfmsub231ps xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0xBA, 0x00 ); FCML_I64( "vfmsub231ps ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0x65, 0xBA, 0x00 ); FCML_I32( "vfmsub231ps ymm0,ymm3,ymm0", 0xC4, 0xE2, 0x65, 0xBA, 0xC0 ); FCML_I64( "vfmsubps xmm2,xmm5,xmmword ptr [rcx+rax],xmm2", 0xC4, 0xE3, 0x51, 0x6C, 0x14, 0x01, 0x20 ); FCML_I64( "vfmsubps ymm2,ymm5,ymmword ptr [rcx+rax],ymm2", 0xC4, 0xE3, 0x55, 0x6C, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmsubps ymm0,ymm5,ymm0,ymm2", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x6c, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x6c, 0xc0, 0x20 ) ); FCML_I64( "vfmsubps xmm2,xmm5,xmm2,xmmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x6C, 0x14, 0x01, 0x20 ); FCML_I64( "vfmsubps ymm2,ymm5,ymm2,ymmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD5, 0x6C, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmsubps ymm0,ymm5,ymm2,ymm0", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x6c, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x6c, 0xc2, 0x00 ) ); FCML_A64( "vfmsub132ps (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0x9a, 0x00 ); FCML_A64( "vfmsub132ps (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0x9a, 0x00 ); FCML_A64( "vfmsub132ps %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0x9a, 0xc0 ); FCML_A64( "vfmsub213ps (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xaa, 0x00 ); FCML_A64( "vfmsub213ps (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xaa, 0x00 ); FCML_A64( "vfmsub213ps %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xaa, 0xc0 ); FCML_A64( "vfmsub231ps (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xba, 0x00 ); FCML_A64( "vfmsub231ps (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xba, 0x00 ); FCML_A64( "vfmsub231ps %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xba, 0xc0 ); FCML_A64( "vfmsubps %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x6c, 0x14, 0x01, 0x20 ); FCML_A64( "vfmsubps %ymm2,(%rcx,%rax),%ymm5,%ymm2", 0xc4, 0xe3, 0x55, 0x6c, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VFMSUBSD(void) { FCML_I64( "vfmsub132sd xmm0,xmm3,mmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0x9B, 0x00 ); FCML_I64( "vfmsub132sd xmm0,xmm3,xmm0", 0xC4, 0xE2, 0xE1, 0x9B, 0xC0 ); FCML_I64( "vfmsub213sd xmm0,xmm3,mmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xAB, 0x00 ); FCML_I64( "vfmsub213sd xmm0,xmm3,xmm0", 0xC4, 0xE2, 0xE1, 0xAB, 0xC0 ); FCML_I64( "vfmsub231sd xmm0,xmm3,mmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xBB, 0x00 ); FCML_I64( "vfmsub231sd xmm0,xmm3,xmm0", 0xC4, 0xE2, 0xE1, 0xBB, 0xC0 ); FCML_I32( "vfmsubsd xmm2,xmm5,mmword ptr [ecx+eax],xmm2", 0xC4, 0xE3, 0x51, 0x6F, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmsubsd xmm0,xmm5,xmm0,xmm2", 2, FCML_MI( 0xc4, 0xe3, 0xd1, 0x6f, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x51, 0x6f, 0xc0, 0x20 ) ); FCML_I64( "vfmsubsd xmm2,xmm5,xmm2,mmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x6F, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmsubsd xmm0,xmm5,xmm2,xmm0", 2, FCML_MI( 0xc4, 0xe3, 0xd1, 0x6f, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x51, 0x6f, 0xc2, 0x00 ) ); FCML_A64( "vfmsub132sd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0x9b, 0x00 ); FCML_A64( "vfmsub132sd %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0x9b, 0xc0 ); FCML_A64( "vfmsub213sd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xab, 0x00 ); FCML_A64( "vfmsub213sd %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xab, 0xc0 ); FCML_A64( "vfmsub231sd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xbb, 0x00 ); FCML_A64( "vfmsub231sd %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xbb, 0xc0 ); FCML_A64( "vfmsubsd %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x6f, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VFMSUBSS(void) { FCML_I32( "vfmsub132ss xmm0,xmm3,dword ptr [eax]", 0xC4, 0xE2, 0x61, 0x9B, 0x00 ); FCML_I64( "vfmsub132ss xmm0,xmm3,xmm0", 0xC4, 0xE2, 0x61, 0x9B, 0xC0 ); FCML_I32( "vfmsub213ss xmm0,xmm3,dword ptr [eax]", 0xC4, 0xE2, 0x61, 0xAB, 0x00 ); FCML_I64( "vfmsub213ss xmm0,xmm3,xmm0", 0xC4, 0xE2, 0x61, 0xAB, 0xC0 ); FCML_I32( "vfmsub231ss xmm0,xmm3,dword ptr [eax]", 0xC4, 0xE2, 0x61, 0xBB, 0x00 ); FCML_I64( "vfmsub231ss xmm0,xmm3,xmm0", 0xC4, 0xE2, 0x61, 0xBB, 0xC0 ); FCML_I64( "vfmsubss xmm2,xmm5,dword ptr [rcx+rax],xmm2", 0xC4, 0xE3, 0x51, 0x6E, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmsubss xmm0,xmm5,xmm0,xmm2", 2, FCML_MI( 0xc4, 0xe3, 0xd1, 0x6e, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x51, 0x6e, 0xc0, 0x20 ) ); FCML_I64( "vfmsubss xmm2,xmm5,xmm2,dword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x6E, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfmsubss xmm0,xmm5,xmm2,xmm0", 2, FCML_MI( 0xc4, 0xe3, 0xd1, 0x6e, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x51, 0x6e, 0xc2, 0x00 ) ); FCML_A64( "vfmsub132ss (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0x9b, 0x00 ); FCML_A64( "vfmsub132ss %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0x9b, 0xc0 ); FCML_A64( "vfmsub213ss (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xab, 0x00 ); FCML_A64( "vfmsub213ss %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xab, 0xc0 ); FCML_A64( "vfmsub231ss (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xbb, 0x00 ); FCML_A64( "vfmsub231ss %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xbb, 0xc0 ); FCML_A64( "vfmsubss %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x6e, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VFNMADDPD(void) { FCML_I64( "vfnmadd132pd xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0x9C, 0x00 ); FCML_I64( "vfnmadd132pd ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0xE5, 0x9C, 0x00 ); FCML_I64( "vfnmadd132pd ymm0,ymm3,ymm0", 0xC4, 0xE2, 0xE5, 0x9C, 0xC0 ); FCML_I64( "vfnmadd213pd xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xAC, 0x00 ); FCML_I64( "vfnmadd213pd ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0xE5, 0xAC, 0x00 ); FCML_I64( "vfnmadd213pd ymm0,ymm3,ymm0", 0xC4, 0xE2, 0xE5, 0xAC, 0xC0 ); FCML_I64( "vfnmadd231pd xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xBC, 0x00 ); FCML_I64( "vfnmadd231pd ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0xE5, 0xBC, 0x00 ); FCML_I64( "vfnmadd231pd ymm0,ymm3,ymm0", 0xC4, 0xE2, 0xE5, 0xBC, 0xC0 ); FCML_I32( "vfnmaddpd xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0xC4, 0xE3, 0x51, 0x79, 0x14, 0x01, 0x20 ); FCML_I64( "vfnmaddpd ymm2,ymm5,ymmword ptr [rcx+rax],ymm2", 0xC4, 0xE3, 0x55, 0x79, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfnmaddpd ymm0,ymm5,ymm0,ymm2", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x79, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x79, 0xc0, 0x20 ) ); FCML_I64( "vfnmaddpd xmm2,xmm5,xmm2,xmmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x79, 0x14, 0x01, 0x20 ); FCML_I64( "vfnmaddpd ymm2,ymm5,ymm2,ymmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD5, 0x79, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfnmaddpd ymm0,ymm5,ymm2,ymm0", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x79, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x79, 0xc2, 0x00 ) ); FCML_A64( "vfnmadd132pd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0x9c, 0x00 ); FCML_A64( "vfnmadd132pd (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0x9c, 0x00 ); FCML_A64( "vfnmadd132pd %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0x9c, 0xc0 ); FCML_A64( "vfnmadd213pd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xac, 0x00 ); FCML_A64( "vfnmadd213pd (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xac, 0x00 ); FCML_A64( "vfnmadd213pd %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xac, 0xc0 ); FCML_A64( "vfnmadd231pd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xbc, 0x00 ); FCML_A64( "vfnmadd231pd (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xbc, 0x00 ); FCML_A64( "vfnmadd231pd %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xbc, 0xc0 ); FCML_A64( "vfnmaddpd %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x79, 0x14, 0x01, 0x20 ); FCML_A64( "vfnmaddpd %ymm2,(%rcx,%rax),%ymm5,%ymm2", 0xc4, 0xe3, 0x55, 0x79, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VFNMADDPS(void) { FCML_I32( "vfnmadd132ps xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0x9C, 0x00 ); FCML_I64( "vfnmadd132ps ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0x65, 0x9C, 0x00 ); FCML_I32( "vfnmadd132ps ymm0,ymm3,ymm0", 0xC4, 0xE2, 0x65, 0x9C, 0xC0 ); FCML_I32( "vfnmadd213ps xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0xAC, 0x00 ); FCML_I64( "vfnmadd213ps ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0x65, 0xAC, 0x00 ); FCML_I32( "vfnmadd213ps ymm0,ymm3,ymm0", 0xC4, 0xE2, 0x65, 0xAC, 0xC0 ); FCML_I32( "vfnmadd231ps xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0xBC, 0x00 ); FCML_I64( "vfnmadd231ps ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0x65, 0xBC, 0x00 ); FCML_I32( "vfnmadd231ps ymm0,ymm3,ymm0", 0xC4, 0xE2, 0x65, 0xBC, 0xC0 ); FCML_I64( "vfnmaddps xmm2,xmm5,xmmword ptr [rcx+rax],xmm2", 0xC4, 0xE3, 0x51, 0x78, 0x14, 0x01, 0x20 ); FCML_I64( "vfnmaddps ymm2,ymm5,ymmword ptr [rcx+rax],ymm2", 0xC4, 0xE3, 0x55, 0x78, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfnmaddps ymm0,ymm5,ymm0,ymm2", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x78, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x78, 0xc0, 0x20 ) ); FCML_I64( "vfnmaddps xmm2,xmm5,xmm2,xmmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x78, 0x14, 0x01, 0x20 ); FCML_I64( "vfnmaddps ymm2,ymm5,ymm2,ymmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD5, 0x78, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfnmaddps ymm0,ymm5,ymm2,ymm0", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x78, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x78, 0xc2, 0x00 ) ); FCML_A64( "vfnmadd132ps (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0x9c, 0x00 ); FCML_A64( "vfnmadd132ps (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0x9c, 0x00 ); FCML_A64( "vfnmadd132ps %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0x9c, 0xc0 ); FCML_A64( "vfnmadd213ps (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xac, 0x00 ); FCML_A64( "vfnmadd213ps (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xac, 0x00 ); FCML_A64( "vfnmadd213ps %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xac, 0xc0 ); FCML_A64( "vfnmadd231ps (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xbc, 0x00 ); FCML_A64( "vfnmadd231ps (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xbc, 0x00 ); FCML_A64( "vfnmadd231ps %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xbc, 0xc0 ); FCML_A64( "vfnmaddps %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x78, 0x14, 0x01, 0x20 ); FCML_A64( "vfnmaddps %ymm2,(%rcx,%rax),%ymm5,%ymm2", 0xc4, 0xe3, 0x55, 0x78, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VFNMADDSD(void) { FCML_I64( "vfnmadd132sd xmm0,xmm3,mmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0x9D, 0x00 ); FCML_I64( "vfnmadd132sd xmm0,xmm3,xmm0", 0xC4, 0xE2, 0xE1, 0x9D, 0xC0 ); FCML_I64( "vfnmadd213sd xmm0,xmm3,mmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xAD, 0x00 ); FCML_I64( "vfnmadd213sd xmm0,xmm3,xmm0", 0xC4, 0xE2, 0xE1, 0xAD, 0xC0 ); FCML_I64( "vfnmadd231sd xmm0,xmm3,mmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xBD, 0x00 ); FCML_I64( "vfnmadd231sd xmm0,xmm3,xmm0", 0xC4, 0xE2, 0xE1, 0xBD, 0xC0 ); FCML_I32( "vfnmaddsd xmm2,xmm5,mmword ptr [ecx+eax],xmm2", 0xC4, 0xE3, 0x51, 0x7B, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfnmaddsd xmm0,xmm5,xmm0,xmm2", 2, FCML_MI( 0xc4, 0xe3, 0xd1, 0x7b, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x51, 0x7b, 0xc0, 0x20 ) ); FCML_I64( "vfnmaddsd xmm2,xmm5,xmm2,mmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x7B, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfnmaddsd xmm0,xmm5,xmm2,xmm0", 2, FCML_MI( 0xc4, 0xe3, 0xd1, 0x7b, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x51, 0x7b, 0xc2, 0x00 ) ); FCML_A64( "vfnmadd132sd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0x9d, 0x00 ); FCML_A64( "vfnmadd132sd %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0x9d, 0xc0 ); FCML_A64( "vfnmadd213sd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xad, 0x00 ); FCML_A64( "vfnmadd213sd %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xad, 0xc0 ); FCML_A64( "vfnmadd231sd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xbd, 0x00 ); FCML_A64( "vfnmadd231sd %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xbd, 0xc0 ); FCML_A64( "vfnmaddsd %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x7b, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VFNMADDSS(void) { FCML_I32( "vfnmadd132ss xmm0,xmm3,dword ptr [eax]", 0xC4, 0xE2, 0x61, 0x9D, 0x00 ); FCML_I64( "vfnmadd132ss xmm0,xmm3,xmm0", 0xC4, 0xE2, 0x61, 0x9D, 0xC0 ); FCML_I32( "vfnmadd213ss xmm0,xmm3,dword ptr [eax]", 0xC4, 0xE2, 0x61, 0xAD, 0x00 ); FCML_I64( "vfnmadd213ss xmm0,xmm3,xmm0", 0xC4, 0xE2, 0x61, 0xAD, 0xC0 ); FCML_I32( "vfnmadd231ss xmm0,xmm3,dword ptr [eax]", 0xC4, 0xE2, 0x61, 0xBD, 0x00 ); FCML_I64( "vfnmadd231ss xmm0,xmm3,xmm0", 0xC4, 0xE2, 0x61, 0xBD, 0xC0 ); FCML_I64( "vfnmaddss xmm2,xmm5,dword ptr [rcx+rax],xmm2", 0xC4, 0xE3, 0x51, 0x7A, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfnmaddss xmm0,xmm5,xmm0,xmm2", 2, FCML_MI( 0xc4, 0xe3, 0xd1, 0x7a, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x51, 0x7a, 0xc0, 0x20 ) ); FCML_I64( "vfnmaddss xmm2,xmm5,xmm2,dword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x7A, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfnmaddss xmm0,xmm5,xmm2,xmm0", 2, FCML_MI( 0xc4, 0xe3, 0xd1, 0x7a, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x51, 0x7a, 0xc2, 0x00 ) ); FCML_A64( "vfnmadd132ss (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0x9d, 0x00 ); FCML_A64( "vfnmadd132ss %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0x9d, 0xc0 ); FCML_A64( "vfnmadd213ss (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xad, 0x00 ); FCML_A64( "vfnmadd213ss %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xad, 0xc0 ); FCML_A64( "vfnmadd231ss (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xbd, 0x00 ); FCML_A64( "vfnmadd231ss %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xbd, 0xc0 ); FCML_A64( "vfnmaddss %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x7a, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VFNMSUBPD(void) { FCML_I64( "vfnmsub132pd xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0x9E, 0x00 ); FCML_I64( "vfnmsub132pd ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0xE5, 0x9E, 0x00 ); FCML_I64( "vfnmsub132pd ymm0,ymm3,ymm0", 0xC4, 0xE2, 0xE5, 0x9E, 0xC0 ); FCML_I64( "vfnmsub213pd xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xAE, 0x00 ); FCML_I64( "vfnmsub213pd ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0xE5, 0xAE, 0x00 ); FCML_I64( "vfnmsub213pd ymm0,ymm3,ymm0", 0xC4, 0xE2, 0xE5, 0xAE, 0xC0 ); FCML_I64( "vfnmsub231pd xmm0,xmm3,xmmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xBE, 0x00 ); FCML_I64( "vfnmsub231pd ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0xE5, 0xBE, 0x00 ); FCML_I64( "vfnmsub231pd ymm0,ymm3,ymm0", 0xC4, 0xE2, 0xE5, 0xBE, 0xC0 ); FCML_I32( "vfnmsubpd xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0xC4, 0xE3, 0x51, 0x7D, 0x14, 0x01, 0x20 ); FCML_I64( "vfnmsubpd ymm2,ymm5,ymmword ptr [rcx+rax],ymm2", 0xC4, 0xE3, 0x55, 0x7D, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfnmsubpd ymm0,ymm5,ymm0,ymm2", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x7d, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x7d, 0xc0, 0x20 ) ); FCML_I64( "vfnmsubpd xmm2,xmm5,xmm2,xmmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x7D, 0x14, 0x01, 0x20 ); FCML_I64( "vfnmsubpd ymm2,ymm5,ymm2,ymmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD5, 0x7D, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfnmsubpd ymm0,ymm5,ymm2,ymm0", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x7d, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x7d, 0xc2, 0x00 ) ); FCML_A64( "vfnmsub132pd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0x9e, 0x00 ); FCML_A64( "vfnmsub132pd (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0x9e, 0x00 ); FCML_A64( "vfnmsub132pd %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0x9e, 0xc0 ); FCML_A64( "vfnmsub213pd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xae, 0x00 ); FCML_A64( "vfnmsub213pd (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xae, 0x00 ); FCML_A64( "vfnmsub213pd %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xae, 0xc0 ); FCML_A64( "vfnmsub231pd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xbe, 0x00 ); FCML_A64( "vfnmsub231pd (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xbe, 0x00 ); FCML_A64( "vfnmsub231pd %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0xe5, 0xbe, 0xc0 ); FCML_A64( "vfnmsubpd %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x7d, 0x14, 0x01, 0x20 ); FCML_A64( "vfnmsubpd %ymm2,(%rcx,%rax),%ymm5,%ymm2", 0xc4, 0xe3, 0x55, 0x7d, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VFNMSUBPS(void) { FCML_I32( "vfnmsub132ps xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0x9E, 0x00 ); FCML_I64( "vfnmsub132ps ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0x65, 0x9E, 0x00 ); FCML_I32( "vfnmsub132ps ymm0,ymm3,ymm0", 0xC4, 0xE2, 0x65, 0x9E, 0xC0 ); FCML_I32( "vfnmsub213ps xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0xAE, 0x00 ); FCML_I64( "vfnmsub213ps ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0x65, 0xAE, 0x00 ); FCML_I32( "vfnmsub213ps ymm0,ymm3,ymm0", 0xC4, 0xE2, 0x65, 0xAE, 0xC0 ); FCML_I32( "vfnmsub231ps xmm0,xmm3,xmmword ptr [eax]", 0xC4, 0xE2, 0x61, 0xBE, 0x00 ); FCML_I64( "vfnmsub231ps ymm0,ymm3,ymmword ptr [rax]", 0xC4, 0xE2, 0x65, 0xBE, 0x00 ); FCML_I32( "vfnmsub231ps ymm0,ymm3,ymm0", 0xC4, 0xE2, 0x65, 0xBE, 0xC0 ); FCML_I64( "vfnmsubps xmm2,xmm5,xmmword ptr [rcx+rax],xmm2", 0xC4, 0xE3, 0x51, 0x7C, 0x14, 0x01, 0x20 ); FCML_I64( "vfnmsubps ymm2,ymm5,ymmword ptr [rcx+rax],ymm2", 0xC4, 0xE3, 0x55, 0x7C, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfnmsubps ymm0,ymm5,ymm0,ymm2", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x7c, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x7c, 0xc0, 0x20 ) ); FCML_I64( "vfnmsubps xmm2,xmm5,xmm2,xmmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x7C, 0x14, 0x01, 0x20 ); FCML_I64( "vfnmsubps ymm2,ymm5,ymm2,ymmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD5, 0x7C, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfnmsubps ymm0,ymm5,ymm2,ymm0", 2, FCML_MI( 0xc4, 0xe3, 0xd5, 0x7c, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x55, 0x7c, 0xc2, 0x00 ) ); FCML_A64( "vfnmsub132ps (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0x9e, 0x00 ); FCML_A64( "vfnmsub132ps (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0x9e, 0x00 ); FCML_A64( "vfnmsub132ps %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0x9e, 0xc0 ); FCML_A64( "vfnmsub213ps (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xae, 0x00 ); FCML_A64( "vfnmsub213ps (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xae, 0x00 ); FCML_A64( "vfnmsub213ps %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xae, 0xc0 ); FCML_A64( "vfnmsub231ps (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xbe, 0x00 ); FCML_A64( "vfnmsub231ps (%rax),%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xbe, 0x00 ); FCML_A64( "vfnmsub231ps %ymm0,%ymm3,%ymm0", 0xc4, 0xe2, 0x65, 0xbe, 0xc0 ); FCML_A64( "vfnmsubps %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x7c, 0x14, 0x01, 0x20 ); FCML_A64( "vfnmsubps %ymm2,(%rcx,%rax),%ymm5,%ymm2", 0xc4, 0xe3, 0x55, 0x7c, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VFNMSUBSD(void) { FCML_I64( "vfnmsub132sd xmm0,xmm3,mmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0x9F, 0x00 ); FCML_I64( "vfnmsub132sd xmm0,xmm3,xmm0", 0xC4, 0xE2, 0xE1, 0x9F, 0xC0 ); FCML_I64( "vfnmsub213sd xmm0,xmm3,mmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xAF, 0x00 ); FCML_I64( "vfnmsub213sd xmm0,xmm3,xmm0", 0xC4, 0xE2, 0xE1, 0xAF, 0xC0 ); FCML_I64( "vfnmsub231sd xmm0,xmm3,mmword ptr [rax]", 0xC4, 0xE2, 0xE1, 0xBF, 0x00 ); FCML_I64( "vfnmsub231sd xmm0,xmm3,xmm0", 0xC4, 0xE2, 0xE1, 0xBF, 0xC0 ); FCML_I32( "vfnmsubsd xmm2,xmm5,mmword ptr [ecx+eax],xmm2", 0xC4, 0xE3, 0x51, 0x7F, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfnmsubsd xmm0,xmm5,xmm0,xmm2", 2, FCML_MI( 0xc4, 0xe3, 0xd1, 0x7f, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x51, 0x7f, 0xc0, 0x20 ) ); FCML_I64( "vfnmsubsd xmm2,xmm5,xmm2,mmword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x7F, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfnmsubsd xmm0,xmm5,xmm2,xmm0", 2, FCML_MI( 0xc4, 0xe3, 0xd1, 0x7f, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x51, 0x7f, 0xc2, 0x00 ) ); FCML_A64( "vfnmsub132sd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0x9f, 0x00 ); FCML_A64( "vfnmsub132sd %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0x9f, 0xc0 ); FCML_A64( "vfnmsub213sd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xaf, 0x00 ); FCML_A64( "vfnmsub213sd %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xaf, 0xc0 ); FCML_A64( "vfnmsub231sd (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xbf, 0x00 ); FCML_A64( "vfnmsub231sd %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0xe1, 0xbf, 0xc0 ); FCML_A64( "vfnmsubsd %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x7f, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VFNMSUBSS(void) { FCML_I32( "vfnmsub132ss xmm0,xmm3,dword ptr [eax]", 0xC4, 0xE2, 0x61, 0x9F, 0x00 ); FCML_I64( "vfnmsub132ss xmm0,xmm3,xmm0", 0xC4, 0xE2, 0x61, 0x9F, 0xC0 ); FCML_I32( "vfnmsub213ss xmm0,xmm3,dword ptr [eax]", 0xC4, 0xE2, 0x61, 0xAF, 0x00 ); FCML_I64( "vfnmsub213ss xmm0,xmm3,xmm0", 0xC4, 0xE2, 0x61, 0xAF, 0xC0 ); FCML_I32( "vfnmsub231ss xmm0,xmm3,dword ptr [eax]", 0xC4, 0xE2, 0x61, 0xBF, 0x00 ); FCML_I64( "vfnmsub231ss xmm0,xmm3,xmm0", 0xC4, 0xE2, 0x61, 0xBF, 0xC0 ); FCML_I64( "vfnmsubss xmm2,xmm5,dword ptr [rcx+rax],xmm2", 0xC4, 0xE3, 0x51, 0x7E, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfnmsubss xmm0,xmm5,xmm0,xmm2", 2, FCML_MI( 0xc4, 0xe3, 0xd1, 0x7e, 0xc2, 0x00 ), FCML_MI( 0xc4, 0xe3, 0x51, 0x7e, 0xc0, 0x20 ) ); FCML_I64( "vfnmsubss xmm2,xmm5,xmm2,dword ptr [rcx+rax]", 0xC4, 0xE3, 0xD1, 0x7E, 0x14, 0x01, 0x20 ); FCML_I64_M( "vfnmsubss xmm0,xmm5,xmm2,xmm0", 2, FCML_MI( 0xc4, 0xe3, 0xd1, 0x7e, 0xc0, 0x20 ), FCML_MI( 0xc4, 0xe3, 0x51, 0x7e, 0xc2, 0x00 ) ); FCML_A64( "vfnmsub132ss (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0x9f, 0x00 ); FCML_A64( "vfnmsub132ss %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0x9f, 0xc0 ); FCML_A64( "vfnmsub213ss (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xaf, 0x00 ); FCML_A64( "vfnmsub213ss %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xaf, 0xc0 ); FCML_A64( "vfnmsub231ss (%rax),%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xbf, 0x00 ); FCML_A64( "vfnmsub231ss %xmm0,%xmm3,%xmm0", 0xc4, 0xe2, 0x61, 0xbf, 0xc0 ); FCML_A64( "vfnmsubss %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0xc4, 0xe3, 0x51, 0x7e, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VFRCZPD(void) { FCML_I32( "vfrczpd xmm0,xmmword ptr [eax]", 0x8F, 0xE9, 0x78, 0x81, 0x00 ); FCML_I32( "vfrczpd xmm0,xmm1", 0x8F, 0xE9, 0x78, 0x81, 0xC1 ); FCML_I32( "vfrczpd ymm0,ymmword ptr [eax]", 0x8F, 0xE9, 0x7C, 0x81, 0x00 ); FCML_I32( "vfrczpd ymm0,ymm1", 0x8F, 0xE9, 0x7C, 0x81, 0xC1 ); FCML_I64( "vfrczpd xmm0,xmmword ptr [rax]", 0x8F, 0xE9, 0x78, 0x81, 0x00 ); FCML_I64( "vfrczpd ymm0,ymmword ptr [rax]", 0x8F, 0xE9, 0x7C, 0x81, 0x00 ); FCML_A64( "vfrczpd (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0x81, 0x00 ); FCML_A64( "vfrczpd %xmm1,%xmm0", 0x8f, 0xe9, 0x78, 0x81, 0xc1 ); FCML_A64( "vfrczpd (%rax),%ymm0", 0x8f, 0xe9, 0x7c, 0x81, 0x00 ); FCML_A64( "vfrczpd %ymm1,%ymm0", 0x8f, 0xe9, 0x7c, 0x81, 0xc1 ); FCML_A64( "vfrczpd (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0x81, 0x00 ); FCML_A64( "vfrczpd (%rax),%ymm0", 0x8f, 0xe9, 0x7c, 0x81, 0x00 ); } void fcml_tf_instruction_VFRCZPS(void) { FCML_I32( "vfrczps xmm0,xmmword ptr [eax]", 0x8F, 0xE9, 0x78, 0x80, 0x00 ); FCML_I32( "vfrczps xmm0,xmm1", 0x8F, 0xE9, 0x78, 0x80, 0xC1 ); FCML_I32( "vfrczps ymm0,ymmword ptr [eax]", 0x8F, 0xE9, 0x7C, 0x80, 0x00 ); FCML_I32( "vfrczps ymm0,ymm1", 0x8F, 0xE9, 0x7C, 0x80, 0xC1 ); FCML_I64( "vfrczps xmm0,xmmword ptr [rax]", 0x8F, 0xE9, 0x78, 0x80, 0x00 ); FCML_I64( "vfrczps ymm0,ymmword ptr [rax]", 0x8F, 0xE9, 0x7C, 0x80, 0x00 ); FCML_A64( "vfrczps (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0x80, 0x00 ); FCML_A64( "vfrczps %xmm1,%xmm0", 0x8f, 0xe9, 0x78, 0x80, 0xc1 ); FCML_A64( "vfrczps (%rax),%ymm0", 0x8f, 0xe9, 0x7c, 0x80, 0x00 ); FCML_A64( "vfrczps %ymm1,%ymm0", 0x8f, 0xe9, 0x7c, 0x80, 0xc1 ); FCML_A64( "vfrczps (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0x80, 0x00 ); FCML_A64( "vfrczps (%rax),%ymm0", 0x8f, 0xe9, 0x7c, 0x80, 0x00 ); } void fcml_tf_instruction_VFRCZSD(void) { FCML_I32( "vfrczsd xmm0,mmword ptr [eax]", 0x8F, 0xE9, 0x78, 0x83, 0x00 ); FCML_I32( "vfrczsd xmm0,xmm1", 0x8F, 0xE9, 0x78, 0x83, 0xC1 ); FCML_I64( "vfrczsd xmm0,mmword ptr [rax]", 0x8F, 0xE9, 0x78, 0x83, 0x00 ); FCML_I64( "vfrczsd xmm0,xmm1", 0x8F, 0xE9, 0x78, 0x83, 0xC1 ); FCML_A64( "vfrczsd (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0x83, 0x00 ); FCML_A64( "vfrczsd %xmm1,%xmm0", 0x8f, 0xe9, 0x78, 0x83, 0xc1 ); } void fcml_tf_instruction_VFRCZSS(void) { FCML_I32( "vfrczss xmm0,dword ptr [eax]", 0x8F, 0xE9, 0x78, 0x82, 0x00 ); FCML_I32( "vfrczss xmm0,xmm1", 0x8F, 0xE9, 0x78, 0x82, 0xC1 ); FCML_I64( "vfrczss xmm0,dword ptr [rax]", 0x8F, 0xE9, 0x78, 0x82, 0x00 ); FCML_I64( "vfrczss xmm0,xmm1", 0x8F, 0xE9, 0x78, 0x82, 0xC1 ); FCML_A64( "vfrczss (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0x82, 0x00 ); FCML_A64( "vfrczss %xmm1,%xmm0", 0x8f, 0xe9, 0x78, 0x82, 0xc1 ); } void fcml_tf_instruction_VPCMOV(void) { FCML_I64( "vpcmov xmm2,xmm5,xmmword ptr [rcx+rax],xmm2", 0x8F, 0xE8, 0x50, 0xA2, 0x14, 0x01, 0x20 ); FCML_I64( "vpcmov ymm2,ymm5,ymmword ptr [rcx+rax],ymm2", 0x8F, 0xE8, 0x54, 0xA2, 0x14, 0x01, 0x20 ); FCML_I64_M( "vpcmov ymm0,ymm5,ymm0,ymm2", 2, FCML_MI( 0x8f, 0xe8, 0xd4, 0xa2, 0xc2, 0x00 ), FCML_MI( 0x8f, 0xe8, 0x54, 0xa2, 0xc0, 0x20 ) ); FCML_I64( "vpcmov xmm2,xmm5,xmm2,xmmword ptr [rcx+rax]", 0x8F, 0xE8, 0xD0, 0xA2, 0x14, 0x01, 0x20 ); FCML_I64( "vpcmov ymm2,ymm5,ymm2,ymmword ptr [rcx+rax]", 0x8F, 0xE8, 0xD4, 0xA2, 0x14, 0x01, 0x20 ); FCML_I64_M( "vpcmov ymm0,ymm5,ymm2,ymm0", 2, FCML_MI( 0x8f, 0xe8, 0xd4, 0xa2, 0xc0, 0x20 ), FCML_MI( 0x8f, 0xe8, 0x54, 0xa2, 0xc2, 0x00 ) ); FCML_A64( "vpcmov %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xa2, 0x14, 0x01, 0x20 ); FCML_A64( "vpcmov %ymm2,(%rcx,%rax),%ymm5,%ymm2", 0x8f, 0xe8, 0x54, 0xa2, 0x14, 0x01, 0x20 ); FCML_A64( "vpcmov (%rcx,%rax),%xmm2,%xmm5,%xmm2", 0x8f, 0xe8, 0xd0, 0xa2, 0x14, 0x01, 0x20 ); FCML_A64( "vpcmov (%rcx,%rax),%ymm2,%ymm5,%ymm2", 0x8f, 0xe8, 0xd4, 0xa2, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VPCOM(void) { FCML_I32( "vpcomb xmm2,xmm5,xmmword ptr [ecx+eax],00h", 0x8F, 0xE8, 0x50, 0xCC, 0x14, 0x01, 0x00 ); FCML_I64_A_FAILED( "vpcomb xmm0,xmm5,xmm0,20h", 0x8F, 0xE8, 0x50, 0xCC, 0xC0, 0x20 ); FCML_I32_A( "vpcomltb xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCC, 0x14, 0x01, 0x00 ); FCML_I32_A( "vpcomleb xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCC, 0x14, 0x01, 0x01 ); FCML_I32_A( "vpcomgtb xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCC, 0x14, 0x01, 0x02 ); FCML_I32_A( "vpcomgeb xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCC, 0x14, 0x01, 0x03 ); FCML_I32_A( "vpcomeqb xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCC, 0x14, 0x01, 0x04 ); FCML_I32_A( "vpcomneqb xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCC, 0x14, 0x01, 0x05 ); FCML_I32_A( "vpcomfalseb xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCC, 0x14, 0x01, 0x06 ); FCML_I32_A( "vpcomtrueb xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCC, 0x14, 0x01, 0x07 ); FCML_A64_A( "vpcomltb (%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xcc, 0x14, 0x01, 0x00 ); FCML_A64( "vpcomb $0x00,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xcc, 0x14, 0x01, 0x00 ); FCML_A64( "vpcomb $0x01,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xcc, 0x14, 0x01, 0x01 ); FCML_A64( "vpcomb $0x02,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xcc, 0x14, 0x01, 0x02 ); FCML_I32( "vpcomw xmm2,xmm5,xmmword ptr [ecx+eax],00h", 0x8F, 0xE8, 0x50, 0xCD, 0x14, 0x01, 0x00 ); FCML_I64_A_FAILED( "vpcomw xmm0,xmm5,xmm0,20h", 0x8F, 0xE8, 0x50, 0xCD, 0xC0, 0x20 ); FCML_I32_A( "vpcomltw xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCD, 0x14, 0x01, 0x00 ); FCML_I32_A( "vpcomlew xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCD, 0x14, 0x01, 0x01 ); FCML_I32_A( "vpcomgtw xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCD, 0x14, 0x01, 0x02 ); FCML_I32_A( "vpcomgew xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCD, 0x14, 0x01, 0x03 ); FCML_I32_A( "vpcomeqw xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCD, 0x14, 0x01, 0x04 ); FCML_I32_A( "vpcomneqw xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCD, 0x14, 0x01, 0x05 ); FCML_I32_A( "vpcomfalsew xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCD, 0x14, 0x01, 0x06 ); FCML_I32_A( "vpcomtruew xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCD, 0x14, 0x01, 0x07 ); FCML_A64( "vpcomw $0x00,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xcd, 0x14, 0x01, 0x00 ); FCML_A64( "vpcomw $0x01,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xcd, 0x14, 0x01, 0x01 ); FCML_A64( "vpcomw $0x02,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xcd, 0x14, 0x01, 0x02 ); FCML_I32( "vpcomd xmm2,xmm5,xmmword ptr [ecx+eax],00h", 0x8F, 0xE8, 0x50, 0xCE, 0x14, 0x01, 0x00 ); FCML_I64_A_FAILED( "vpcomd xmm0,xmm5,xmm0,20h", 0x8F, 0xE8, 0x50, 0xCE, 0xC0, 0x20 ); FCML_I32_A( "vpcomltd xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCE, 0x14, 0x01, 0x00 ); FCML_I32_A( "vpcomled xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCE, 0x14, 0x01, 0x01 ); FCML_I32_A( "vpcomgtd xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCE, 0x14, 0x01, 0x02 ); FCML_I32_A( "vpcomged xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCE, 0x14, 0x01, 0x03 ); FCML_I32_A( "vpcomeqd xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCE, 0x14, 0x01, 0x04 ); FCML_I32_A( "vpcomneqd xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCE, 0x14, 0x01, 0x05 ); FCML_I32_A( "vpcomfalsed xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCE, 0x14, 0x01, 0x06 ); FCML_I32_A( "vpcomtrued xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCE, 0x14, 0x01, 0x07 ); FCML_A64( "vpcomd $0x00,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xce, 0x14, 0x01, 0x00 ); FCML_A64( "vpcomd $0x01,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xce, 0x14, 0x01, 0x01 ); FCML_A64( "vpcomd $0x02,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xce, 0x14, 0x01, 0x02 ); FCML_I32( "vpcomq xmm2,xmm5,xmmword ptr [ecx+eax],00h", 0x8F, 0xE8, 0x50, 0xCF, 0x14, 0x01, 0x00 ); FCML_I64_A_FAILED( "vpcomq xmm0,xmm5,xmm0,20h", 0x8F, 0xE8, 0x50, 0xCF, 0xC0, 0x20 ); FCML_I32_A( "vpcomltq xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCF, 0x14, 0x01, 0x00 ); FCML_I32_A( "vpcomleq xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCF, 0x14, 0x01, 0x01 ); FCML_I32_A( "vpcomgtq xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCF, 0x14, 0x01, 0x02 ); FCML_I32_A( "vpcomgeq xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCF, 0x14, 0x01, 0x03 ); FCML_I32_A( "vpcomeqq xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCF, 0x14, 0x01, 0x04 ); FCML_I32_A( "vpcomneqq xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCF, 0x14, 0x01, 0x05 ); FCML_I32_A( "vpcomfalseq xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCF, 0x14, 0x01, 0x06 ); FCML_I32_A( "vpcomtrueq xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xCF, 0x14, 0x01, 0x07 ); FCML_A64( "vpcomq $0x00,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xcf, 0x14, 0x01, 0x00 ); FCML_A64( "vpcomq $0x01,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xcf, 0x14, 0x01, 0x01 ); FCML_A64( "vpcomq $0x02,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xcf, 0x14, 0x01, 0x02 ); } void fcml_tf_instruction_VPCOMU(void) { FCML_I32( "vpcomub xmm2,xmm5,xmmword ptr [ecx+eax],00h", 0x8F, 0xE8, 0x50, 0xEC, 0x14, 0x01, 0x00 ); FCML_I64_A_FAILED( "vpcomub xmm0,xmm5,xmm0,20h", 0x8F, 0xE8, 0x50, 0xEC, 0xC0, 0x20 ); FCML_I32_A( "vpcomltub xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEC, 0x14, 0x01, 0x00 ); FCML_I32_A( "vpcomleub xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEC, 0x14, 0x01, 0x01 ); FCML_I32_A( "vpcomgtub xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEC, 0x14, 0x01, 0x02 ); FCML_I32_A( "vpcomgeub xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEC, 0x14, 0x01, 0x03 ); FCML_I32_A( "vpcomequb xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEC, 0x14, 0x01, 0x04 ); FCML_I32_A( "vpcomnequb xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEC, 0x14, 0x01, 0x05 ); FCML_I32_A( "vpcomfalseub xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEC, 0x14, 0x01, 0x06 ); FCML_I32_A( "vpcomtrueub xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEC, 0x14, 0x01, 0x07 ); FCML_A64( "vpcomub $0x00,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xec, 0x14, 0x01, 0x00 ); FCML_A64( "vpcomub $0x01,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xec, 0x14, 0x01, 0x01 ); FCML_A64( "vpcomub $0x02,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xec, 0x14, 0x01, 0x02 ); FCML_A64( "vpcomub $0x03,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xec, 0x14, 0x01, 0x03 ); FCML_I32( "vpcomud xmm2,xmm5,xmmword ptr [ecx+eax],00h", 0x8F, 0xE8, 0x50, 0xEE, 0x14, 0x01, 0x00 ); FCML_I64_A_FAILED( "vpcomud xmm0,xmm5,xmm0,20h", 0x8F, 0xE8, 0x50, 0xEE, 0xC0, 0x20 ); FCML_I32_A( "vpcomltud xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEE, 0x14, 0x01, 0x00 ); FCML_I32_A( "vpcomleud xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEE, 0x14, 0x01, 0x01 ); FCML_I32_A( "vpcomgtud xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEE, 0x14, 0x01, 0x02 ); FCML_I32_A( "vpcomgeud xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEE, 0x14, 0x01, 0x03 ); FCML_I32_A( "vpcomequd xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEE, 0x14, 0x01, 0x04 ); FCML_I32_A( "vpcomnequd xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEE, 0x14, 0x01, 0x05 ); FCML_I32_A( "vpcomfalseud xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEE, 0x14, 0x01, 0x06 ); FCML_I32_A( "vpcomtrueud xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEE, 0x14, 0x01, 0x07 ); FCML_A64( "vpcomud $0x00,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xee, 0x14, 0x01, 0x00 ); FCML_A64( "vpcomud $0x01,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xee, 0x14, 0x01, 0x01 ); FCML_A64( "vpcomud $0x02,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xee, 0x14, 0x01, 0x02 ); FCML_A64( "vpcomud $0x03,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xee, 0x14, 0x01, 0x03 ); FCML_I32( "vpcomuq xmm2,xmm5,xmmword ptr [ecx+eax],00h", 0x8F, 0xE8, 0x50, 0xEF, 0x14, 0x01, 0x00 ); FCML_I64_A_FAILED( "vpcomuq xmm0,xmm5,xmm0,20h", 0x8F, 0xE8, 0x50, 0xEF, 0xC0, 0x20 ); FCML_I32_A( "vpcomltuq xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEF, 0x14, 0x01, 0x00 ); FCML_I32_A( "vpcomleuq xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEF, 0x14, 0x01, 0x01 ); FCML_I32_A( "vpcomgtuq xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEF, 0x14, 0x01, 0x02 ); FCML_I32_A( "vpcomgeuq xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEF, 0x14, 0x01, 0x03 ); FCML_I32_A( "vpcomequq xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEF, 0x14, 0x01, 0x04 ); FCML_I32_A( "vpcomnequq xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEF, 0x14, 0x01, 0x05 ); FCML_I32_A( "vpcomfalseuq xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEF, 0x14, 0x01, 0x06 ); FCML_I32_A( "vpcomtrueuq xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xEF, 0x14, 0x01, 0x07 ); FCML_A64( "vpcomuq $0x00,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xef, 0x14, 0x01, 0x00 ); FCML_A64( "vpcomuq $0x01,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xef, 0x14, 0x01, 0x01 ); FCML_A64( "vpcomuq $0x02,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xef, 0x14, 0x01, 0x02 ); FCML_A64( "vpcomuq $0x03,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xef, 0x14, 0x01, 0x03 ); FCML_I32( "vpcomuw xmm2,xmm5,xmmword ptr [ecx+eax],00h", 0x8F, 0xE8, 0x50, 0xED, 0x14, 0x01, 0x00 ); FCML_I64_A_FAILED( "vpcomuw xmm0,xmm5,xmm0,20h", 0x8F, 0xE8, 0x50, 0xED, 0xC0, 0x20 ); FCML_I32_A( "vpcomltuw xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xED, 0x14, 0x01, 0x00 ); FCML_I32_A( "vpcomleuw xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xED, 0x14, 0x01, 0x01 ); FCML_I32_A( "vpcomgtuw xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xED, 0x14, 0x01, 0x02 ); FCML_I32_A( "vpcomgeuw xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xED, 0x14, 0x01, 0x03 ); FCML_I32_A( "vpcomequw xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xED, 0x14, 0x01, 0x04 ); FCML_I32_A( "vpcomnequw xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xED, 0x14, 0x01, 0x05 ); FCML_I32_A( "vpcomfalseuw xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xED, 0x14, 0x01, 0x06 ); FCML_I32_A( "vpcomtrueuw xmm2,xmm5,xmmword ptr [ecx+eax]", 0x8F, 0xE8, 0x50, 0xED, 0x14, 0x01, 0x07 ); FCML_A64( "vpcomuw $0x00,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xed, 0x14, 0x01, 0x00 ); FCML_A64( "vpcomuw $0x01,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xed, 0x14, 0x01, 0x01 ); FCML_A64( "vpcomuw $0x02,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xed, 0x14, 0x01, 0x02 ); FCML_A64( "vpcomuw $0x03,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xed, 0x14, 0x01, 0x03 ); } void fcml_tf_instruction_VPHADDBD(void) { FCML_I32( "vphaddbd xmm0,xmmword ptr [eax]", 0x8F, 0xE9, 0x78, 0xC2, 0x00 ); FCML_I32( "vphaddbd xmm0,xmm1", 0x8F, 0xE9, 0x78, 0xC2, 0xC1 ); FCML_A64( "vphaddbd (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0xc2, 0x00 ); FCML_A64( "vphaddbd %xmm1,%xmm0", 0x8f, 0xe9, 0x78, 0xc2, 0xc1 ); } void fcml_tf_instruction_VPHADDBW(void) { FCML_I32( "vphaddbw xmm0,xmmword ptr [eax]", 0x8F, 0xE9, 0x78, 0xC1, 0x00 ); FCML_I32( "vphaddbw xmm0,xmm1", 0x8F, 0xE9, 0x78, 0xC1, 0xC1 ); FCML_A64( "vphaddbw (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0xc1, 0x00 ); FCML_A64( "vphaddbw %xmm1,%xmm0", 0x8f, 0xe9, 0x78, 0xc1, 0xc1 ); } void fcml_tf_instruction_VPHADDBQ(void) { FCML_I32( "vphaddbq xmm0,xmmword ptr [eax]", 0x8F, 0xE9, 0x78, 0xC3, 0x00 ); FCML_I32( "vphaddbq xmm0,xmm1", 0x8F, 0xE9, 0x78, 0xC3, 0xC1 ); FCML_A64( "vphaddbq (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0xc3, 0x00 ); FCML_A64( "vphaddbq %xmm1,%xmm0", 0x8f, 0xe9, 0x78, 0xc3, 0xc1 ); } void fcml_tf_instruction_VPHADDDQ(void) { FCML_I32( "vphadddq xmm0,xmmword ptr [eax]", 0x8F, 0xE9, 0x78, 0xCB, 0x00 ); FCML_I32( "vphadddq xmm0,xmm1", 0x8F, 0xE9, 0x78, 0xCB, 0xC1 ); FCML_A64( "vphadddq (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0xcb, 0x00 ); FCML_A64( "vphadddq %xmm1,%xmm0", 0x8f, 0xe9, 0x78, 0xcb, 0xc1 ); } void fcml_tf_instruction_VPHADDUBD(void) { FCML_I32( "vphaddubd xmm0,xmmword ptr [eax]", 0x8F, 0xE9, 0x78, 0xD2, 0x00 ); FCML_I32( "vphaddubd xmm0,xmm1", 0x8F, 0xE9, 0x78, 0xD2, 0xC1 ); FCML_A64( "vphaddubd (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0xd2, 0x00 ); FCML_A64( "vphaddubd %xmm1,%xmm0", 0x8f, 0xe9, 0x78, 0xd2, 0xc1 ); } void fcml_tf_instruction_VPHADDUBQ(void) { FCML_I32( "vphaddubq xmm0,xmmword ptr [eax]", 0x8F, 0xE9, 0x78, 0xD3, 0x00 ); FCML_I32( "vphaddubq xmm0,xmm1", 0x8F, 0xE9, 0x78, 0xD3, 0xC1 ); FCML_A64( "vphaddubq (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0xd3, 0x00 ); FCML_A64( "vphaddubq %xmm1,%xmm0", 0x8f, 0xe9, 0x78, 0xd3, 0xc1 ); } void fcml_tf_instruction_VPHADDUBW(void) { FCML_I32( "vphaddubw xmm0,xmmword ptr [eax]", 0x8F, 0xE9, 0x78, 0xD1, 0x00 ); FCML_I32( "vphaddubw xmm0,xmm1", 0x8F, 0xE9, 0x78, 0xD1, 0xC1 ); FCML_A64( "vphaddubw (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0xd1, 0x00 ); FCML_A64( "vphaddubw %xmm1,%xmm0", 0x8f, 0xe9, 0x78, 0xd1, 0xc1 ); } void fcml_tf_instruction_VPHADDUDQ(void) { FCML_I32( "vphaddudq xmm0,xmmword ptr [eax]", 0x8F, 0xE9, 0x78, 0xDB, 0x00 ); FCML_I32( "vphaddudq xmm0,xmm1", 0x8F, 0xE9, 0x78, 0xDB, 0xC1 ); FCML_A64( "vphaddudq (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0xdb, 0x00 ); FCML_A64( "vphaddudq %xmm1,%xmm0", 0x8f, 0xe9, 0x78, 0xdb, 0xc1 ); } void fcml_tf_instruction_VPHADDUWD(void) { FCML_I32( "vphadduwd xmm0,xmmword ptr [eax]", 0x8F, 0xE9, 0x78, 0xD6, 0x00 ); FCML_I32( "vphadduwd xmm0,xmm1", 0x8F, 0xE9, 0x78, 0xD6, 0xC1 ); FCML_A64( "vphadduwd (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0xd6, 0x00 ); FCML_A64( "vphadduwd %xmm1,%xmm0", 0x8f, 0xe9, 0x78, 0xd6, 0xc1 ); } void fcml_tf_instruction_VPHADDUWQ(void) { FCML_I32( "vphadduwq xmm0,xmmword ptr [eax]", 0x8F, 0xE9, 0x78, 0xD7, 0x00 ); FCML_I32( "vphadduwq xmm0,xmm1", 0x8F, 0xE9, 0x78, 0xD7, 0xC1 ); FCML_A64( "vphadduwq (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0xd7, 0x00 ); FCML_A64( "vphadduwq %xmm1,%xmm0", 0x8f, 0xe9, 0x78, 0xd7, 0xc1 ); } void fcml_tf_instruction_VPHADDWD(void) { FCML_I32( "vphaddwd xmm0,xmmword ptr [eax]", 0x8F, 0xE9, 0x78, 0xC6, 0x00 ); FCML_I32( "vphaddwd xmm0,xmm1", 0x8F, 0xE9, 0x78, 0xC6, 0xC1 ); FCML_A64( "vphaddwd (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0xc6, 0x00 ); FCML_A64( "vphaddwd %xmm1,%xmm0", 0x8f, 0xe9, 0x78, 0xc6, 0xc1 ); } void fcml_tf_instruction_VPHADDWQ(void) { FCML_I32( "vphaddwq xmm0,xmmword ptr [eax]", 0x8F, 0xE9, 0x78, 0xC7, 0x00 ); FCML_I32( "vphaddwq xmm0,xmm1", 0x8F, 0xE9, 0x78, 0xC7, 0xC1 ); FCML_A64( "vphaddwq (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0xc7, 0x00 ); FCML_A64( "vphaddwq %xmm1,%xmm0", 0x8f, 0xe9, 0x78, 0xc7, 0xc1 ); } void fcml_tf_instruction_VPHSUBBW(void) { FCML_I32( "vphsubbw xmm0,xmmword ptr [eax]", 0x8F, 0xE9, 0x78, 0xE1, 0x00 ); FCML_I32( "vphsubbw xmm0,xmm1", 0x8F, 0xE9, 0x78, 0xE1, 0xC1 ); FCML_A64( "vphsubbw (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0xe1, 0x00 ); FCML_A64( "vphsubbw %xmm1,%xmm0", 0x8f, 0xe9, 0x78, 0xe1, 0xc1 ); } void fcml_tf_instruction_VPHSUBDQ(void) { FCML_I32( "vphsubdq xmm0,xmmword ptr [eax]", 0x8F, 0xE9, 0x78, 0xE3, 0x00 ); FCML_I32( "vphsubdq xmm0,xmm1", 0x8F, 0xE9, 0x78, 0xE3, 0xC1 ); FCML_A64( "vphsubdq (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0xe3, 0x00 ); FCML_A64( "vphsubdq %xmm1,%xmm0", 0x8f, 0xe9, 0x78, 0xe3, 0xc1 ); } void fcml_tf_instruction_VPHSUBWD(void) { FCML_I32( "vphsubwd xmm0,xmmword ptr [eax]", 0x8F, 0xE9, 0x78, 0xE2, 0x00 ); FCML_I32( "vphsubwd xmm0,xmm1", 0x8F, 0xE9, 0x78, 0xE2, 0xC1 ); FCML_A64( "vphsubwd (%rax),%xmm0", 0x8f, 0xe9, 0x78, 0xe2, 0x00 ); FCML_A64( "vphsubwd %xmm1,%xmm0", 0x8f, 0xe9, 0x78, 0xe2, 0xc1 ); } void fcml_tf_instruction_VPMACSDD(void) { FCML_I32( "vpmacsdd xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0x8F, 0xE8, 0x50, 0x9E, 0x14, 0x01, 0x20 ); FCML_I64( "vpmacsdd xmm0,xmm5,xmm0,xmm2", 0x8F, 0xE8, 0x50, 0x9E, 0xC0, 0x20 ); FCML_A64( "vpmacsdd %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0x9e, 0x14, 0x01, 0x20 ); FCML_A64( "vpmacsdd %xmm2,%xmm0,%xmm5,%xmm0", 0x8f, 0xe8, 0x50, 0x9e, 0xc0, 0x20 ); } void fcml_tf_instruction_VPMACSDQH(void) { FCML_I32( "vpmacsdqh xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0x8F, 0xE8, 0x50, 0x9F, 0x14, 0x01, 0x20 ); FCML_I64( "vpmacsdqh xmm0,xmm5,xmm0,xmm2", 0x8F, 0xE8, 0x50, 0x9F, 0xC0, 0x20 ); FCML_A64( "vpmacsdqh %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0x9f, 0x14, 0x01, 0x20 ); FCML_A64( "vpmacsdqh %xmm2,%xmm0,%xmm5,%xmm0", 0x8f, 0xe8, 0x50, 0x9f, 0xc0, 0x20 ); } void fcml_tf_instruction_VPMACSDQL(void) { FCML_I32( "vpmacsdql xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0x8F, 0xE8, 0x50, 0x97, 0x14, 0x01, 0x20 ); FCML_I64( "vpmacsdql xmm0,xmm5,xmm0,xmm2", 0x8F, 0xE8, 0x50, 0x97, 0xC0, 0x20 ); FCML_A64( "vpmacsdql %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0x97, 0x14, 0x01, 0x20 ); FCML_A64( "vpmacsdql %xmm2,%xmm0,%xmm5,%xmm0", 0x8f, 0xe8, 0x50, 0x97, 0xc0, 0x20 ); } void fcml_tf_instruction_VPMACSSDD(void) { FCML_I32( "vpmacssdd xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0x8F, 0xE8, 0x50, 0x8E, 0x14, 0x01, 0x20 ); FCML_I64( "vpmacssdd xmm0,xmm5,xmm0,xmm2", 0x8F, 0xE8, 0x50, 0x8E, 0xC0, 0x20 ); FCML_A64( "vpmacssdd %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0x8e, 0x14, 0x01, 0x20 ); FCML_A64( "vpmacssdd %xmm2,%xmm0,%xmm5,%xmm0", 0x8f, 0xe8, 0x50, 0x8e, 0xc0, 0x20 ); } void fcml_tf_instruction_VPMACSSDQH(void) { FCML_I32( "vpmacssdqh xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0x8F, 0xE8, 0x50, 0x8F, 0x14, 0x01, 0x20 ); FCML_I64( "vpmacssdqh xmm0,xmm5,xmm0,xmm2", 0x8F, 0xE8, 0x50, 0x8F, 0xC0, 0x20 ); FCML_A64( "vpmacssdqh %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0x8f, 0x14, 0x01, 0x20 ); FCML_A64( "vpmacssdqh %xmm2,%xmm0,%xmm5,%xmm0", 0x8f, 0xe8, 0x50, 0x8f, 0xc0, 0x20 ); } void fcml_tf_instruction_VPMACSSDQL(void) { FCML_I32( "vpmacssdql xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0x8F, 0xE8, 0x50, 0x87, 0x14, 0x01, 0x20 ); FCML_I64( "vpmacssdql xmm0,xmm5,xmm0,xmm2", 0x8F, 0xE8, 0x50, 0x87, 0xC0, 0x20 ); FCML_A64( "vpmacssdql %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0x87, 0x14, 0x01, 0x20 ); FCML_A64( "vpmacssdql %xmm2,%xmm0,%xmm5,%xmm0", 0x8f, 0xe8, 0x50, 0x87, 0xc0, 0x20 ); } void fcml_tf_instruction_VPMACSSWD(void) { FCML_I32( "vpmacsswd xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0x8F, 0xE8, 0x50, 0x86, 0x14, 0x01, 0x20 ); FCML_I64( "vpmacsswd xmm0,xmm5,xmm0,xmm2", 0x8F, 0xE8, 0x50, 0x86, 0xC0, 0x20 ); FCML_A64( "vpmacsswd %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0x86, 0x14, 0x01, 0x20 ); FCML_A64( "vpmacsswd %xmm2,%xmm0,%xmm5,%xmm0", 0x8f, 0xe8, 0x50, 0x86, 0xc0, 0x20 ); } void fcml_tf_instruction_VPMACSSWW(void) { FCML_I32( "vpmacssww xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0x8F, 0xE8, 0x50, 0x85, 0x14, 0x01, 0x20 ); FCML_I64( "vpmacssww xmm0,xmm5,xmm0,xmm2", 0x8F, 0xE8, 0x50, 0x85, 0xC0, 0x20 ); FCML_A64( "vpmacssww %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0x85, 0x14, 0x01, 0x20 ); FCML_A64( "vpmacssww %xmm2,%xmm0,%xmm5,%xmm0", 0x8f, 0xe8, 0x50, 0x85, 0xc0, 0x20 ); } void fcml_tf_instruction_VPMACSWD(void) { FCML_I32( "vpmacswd xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0x8F, 0xE8, 0x50, 0x96, 0x14, 0x01, 0x20 ); FCML_I64( "vpmacswd xmm0,xmm5,xmm0,xmm2", 0x8F, 0xE8, 0x50, 0x96, 0xC0, 0x20 ); FCML_A64( "vpmacswd %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0x96, 0x14, 0x01, 0x20 ); FCML_A64( "vpmacswd %xmm2,%xmm0,%xmm5,%xmm0", 0x8f, 0xe8, 0x50, 0x96, 0xc0, 0x20 ); } void fcml_tf_instruction_VPMACSWW(void) { FCML_I32( "vpmacsww xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0x8F, 0xE8, 0x50, 0x95, 0x14, 0x01, 0x20 ); FCML_I64( "vpmacsww xmm0,xmm5,xmm0,xmm2", 0x8F, 0xE8, 0x50, 0x95, 0xC0, 0x20 ); FCML_A64( "vpmacsww %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0x95, 0x14, 0x01, 0x20 ); FCML_A64( "vpmacsww %xmm2,%xmm0,%xmm5,%xmm0", 0x8f, 0xe8, 0x50, 0x95, 0xc0, 0x20 ); } void fcml_tf_instruction_VPMADCSSWD(void) { FCML_I32( "vpmadcsswd xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0x8F, 0xE8, 0x50, 0xA6, 0x14, 0x01, 0x20 ); FCML_I64( "vpmadcsswd xmm0,xmm5,xmm0,xmm2", 0x8F, 0xE8, 0x50, 0xA6, 0xC0, 0x20 ); FCML_I32( "vpmadcsswd xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0x8F, 0xE8, 0x50, 0xA6, 0x14, 0x01, 0x20 ); FCML_I64( "vpmadcsswd xmm0,xmm5,xmm0,xmm2", 0x8F, 0xE8, 0x50, 0xA6, 0xC0, 0x20 ); } void fcml_tf_instruction_VPMADCSWD(void) { FCML_I32( "vpmadcswd xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0x8F, 0xE8, 0x50, 0xB6, 0x14, 0x01, 0x20 ); FCML_I64( "vpmadcswd xmm0,xmm5,xmm0,xmm2", 0x8F, 0xE8, 0x50, 0xB6, 0xC0, 0x20 ); FCML_A64( "vpmadcswd %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xb6, 0x14, 0x01, 0x20 ); FCML_A64( "vpmadcswd %xmm2,%xmm0,%xmm5,%xmm0", 0x8f, 0xe8, 0x50, 0xb6, 0xc0, 0x20 ); } void fcml_tf_instruction_VPPERM(void) { FCML_I32( "vpperm xmm2,xmm5,xmmword ptr [ecx+eax],xmm2", 0x8F, 0xE8, 0x50, 0xA3, 0x14, 0x01, 0x20 ); FCML_I64_M( "vpperm xmm0,xmm5,xmm0,xmm2", 2, FCML_MI( 0x8f, 0xe8, 0xd0, 0xa3, 0xc2, 0x00 ), FCML_MI( 0x8f, 0xe8, 0x50, 0xa3, 0xc0, 0x20 ) ); FCML_I64( "vpperm xmm2,xmm5,xmm2,xmmword ptr [rcx+rax]", 0x8F, 0xE8, 0xD0, 0xA3, 0x14, 0x01, 0x20 ); FCML_I64_M( "vpperm xmm0,xmm5,xmm2,xmm0", 2, FCML_MI( 0x8f, 0xe8, 0xd0, 0xa3, 0xc0, 0x20 ), FCML_MI( 0x8f, 0xe8, 0x50, 0xa3, 0xc2, 0x00 ) ); FCML_A64( "vpperm %xmm2,(%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe8, 0x50, 0xa3, 0x14, 0x01, 0x20 ); FCML_A64( "vpperm (%rcx,%rax),%xmm2,%xmm5,%xmm2", 0x8f, 0xe8, 0xd0, 0xa3, 0x14, 0x01, 0x20 ); } void fcml_tf_instruction_VPROTD(void) { FCML_I64( "vprotd xmm2,xmmword ptr [rcx+rax],xmm5", 0x8F, 0xE9, 0x50, 0x92, 0x14, 0x01 ); FCML_I64_M( "vprotd xmm0,xmm0,xmm5", 2, FCML_MI( 0x8f, 0xe9, 0xf8, 0x92, 0xc5 ), FCML_MI( 0x8f, 0xe9, 0x50, 0x92, 0xc0 ) ); FCML_I64( "vprotd xmm2,xmm5,xmmword ptr [rcx+rax]", 0x8F, 0xE9, 0xD0, 0x92, 0x14, 0x01 ); FCML_I64_M( "vprotd xmm0,xmm5,xmm0", 2, FCML_MI( 0x8f, 0xe9, 0xd0, 0x92, 0xc0 ), FCML_MI( 0x8f, 0xe9, 0x78, 0x92, 0xc5 ) ); FCML_I32( "vprotd xmm2,xmmword ptr [ecx+eax],20h", 0x8F, 0xE8, 0x78, 0xC2, 0x14, 0x01, 0x20 ); FCML_I64( "vprotd xmm0,xmm0,20h", 0x8F, 0xE8, 0x78, 0xC2, 0xC0, 0x20 ); FCML_A64( "vprotd %xmm5,(%rcx,%rax),%xmm2", 0x8f, 0xe9, 0x50, 0x92, 0x14, 0x01 ); FCML_A64( "vprotd (%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe9, 0xd0, 0x92, 0x14, 0x01 ); FCML_A64( "vprotd $0x20,(%rcx,%rax),%xmm2", 0x8f, 0xe8, 0x78, 0xc2, 0x14, 0x01, 0x20 ); FCML_A64( "vprotd $0x20,%xmm0,%xmm0", 0x8f, 0xe8, 0x78, 0xc2, 0xc0, 0x20 ); } void fcml_tf_instruction_VPROTB(void) { FCML_I32( "vprotb xmm2,xmmword ptr [ecx+eax],xmm5", 0x8F, 0xE9, 0x50, 0x90, 0x14, 0x01 ); FCML_I64_M( "vprotb xmm0,xmm0,xmm5", 2, FCML_MI( 0x8f, 0xe9, 0xf8, 0x90, 0xc5 ), FCML_MI( 0x8f, 0xe9, 0x50, 0x90, 0xc0 ) ); FCML_I64( "vprotb xmm2,xmm5,xmmword ptr [rcx+rax]", 0x8F, 0xE9, 0xD0, 0x90, 0x14, 0x01 ); FCML_I64_M( "vprotb xmm0,xmm5,xmm0", 2, FCML_MI( 0x8f, 0xe9, 0xd0, 0x90, 0xc0 ), FCML_MI( 0x8f, 0xe9, 0x78, 0x90, 0xc5 ) ); FCML_I32( "vprotb xmm2,xmmword ptr [ecx+eax],20h", 0x8F, 0xE8, 0x78, 0xC0, 0x14, 0x01, 0x20 ); FCML_I64( "vprotb xmm0,xmm0,20h", 0x8F, 0xE8, 0x78, 0xC0, 0xC0, 0x20 ); FCML_A64( "vprotb %xmm5,(%rcx,%rax),%xmm2", 0x8f, 0xe9, 0x50, 0x90, 0x14, 0x01 ); FCML_A64( "vprotb (%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe9, 0xd0, 0x90, 0x14, 0x01 ); FCML_A64( "vprotb $0x20,(%rcx,%rax),%xmm2", 0x8f, 0xe8, 0x78, 0xc0, 0x14, 0x01, 0x20 ); FCML_A64( "vprotb $0x20,%xmm0,%xmm0", 0x8f, 0xe8, 0x78, 0xc0, 0xc0, 0x20 ); } void fcml_tf_instruction_VPROTQ(void) { FCML_I32( "vprotq xmm2,xmmword ptr [ecx+eax],xmm5", 0x8F, 0xE9, 0x50, 0x93, 0x14, 0x01 ); FCML_I64_M( "vprotq xmm0,xmm0,xmm5", 2, FCML_MI( 0x8f, 0xe9, 0xf8, 0x93, 0xc5 ), FCML_MI( 0x8f, 0xe9, 0x50, 0x93, 0xc0 ) ); FCML_I64( "vprotq xmm2,xmm5,xmmword ptr [rcx+rax]", 0x8F, 0xE9, 0xD0, 0x93, 0x14, 0x01 ); FCML_I64_M( "vprotq xmm0,xmm5,xmm0", 2, FCML_MI( 0x8f, 0xe9, 0xd0, 0x93, 0xc0 ), FCML_MI( 0x8f, 0xe9, 0x78, 0x93, 0xc5 ) ); FCML_I32( "vprotq xmm2,xmmword ptr [ecx+eax],20h", 0x8F, 0xE8, 0x78, 0xC3, 0x14, 0x01, 0x20 ); FCML_I64( "vprotq xmm0,xmm0,20h", 0x8F, 0xE8, 0x78, 0xC3, 0xC0, 0x20 ); FCML_A64( "vprotq %xmm5,(%rcx,%rax),%xmm2", 0x8f, 0xe9, 0x50, 0x93, 0x14, 0x01 ); FCML_A64( "vprotq (%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe9, 0xd0, 0x93, 0x14, 0x01 ); FCML_A64( "vprotq $0x20,(%rcx,%rax),%xmm2", 0x8f, 0xe8, 0x78, 0xc3, 0x14, 0x01, 0x20 ); FCML_A64( "vprotq $0x20,%xmm0,%xmm0", 0x8f, 0xe8, 0x78, 0xc3, 0xc0, 0x20 ); } void fcml_tf_instruction_VPROTW(void) { FCML_I32( "vprotw xmm2,xmmword ptr [ecx+eax],xmm5", 0x8F, 0xE9, 0x50, 0x91, 0x14, 0x01 ); FCML_I64_M( "vprotw xmm0,xmm0,xmm5", 2, FCML_MI( 0x8f, 0xe9, 0xf8, 0x91, 0xc5 ), FCML_MI( 0x8f, 0xe9, 0x50, 0x91, 0xc0 ) ); FCML_I64( "vprotw xmm2,xmm5,xmmword ptr [rcx+rax]", 0x8F, 0xE9, 0xD0, 0x91, 0x14, 0x01 ); FCML_I64_M( "vprotw xmm0,xmm5,xmm0", 2, FCML_MI( 0x8f, 0xe9, 0xd0, 0x91, 0xc0 ), FCML_MI( 0x8f, 0xe9, 0x78, 0x91, 0xc5 ) ); FCML_I32( "vprotw xmm2,xmmword ptr [ecx+eax],20h", 0x8F, 0xE8, 0x78, 0xC1, 0x14, 0x01, 0x20 ); FCML_I64( "vprotw xmm0,xmm0,20h", 0x8F, 0xE8, 0x78, 0xC1, 0xC0, 0x20 ); FCML_A64( "vprotw %xmm5,(%rcx,%rax),%xmm2", 0x8f, 0xe9, 0x50, 0x91, 0x14, 0x01 ); FCML_A64( "vprotw (%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe9, 0xd0, 0x91, 0x14, 0x01 ); FCML_A64( "vprotw $0x20,(%rcx,%rax),%xmm2", 0x8f, 0xe8, 0x78, 0xc1, 0x14, 0x01, 0x20 ); FCML_A64( "vprotw $0x20,%xmm0,%xmm0", 0x8f, 0xe8, 0x78, 0xc1, 0xc0, 0x20 ); } void fcml_tf_instruction_VPSHAB(void) { FCML_I32( "vpshab xmm2,xmmword ptr [ecx+eax],xmm5", 0x8F, 0xE9, 0x50, 0x98, 0x14, 0x01 ); FCML_I64_M( "vpshab xmm0,xmm0,xmm5", 2, FCML_MI( 0x8f, 0xe9, 0xf8, 0x98, 0xc5 ), FCML_MI( 0x8f, 0xe9, 0x50, 0x98, 0xc0 ) ); FCML_I64( "vpshab xmm2,xmm5,xmmword ptr [rcx+rax]", 0x8F, 0xE9, 0xD0, 0x98, 0x14, 0x01 ); FCML_I64_M( "vpshab xmm0,xmm5,xmm0", 2, FCML_MI( 0x8f, 0xe9, 0xd0, 0x98, 0xc0 ), FCML_MI( 0x8f, 0xe9, 0x78, 0x98, 0xc5 ) ); FCML_A64( "vpshab %xmm5,(%rcx,%rax),%xmm2", 0x8f, 0xe9, 0x50, 0x98, 0x14, 0x01 ); FCML_A64( "vpshab (%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe9, 0xd0, 0x98, 0x14, 0x01 ); FCML_A64_M( "vpshab %xmm5,%xmm0,%xmm0", 2, FCML_MI( 0x8f, 0xe9, 0xf8, 0x98, 0xc5 ), FCML_MI( 0x8f, 0xe9, 0x50, 0x98, 0xc0 ) ); FCML_A64_M( "vpshab %xmm0,%xmm5,%xmm0", 2, FCML_MI( 0x8f, 0xe9, 0xd0, 0x98, 0xc0 ), FCML_MI( 0x8f, 0xe9, 0x78, 0x98, 0xc5 ) ); } void fcml_tf_instruction_VPSHAD(void) { FCML_I32( "vpshad xmm2,xmmword ptr [ecx+eax],xmm5", 0x8F, 0xE9, 0x50, 0x9A, 0x14, 0x01 ); FCML_I64_M( "vpshad xmm0,xmm0,xmm5", 2, FCML_MI( 0x8f, 0xe9, 0xf8, 0x9a, 0xc5 ), FCML_MI( 0x8f, 0xe9, 0x50, 0x9A, 0xc0 ) ); FCML_I64( "vpshad xmm2,xmm5,xmmword ptr [rcx+rax]", 0x8F, 0xE9, 0xD0, 0x9a, 0x14, 0x01 ); FCML_I64_M( "vpshad xmm0,xmm5,xmm0", 2, FCML_MI( 0x8f, 0xe9, 0xd0, 0x9a, 0xc0 ), FCML_MI( 0x8f, 0xe9, 0x78, 0x9A, 0xc5 ) ); FCML_A64( "vpshad %xmm5,(%rcx,%rax),%xmm2", 0x8f, 0xe9, 0x50, 0x9a, 0x14, 0x01 ); FCML_A64( "vpshad (%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe9, 0xd0, 0x9a, 0x14, 0x01 ); } void fcml_tf_instruction_VPSHAQ(void) { FCML_I32( "vpshaq xmm2,xmmword ptr [ecx+eax],xmm5", 0x8F, 0xE9, 0x50, 0x9B, 0x14, 0x01 ); FCML_I64_M( "vpshaq xmm0,xmm0,xmm5", 2, FCML_MI( 0x8f, 0xe9, 0xf8, 0x9b, 0xc5 ), FCML_MI( 0x8f, 0xe9, 0x50, 0x9b, 0xc0 ) ); FCML_I64( "vpshaq xmm2,xmm5,xmmword ptr [rcx+rax]", 0x8F, 0xE9, 0xD0, 0x9B, 0x14, 0x01 ); FCML_I64_M( "vpshaq xmm0,xmm5,xmm0", 2, FCML_MI( 0x8f, 0xe9, 0xd0, 0x9b, 0xc0 ), FCML_MI( 0x8f, 0xe9, 0x78, 0x9b, 0xc5 ) ); FCML_A64( "vpshaq %xmm5,(%rcx,%rax),%xmm2", 0x8f, 0xe9, 0x50, 0x9b, 0x14, 0x01 ); FCML_A64( "vpshaq (%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe9, 0xd0, 0x9b, 0x14, 0x01 ); } void fcml_tf_instruction_VPSHAW(void) { FCML_I32( "vpshaw xmm2,xmmword ptr [ecx+eax],xmm5", 0x8F, 0xE9, 0x50, 0x99, 0x14, 0x01 ); FCML_I64_M( "vpshaw xmm0,xmm0,xmm5", 2, FCML_MI( 0x8f, 0xe9, 0xf8, 0x99, 0xc5 ), FCML_MI( 0x8f, 0xe9, 0x50, 0x99, 0xc0 ) ); FCML_I64( "vpshaw xmm2,xmmword ptr [rcx+rax],xmm5", 0x8F, 0xE9, 0x50, 0x99, 0x14, 0x01 ); FCML_I64_M( "vpshaw xmm0,xmm0,xmm5", 2, FCML_MI( 0x8f, 0xe9, 0xf8, 0x99, 0xc5 ), FCML_MI( 0x8f, 0xe9, 0x50, 0x99, 0xc0 ) ); FCML_A64( "vpshaw %xmm5,(%rcx,%rax),%xmm2", 0x8f, 0xe9, 0x50, 0x99, 0x14, 0x01 ); FCML_A64( "vpshaw %xmm5,(%rcx,%rax),%xmm2", 0x8f, 0xe9, 0x50, 0x99, 0x14, 0x01 ); } void fcml_tf_instruction_VPSHLB(void) { FCML_I32( "vpshlb xmm2,xmmword ptr [ecx+eax],xmm5", 0x8F, 0xE9, 0x50, 0x94, 0x14, 0x01 ); FCML_I64_M( "vpshlb xmm0,xmm0,xmm5", 2, FCML_MI( 0x8f, 0xe9, 0xf8, 0x94, 0xc5 ), FCML_MI( 0x8f, 0xe9, 0x50, 0x94, 0xc0 ) ); FCML_I64( "vpshlb xmm2,xmmword ptr [rcx+rax],xmm5", 0x8F, 0xE9, 0x50, 0x94, 0x14, 0x01 ); FCML_I64_M( "vpshlb xmm0,xmm0,xmm5", 2, FCML_MI( 0x8f, 0xe9, 0xf8, 0x94, 0xc5 ), FCML_MI( 0x8f, 0xe9, 0x50, 0x94, 0xc0 ) ); FCML_A64( "vpshlb %xmm5,(%rcx,%rax),%xmm2", 0x8f, 0xe9, 0x50, 0x94, 0x14, 0x01 ); FCML_A64( "vpshlb %xmm5,(%rcx,%rax),%xmm2", 0x8f, 0xe9, 0x50, 0x94, 0x14, 0x01 ); } void fcml_tf_instruction_VPSHLD(void) { FCML_I32( "vpshld xmm2,xmmword ptr [ecx+eax],xmm5", 0x8F, 0xE9, 0x50, 0x96, 0x14, 0x01 ); FCML_I64_M( "vpshld xmm0,xmm0,xmm5", 2, FCML_MI( 0x8f, 0xe9, 0xf8, 0x96, 0xc5 ), FCML_MI( 0x8f, 0xe9, 0x50, 0x96, 0xc0 ) ); FCML_I64( "vpshld xmm2,xmm5,xmmword ptr [rcx+rax]", 0x8F, 0xE9, 0xD0, 0x96, 0x14, 0x01 ); FCML_I64_M( "vpshld xmm0,xmm5,xmm0", 2, FCML_MI( 0x8f, 0xe9, 0xd0, 0x96, 0xc0 ), FCML_MI( 0x8f, 0xe9, 0x78, 0x96, 0xc5 ) ); FCML_A64( "vpshld %xmm5,(%rcx,%rax),%xmm2", 0x8f, 0xe9, 0x50, 0x96, 0x14, 0x01 ); FCML_A64( "vpshld (%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe9, 0xd0, 0x96, 0x14, 0x01 ); } void fcml_tf_instruction_VPSHLQ(void) { FCML_I32( "vpshlq xmm2,xmmword ptr [ecx+eax],xmm5", 0x8F, 0xE9, 0x50, 0x97, 0x14, 0x01 ); FCML_I64_M( "vpshlq xmm0,xmm0,xmm5", 2, FCML_MI( 0x8f, 0xe9, 0xf8, 0x97, 0xc5 ), FCML_MI( 0x8f, 0xe9, 0x50, 0x97, 0xc0 ) ); FCML_I64( "vpshlq xmm2,xmm5,xmmword ptr [rcx+rax]", 0x8F, 0xE9, 0xD0, 0x97, 0x14, 0x01 ); FCML_I64_M( "vpshlq xmm0,xmm5,xmm0", 2, FCML_MI( 0x8f, 0xe9, 0xd0, 0x97, 0xc0 ), FCML_MI( 0x8f, 0xe9, 0x78, 0x97, 0xc5 ) ); FCML_A64( "vpshlq %xmm5,(%rcx,%rax),%xmm2", 0x8f, 0xe9, 0x50, 0x97, 0x14, 0x01 ); FCML_A64( "vpshlq (%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe9, 0xd0, 0x97, 0x14, 0x01 ); } void fcml_tf_instruction_VPSHLW(void) { FCML_I32( "vpshlw xmm2,xmmword ptr [ecx+eax],xmm5", 0x8F, 0xE9, 0x50, 0x95, 0x14, 0x01 ); FCML_I64_M( "vpshlw xmm0,xmm0,xmm5", 2, FCML_MI( 0x8f, 0xe9, 0xf8, 0x95, 0xc5 ), FCML_MI( 0x8f, 0xe9, 0x50, 0x95, 0xc0 ) ); FCML_I64( "vpshlw xmm2,xmm5,xmmword ptr [rcx+rax]", 0x8F, 0xE9, 0xD0, 0x95, 0x14, 0x01 ); FCML_I64_M( "vpshlw xmm0,xmm5,xmm0", 2, FCML_MI( 0x8f, 0xe9, 0xd0, 0x95, 0xc0 ), FCML_MI( 0x8f, 0xe9, 0x78, 0x95, 0xc5 ) ); FCML_A64( "vpshlw %xmm5,(%rcx,%rax),%xmm2", 0x8f, 0xe9, 0x50, 0x95, 0x14, 0x01 ); FCML_A64( "vpshlw (%rcx,%rax),%xmm5,%xmm2", 0x8f, 0xe9, 0xd0, 0x95, 0x14, 0x01 ); } void fcml_tf_instruction_VMPTRLD(void) { FCML_I64( "vmptrld qword ptr [rdx]", 0x0F, 0xC7, 0x32 ); FCML_I64( "vmptrld qword ptr [edx]", 0x67, 0x0F, 0xC7, 0x32 ); FCML_I64_A_FAILED( "vmptrld edx", 0x67, 0x0F, 0xC7, 0xF2 ); FCML_I64_D_FAILED( "vmptrld edx", 0x67, 0x0F, 0xC7, 0xF2 ); FCML_I32_FAILED( "vmptrld qword ptr [edx]", 0x0F, 0xC7, 0x32 ); FCML_A64( "vmptrld (%rdx)", 0x0f, 0xc7, 0x32 ); FCML_A64( "vmptrld (%edx)", 0x67, 0x0f, 0xc7, 0x32 ); } void fcml_tf_instruction_VMPTRST(void) { FCML_I64( "vmptrst qword ptr [rdx]", 0x0F, 0xC7, 0x3A ); FCML_I64( "vmptrst qword ptr [edx]", 0x67, 0x0F, 0xC7, 0x3A ); FCML_I64_A_FAILED( "vmptrst edx", 0x67, 0x0F, 0xC7, 0xFA ); FCML_I32_FAILED( "vmptrst qword ptr [edx]", 0x0F, 0xC7, 0x3A ); FCML_A64( "vmptrst (%rdx)", 0x0f, 0xc7, 0x3a ); FCML_A64( "vmptrst (%edx)", 0x67, 0x0f, 0xc7, 0x3a ); } void fcml_tf_instruction_VMCLEAR(void) { FCML_I64( "vmclear qword ptr [rdx]", 0x66, 0x0F, 0xC7, 0x3A ); FCML_I64( "vmclear qword ptr [edx]", 0x67, 0x66, 0x0F, 0xC7, 0x3A ); FCML_I64_A_FAILED( "vmclear edx", 0x67, 0x66, 0x0F, 0xC7, 0xFA ); FCML_I32_FAILED( "vmclear qword ptr [edx]", 0x66, 0x0F, 0xC7, 0x3A ); FCML_A64( "vmptrst (%rdx)", 0x0f, 0xc7, 0x3a ); FCML_A64( "vmptrst (%edx)", 0x67, 0x0f, 0xc7, 0x3a ); } void fcml_tf_instruction_VMREAD(void) { FCML_I64( "vmread qword ptr [rdx],rdi", 0x0F, 0x78, 0x3A ); FCML_I64( "vmread rdx,rdi", 0x0F, 0x78, 0xFA ); FCML_I32( "vmread dword ptr [edx],edi", 0x0F, 0x78, 0x3A ); FCML_I32( "vmread edx,edi", 0x0F, 0x78, 0xFA ); FCML_A64( "vmread %rdi,(%rdx)", 0x0f, 0x78, 0x3a ); } void fcml_tf_instruction_VMWRITE(void) { FCML_I64( "vmwrite rdi,qword ptr [rdx]", 0x0F, 0x79, 0x3A ); FCML_I64( "vmwrite rdi,rdx", 0x0F, 0x79, 0xFA ); FCML_I32( "vmwrite edi,dword ptr [edx]", 0x0F, 0x79, 0x3A ); FCML_I32( "vmwrite edi,edx", 0x0F, 0x79, 0xFA ); FCML_A64( "vmwrite (%rdx),%rdi", 0x0f, 0x79, 0x3a ); FCML_A64( "vmwrite %rdx,%rdi", 0x0f, 0x79, 0xfa ); FCML_A64( "vmwrite (%rdx),%rdi", 0x0f, 0x79, 0x3a ); FCML_A64( "vmwrite %rdx,%rdi", 0x0f, 0x79, 0xfa ); } void fcml_tf_instruction_VMLAUNCH(void) { FCML_I64( "vmlaunch", 0x0F, 0x01, 0xC2 ); FCML_I32_FAILED( "vmlaunch", 0x0F, 0x01, 0xC2 ); FCML_A64( "vmlaunch", 0x0f, 0x01, 0xc2 ); } void fcml_tf_instruction_VMRESUME(void) { FCML_I64( "vmresume", 0x0F, 0x01, 0xC3 ); FCML_I32_FAILED( "vmresume", 0x0F, 0x01, 0xC3 ); FCML_A64( "vmresume", 0x0f, 0x01, 0xc3 ); } void fcml_tf_instruction_VMXON(void) { FCML_I64( "vmxon qword ptr [rdx]", 0xF3, 0x0F, 0xC7, 0x32 ); FCML_I64( "vmxon qword ptr [edx]", 0x67, 0xF3, 0x0F, 0xC7, 0x32 ); FCML_I64_A_FAILED( "vmxon edx", 0x67, 0xF3, 0x0F, 0xC7, 0xF2 ); FCML_I32_FAILED( "vmxon qword ptr [edx]", 0xF3, 0x0F, 0xC7, 0x32 ); FCML_A64( "vmxon (%rdx)", 0xf3, 0x0f, 0xc7, 0x32 ); FCML_A64( "vmxon (%edx)", 0x67, 0xf3, 0x0f, 0xc7, 0x32 ); } void fcml_tf_instruction_VMXOFF(void) { FCML_I64( "vmxoff", 0x0F, 0x01, 0xC4 ); FCML_I32_FAILED( "vmxoff", 0x0F, 0x01, 0xC4 ); FCML_A64( "vmxoff", 0x0f, 0x01, 0xc4 ); } void fcml_tf_instruction_VMCALL(void) { FCML_I64( "vmcall", 0x0F, 0x01, 0xC1 ); FCML_I32_FAILED( "vmcall", 0x0F, 0x01, 0xC1 ); FCML_A64( "vmcall", 0x0f, 0x01, 0xc1 ); } void fcml_tf_instruction_VMFUNC(void) { FCML_I64( "vmfunc", 0x0F, 0x01, 0xD4 ); FCML_I32_FAILED( "vmfunc", 0x0F, 0x01, 0xD4 ); FCML_A64( "vmfunc", 0x0f, 0x01, 0xd4 ); } void fcml_tf_instruction_VPERMIL2PS(void) { FCML_I32( "vpermil2ps xmm0,xmm4,xmmword ptr [ecx],xmm7,01h", 0xC4, 0xE3, 0x59, 0x48, 0x01, 0x71 ); FCML_I64( "vpermil2ps xmm0,xmm4,xmm7,xmmword ptr [rcx],01h", 0xC4, 0xE3, 0xD9, 0x48, 0x01, 0x71 ); FCML_I32( "vpermil2ps ymm0,ymm4,ymmword ptr [ecx],ymm7,01h", 0xC4, 0xE3, 0x5D, 0x48, 0x01, 0x71 ); FCML_I64( "vpermil2ps ymm0,ymm4,ymm7,ymmword ptr [rcx],01h", 0xC4, 0xE3, 0xDD, 0x48, 0x01, 0x71 ); FCML_I64( "vpermil2ps ymm0,ymm4,ymm15,ymmword ptr [rcx],01h", 0xC4, 0xE3, 0xDD, 0x48, 0x01, 0xF1 ); FCML_I64_M( "vpermil2ps ymm0,ymm4,ymm15,ymm1,01h", 2, FCML_MI( 0xc4, 0xe3, 0xdd, 0x48, 0xc1, 0xf1 ), FCML_MI( 0xc4, 0xc3, 0x5d, 0x48, 0xc7, 0x11 ) ); } void fcml_tf_instruction_VPERMIL2PD(void) { FCML_I32( "vpermil2pd xmm0,xmm4,xmmword ptr [ecx],xmm7,01h", 0xC4, 0xE3, 0x59, 0x49, 0x01, 0x71 ); FCML_I64( "vpermil2pd xmm0,xmm4,xmm7,xmmword ptr [rcx],01h", 0xC4, 0xE3, 0xD9, 0x49, 0x01, 0x71 ); FCML_I32( "vpermil2pd ymm0,ymm4,ymmword ptr [ecx],ymm7,01h", 0xC4, 0xE3, 0x5D, 0x49, 0x01, 0x71 ); FCML_I64( "vpermil2pd ymm0,ymm4,ymm7,ymmword ptr [rcx],01h", 0xC4, 0xE3, 0xDD, 0x49, 0x01, 0x71 ); FCML_I64( "vpermil2pd ymm0,ymm4,ymm15,ymmword ptr [rcx],01h", 0xC4, 0xE3, 0xDD, 0x49, 0x01, 0xF1 ); FCML_I64_M( "vpermil2pd ymm0,ymm4,ymm15,ymm1,01h", 2, FCML_MI( 0xc4, 0xe3, 0xdd, 0x49, 0xc1, 0xf1 ), FCML_MI( 0xc4, 0xc3, 0x5d, 0x49, 0xc7, 0x11 ) ); } fcml_stf_test_case fctl_ti_instructions_v[] = { { "fcml_tf_instruction_VBROADCASTSS", fcml_tf_instruction_VBROADCASTSS }, { "fcml_tf_instruction_VPBROADCASTB", fcml_tf_instruction_VPBROADCASTB }, { "fcml_tf_instruction_VEXTRACTF128", fcml_tf_instruction_VEXTRACTF128 }, { "fcml_tf_instruction_VINSERTF128", fcml_tf_instruction_VINSERTF128 }, { "fcml_tf_instruction_VMASKMOVPS_VMASKMOVPD", fcml_tf_instruction_VMASKMOVPS_VMASKMOVPD }, { "fcml_tf_instruction_VPMASKMOVD_VPMASKMOVQ", fcml_tf_instruction_VPMASKMOVD_VPMASKMOVQ }, { "fcml_tf_instruction_VPBLENDD", fcml_tf_instruction_VPBLENDD }, { "fcml_tf_instruction_VCVTPH2PS", fcml_tf_instruction_VCVTPH2PS }, { "fcml_tf_instruction_VCVTPS2PH", fcml_tf_instruction_VCVTPS2PH }, { "fcml_tf_instruction_VERR", fcml_tf_instruction_VERR }, { "fcml_tf_instruction_VMLOAD", fcml_tf_instruction_VMLOAD }, { "fcml_tf_instruction_VMMCALL", fcml_tf_instruction_VMMCALL }, { "fcml_tf_instruction_VMRUN", fcml_tf_instruction_VMRUN }, { "fcml_tf_instruction_VMSAVE", fcml_tf_instruction_VMSAVE }, { "fcml_tf_instruction_VPERMILPD", fcml_tf_instruction_VPERMILPD }, { "fcml_tf_instruction_VPERMILPS", fcml_tf_instruction_VPERMILPS }, { "fcml_tf_instruction_VPSLLVD", fcml_tf_instruction_VPSLLVD }, { "fcml_tf_instruction_VPSRLVD", fcml_tf_instruction_VPSRLVD }, { "fcml_tf_instruction_VPSRAVD", fcml_tf_instruction_VPSRAVD }, { "fcml_tf_instruction_VPERMD", fcml_tf_instruction_VPERMD }, { "fcml_tf_instruction_VPERMPD", fcml_tf_instruction_VPERMPD }, { "fcml_tf_instruction_VPERMQ", fcml_tf_instruction_VPERMQ }, { "fcml_tf_instruction_VPERMPS", fcml_tf_instruction_VPERMPS }, { "fcml_tf_instruction_VPERM2F128", fcml_tf_instruction_VPERM2F128 }, { "fcml_tf_instruction_VPERM2I128", fcml_tf_instruction_VPERM2I128 }, { "fcml_tf_instruction_VEXTRACTI128", fcml_tf_instruction_VEXTRACTI128 }, { "fcml_tf_instruction_VINSERTI128", fcml_tf_instruction_VINSERTI128 }, { "fcml_tf_instruction_VTESTPS", fcml_tf_instruction_VTESTPS }, { "fcml_tf_instruction_VGATHERDPD", fcml_tf_instruction_VGATHERDPD }, { "fcml_tf_instruction_VGATHERDPS", fcml_tf_instruction_VGATHERDPS }, { "fcml_tf_instruction_VPGATHERDD", fcml_tf_instruction_VPGATHERDD }, { "fcml_tf_instruction_VPGATHERDQ", fcml_tf_instruction_VPGATHERDQ }, { "fcml_tf_instruction_VZEROALL", fcml_tf_instruction_VZEROALL }, { "fcml_tf_instruction_VZEROUPPER", fcml_tf_instruction_VZEROUPPER }, { "fcml_tf_instruction_VFMADDPD", fcml_tf_instruction_VFMADDPD }, { "fcml_tf_instruction_VFMADDPS", fcml_tf_instruction_VFMADDPS }, { "fcml_tf_instruction_VFMADDSD", fcml_tf_instruction_VFMADDSD }, { "fcml_tf_instruction_VFMADDSS", fcml_tf_instruction_VFMADDSS }, { "fcml_tf_instruction_VFMADDSUBPD", fcml_tf_instruction_VFMADDSUBPD }, { "fcml_tf_instruction_VFMADDSUBPS", fcml_tf_instruction_VFMADDSUBPS }, { "fcml_tf_instruction_VFMSUBADDPD", fcml_tf_instruction_VFMSUBADDPD }, { "fcml_tf_instruction_VFMSUBADDPS", fcml_tf_instruction_VFMSUBADDPS }, { "fcml_tf_instruction_VFMSUBPD", fcml_tf_instruction_VFMSUBPD }, { "fcml_tf_instruction_VFMSUBPS", fcml_tf_instruction_VFMSUBPS }, { "fcml_tf_instruction_VFMSUBSD", fcml_tf_instruction_VFMSUBSD }, { "fcml_tf_instruction_VFMSUBSS", fcml_tf_instruction_VFMSUBSS }, { "fcml_tf_instruction_VFNMADDPD", fcml_tf_instruction_VFNMADDPD }, { "fcml_tf_instruction_VFNMADDPS", fcml_tf_instruction_VFNMADDPS }, { "fcml_tf_instruction_VFNMADDSD", fcml_tf_instruction_VFNMADDSD }, { "fcml_tf_instruction_VFNMADDSS", fcml_tf_instruction_VFNMADDSS }, { "fcml_tf_instruction_VFNMSUBPD", fcml_tf_instruction_VFNMSUBPD }, { "fcml_tf_instruction_VFNMSUBPS", fcml_tf_instruction_VFNMSUBPS }, { "fcml_tf_instruction_VFNMSUBSD", fcml_tf_instruction_VFNMSUBSD }, { "fcml_tf_instruction_VFNMSUBSS", fcml_tf_instruction_VFNMSUBSS }, { "fcml_tf_instruction_VFRCZPD", fcml_tf_instruction_VFRCZPD }, { "fcml_tf_instruction_VFRCZPS", fcml_tf_instruction_VFRCZPS }, { "fcml_tf_instruction_VFRCZSD", fcml_tf_instruction_VFRCZSD }, { "fcml_tf_instruction_VFRCZSS", fcml_tf_instruction_VFRCZSS }, { "fcml_tf_instruction_VPCMOV", fcml_tf_instruction_VPCMOV }, { "fcml_tf_instruction_VPCOMU", fcml_tf_instruction_VPCOMU }, { "fcml_tf_instruction_VPCOM", fcml_tf_instruction_VPCOM }, { "fcml_tf_instruction_VPHADDBD", fcml_tf_instruction_VPHADDBD }, { "fcml_tf_instruction_VPHADDBW", fcml_tf_instruction_VPHADDBW }, { "fcml_tf_instruction_VPHADDBQ", fcml_tf_instruction_VPHADDBQ }, { "fcml_tf_instruction_VPHADDDQ", fcml_tf_instruction_VPHADDDQ }, { "fcml_tf_instruction_VPHADDUBD", fcml_tf_instruction_VPHADDUBD }, { "fcml_tf_instruction_VPHADDUBQ", fcml_tf_instruction_VPHADDUBQ }, { "fcml_tf_instruction_VPHADDUBW", fcml_tf_instruction_VPHADDUBW }, { "fcml_tf_instruction_VPHADDUDQ", fcml_tf_instruction_VPHADDUDQ }, { "fcml_tf_instruction_VPHADDUWD", fcml_tf_instruction_VPHADDUWD }, { "fcml_tf_instruction_VPHADDUWQ", fcml_tf_instruction_VPHADDUWQ }, { "fcml_tf_instruction_VPHADDWD", fcml_tf_instruction_VPHADDWD }, { "fcml_tf_instruction_VPHADDWQ", fcml_tf_instruction_VPHADDWQ }, { "fcml_tf_instruction_VPHSUBBW", fcml_tf_instruction_VPHSUBBW }, { "fcml_tf_instruction_VPHSUBDQ", fcml_tf_instruction_VPHSUBDQ }, { "fcml_tf_instruction_VPHSUBWD", fcml_tf_instruction_VPHSUBWD }, { "fcml_tf_instruction_VPMACSDD", fcml_tf_instruction_VPMACSDD }, { "fcml_tf_instruction_VPMACSDQH", fcml_tf_instruction_VPMACSDQH }, { "fcml_tf_instruction_VPMACSDQL", fcml_tf_instruction_VPMACSDQL }, { "fcml_tf_instruction_VPMACSSDD", fcml_tf_instruction_VPMACSSDD }, { "fcml_tf_instruction_VPMACSSDQH", fcml_tf_instruction_VPMACSSDQH }, { "fcml_tf_instruction_VPMACSSDQL", fcml_tf_instruction_VPMACSSDQL }, { "fcml_tf_instruction_VPMACSSWD", fcml_tf_instruction_VPMACSSWD }, { "fcml_tf_instruction_VPMACSSWW", fcml_tf_instruction_VPMACSSWW }, { "fcml_tf_instruction_VPMACSWD", fcml_tf_instruction_VPMACSWD }, { "fcml_tf_instruction_VPMACSWW", fcml_tf_instruction_VPMACSWW }, { "fcml_tf_instruction_VPMADCSSWD", fcml_tf_instruction_VPMADCSSWD }, { "fcml_tf_instruction_VPMADCSWD", fcml_tf_instruction_VPMADCSWD }, { "fcml_tf_instruction_VPPERM", fcml_tf_instruction_VPPERM }, { "fcml_tf_instruction_VPROTD", fcml_tf_instruction_VPROTD }, { "fcml_tf_instruction_VPROTB", fcml_tf_instruction_VPROTB }, { "fcml_tf_instruction_VPROTQ", fcml_tf_instruction_VPROTQ }, { "fcml_tf_instruction_VPROTW", fcml_tf_instruction_VPROTW }, { "fcml_tf_instruction_VPSHAB", fcml_tf_instruction_VPSHAB }, { "fcml_tf_instruction_VPSHAD", fcml_tf_instruction_VPSHAD }, { "fcml_tf_instruction_VPSHAQ", fcml_tf_instruction_VPSHAQ }, { "fcml_tf_instruction_VPSHAW", fcml_tf_instruction_VPSHAW }, { "fcml_tf_instruction_VPSHLB", fcml_tf_instruction_VPSHLB }, { "fcml_tf_instruction_VPSHLD", fcml_tf_instruction_VPSHLD }, { "fcml_tf_instruction_VPSHLQ", fcml_tf_instruction_VPSHLQ }, { "fcml_tf_instruction_VPSHLW", fcml_tf_instruction_VPSHLW }, { "fcml_tf_instruction_VMPTRLD", fcml_tf_instruction_VMPTRLD }, { "fcml_tf_instruction_VMPTRST", fcml_tf_instruction_VMPTRST }, { "fcml_tf_instruction_VMCLEAR", fcml_tf_instruction_VMCLEAR }, { "fcml_tf_instruction_VMREAD", fcml_tf_instruction_VMREAD }, { "fcml_tf_instruction_VMWRITE", fcml_tf_instruction_VMWRITE }, { "fcml_tf_instruction_VMLAUNCH", fcml_tf_instruction_VMLAUNCH }, { "fcml_tf_instruction_VMRESUME", fcml_tf_instruction_VMRESUME }, { "fcml_tf_instruction_VMXON", fcml_tf_instruction_VMXON }, { "fcml_tf_instruction_VMXOFF", fcml_tf_instruction_VMXOFF }, { "fcml_tf_instruction_VMCALL", fcml_tf_instruction_VMCALL }, { "fcml_tf_instruction_VMFUNC", fcml_tf_instruction_VMFUNC }, { "fcml_tf_instruction_VPERMIL2PS", fcml_tf_instruction_VPERMIL2PS }, { "fcml_tf_instruction_VPERMIL2PD", fcml_tf_instruction_VPERMIL2PD }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_v = { "suite-fctl_ti_instructions_v", fcml_tf_instructions_v_suite_init, fcml_tf_instructions_v_suite_cleanup, fctl_ti_instructions_v }; fcml-1.1.1/check/public-tests/assembler_t.h0000644000175000017500000000173112560745216015532 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 ASSEMBLER_T_H_ #define ASSEMBLER_T_H_ #include extern fcml_stf_test_suite fcml_si_assembler; #endif /* ASSEMBLER_T_H_ */ fcml-1.1.1/check/public-tests/instructions_base_t.h0000644000175000017500000004425112560745216017317 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 INSTRUCTIONS_BASE_T_H_ #define INSTRUCTIONS_BASE_T_H_ #include #include #include #include #include extern fcml_st_dialect *dialect_intel; extern fcml_st_assembler *assembler_intel; extern fcml_st_disassembler *disassembler_intel; extern fcml_st_dialect *dialect_gas; extern fcml_st_assembler *assembler_gas; extern fcml_st_disassembler *disassembler_gas; #define FCML_TSF_SHOULD_FAIL 0x00000001 #define FCML_TSF_SHORT 0x00000002 #define FCML_TSF_PRINT_ONLY 0x00000004 #define FCML_TSF_ENABLE_RIP 0x00000008 #define FCML_TSF_MULTI_ASM_RESULTS 0x00000010 #define FCML_TSF_ASM_ONLY 0x00000020 #define FCML_TSF_GAS_DIALECT 0x00000040 #ifdef FCML_MSCC int fcml_fn_test_number_of_arguments( fcml_string code ); #define FCML_MI(...) fcml_fn_test_number_of_arguments(#__VA_ARGS__), __VA_ARGS__ #else #define FCML_MI(...) ( sizeof( ( fcml_uint8_t[] ) { __VA_ARGS__ } ) / sizeof( fcml_uint8_t ) ), __VA_ARGS__ #endif #define FCML_I16_M(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT( fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_16_BIT, x, FCML_TSF_MULTI_ASM_RESULTS, 0 ) ); } #define FCML_I32_M(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT( fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_MULTI_ASM_RESULTS, 0 ) ); } #define FCML_A32_M(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT( fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_MULTI_ASM_RESULTS | FCML_TSF_GAS_DIALECT, 0 ) ); } #define FCML_I64_M(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT( fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_MULTI_ASM_RESULTS, 0 ) ); } #define FCML_A64_M(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT( fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_MULTI_ASM_RESULTS | FCML_TSF_GAS_DIALECT, 0 ) ); } #define FCML_I32_RIP_M(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_ENABLE_RIP | FCML_TSF_MULTI_ASM_RESULTS, 0)); } #define FCML_I64_RIP_M(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_ENABLE_RIP | FCML_TSF_MULTI_ASM_RESULTS, 0)); } #define FCML_I3264_M(x,...) { FCML_I32_M( x, __VA_ARGS__ ); FCML_I64_M( x, __VA_ARGS__ ); } #define FCML_A3264_M(x,...) { FCML_A32_M( x, __VA_ARGS__ ); FCML_A64_M( x, __VA_ARGS__ ); } #define FCML_I16_M_A(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_16_BIT, x, FCML_TSF_MULTI_ASM_RESULTS | FCML_TSF_ASM_ONLY, 0)); } #define FCML_I32_M_A(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_MULTI_ASM_RESULTS | FCML_TSF_ASM_ONLY, 0)); } #define FCML_A32_M_A(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_MULTI_ASM_RESULTS | FCML_TSF_ASM_ONLY | FCML_TSF_GAS_DIALECT, 0)); } #define FCML_I64_M_A(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_MULTI_ASM_RESULTS | FCML_TSF_ASM_ONLY, 0)); } #define FCML_A64_M_A(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_MULTI_ASM_RESULTS | FCML_TSF_ASM_ONLY | FCML_TSF_GAS_DIALECT, 0)); } #define FCML_I3264_M_A(x,...) { FCML_I32_M_A( x, __VA_ARGS__ ); FCML_I64_M_A( x, __VA_ARGS__ ); } #define FCML_I32_M_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_PRINT_ONLY | FCML_TSF_MULTI_ASM_RESULTS, 0); } #define FCML_I64_M_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_PRINT_ONLY | FCML_TSF_MULTI_ASM_RESULTS, 0); } #define FCML_A32_M_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_PRINT_ONLY | FCML_TSF_MULTI_ASM_RESULTS | FCML_TSF_GAS_DIALECT, 0); } #define FCML_A64_M_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_PRINT_ONLY | FCML_TSF_MULTI_ASM_RESULTS | FCML_TSF_GAS_DIALECT, 0); } #define FCML_I3264(x,...) { FCML_I32(x,__VA_ARGS__); FCML_I64(x,__VA_ARGS__); } #define FCML_A3264(x,...) { FCML_A32(x,__VA_ARGS__); FCML_A64(x,__VA_ARGS__); } #define FCML_I16_DF(x,tf,rf,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_16_BIT, x, tf, rf)); } #define FCML_I32_DF(x,tf,rf,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, tf, rf)); } #define FCML_I64_DF(x,tf,rf,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, tf, rf)); } #define FCML_I16(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_16_BIT, x, 0, 0)); } #define FCML_I32(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, 0, 0)); } #define FCML_A32(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_GAS_DIALECT, 0)); } #define FCML_I64(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, 0, 0)); } #define FCML_A64(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_GAS_DIALECT, 0)); } #define FCML_I32_RF(x,ren,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, 0, ren)); } #define FCML_I64_RF(x,ren,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, 0, ren)); } #define FCML_I32_RIP(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_ENABLE_RIP, 0)); } #define FCML_I64_RIP(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_ENABLE_RIP, 0)); } #define FCML_I32_FAILED(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_SHOULD_FAIL, 0)); } #define FCML_A32_FAILED(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_SHOULD_FAIL | FCML_TSF_GAS_DIALECT, 0)); } #define FCML_I64_FAILED(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_SHOULD_FAIL, 0)); } #define FCML_A64_FAILED(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_SHOULD_FAIL | FCML_TSF_GAS_DIALECT, 0)); } #define FCML_I3264_P(x,...) { FCML_I32_P( x, __VA_ARGS__ ); FCML_I64_P( x, __VA_ARGS__ ); } #define FCML_I16_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_16_BIT, x, FCML_TSF_PRINT_ONLY, 0); } #define FCML_I32_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_PRINT_ONLY, 0); } #define FCML_A32_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_PRINT_ONLY | FCML_TSF_GAS_DIALECT, 0); } #define FCML_I64_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_PRINT_ONLY, 0); } #define FCML_A64_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_PRINT_ONLY | FCML_TSF_GAS_DIALECT, 0); } #define FCML_I64_RIP_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_PRINT_ONLY | FCML_TSF_ENABLE_RIP | FCML_TSF_MULTI_ASM_RESULTS, 0); } #define FCML_I3264_D(x,...) { FCML_I32_D( x, __VA_ARGS__ ); FCML_I64_D( x, __VA_ARGS__ ); } #define FCML_I16_D(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_16_BIT, x, 0, 0)); } #define FCML_I32_D(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_32_BIT, x, 0, 0)); } #define FCML_A32_D(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_GAS_DIALECT, 0)); } #define FCML_I16_D_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_16_BIT, x, FCML_TSF_PRINT_ONLY, 0 ); } #define FCML_I32_D_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_PRINT_ONLY, 0 ); } #define FCML_A16_D_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_16_BIT, x, FCML_TSF_PRINT_ONLY | FCML_TSF_GAS_DIALECT, 0 ); } #define FCML_A32_D_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_PRINT_ONLY | FCML_TSF_GAS_DIALECT, 0 ); } #define FCML_I32_D_RF(x,ren,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_32_BIT, x, 0, ren)); } #define FCML_I32_D_RF_P(x,ren,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_PRINT_ONLY, ren); } #define FCML_I64_D(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_64_BIT, x, 0, 0)); } #define FCML_A64_D(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_GAS_DIALECT, 0)); } #define FCML_I64_D_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_PRINT_ONLY, 0); } #define FCML_A64_D_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_PRINT_ONLY | FCML_TSF_GAS_DIALECT, 0); } #define FCML_I64_D_RF(x,ren,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_64_BIT, x, 0, ren)); } #define FCML_I32_D_FAILED(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_SHOULD_FAIL, 0)); } #define FCML_A32_D_FAILED(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_SHOULD_FAIL | FCML_TSF_GAS_DIALECT, 0)); } #define FCML_I64_D_FAILED(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_SHOULD_FAIL, 0)); } #define FCML_A64_D_FAILED(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_SHOULD_FAIL | FCML_TSF_GAS_DIALECT, 0)); } #define FCML_I32_D_SHORT(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_SHORT, 0)); } #define FCML_A32_D_SHORT(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_SHORT | FCML_TSF_GAS_DIALECT, 0)); } #define FCML_I64_D_SHORT(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_SHORT, 0)); } #define FCML_A64_D_SHORT(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_SHORT | FCML_TSF_GAS_DIALECT, 0)); } #define FCML_I32_D_SHORT_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_PRINT_ONLY | FCML_TSF_SHORT, 0); } #define FCML_A32_D_SHORT_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_PRINT_ONLY | FCML_TSF_SHORT | FCML_TSF_GAS_DIALECT, 0); } #define FCML_I64_D_SHORT_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_PRINT_ONLY | FCML_TSF_SHORT, 0); } #define FCML_A64_D_SHORT_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test_diss( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_PRINT_ONLY | FCML_TSF_SHORT | FCML_TSF_GAS_DIALECT, 0); } #define FCML_I3264_A(x,...) { FCML_I32_A(x,__VA_ARGS__); FCML_I64_A(x,__VA_ARGS__); } #define FCML_A3264_A(x,...) { FCML_A32_A(x,__VA_ARGS__); FCML_A64_A(x,__VA_ARGS__); } #define FCML_I3264_A_FAILED(x,...) { FCML_I32_A_FAILED(x,__VA_ARGS__); FCML_I64_A_FAILED(x,__VA_ARGS__); } #define FCML_I32_A(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_ASM_ONLY, 0)); } #define FCML_I16_A(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_16_BIT, x, FCML_TSF_ASM_ONLY, 0)); } #define FCML_A32_A(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_ASM_ONLY | FCML_TSF_GAS_DIALECT, 0)); } #define FCML_A16_A(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_16_BIT, x, FCML_TSF_ASM_ONLY | FCML_TSF_GAS_DIALECT, 0)); } #define FCML_I32_A_RF(x,ren,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_ASM_ONLY, ren)); } #define FCML_I32_A_FAILED(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_SHOULD_FAIL | FCML_TSF_ASM_ONLY, 0)); } #define FCML_I64_A(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_ASM_ONLY, 0)); } #define FCML_A64_A(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_ASM_ONLY | FCML_TSF_GAS_DIALECT, 0)); } #define FCML_I64_A_RF(x,ren,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_ASM_ONLY, ren)); } #define FCML_I64_RIP_A(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_ENABLE_RIP | FCML_TSF_ASM_ONLY, 0)); } #define FCML_I64_A_FAILED(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_SHOULD_FAIL | FCML_TSF_ASM_ONLY, 0)); } #define FCML_A64_A_FAILED(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; STF_ASSERT(fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_SHOULD_FAIL | FCML_TSF_ASM_ONLY | FCML_TSF_GAS_DIALECT, 0)); } #define FCML_I3264_A_P(x,...) { FCML_I32_A_P(x,__VA_ARGS__); FCML_I64_A_P(x,__VA_ARGS__); } #define FCML_I32_A_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_PRINT_ONLY | FCML_TSF_ASM_ONLY, 0); } #define FCML_A32_A_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_32_BIT, x, FCML_TSF_PRINT_ONLY | FCML_TSF_ASM_ONLY | FCML_TSF_GAS_DIALECT, 0); } #define FCML_I64_A_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_PRINT_ONLY | FCML_TSF_ASM_ONLY, 0); } #define FCML_A64_A_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_PRINT_ONLY | FCML_TSF_ASM_ONLY | FCML_TSF_GAS_DIALECT, 0); } #define FCML_I64_A_FAILED_P(x,...) { fcml_uint8_t code[] = {__VA_ARGS__}; fcml_fn_ts_instruction_test( code, sizeof( code ), FCML_OM_64_BIT, x, FCML_TSF_SHOULD_FAIL | FCML_TSF_PRINT_ONLY | FCML_TSF_ASM_ONLY, 0); } fcml_bool fcml_fn_ts_instruction_test( fcml_uint8_t *code, fcml_int size, fcml_en_operating_mode addr_mode, fcml_string mnemonic, fcml_uint32_t t_flags, fcml_uint32_t rend_flags ); fcml_bool fcml_fn_ts_instruction_test_diss( fcml_uint8_t *code, fcml_int size, fcml_en_operating_mode addr_mode, fcml_string mnemonic, fcml_uint32_t t_flags, fcml_uint32_t ren_flags ); #endif /* INSTRUCTIONS_BASE_T_H_ */ fcml-1.1.1/check/public-tests/instructions_f_t.c0000644000175000017500000007775012560745216016637 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "instructions_e_t.h" #include "instructions_base_t.h" fcml_bool fcml_tf_instructions_f_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_instructions_f_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_instruction_F2XM1(void) { FCML_I3264( "f2xm1", 0xD9, 0xF0 ); FCML_A64( "f2xm1", 0xd9, 0xf0 ); } void fcml_tf_instruction_FABS(void) { FCML_I3264( "fabs", 0xD9, 0xE1 ); FCML_A64( "fabs", 0xd9, 0xe1 ); } void fcml_tf_instruction_FADD(void) { FCML_I64( "fadd dword ptr [rax+0000000000000020h]", 0xD8, 0x40, 0x20 ); FCML_I32( "fadd dword ptr [eax+00000020h]", 0xD8, 0x40, 0x20 ); FCML_I64( "fadd qword ptr [rax+0000000000000020h]", 0xDC, 0x40, 0x20 ); FCML_I32( "fadd qword ptr [eax+00000020h]", 0xDC, 0x40, 0x20 ); FCML_I3264_M( "fadd st(0),st(0)", 2, FCML_MI( 0xD8, 0xC0 ), FCML_MI( 0xdc, 0xc0 ) ); FCML_I32( "fadd st(0),st(1)", 0xD8, 0xC1 ); FCML_I32( "fadd st(0),st(2)", 0xD8, 0xC2 ); FCML_I32( "fadd st(0),st(3)", 0xD8, 0xC3 ); FCML_I32( "fadd st(0),st(4)", 0xD8, 0xC4 ); FCML_I32( "fadd st(0),st(5)", 0xD8, 0xC5 ); FCML_I32( "fadd st(0),st(6)", 0xD8, 0xC6 ); FCML_I32( "fadd st(0),st(7)", 0xD8, 0xC7 ); FCML_A64_A( "fadds 0x0000000000000020(%rax)", 0xd8, 0x40, 0x20 ); FCML_A64_A( "faddl 0x0000000000000020(%rax)", 0xdc, 0x40, 0x20 ); FCML_A64( "fadd %st(1),%st(0)", 0xd8, 0xc1 ); FCML_A64( "fadd %st(0),%st(1)", 0xdc, 0xc1 ); FCML_I64( "fadd st(1),st(0)", 0xDC, 0xC1 ); FCML_I32( "fadd st(1),st(0)", 0xDC, 0xC1 ); FCML_I64( "faddp st(1),st(0)", 0xDE, 0xC1 ); FCML_A64( "faddp %st(0),%st(1)", 0xde, 0xc1 ); FCML_I32( "faddp st(1),st(0)", 0xDE, 0xC1 ); FCML_I3264_A( "faddp", 0xDE, 0xC1 ); FCML_A3264_A( "faddp", 0xDE, 0xC1 ); FCML_I64( "fiadd dword ptr [rax+0000000000000020h]", 0xDA, 0x40, 0x20 ); FCML_I32( "fiadd dword ptr [eax+00000020h]", 0xDA, 0x40, 0x20 ); FCML_I64( "fiadd word ptr [rax+0000000000000020h]", 0xDE, 0x40, 0x20 ); FCML_I32( "fiadd word ptr [eax+00000020h]", 0xDE, 0x40, 0x20 ); FCML_A64( "fiaddl 0x0000000000000020(%rax)", 0xda, 0x40, 0x20 ); FCML_A64( "fiadd 0x0000000000000020(%rax)", 0xde, 0x40, 0x20 ); } void fcml_tf_instruction_FBLD(void) { FCML_I64( "fbld tbyte ptr [rax+0000000000000020h]", 0xDf, 0x60, 0x20 ) ; FCML_A64( "fbld 0x0000000000000020(%rax)", 0xdf, 0x60, 0x20 ); FCML_I32( "fbld tbyte ptr [eax+00000020h]", 0xDf, 0x60, 0x20 ); } void fcml_tf_instruction_FBSTP(void) { FCML_I64( "fbstp tbyte ptr [rax+0000000000000020h]", 0xDf, 0x70, 0x20 ) ; FCML_A64( "fbstp 0x0000000000000020(%rax)", 0xdf, 0x70, 0x20 ); FCML_I32( "fbstp tbyte ptr [eax+00000020h]", 0xDf, 0x70, 0x20 ); } void fcml_tf_instruction_FCHS(void) { FCML_I3264( "fchs", 0xD9, 0xE0 ) ; FCML_A64( "fchs", 0xd9, 0xe0 ); } void fcml_tf_instruction_FNCLEX(void) { FCML_I64( "fclex", 0x9B, 0xDB, 0xE2 ); FCML_I32( "fclex", 0x9B, 0xDB, 0xE2 ); FCML_I64( "fnclex", 0xDB, 0xE2 ); FCML_I32( "fnclex", 0xDB, 0xE2 ); FCML_A64( "fclex", 0x9b, 0xdb, 0xe2 ); FCML_A64( "fnclex", 0xdb, 0xe2 ); } void fcml_tf_instruction_FCMOV(void) { FCML_I64( "fcmovnu st(0),st(1)", 0xDB, 0xD9 ); FCML_I32( "fcmovnu st(0),st(1)", 0xDB, 0xD9 ); FCML_I64( "fcmovnbe st(0),st(1)", 0xDB, 0xD1 ); FCML_I32( "fcmovnbe st(0),st(1)", 0xDB, 0xD1 ); FCML_I64( "fcmovne st(0),st(1)", 0xDB, 0xC9 ); FCML_I32( "fcmovne st(0),st(1)", 0xDB, 0xC9 ); FCML_I64( "fcmovnb st(0),st(1)", 0xDB, 0xC1 ); FCML_I32( "fcmovnb st(0),st(1)", 0xDB, 0xC1 ); FCML_I64( "fcmovu st(0),st(1)", 0xDA, 0xD9 ); FCML_I32( "fcmovu st(0),st(1)", 0xDA, 0xD9); FCML_I64( "fcmovbe st(0),st(1)", 0xDA, 0xD1 ); FCML_I32( "fcmovbe st(0),st(1)", 0xDA, 0xD1 ); FCML_I64( "fcmovb st(0),st(1)", 0xDA, 0xC1 ); FCML_I32( "fcmovb st(0),st(1)", 0xDA, 0xC1 ); FCML_I64( "fcmove st(0),st(1)", 0xDA, 0xC9 ); FCML_I32( "fcmove st(0),st(1)", 0xDA, 0xC9 ); FCML_A64( "fcmovnu %st(1),%st(0)", 0xdb, 0xd9 ); FCML_A64( "fcmovnbe %st(1),%st(0)", 0xdb, 0xd1 ); FCML_A64( "fcmovne %st(1),%st(0)", 0xdb, 0xc9 ); FCML_A64( "fcmovnb %st(1),%st(0)", 0xdb, 0xc1 ); FCML_A64( "fcmovu %st(1),%st(0)", 0xda, 0xd9 ); FCML_A64( "fcmovbe %st(1),%st(0)", 0xda, 0xd1 ); FCML_A64( "fcmovb %st(1),%st(0)", 0xda, 0xc1 ); FCML_A64( "fcmove %st(1),%st(0)", 0xda, 0xc9 ); } void fcml_tf_instruction_FCOM(void) { FCML_I64( "fcom dword ptr [rax]", 0xD8, 0x10 ); FCML_I32( "fcom dword ptr [eax]", 0xD8, 0x10 ); FCML_I64( "fcomp dword ptr [rax]", 0xD8, 0x18 ); FCML_I32( "fcomp dword ptr [eax]", 0xD8, 0x18 ); FCML_I64( "fcom qword ptr [rax]", 0xDC, 0x10 ); FCML_I32( "fcom qword ptr [eax]", 0xDC, 0x10 ); FCML_I64( "fcomp qword ptr [rax]", 0xDC, 0x18 ); FCML_I32( "fcomp qword ptr [eax]", 0xDC, 0x18 ); FCML_I64( "fcom st(0)", 0xD8, 0xD0 ); FCML_I64( "fcom st(1)", 0xD8, 0xD1 ); FCML_I32( "fcom st(0)", 0xD8, 0xD0 ); FCML_I32( "fcom st(1)", 0xD8, 0xD1 ); FCML_I64( "fcomp st(0)", 0xD8, 0xD8 ); FCML_I64( "fcomp st(1)", 0xD8, 0xD9 ); FCML_I32( "fcomp st(0)", 0xD8, 0xD8 ); FCML_I32( "fcomp st(1)", 0xD8, 0xD9 ); FCML_I32( "fcompp", 0xDE, 0xD9 ); FCML_I64( "fcompp", 0xDE, 0xD9 ); FCML_I32_A( "fcom", 0xD8, 0xD1 ); FCML_I32_A( "fcomp", 0xD8, 0xD9 ); FCML_A64( "fcoms (%rax)", 0xd8, 0x10 ); FCML_A64( "fcomps (%rax)", 0xd8, 0x18 ); FCML_A64( "fcoml (%rax)", 0xdc, 0x10 ); FCML_A64( "fcompl (%rax)", 0xdc, 0x18 ); FCML_A64( "fcom %st(1)", 0xd8, 0xd1 ); FCML_A64( "fcomp %st(1)", 0xd8, 0xd9 ); FCML_A64( "fcompp", 0xde, 0xd9 ); FCML_A64( "add %cl,(%rdi)", 0x00, 0x0f ); FCML_A32_A( "fcom", 0xD8, 0xD1 ); FCML_A32_A( "fcomp", 0xD8, 0xD9 ); } void fcml_tf_instruction_FCOMI(void) { FCML_I64( "fcomi st(0),st(1)", 0xDB, 0xF1 ); FCML_I32( "fcomi st(0),st(1)", 0xDB, 0xF1 ); FCML_I64( "fcomip st(0),st(1)", 0xDF, 0xF1 ); FCML_I32( "fcomip st(0),st(1)", 0xDF, 0xF1 ); FCML_I64( "fucomi st(0),st(1)", 0xDB, 0xE9 ); FCML_I32( "fucomi st(0),st(1)", 0xDB, 0xE9 ); FCML_I64( "fucomip st(0),st(1)", 0xDF, 0xE9 ); FCML_I32( "fucomip st(0),st(1)", 0xDF, 0xE9 ); FCML_A64( "fcomi %st(1),%st(0)", 0xdb, 0xf1 ); FCML_A64( "fcomip %st(1),%st(0)", 0xdf, 0xf1 ); FCML_A64( "fucomi %st(1),%st(0)", 0xdb, 0xe9 ); FCML_A64( "fucomip %st(1),%st(0)", 0xdf, 0xe9 ); } void fcml_tf_instruction_FCOS(void) { FCML_I3264( "fcos", 0xD9, 0xFF ); FCML_A64( "fcos", 0xd9, 0xff ); } void fcml_tf_instruction_FDECSTP(void) { FCML_I3264( "fdecstp", 0xD9, 0xf6 ); FCML_A64( "fdecstp", 0xd9, 0xf6 ); } void fcml_tf_instruction_FDIV(void) { FCML_I64( "fdiv dword ptr [rax+0000000000000020h]", 0xD8, 0x70, 0x20 ); FCML_I32( "fdiv dword ptr [eax+00000020h]", 0xD8, 0x70, 0x20 ); FCML_I64( "fdiv qword ptr [rax+0000000000000020h]", 0xDC, 0x70, 0x20 ); FCML_I32( "fdiv qword ptr [eax+00000020h]", 0xDC, 0x70, 0x20 ); FCML_I3264( "fdiv st(0),st(1)", 0xD8, 0xF1 ); FCML_I3264( "fdiv st(1),st(0)", 0xDC, 0xF9 ); FCML_I3264( "fdiv st(1),st(0)", 0xDC, 0xF9 ); FCML_I32( "fdivp st(1),st(0)", 0xDE, 0xF9 ); FCML_I64( "fidiv dword ptr [rax+0000000000000020h]", 0xDA, 0x70, 0x20 ); FCML_I32( "fidiv dword ptr [eax+00000020h]", 0xDA, 0x70, 0x20 ); FCML_I64( "fidiv word ptr [rax+0000000000000020h]", 0xDE, 0x70, 0x20 ); FCML_I32( "fidiv word ptr [eax+00000020h]", 0xDE, 0x70, 0x20 ); FCML_I3264_A( "fdivp", 0xDE, 0xF9 ); FCML_A64( "fdivs 0x0000000000000020(%rax)", 0xd8, 0x70, 0x20 ); FCML_A64( "fdivl 0x0000000000000020(%rax)", 0xdc, 0x70, 0x20 ); FCML_A64( "fdiv %st(1),%st(0)", 0xd8, 0xf1 ); FCML_A64( "fdivr %st(0),%st(1)", 0xdc, 0xf9 ); FCML_A64( "fidivl 0x0000000000000020(%rax)", 0xda, 0x70, 0x20 ); FCML_A64( "fidiv 0x0000000000000020(%rax)", 0xde, 0x70, 0x20 ); FCML_A64( "fdivrp %st(0),%st(1)", 0xde, 0xf9 ); } void fcml_tf_instruction_FDIVR(void) { FCML_I32( "fdivr dword ptr [eax]", 0xD8, 0x38 ); FCML_I64( "fdivr dword ptr [rax+0000000000000020h]", 0xD8, 0x78, 0x20 ); FCML_I32( "fdivr dword ptr [eax+00000020h]", 0xD8, 0x78, 0x20 ); FCML_I64( "fdivr qword ptr [rax+0000000000000020h]", 0xDC, 0x78, 0x20 ); FCML_I32( "fdivr qword ptr [eax+00000020h]", 0xDC, 0x78, 0x20 ); FCML_I32( "fdivr st(0),st(1)", 0xD8, 0xF9 ); FCML_I64( "fdivr st(0),st(1)", 0xD8, 0xF9 ); FCML_I64( "fdivr st(1),st(0)", 0xDC, 0xF1 ); FCML_I32( "fdivr st(1),st(0)", 0xDC, 0xF1 ); FCML_I64( "fdivrp st(1),st(0)", 0xDE, 0xF1 ); FCML_I32( "fdivrp st(1),st(0)", 0xDE, 0xF1 ); FCML_I64( "fidivr dword ptr [rax+0000000000000020h]", 0xDA, 0x78, 0x20 ); FCML_I32( "fidivr dword ptr [eax+00000020h]", 0xDA, 0x78, 0x20 ); FCML_I64( "fidivr word ptr [rax+0000000000000020h]", 0xDE, 0x78, 0x20 ); FCML_I32( "fidivr word ptr [eax+00000020h]", 0xDE, 0x78, 0x20 ); FCML_I3264_A( "fdivrp", 0xDE, 0xF1 ); FCML_A64( "fdivrs 0x0000000000000020(%rax)", 0xd8, 0x78, 0x20 ); FCML_A64( "fdivrl 0x0000000000000020(%rax)", 0xdc, 0x78, 0x20 ); FCML_A64( "fdivr %st(1),%st(0)", 0xd8, 0xf9 ); FCML_A64( "fdiv %st(0),%st(1)", 0xdc, 0xf1 ); FCML_A64( "fdivp %st(0),%st(1)", 0xde, 0xf1 ); FCML_A64( "fidivrl 0x0000000000000020(%rax)", 0xda, 0x78, 0x20 ); FCML_A64( "fidivr 0x0000000000000020(%rax)", 0xde, 0x78, 0x20 ); FCML_A64( "fdivp %st(0),%st(1)", 0xde, 0xf1 ); } void fcml_tf_instruction_FFREE(void) { FCML_I3264( "ffree st(1)", 0xDD, 0xC1 ); FCML_A64( "ffree %st(1)", 0xdd, 0xc1 ); } void fcml_tf_instruction_FICOM(void) { FCML_I32( "ficom word ptr [eax+00000040h]", 0xDE, 0x50, 0x40 ); FCML_I64( "ficom word ptr [rax+0000000000000040h]", 0xDE, 0x50, 0x40 ); FCML_I32( "ficom dword ptr [eax+00000040h]", 0xDA, 0x50, 0x40 ); FCML_I64( "ficom dword ptr [rax+0000000000000040h]", 0xDA, 0x50, 0x40 ); FCML_I32( "ficomp word ptr [eax+00000040h]", 0xDE, 0x58, 0x40 ); FCML_I64( "ficomp word ptr [rax+0000000000000040h]", 0xDE, 0x58, 0x40 ); FCML_I32( "ficomp dword ptr [eax+00000040h]", 0xDA, 0x58, 0x40 ); FCML_I64( "ficomp dword ptr [rax+0000000000000040h]", 0xDA, 0x58, 0x40 ); FCML_A64( "ficom 0x0000000000000040(%rax)", 0xde, 0x50, 0x40 ); FCML_A64( "ficoml 0x0000000000000040(%rax)", 0xda, 0x50, 0x40 ); FCML_A64( "ficomp 0x0000000000000040(%rax)", 0xde, 0x58, 0x40 ); FCML_A64( "ficompl 0x0000000000000040(%rax)", 0xda, 0x58, 0x40 ); } void fcml_tf_instruction_FILD(void) { FCML_I32( "fild word ptr [eax+00000040h]", 0xDF, 0x40, 0x40 ); FCML_I64( "fild word ptr [rax+0000000000000040h]", 0xDF, 0x40, 0x40 ); FCML_I32( "fild dword ptr [eax+00000040h]", 0xDB, 0x40, 0x40 ); FCML_I64( "fild dword ptr [rax+0000000000000040h]", 0xDB, 0x40, 0x40 ); FCML_I32( "fild qword ptr [eax+00000040h]", 0xDF, 0x68, 0x40 ); FCML_I64( "fild qword ptr [rax+0000000000000040h]", 0xDF, 0x68, 0x40 ); FCML_A64( "fild 0x0000000000000040(%rax)", 0xdf, 0x40, 0x40 ); FCML_A64( "fildl 0x0000000000000040(%rax)", 0xdb, 0x40, 0x40 ); FCML_A64( "fildll 0x0000000000000040(%rax)", 0xdf, 0x68, 0x40 ); } void fcml_tf_instruction_FINCSTP(void) { FCML_I32( "fincstp", 0xD9, 0xF7 ); FCML_I64( "fincstp", 0xD9, 0xF7 ); FCML_A64( "fincstp", 0xd9, 0xf7 ); } void fcml_tf_instruction_FINIT_FNINIT(void) { FCML_I32( "finit", 0x9B, 0xDB, 0xE3 ); FCML_I64( "fninit", 0xDB, 0xE3 ); FCML_A64( "finit", 0x9b, 0xdb, 0xe3 ); FCML_A64( "fninit", 0xdb, 0xe3 ); } void fcml_tf_instruction_FIST_FISTP(void) { FCML_I32( "fist word ptr [eax+00000020h]", 0xDF, 0x50, 0x20 ); FCML_I64( "fist word ptr [rax+0000000000000020h]", 0xDF, 0x50, 0x20 ); FCML_I32( "fist dword ptr [eax+00000020h]", 0xDB, 0x50, 0x20 ); FCML_I64( "fist dword ptr [rax+0000000000000020h]", 0xDB, 0x50, 0x20 ); FCML_I32( "fistp word ptr [eax+00000020h]", 0xDF, 0x58, 0x20 ); FCML_I64( "fistp word ptr [rax+0000000000000020h]", 0xDF, 0x58, 0x20 ); FCML_I32( "fistp dword ptr [eax+00000020h]", 0xDB, 0x58, 0x20 ); FCML_I64( "fistp dword ptr [rax+0000000000000020h]", 0xDB, 0x58, 0x20 ); FCML_I32( "fistp qword ptr [eax+00000020h]", 0xDF, 0x78, 0x20 ); FCML_I64( "fistp qword ptr [rax+0000000000000020h]", 0xDF, 0x78, 0x20 ); FCML_A64( "fist 0x0000000000000020(%rax)", 0xdf, 0x50, 0x20 ); FCML_A64( "fistl 0x0000000000000020(%rax)", 0xdb, 0x50, 0x20 ); FCML_A64( "fistp 0x0000000000000020(%rax)", 0xdf, 0x58, 0x20 ); FCML_A64( "fistpll 0x0000000000000020(%rax)", 0xdf, 0x78, 0x20 ); } void fcml_tf_instruction_FLD(void) { FCML_I32( "fld dword ptr [eax+00000020h]", 0xD9, 0x40, 0x20 ); FCML_I64( "fld dword ptr [rax+0000000000000020h]", 0xD9, 0x40, 0x20 ); FCML_I32( "fld qword ptr [eax+00000020h]", 0xDD, 0x40, 0x20 ); FCML_I64( "fld qword ptr [rax+0000000000000020h]", 0xDD, 0x40, 0x20 ); FCML_I32( "fld tbyte ptr [eax+00000020h]", 0xDB, 0x68, 0x20 ); FCML_I64( "fld tbyte ptr [rax+0000000000000020h]", 0xDB, 0x68, 0x20 ); FCML_I32( "fld st(1)", 0xD9, 0xC1 ); FCML_I64( "fld st(1)", 0xD9, 0xC1 ); FCML_A64( "flds 0x0000000000000020(%rax)", 0xd9, 0x40, 0x20 ); FCML_A64( "fldl 0x0000000000000020(%rax)", 0xdd, 0x40, 0x20 ); FCML_A64( "fldt 0x0000000000000020(%rax)", 0xdb, 0x68, 0x20 ); FCML_A64( "fld %st(1)", 0xd9, 0xc1 ); } void fcml_tf_instruction_FLDx(void) { FCML_I32( "fld1", 0xD9, 0xE8 ); FCML_I64( "fld1", 0xD9, 0xE8 ); FCML_I32( "fldl2t", 0xD9, 0xE9 ); FCML_I64( "fldl2t", 0xD9, 0xE9 ); FCML_I32( "fldl2e", 0xD9, 0xEA ); FCML_I64( "fldl2e", 0xD9, 0xEA ); FCML_I32( "fldpi", 0xD9, 0xEB ); FCML_I64( "fldpi", 0xD9, 0xEB ); FCML_I32( "fldlg2", 0xD9, 0xEC ); FCML_I64( "fldlg2", 0xD9, 0xEC ); FCML_I32( "fldln2", 0xD9, 0xED ); FCML_I64( "fldln2", 0xD9, 0xED ); FCML_I32( "fldz", 0xD9, 0xEE ); FCML_I64( "fldz", 0xD9, 0xEE ); FCML_A64( "fld1", 0xd9, 0xe8 ); FCML_A64( "fldl2t", 0xd9, 0xe9 ); FCML_A64( "fldl2e", 0xd9, 0xea ); FCML_A64( "fldpi", 0xd9, 0xeb ); FCML_A64( "fldlg2", 0xd9, 0xec ); FCML_A64( "fldln2", 0xd9, 0xed ); FCML_A64( "fldz", 0xd9, 0xee ); } void fcml_tf_instruction_FLDCW(void) { FCML_I32( "fldcw word ptr [eax+00000040h]", 0xD9, 0x68, 0x40 ); FCML_I64( "fldcw word ptr [rax+0000000000000040h]", 0xD9, 0x68, 0x40 ); FCML_A64( "fldcw 0x0000000000000040(%rax)", 0xd9, 0x68, 0x40 ); } void fcml_tf_instruction_FLDENV(void) { FCML_I64( "fldenv 28byte ptr [rax+0000000000000020h]", 0xD9, 0x60, 0x20 ); FCML_I32( "fldenv 28byte ptr [eax+00000020h]", 0xD9, 0x60, 0x20 ); FCML_I32( "fldenv 14byte ptr [eax+00000020h]", 0x66, 0xD9, 0x60, 0x20 ); FCML_A64( "fldenv 0x0000000000000020(%rax)", 0xd9, 0x60, 0x20 ); FCML_A64( "fldenvs 0x0000000000000020(%rax)", 0x66, 0xd9, 0x60, 0x20 ); } void fcml_tf_instruction_FMUL_FMULP_FIMUL(void) { FCML_I64( "fmul dword ptr [rax+0000000000000020h]", 0xD8, 0x48, 0x20 ); FCML_I32( "fmul dword ptr [eax+00000020h]", 0xD8, 0x48, 0x20 ); FCML_I64( "fmul qword ptr [rax+0000000000000020h]", 0xDC, 0x48, 0x20 ); FCML_I32( "fmul qword ptr [eax+00000020h]", 0xDC, 0x48, 0x20 ); FCML_I32( "fmul st(0),st(1)", 0xD8, 0xc9 ); FCML_I64( "fmul st(0),st(1)", 0xD8, 0xc9 ); FCML_I64( "fmul st(1),st(0)", 0xDC, 0xc9 ); FCML_I32( "fmul st(1),st(0)", 0xDC, 0xc9 ); FCML_I64( "fmulp st(1),st(0)", 0xDE, 0xc9 ); FCML_I32( "fmulp st(1),st(0)", 0xDE, 0xc9 ); FCML_I64( "fimul dword ptr [rax+0000000000000020h]", 0xDA, 0x48, 0x20 ); FCML_I32( "fimul dword ptr [eax+00000020h]", 0xDA, 0x48, 0x20 ); FCML_I64( "fimul word ptr [rax+0000000000000020h]", 0xDE, 0x48, 0x20 ); FCML_I32( "fimul word ptr [eax+00000020h]", 0xDE, 0x48, 0x20 ); FCML_I32_A( "fmulp", 0xDE, 0xC9 ); FCML_A64( "fmuls 0x0000000000000020(%rax)", 0xd8, 0x48, 0x20 ); FCML_A64( "fmull 0x0000000000000020(%rax)", 0xdc, 0x48, 0x20 ); FCML_A64( "fmul %st(1),%st(0)", 0xd8, 0xc9 ); FCML_A64( "fmul %st(0),%st(1)", 0xdc, 0xc9 ); FCML_A64( "fmulp %st(0),%st(1)", 0xde, 0xc9 ); FCML_A64( "fimull 0x0000000000000020(%rax)", 0xda, 0x48, 0x20 ); FCML_A64( "fimul 0x0000000000000020(%rax)", 0xde, 0x48, 0x20 ); FCML_A64( "fmulp %st(0),%st(1)", 0xde, 0xc9 ); } void fcml_tf_instruction_FNOP(void) { FCML_I3264( "fnop", 0xD9, 0xD0 ); FCML_A64( "fnop", 0xd9, 0xd0 ); } void fcml_tf_instruction_FPATAN(void) { FCML_I3264( "fpatan", 0xD9, 0xF3 ); FCML_A64( "fpatan", 0xd9, 0xf3 ); } void fcml_tf_instruction_FPREM(void) { FCML_I3264( "fprem", 0xD9, 0xF8 ); FCML_A64( "fprem", 0xd9, 0xf8 ); } void fcml_tf_instruction_FPREM1(void) { FCML_I3264( "fprem1", 0xD9, 0xF5 ); FCML_A64( "fprem1", 0xd9, 0xf5 ); } void fcml_tf_instruction_FPTAN(void) { FCML_I3264( "fptan", 0xD9, 0xF2 ); FCML_A64( "fptan", 0xd9, 0xf2 ); } void fcml_tf_instruction_FRNDINT(void) { FCML_I3264( "frndint", 0xD9, 0xFc ); FCML_A64( "frndint", 0xd9, 0xfc ); } void fcml_tf_instruction_FRSTOR(void) { FCML_I64( "frstor 108byte ptr [rax+0000000000000020h]", 0xDD, 0x60, 0x20 ); FCML_I32( "frstor 108byte ptr [eax+00000020h]", 0xDD, 0x60, 0x20 ); FCML_I32( "frstor 94byte ptr [eax+00000020h]", 0x66, 0xDD, 0x60, 0x20 ); FCML_A64( "frstor 0x0000000000000020(%rax)", 0xdd, 0x60, 0x20 ); FCML_A64( "frstors 0x0000000000000020(%rax)", 0x66, 0xdd, 0x60, 0x20 ); } void fcml_tf_instruction_FSAVE_FNSAVE(void) { FCML_I64( "fsave 108byte ptr [rax+0000000000000020h]", 0x9B, 0xDD, 0x70, 0x20 ); FCML_I32( "fsave 108byte ptr [eax+00000020h]", 0x9B, 0xDD, 0x70, 0x20 ); FCML_I32( "fsave 94byte ptr [eax+00000020h]", 0x66, 0x9B, 0xDD, 0x70, 0x20 ); FCML_I64( "fnsave 108byte ptr [rax+0000000000000020h]", 0xDD, 0x70, 0x20 ); FCML_I64( "fnsave 94byte ptr [rax+0000000000000020h]", 0x66, 0xDD, 0x70, 0x20 ); FCML_I32( "fnsave 108byte ptr [eax+00000020h]", 0xDD, 0x70, 0x20 ); FCML_A64( "fsave 0x0000000000000020(%rax)", 0x9b, 0xdd, 0x70, 0x20 ); FCML_A64( "fsaves 0x0000000000000020(%rax)", 0x66, 0x9b, 0xdd, 0x70, 0x20 ); FCML_A64( "fnsave 0x0000000000000020(%rax)", 0xdd, 0x70, 0x20 ); FCML_A64( "fnsaves 0x0000000000000020(%rax)", 0x66, 0xdd, 0x70, 0x20 ); } void fcml_tf_instruction_FSCALE(void) { FCML_I3264( "fscale", 0xD9, 0xFD ); FCML_A64( "fscale", 0xd9, 0xfd ); } void fcml_tf_instruction_FSIN(void) { FCML_I3264( "fsin", 0xD9, 0xFE ); FCML_A64( "fsin", 0xd9, 0xfe ); } void fcml_tf_instruction_FSINCOS(void) { FCML_I3264( "fsincos", 0xD9, 0xFB ); FCML_A64( "fsincos", 0xd9, 0xfb ); } void fcml_tf_instruction_FSQRT(void) { FCML_I3264( "fsqrt", 0xD9, 0xFA ); FCML_A64( "fsqrt", 0xd9, 0xfa ); } void fcml_tf_instruction_FST_FSTP(void) { FCML_I64( "fst dword ptr [rax+0000000000000020h]", 0xD9, 0x50, 0x20 ); FCML_I32( "fst dword ptr [eax+00000020h]", 0xD9, 0x50, 0x20 ); FCML_I64( "fst qword ptr [rax+0000000000000020h]", 0xDD, 0x50, 0x20 ); FCML_I32( "fst qword ptr [eax+00000020h]", 0xDD, 0x50, 0x20 ); FCML_I64( "fst st(1)", 0xDD, 0xD1 ); FCML_I32( "fst st(1)", 0xDD, 0xD1 ); FCML_I64( "fstp dword ptr [rax+0000000000000020h]", 0xD9, 0x58, 0x20 ); FCML_I32( "fstp dword ptr [eax+00000020h]", 0xD9, 0x58, 0x20 ); FCML_I64( "fstp qword ptr [rax+0000000000000020h]", 0xDD, 0x58, 0x20 ); FCML_I32( "fstp qword ptr [eax+00000020h]", 0xDD, 0x58, 0x20 ); FCML_I64( "fstp tbyte ptr [rax+0000000000000020h]", 0xDB, 0x78, 0x20 ); FCML_I32( "fstp tbyte ptr [eax+00000020h]", 0xDB, 0x78, 0x20 ); FCML_I64( "fstp st(1)", 0xDD, 0xD9 ); FCML_I32( "fstp st(1)", 0xDD, 0xD9 ); FCML_A64( "fsts 0x0000000000000020(%rax)", 0xd9, 0x50, 0x20 ); FCML_A64( "fstl 0x0000000000000020(%rax)", 0xdd, 0x50, 0x20 ); FCML_A64( "fst %st(1)", 0xdd, 0xd1 ); FCML_A64( "fstps 0x0000000000000020(%rax)", 0xd9, 0x58, 0x20 ); FCML_A64( "fstpl 0x0000000000000020(%rax)", 0xdd, 0x58, 0x20 ); FCML_A64( "fstpt 0x0000000000000020(%rax)", 0xdb, 0x78, 0x20 ); FCML_A64( "fstp %st(1)", 0xdd, 0xd9 ); } void fcml_tf_instruction_FSTENV_FNSTENV(void) { FCML_I64( "fstenv 28byte ptr [rax+0000000000000020h]", 0x9B, 0xD9, 0x70, 0x20 ); FCML_I32( "fstenv 28byte ptr [eax+00000020h]", 0x9B, 0xD9, 0x70, 0x20 ); FCML_I32( "fstenv 14byte ptr [eax+00000020h]", 0x66, 0x9B, 0xD9, 0x70, 0x20 ); FCML_I64( "fnstenv 28byte ptr [rax+0000000000000020h]", 0xD9, 0x70, 0x20 ); FCML_I64( "fnstenv 14byte ptr [rax+0000000000000020h]", 0x66, 0xD9, 0x70, 0x20 ); FCML_I32( "fnstenv 28byte ptr [eax+00000020h]", 0xD9, 0x70, 0x20 ); FCML_A64( "fstenv 0x0000000000000020(%rax)", 0x9b, 0xd9, 0x70, 0x20 ); FCML_A64( "fstenvs 0x0000000000000020(%rax)", 0x66, 0x9b, 0xd9, 0x70, 0x20 ); FCML_A64( "fnstenv 0x0000000000000020(%rax)", 0xd9, 0x70, 0x20 ); FCML_A64( "fnstenvs 0x0000000000000020(%rax)", 0x66, 0xd9, 0x70, 0x20 ); } void fcml_tf_instruction_FSTCW_FNSTCW(void) { FCML_I64( "fstcw word ptr [rax+0000000000000020h]", 0x9B, 0xD9, 0x78, 0x20 ); FCML_I32( "fstcw word ptr [eax+00000020h]",0x9B, 0xD9, 0x78, 0x20 ); FCML_I64( "fnstcw word ptr [rax+0000000000000020h]", 0xD9, 0x78, 0x20 ); FCML_I32( "fnstcw word ptr [eax+00000020h]", 0xD9, 0x78, 0x20 ); FCML_A64( "fstcw 0x0000000000000020(%rax)", 0x9b, 0xd9, 0x78, 0x20 ); FCML_A64( "fnstcw 0x0000000000000020(%rax)", 0xd9, 0x78, 0x20 ); } void fcml_tf_instruction_FSTSW_FNSTSW(void) { FCML_I64( "fstsw word ptr [rax+0000000000000020h]", 0x9B, 0xDD, 0x78, 0x20 ); FCML_I32( "fstsw word ptr [eax+00000020h]", 0x9B, 0xDD, 0x78, 0x20 ); FCML_I64( "fstsw ax", 0x9B, 0xDF, 0xE0 ); FCML_I32( "fstsw ax", 0x9B, 0xDF, 0xE0 ); FCML_I64( "fnstsw word ptr [rax+0000000000000020h]", 0xDD, 0x78, 0x20 ); FCML_I32( "fnstsw word ptr [eax+00000020h]", 0xDD, 0x78, 0x20 ); FCML_I64( "fnstsw ax", 0xDF, 0xE0 ); FCML_I32( "fnstsw ax", 0xDF, 0xE0 ); FCML_A64( "fstsw 0x0000000000000020(%rax)", 0x9b, 0xdd, 0x78, 0x20 ); FCML_A64( "fstsw %ax", 0x9b, 0xdf, 0xe0 ); FCML_A64( "fnstsw 0x0000000000000020(%rax)", 0xdd, 0x78, 0x20 ); FCML_A64( "fnstsw %ax", 0xdf, 0xe0 ); } void fcml_tf_instruction_FSUB_FSUBP_FISUB(void) { FCML_I64( "fsub dword ptr [rax+0000000000000020h]", 0xD8, 0x60, 0x20 ); FCML_I32( "fsub dword ptr [eax+00000020h]", 0xD8, 0x60, 0x20 ); FCML_I64( "fsub qword ptr [rax+0000000000000020h]", 0xDC, 0x60, 0x20 ); FCML_I32( "fsub qword ptr [eax+00000020h]", 0xDC, 0x60, 0x20 ); FCML_I32( "fsub st(0),st(1)", 0xD8, 0xe1 ); FCML_I64( "fsub st(0),st(1)", 0xD8, 0xe1 ); FCML_I64( "fsub st(1),st(0)", 0xDC, 0xe9 ); FCML_I32( "fsub st(1),st(0)", 0xDC, 0xe9 ); FCML_I64( "fsubp st(1),st(0)", 0xDE, 0xe9 ); FCML_I32( "fsubp st(1),st(0)", 0xDE, 0xe9 ); FCML_I64( "fisub dword ptr [rax+0000000000000020h]", 0xDA, 0x60, 0x20 ); FCML_I32( "fisub dword ptr [eax+00000020h]", 0xDA, 0x60, 0x20 ); FCML_I64( "fisub word ptr [rax+0000000000000020h]", 0xDE, 0x60, 0x20 ); FCML_I32( "fisub word ptr [eax+00000020h]", 0xDE, 0x60, 0x20 ); FCML_I3264_A( "fsubp", 0xDE, 0xE9 ); FCML_A64( "fsubs 0x0000000000000020(%rax)", 0xd8, 0x60, 0x20 ); FCML_A64( "fsubl 0x0000000000000020(%rax)", 0xdc, 0x60, 0x20 ); FCML_A64( "fsub %st(1),%st(0)", 0xd8, 0xe1 ); /* SVR3.2 compatible by default. */ FCML_A64( "fsubr %st(0),%st(1)", 0xdc, 0xe9 ); FCML_A64( "fsubrp %st(0),%st(1)", 0xde, 0xe9 ); FCML_A64( "fisubl 0x0000000000000020(%rax)", 0xda, 0x60, 0x20 ); FCML_A64( "fisub 0x0000000000000020(%rax)", 0xde, 0x60, 0x20 ); } void fcml_tf_instruction_FSUBR_FSUBRP_FISUBR(void) { FCML_I64( "fsubr dword ptr [rax+0000000000000020h]", 0xD8, 0x68, 0x20 ); FCML_I32( "fsubr dword ptr [eax+00000020h]", 0xD8, 0x68, 0x20 ); FCML_I64( "fsubr qword ptr [rax+0000000000000020h]", 0xDC, 0x68, 0x20 ); FCML_I32( "fsubr qword ptr [eax+00000020h]", 0xDC, 0x68, 0x20 ); FCML_I32( "fsubr st(0),st(1)", 0xD8, 0xe9 ); FCML_I64( "fsubr st(0),st(1)", 0xD8, 0xe9 ); FCML_I64( "fsubr st(1),st(0)", 0xDC, 0xe1 ); FCML_I32( "fsubr st(1),st(0)", 0xDC, 0xe1 ); FCML_I64( "fsubrp st(1),st(0)", 0xDE, 0xe1 ); FCML_I32( "fsubrp st(1),st(0)", 0xDE, 0xe1 ); FCML_I64( "fisubr dword ptr [rax+0000000000000020h]", 0xDA, 0x68, 0x20 ); FCML_I32( "fisubr dword ptr [eax+00000020h]", 0xDA, 0x68, 0x20 ); FCML_I64( "fisubr word ptr [rax+0000000000000020h]", 0xDE, 0x68, 0x20 ); FCML_I32( "fisubr word ptr [eax+00000020h]", 0xDE, 0x68, 0x20 ); FCML_I3264_A( "fsubrp", 0xDE, 0xE1 ); FCML_A64( "fsubrs 0x0000000000000020(%rax)", 0xd8, 0x68, 0x20 ); FCML_A64( "fsubrl 0x0000000000000020(%rax)", 0xdc, 0x68, 0x20 ); FCML_A64( "fsubr %st(1),%st(0)", 0xd8, 0xe9 ); /* SVR3.2 compatible by default. */ FCML_A64( "fsub %st(0),%st(1)", 0xdc, 0xe1 ); FCML_A64( "fsubp %st(0),%st(1)", 0xde, 0xe1 ); FCML_A64( "fisubrl 0x0000000000000020(%rax)", 0xda, 0x68, 0x20 ); FCML_A64( "fisubr 0x0000000000000020(%rax)", 0xde, 0x68, 0x20 ); } void fcml_tf_instruction_FTST(void) { FCML_I3264( "ftst", 0xD9, 0xE4 ); } void fcml_tf_instruction_FUCOM_FUCOMP_FUCOMPP(void) { FCML_I3264( "fucom st(1)", 0xDD, 0xE1 ); FCML_I3264( "fucomp st(1)", 0xDD, 0xE9 ); FCML_I3264_A( "fucom", 0xDD, 0xE1 ); FCML_I3264_A( "fucomp", 0xDD, 0xE9 ); FCML_I3264( "fucompp", 0xDA, 0xE9 ); FCML_A64( "fucom %st(1)", 0xdd, 0xe1 ); FCML_A64( "fucomp %st(1)", 0xdd, 0xe9 ); FCML_A64( "fucompp", 0xda, 0xe9 ); } void fcml_tf_instruction_FXAM(void) { FCML_I3264( "fxam", 0xD9, 0xE5 ); FCML_A64( "fxam", 0xd9, 0xe5 ); } void fcml_tf_instruction_FXCH(void) { FCML_I3264( "fxch st(1)", 0xD9, 0xC9 ); FCML_I3264( "fxch st(2)", 0xD9, 0xCA ); FCML_I3264_A( "fxch", 0xD9, 0xC9 ); FCML_A64( "fxch %st(1)", 0xd9, 0xc9 ); FCML_A64( "fxch %st(2)", 0xd9, 0xca ); FCML_A64_A( "fxch", 0xD9, 0xC9 ); } void fcml_tf_instruction_FXRSTOR(void) { FCML_I64( "xrstor [rax]", 0x0F, 0xAE, 0x28 ); FCML_I32( "xrstor [eax]", 0x0F, 0xAE, 0x28 ); FCML_I64( "xrstor [rax]", 0x66, 0x0F, 0xAE, 0x28 ); FCML_I32( "xrstor [eax]", 0x66, 0x0F, 0xAE, 0x28 ); FCML_I64( "xrstor64 [rax]", 0x48, 0x0F, 0xAE, 0x28 ); FCML_A64( "xrstor (%rax)", 0x0f, 0xae, 0x28 ); FCML_A64( "xrstor64 (%rax)", 0x48, 0x0f, 0xae, 0x28 ); } void fcml_tf_instruction_FXRSAVE(void) { FCML_I64( "fxsave [rax+0000000000000020h]", 0x0F, 0xAE, 0x40, 0x20 ); FCML_I32( "fxsave [eax+00000020h]", 0x0F, 0xAE, 0x40, 0x20 ); FCML_I64_D( "fxsave [rax+0000000000000020h]", 0x66, 0x0F, 0xAE, 0x40, 0x20 ); FCML_I32_D( "fxsave [eax+00000020h]", 0x66, 0x0F, 0xAE, 0x40, 0x20 ); FCML_I64( "fxsave64 [rax+0000000000000020h]", 0x48, 0x0F, 0xAE, 0x40, 0x20 ); FCML_A64( "fxsave 0x0000000000000020(%rax)", 0x0f, 0xae, 0x40, 0x20 ); FCML_A64( "fxsave64 0x0000000000000020(%rax)", 0x48, 0x0f, 0xae, 0x40, 0x20 ); } void fcml_tf_instruction_FXTRACT(void) { FCML_I3264( "fxtract", 0xD9, 0xF4 ); FCML_A64( "fxtract", 0xd9, 0xf4 ); } void fcml_tf_instruction_FYL2X(void) { FCML_I3264( "fyl2x", 0xD9, 0xF1 ); FCML_A64( "fyl2x", 0xd9, 0xf1 ); } void fcml_tf_instruction_FYL2XP1(void) { FCML_I3264( "fyl2xp1", 0xD9, 0xF9 ); FCML_A64( "fyl2xp1", 0xd9, 0xf9 ); } void fcml_tf_instruction_FEMMS(void) { FCML_I3264( "femms", 0x0F, 0x0E ); FCML_A64( "femms", 0x0f, 0x0e ); } void fcml_tf_instruction_FISTTP(void) { FCML_I32( "fisttp word ptr [eax+00000020h]", 0xDF, 0x48, 0x20 ); FCML_I64( "fisttp word ptr [rax+0000000000000020h]", 0xDF, 0x48, 0x20 ); FCML_I32( "fisttp dword ptr [eax+00000020h]", 0xDB, 0x48, 0x20 ); FCML_I64( "fisttp dword ptr [rax+0000000000000020h]", 0xDB, 0x48, 0x20 ); FCML_I32( "fisttp qword ptr [eax+00000020h]", 0xDD, 0x48, 0x20 ); FCML_I64( "fisttp qword ptr [rax+0000000000000020h]", 0xDD, 0x48, 0x20 ); FCML_A64( "fisttp 0x0000000000000020(%rax)", 0xdf, 0x48, 0x20 ); FCML_A64( "fisttpl 0x0000000000000020(%rax)", 0xdb, 0x48, 0x20 ); FCML_A64( "fisttpll 0x0000000000000020(%rax)", 0xdd, 0x48, 0x20 ); } fcml_stf_test_case fctl_ti_instructions_f[] = { { "fcml_tf_instruction_F2XM1", fcml_tf_instruction_F2XM1 }, { "fcml_tf_instruction_FABS", fcml_tf_instruction_FABS }, { "fcml_tf_instruction_FADD", fcml_tf_instruction_FADD }, { "fcml_tf_instruction_FBLD", fcml_tf_instruction_FBLD }, { "fcml_tf_instruction_FBSTP", fcml_tf_instruction_FBSTP }, { "fcml_tf_instruction_FCHS", fcml_tf_instruction_FCHS }, { "fcml_tf_instruction_FNCLEX", fcml_tf_instruction_FNCLEX }, { "fcml_tf_instruction_FCMOV", fcml_tf_instruction_FCMOV }, { "fcml_tf_instruction_FCOM", fcml_tf_instruction_FCOM }, { "fcml_tf_instruction_FCOMI", fcml_tf_instruction_FCOMI }, { "fcml_tf_instruction_FCOS", fcml_tf_instruction_FCOS }, { "fcml_tf_instruction_FDECSTP", fcml_tf_instruction_FDECSTP }, { "fcml_tf_instruction_FDIV", fcml_tf_instruction_FDIV }, { "fcml_tf_instruction_FDIVR", fcml_tf_instruction_FDIVR }, { "fcml_tf_instruction_FFREE", fcml_tf_instruction_FFREE }, { "fcml_tf_instruction_FICOM", fcml_tf_instruction_FICOM }, { "fcml_tf_instruction_FILD", fcml_tf_instruction_FILD }, { "fcml_tf_instruction_FINCSTP", fcml_tf_instruction_FINCSTP }, { "fcml_tf_instruction_FINIT_FNINIT", fcml_tf_instruction_FINIT_FNINIT }, { "fcml_tf_instruction_FIST_FISTP", fcml_tf_instruction_FIST_FISTP }, { "fcml_tf_instruction_FLD", fcml_tf_instruction_FLD }, { "fcml_tf_instruction_FLDx", fcml_tf_instruction_FLDx }, { "fcml_tf_instruction_FLDCW", fcml_tf_instruction_FLDCW }, { "fcml_tf_instruction_FLDENV", fcml_tf_instruction_FLDENV }, { "fcml_tf_instruction_FMUL_FMULP_FIMUL", fcml_tf_instruction_FMUL_FMULP_FIMUL }, { "fcml_tf_instruction_FNOP", fcml_tf_instruction_FNOP }, { "fcml_tf_instruction_FPATAN", fcml_tf_instruction_FPATAN }, { "fcml_tf_instruction_FPREM", fcml_tf_instruction_FPREM }, { "fcml_tf_instruction_FPREM1", fcml_tf_instruction_FPREM1 }, { "fcml_tf_instruction_FPTAN", fcml_tf_instruction_FPTAN }, { "fcml_tf_instruction_FRNDINT", fcml_tf_instruction_FRNDINT }, { "fcml_tf_instruction_FRSTOR", fcml_tf_instruction_FRSTOR }, { "fcml_tf_instruction_FSAVE_FNSAVE", fcml_tf_instruction_FSAVE_FNSAVE }, { "fcml_tf_instruction_FSCALE", fcml_tf_instruction_FSCALE }, { "fcml_tf_instruction_FSIN", fcml_tf_instruction_FSIN }, { "fcml_tf_instruction_FSINCOS", fcml_tf_instruction_FSINCOS }, { "fcml_tf_instruction_FSQRT", fcml_tf_instruction_FSQRT }, { "fcml_tf_instruction_FST_FSTP", fcml_tf_instruction_FST_FSTP }, { "fcml_tf_instruction_FSTENV_FNSTENV", fcml_tf_instruction_FSTENV_FNSTENV }, { "fcml_tf_instruction_FSTCW_FNSTCW", fcml_tf_instruction_FSTCW_FNSTCW }, { "fcml_tf_instruction_FSTSW_FNSTSW", fcml_tf_instruction_FSTSW_FNSTSW }, { "fcml_tf_instruction_FSUB_FSUBP_FISUB", fcml_tf_instruction_FSUB_FSUBP_FISUB }, { "fcml_tf_instruction_FSUBR_FSUBRP_FISUBR", fcml_tf_instruction_FSUBR_FSUBRP_FISUBR }, { "fcml_tf_instruction_FTST", fcml_tf_instruction_FTST }, { "fcml_tf_instruction_FUCOM_FUCOMP_FUCOMPP", fcml_tf_instruction_FUCOM_FUCOMP_FUCOMPP }, { "fcml_tf_instruction_FXAM", fcml_tf_instruction_FXAM }, { "fcml_tf_instruction_FXCH", fcml_tf_instruction_FXCH }, { "fcml_tf_instruction_FXRSTOR", fcml_tf_instruction_FXRSTOR }, { "fcml_tf_instruction_FXRSAVE", fcml_tf_instruction_FXRSAVE }, { "fcml_tf_instruction_FXTRACT", fcml_tf_instruction_FXTRACT }, { "fcml_tf_instruction_FYL2X", fcml_tf_instruction_FYL2X }, { "fcml_tf_instruction_FYL2XP1", fcml_tf_instruction_FYL2XP1 }, { "fcml_tf_instruction_FEMMS", fcml_tf_instruction_FEMMS }, { "fcml_tf_instruction_FISTTP", fcml_tf_instruction_FISTTP }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_instructions_f = { "suite-fctl_ti_instructions_f", fcml_tf_instructions_f_suite_init, fcml_tf_instructions_f_suite_cleanup, fctl_ti_instructions_f }; fcml-1.1.1/check/internal-tests/0000755000175000017500000000000012561462632013474 500000000000000fcml-1.1.1/check/internal-tests/modrm_decoder_t.c0000644000175000017500000015652512560745216016725 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 "modrm_decoder_t.h" #include #include #include fcml_st_modrm_decoder_context fcml_ifn_modrm_decoder_alloc_ctx() { fcml_st_modrm_decoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); return context; } fcml_bool fcml_tf_modrm_decoder_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_modrm_decoder_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_modrm_decoder_test_1(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_32_BIT; context.effective_address_size = FCML_DS_16; fcml_uint8_t buffer[] = {23}; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 0; modrm_source.ext_r = 0; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, FCML_REG_BX ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_16 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_DX ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); } void fcml_tf_modrm_decoder_test_2(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_32_BIT; context.effective_address_size = FCML_DS_16; fcml_uint8_t buffer[] = {0x1E, 0x01, 0x02}; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 0; modrm_source.ext_r = 0; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_BX ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, FCML_DS_16 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.int16, 0x0201 ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); } void fcml_tf_modrm_decoder_test_3(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_32_BIT; context.effective_address_size = FCML_DS_16; fcml_uint8_t buffer[] = {0x0B}; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 0; modrm_source.ext_r = 0; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, FCML_REG_BP ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_16 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, FCML_REG_DI ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, FCML_DS_16 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_CX ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); } void fcml_tf_modrm_decoder_test_4(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_32_BIT; context.effective_address_size = FCML_DS_16; fcml_uint8_t buffer[] = {0x14}; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 0; modrm_source.ext_r = 0; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, FCML_REG_SI ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_16 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_DX ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); } void fcml_tf_modrm_decoder_test_5(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_16; fcml_uint8_t buffer[] = {0x14}; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 0; modrm_source.ext_r = 0; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_INVALID_ADDRESSING_FORM ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); } void fcml_tf_modrm_decoder_test_6(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_32_BIT; context.effective_address_size = FCML_DS_16; fcml_uint8_t buffer[] = {0x73, 0x01}; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 0; modrm_source.ext_r = 0; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, FCML_REG_BP ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_16 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, FCML_REG_DI ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, FCML_DS_16 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_SI ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, FCML_DS_8 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.int8, 0x01 ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); } void fcml_tf_modrm_decoder_test_7(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_32_BIT; context.effective_address_size = FCML_DS_16; fcml_uint8_t buffer[] = {0x73}; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 0; modrm_source.ext_r = 0; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_EOF ); } /* [EBX], EBX*/ void fcml_tf_modrm_3264_decoder_test_1(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_32_BIT; context.effective_address_size = FCML_DS_32; fcml_uint8_t buffer[] = {0x1B}; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 0; modrm_source.ext_r = 0; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, FCML_REG_EBX ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_32 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_EBX ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.int8, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); } /* [04030201], EDX*/ void fcml_tf_modrm_3264_decoder_test_2(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_32_BIT; context.effective_address_size = FCML_DS_32; fcml_uint8_t buffer[] = {0x15, 0x01, 0x02, 0x03, 0x04}; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 0; modrm_source.ext_r = 0; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_EDX ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.size, FCML_DS_32 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.off32, 0x04030201 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); } /* RIP-addressing.*/ /* RIP: 401000h*/ /* disp32: 0f1efbf00h*/ /* [FFFFFFFFFF887766], EDX*/ void fcml_tf_modrm_3264_decoder_test_3(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_64; fcml_uint8_t buffer[] = {0x15, 0xfa, 0xf1, 0xbf, 0xff}; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 0; modrm_source.ext_r = 0; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_IP ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_EDX ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.size, FCML_DS_32 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.off32, 0xFFBFF1FA ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); STF_ASSERT_EQUAL( decoded_modrm.is_rip, FCML_TRUE ); fcml_st_offset address = {0}; error = fcml_fn_modrm_decode_rip( 0x401000, FCML_DS_64, &(decoded_modrm.address.offset), &address ); STF_ASSERT_EQUAL( address.size, FCML_DS_64 ); STF_ASSERT_EQUAL( address.off64, 0x1faUL ); } /* [ECX]+0x66, EAX*/ void fcml_tf_modrm_3264_decoder_test_4(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_32; fcml_uint8_t buffer[] = {0x41, 0x66}; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 0; modrm_source.ext_r = 0; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, FCML_REG_ECX ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_32 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_EAX ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, FCML_DS_8 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.int8, 0x66 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); } /* [ECX]+0x01020304, EAX*/ void fcml_tf_modrm_3264_decoder_test_5(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_32; fcml_uint8_t buffer[] = {0x81, 0x04, 0x03, 0x02, 0x01}; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 0; modrm_source.ext_r = 0; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, FCML_REG_ECX ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_32 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_EAX ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, FCML_DS_32 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.int32, 0x01020304 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); } /* [R9]+0x01020304, R8*/ void fcml_tf_modrm_3264_decoder_test_6(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_64; fcml_uint8_t buffer[] = {0x81, 0x04, 0x03, 0x02, 0x01}; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 1; modrm_source.ext_r = 1; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, FCML_REG_R9 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_R8 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, FCML_DS_32 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.int32, 0x01020304 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); } /* Illegal EASA size.*/ void fcml_tf_modrm_3264_decoder_test_7(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_16; fcml_uint8_t buffer[] = {0x81, 0x04, 0x03, 0x02, 0x01}; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 1; modrm_source.ext_r = 1; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_INVALID_ADDRESSING_FORM ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.int32, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.off32, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); } /* RAX, EBX*/ void fcml_tf_modrm_3264_decoder_test_8(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_64; fcml_uint8_t buffer[] = {0xD8}; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 0; modrm_source.ext_r = 0; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.reg.value, FCML_REG_RAX ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_TRUE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_RBX ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.int32, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.off32, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); } /* R8, R11*/ void fcml_tf_modrm_3264_decoder_test_9(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_64; fcml_uint8_t buffer[] = {0xD8}; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 1; modrm_source.ext_r = 1; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.reg.value, FCML_REG_R8 ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_TRUE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_R11 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.int32, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.off64, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); } /* RIP-addressing.*/ void fcml_tf_modrm_3264_decoder_test_10(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_64; fcml_uint8_t buffer[] = {0x15, 0xff, 0xff, 0xff, 0xff}; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 0; modrm_source.ext_r = 0; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_IP ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_EDX ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.size, FCML_DS_32 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.off32, 0xFFFFFFFF ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); STF_ASSERT_EQUAL( decoded_modrm.is_rip, FCML_TRUE ); fcml_st_offset address = {0}; error = fcml_fn_modrm_decode_rip( 0x401000, FCML_DS_64, &(decoded_modrm.address.offset), &address ); STF_ASSERT_EQUAL( address.size, FCML_DS_64 ); STF_ASSERT_EQUAL( address.off64, 0x400fffUL ); } /* RIP-addressing.*/ void fcml_tf_modrm_3264_decoder_test_11(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_64; fcml_uint8_t buffer[] = {0x15, 0x00, 0xE0, 0x7F, 0xFF}; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 0; modrm_source.ext_r = 0; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_IP ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_EDX ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.size, FCML_DS_32 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.off32, 0xFF7FE000 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); STF_ASSERT_EQUAL( decoded_modrm.is_rip, FCML_TRUE ); fcml_st_offset address = {0}; error = fcml_fn_modrm_decode_rip( 0x401000, FCML_DS_64, &(decoded_modrm.address.offset), &address ); STF_ASSERT_EQUAL( address.size, FCML_DS_64 ); STF_ASSERT_EQUAL( address.off64, 0xffffffffffbff000UL ); } /* RIP-addressing.*/ void fcml_tf_modrm_3264_decoder_test_12(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_32; fcml_uint8_t buffer[] = {0x15, 0x00, 0xE0, 0x7F, 0xFF}; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 0; modrm_source.ext_r = 0; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_IP ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_EDX ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.size, FCML_DS_32 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.off32, 0xFF7FE000 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); STF_ASSERT_EQUAL( decoded_modrm.is_rip, FCML_TRUE ); fcml_st_offset address = {0}; error = fcml_fn_modrm_decode_rip( 0x401000, FCML_DS_32, &(decoded_modrm.address.offset), &address ); STF_ASSERT_EQUAL( address.size, FCML_DS_64 ); STF_ASSERT_EQUAL( address.off64, 0x00000000ffbff000UL ); } /* [01020304], R8*/ void fcml_tf_modrm_3264_decoder_sib_test_1(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_64; fcml_uint8_t buffer[] = { 0x04, 0x25, 0x04, 0x03, 0x02, 0x01 }; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 1; modrm_source.ext_r = 1; modrm_source.ext_x = 0; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.reg.value, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_R8 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.off64, 0x01020304 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); } /* [EBX]+0x01020304, R8*/ void fcml_tf_modrm_3264_decoder_sib_test_2(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_64; fcml_uint8_t buffer[] = { 0x04, 0x1D, 0x04, 0x03, 0x02, 0x01 }; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 0; modrm_source.ext_r = 1; modrm_source.ext_x = 1; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.reg.value, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, FCML_REG_R11 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_R8 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, 32 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.int32, 0x01020304 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); } /* [ECX+EBX]+0x01, R8*/ void fcml_tf_modrm_3264_decoder_sib_test_3(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_64; fcml_uint8_t buffer[] = { 0x04, 0x19 }; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 1; modrm_source.ext_r = 1; modrm_source.ext_x = 1; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.reg.value, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, FCML_REG_R9 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, FCML_REG_R11 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_R8 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.int32, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.off32, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); } /* [ECX+EBX*2]+0x01, R8*/ void fcml_tf_modrm_3264_decoder_sib_test_4(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_64; fcml_uint8_t buffer[] = { 0x04, 0x59 }; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 1; modrm_source.ext_r = 1; modrm_source.ext_x = 1; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.reg.value, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, FCML_REG_R9 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, FCML_REG_R11 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_R8 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.int32, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.off32, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 2 ); } /* [ECX+EBX*4], R8*/ void fcml_tf_modrm_3264_decoder_sib_test_5(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_64; fcml_uint8_t buffer[] = { 0x04, 0x99 }; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 1; modrm_source.ext_r = 1; modrm_source.ext_x = 1; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.reg.value, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, FCML_REG_R9 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, FCML_REG_R11 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_R8 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.int32, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.off32, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 4 ); } /* [ECX+EBX*8], R8*/ void fcml_tf_modrm_3264_decoder_sib_test_6(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_64; fcml_uint8_t buffer[] = { 0x04, 0xD9 }; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 1; modrm_source.ext_r = 1; modrm_source.ext_x = 1; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.reg.value, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, FCML_REG_R9 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, FCML_REG_R11 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_R8 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.int32, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.off32, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.offset.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 8 ); } /* [ECX+EBX*8]+0x55, R8*/ void fcml_tf_modrm_3264_decoder_sib_test_7(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_64; fcml_uint8_t buffer[] = { 0x44, 0xD9, 0x55 }; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 1; modrm_source.ext_r = 1; modrm_source.ext_x = 1; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.reg.value, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, FCML_REG_R9 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, FCML_REG_R11 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_R8 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, FCML_DS_8 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.int8, 0x55 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 8 ); } /* [ECX+EBX*8]+0x01020304, R8*/ void fcml_tf_modrm_3264_decoder_sib_test_8(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_64; fcml_uint8_t buffer[] = { 0x84, 0xD9, 0x04, 0x03, 0x02, 0x01 }; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 1; modrm_source.ext_r = 1; modrm_source.ext_x = 1; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.reg.value, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, FCML_REG_R9 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, FCML_REG_R11 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_R8 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, FCML_DS_32 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.int32, 0x01020304 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 8 ); } /* [R9]+0x01020304, R8*/ void fcml_tf_modrm_3264_decoder_sib_test_9(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_64; fcml_uint8_t buffer[] = { 0x84, 0xE1, 0x04, 0x03, 0x02, 0x01 }; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 1; modrm_source.ext_r = 1; modrm_source.ext_x = 1; modrm_source.stream = &stream; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.reg.value, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, FCML_REG_R9 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, 0 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, 0 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_R8 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, FCML_DS_32 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.int32, 0x01020304 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 0 ); } /* [ECX+XMM1*8]+0x01020304, R8*/ void fcml_tf_modrm_3264_decoder_sib_test_10(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_64; fcml_uint8_t buffer[] = { 0x84, 0xD9, 0x04, 0x03, 0x02, 0x01 }; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 1; modrm_source.ext_r = 1; modrm_source.ext_x = 1; modrm_source.stream = &stream; modrm_source.is_vsib = FCML_TRUE; modrm_source.vsib_index_size = FCML_DS_128; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.reg.value, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, FCML_REG_R9 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_SIMD ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, FCML_REG_XMM11 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, FCML_DS_128 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_R8 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, FCML_DS_32 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.int32, 0x01020304 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 8 ); } /* [ECX+YMM1*8]+0x01020304, R8*/ void fcml_tf_modrm_3264_decoder_sib_test_11(void) { fcml_st_modrm_decoder_context context = fcml_ifn_modrm_decoder_alloc_ctx(); context.op_mode = FCML_OM_64_BIT; context.effective_address_size = FCML_DS_64; fcml_uint8_t buffer[] = { 0x84, 0xD9, 0x04, 0x03, 0x02, 0x01 }; fcml_st_memory_stream stream; stream.base_address = &buffer; stream.size = sizeof( buffer ); stream.offset = 0; fcml_st_modrm_source modrm_source = {0}; modrm_source.ext_b = 1; modrm_source.ext_r = 1; modrm_source.ext_x = 1; modrm_source.stream = &stream; modrm_source.is_vsib = FCML_TRUE; modrm_source.vsib_index_size = FCML_DS_256; fcml_st_modrm decoded_modrm; fcml_st_modrm_details details; fcml_ceh_error error = fcml_fn_modrm_decode( &context, &modrm_source, &decoded_modrm, &details, 0 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( decoded_modrm.reg.value, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( decoded_modrm.reg.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.reg, FCML_REG_R9 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.base.size, FCML_DS_64 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.type, FCML_REG_SIMD ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.reg, FCML_REG_XMM11 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.index.size, FCML_DS_256 ); STF_ASSERT_EQUAL( decoded_modrm.reg_opcode, FCML_REG_R8 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.size, FCML_DS_32 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.int32, 0x01020304 ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.displacement.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( decoded_modrm.address.effective_address.scale_factor, 8 ); } fcml_stf_test_case fctl_ti_modrm_decoder[] = { { "fcml_tf_modrm_decoder_test_1", fcml_tf_modrm_decoder_test_1 }, { "fcml_tf_modrm_decoder_test_2", fcml_tf_modrm_decoder_test_2 }, { "fcml_tf_modrm_decoder_test_3", fcml_tf_modrm_decoder_test_3 }, { "fcml_tf_modrm_decoder_test_4", fcml_tf_modrm_decoder_test_4 }, { "fcml_tf_modrm_decoder_test_5", fcml_tf_modrm_decoder_test_5 }, { "fcml_tf_modrm_decoder_test_6", fcml_tf_modrm_decoder_test_6 }, { "fcml_tf_modrm_decoder_test_7", fcml_tf_modrm_decoder_test_7 }, { "fcml_tf_modrm_3264_decoder_test_1", fcml_tf_modrm_3264_decoder_test_1 }, { "fcml_tf_modrm_3264_decoder_test_2", fcml_tf_modrm_3264_decoder_test_2 }, { "fcml_tf_modrm_3264_decoder_test_3", fcml_tf_modrm_3264_decoder_test_3 }, { "fcml_tf_modrm_3264_decoder_test_4", fcml_tf_modrm_3264_decoder_test_4 }, { "fcml_tf_modrm_3264_decoder_test_5", fcml_tf_modrm_3264_decoder_test_5 }, { "fcml_tf_modrm_3264_decoder_test_6", fcml_tf_modrm_3264_decoder_test_6 }, { "fcml_tf_modrm_3264_decoder_test_7", fcml_tf_modrm_3264_decoder_test_7 }, { "fcml_tf_modrm_3264_decoder_test_8", fcml_tf_modrm_3264_decoder_test_8 }, { "fcml_tf_modrm_3264_decoder_test_9", fcml_tf_modrm_3264_decoder_test_9 }, { "fcml_tf_modrm_3264_decoder_test_10", fcml_tf_modrm_3264_decoder_test_10 }, { "fcml_tf_modrm_3264_decoder_test_11", fcml_tf_modrm_3264_decoder_test_11 }, { "fcml_tf_modrm_3264_decoder_test_12", fcml_tf_modrm_3264_decoder_test_12 }, { "fcml_tf_modrm_3264_decoder_sib_test_1", fcml_tf_modrm_3264_decoder_sib_test_1 }, { "fcml_tf_modrm_3264_decoder_sib_test_2", fcml_tf_modrm_3264_decoder_sib_test_2 }, { "fcml_tf_modrm_3264_decoder_sib_test_3", fcml_tf_modrm_3264_decoder_sib_test_3 }, { "fcml_tf_modrm_3264_decoder_sib_test_4", fcml_tf_modrm_3264_decoder_sib_test_4 }, { "fcml_tf_modrm_3264_decoder_sib_test_5", fcml_tf_modrm_3264_decoder_sib_test_5 }, { "fcml_tf_modrm_3264_decoder_sib_test_6", fcml_tf_modrm_3264_decoder_sib_test_6 }, { "fcml_tf_modrm_3264_decoder_sib_test_7", fcml_tf_modrm_3264_decoder_sib_test_7 }, { "fcml_tf_modrm_3264_decoder_sib_test_8", fcml_tf_modrm_3264_decoder_sib_test_8 }, { "fcml_tf_modrm_3264_decoder_sib_test_9", fcml_tf_modrm_3264_decoder_sib_test_9 }, { "fcml_tf_modrm_3264_decoder_sib_test_10", fcml_tf_modrm_3264_decoder_sib_test_10 }, { "fcml_tf_modrm_3264_decoder_sib_test_11", fcml_tf_modrm_3264_decoder_sib_test_11 }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_modrm_decoder = { "suite-modrm", fcml_tf_modrm_decoder_suite_init, fcml_tf_modrm_decoder_suite_cleanup, fctl_ti_modrm_decoder }; fcml-1.1.1/check/internal-tests/mnemonic_parser_t.h0000644000175000017500000000200012560745216017262 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_MNEMONIC_PARSER_T_H_ #define FCML_MNEMONIC_PARSER_T_H_ #include extern fcml_stf_test_suite fcml_si_mnemonic_parser; #endif /* FCML_MNEMONIC_PARSER_T_H_ */ fcml-1.1.1/check/internal-tests/modrm_decoder_t.h0000644000175000017500000000175112560745216016720 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 MODRM_DECODER_T_H_ #define MODRM_DECODER_T_H_ #include extern fcml_stf_test_suite fctl_si_modrm_decoder; #endif /* MODRM_DECODER_T_H_ */ fcml-1.1.1/check/internal-tests/lag_assembler_t.h0000644000175000017500000000175212560745216016716 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 LAG_ASSEMBLER_T_H_ #define LAG_ASSEMBLER_T_H_ #include extern fcml_stf_test_suite fcml_si_lag_assembler; #endif /* LAG_ASSEMBLER_T_H_ */ fcml-1.1.1/check/internal-tests/utils_t.h0000644000175000017500000000173012560745216015252 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_UTILS_T_H_ #define FCML_UTILS_T_H_ #include extern fcml_stf_test_suite fcml_si_utils; #endif /* FCML_UTILS_T_H_ */ fcml-1.1.1/check/internal-tests/env_t.h0000644000175000017500000000172012560745216014701 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_ENV_T_H_ #define FCML_ENV_T_H_ #include extern fcml_stf_test_suite fcml_si_env; #endif /* FCML_ENV_T_H_ */ fcml-1.1.1/check/internal-tests/ceh_t.h0000644000175000017500000000170112560745216014647 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 CEH_T_H_ #define CEH_T_H_ #include extern fcml_stf_test_suite fcml_si_ceh; #endif /* CEH_T_H_ */ fcml-1.1.1/check/internal-tests/modrm_encoder_t.c0000644000175000017500000024700312560745216016727 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 "modrm_encoder_t.h" #include #include #include #include fcml_bool fcml_tf_modrm_encoder_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_modrm_encoder_suite_cleanup(void) { return FCML_TRUE; } /* [EAX]*/ void fcml_tf_modrm_encoder_test_1(void) { fcml_flags effective_address_size; fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_EAX; modrm.address.effective_address.base.size = FCML_DS_32; fcml_ceh_error error = fcml_fn_modrm_calculate_effective_address_size( &modrm, &effective_address_size ); STF_ASSERT_EQUAL( effective_address_size, FCML_EN_ASF_32 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); } /* [RAX]*/ void fcml_tf_modrm_encoder_test_2(void) { fcml_flags effective_address_size; fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_RAX; modrm.address.effective_address.base.size = FCML_DS_64; fcml_ceh_error error = fcml_fn_modrm_calculate_effective_address_size( &modrm, &effective_address_size ); STF_ASSERT_EQUAL( effective_address_size, FCML_EN_ASF_64 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); } /* [AX]*/ void fcml_tf_modrm_encoder_test_3(void) { fcml_flags effective_address_size; fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_AX; modrm.address.effective_address.base.size = FCML_DS_16; fcml_ceh_error error = fcml_fn_modrm_calculate_effective_address_size( &modrm, &effective_address_size ); STF_ASSERT_EQUAL( effective_address_size, FCML_EN_ASF_16 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); } /* SIB index [AX]*/ void fcml_tf_modrm_encoder_test_4(void) { fcml_flags effective_address_size; fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.effective_address.index.type = FCML_REG_GPR; modrm.address.effective_address.index.reg = FCML_REG_AX; modrm.address.effective_address.index.size = FCML_DS_16; fcml_ceh_error error = fcml_fn_modrm_calculate_effective_address_size( &modrm, &effective_address_size ); STF_ASSERT_EQUAL( effective_address_size, FCML_EN_ASF_16 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); } /* SIB index [EAX]*/ void fcml_tf_modrm_encoder_test_5(void) { fcml_flags effective_address_size; fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.effective_address.index.type = FCML_REG_GPR; modrm.address.effective_address.index.reg = FCML_REG_EAX; modrm.address.effective_address.index.size = FCML_DS_32; fcml_ceh_error error = fcml_fn_modrm_calculate_effective_address_size( &modrm, &effective_address_size ); STF_ASSERT_EQUAL( effective_address_size, FCML_EN_ASF_32 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); } /* SIB index [RAX]*/ void fcml_tf_modrm_encoder_test_6(void) { fcml_flags effective_address_size; fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.effective_address.index.type = FCML_REG_GPR; modrm.address.effective_address.index.reg = FCML_REG_RAX; modrm.address.effective_address.index.size = FCML_DS_64; fcml_ceh_error error = fcml_fn_modrm_calculate_effective_address_size( &modrm, &effective_address_size ); STF_ASSERT_EQUAL( effective_address_size, FCML_EN_ASF_64 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); } /* displacement 8*/ void fcml_tf_modrm_encoder_test_7(void) { fcml_flags effective_address_size; fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.effective_address.displacement.size = FCML_DS_8; fcml_ceh_error error = fcml_fn_modrm_calculate_effective_address_size( &modrm, &effective_address_size ); STF_ASSERT( effective_address_size & FCML_EN_ASF_16 ); STF_ASSERT( effective_address_size & FCML_EN_ASF_32 ); STF_ASSERT( effective_address_size & FCML_EN_ASF_64 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); } /* displacement 16*/ void fcml_tf_modrm_encoder_test_8(void) { fcml_flags effective_address_size; fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.effective_address.displacement.size = FCML_DS_16; fcml_ceh_error error = fcml_fn_modrm_calculate_effective_address_size( &modrm, &effective_address_size ); STF_ASSERT( effective_address_size & FCML_EN_ASF_16 ); STF_ASSERT( effective_address_size & FCML_EN_ASF_32 ); STF_ASSERT( effective_address_size & FCML_EN_ASF_64 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); } /* displacement 64*/ void fcml_tf_modrm_encoder_test_9(void) { fcml_flags effective_address_size; fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.effective_address.displacement.size = FCML_DS_32; fcml_ceh_error error = fcml_fn_modrm_calculate_effective_address_size( &modrm, &effective_address_size ); STF_ASSERT( effective_address_size & FCML_EN_ASF_16 ); STF_ASSERT( effective_address_size & FCML_EN_ASF_32 ); STF_ASSERT( effective_address_size & FCML_EN_ASF_64 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); } /* SIB index [XMM]*/ void fcml_tf_modrm_encoder_test_10(void) { fcml_flags effective_address_size; fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.effective_address.index.type = FCML_REG_SIMD; modrm.address.effective_address.index.reg = FCML_REG_XMM1; modrm.address.effective_address.index.size = FCML_DS_128; fcml_ceh_error error = fcml_fn_modrm_calculate_effective_address_size( &modrm, &effective_address_size ); STF_ASSERT( !(effective_address_size & FCML_EN_ASF_16 ) ); STF_ASSERT( effective_address_size & FCML_EN_ASF_32 ); STF_ASSERT( effective_address_size & FCML_EN_ASF_64 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); } /* SIB index [YMM]*/ void fcml_tf_modrm_encoder_test_11(void) { fcml_flags effective_address_size; fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.effective_address.index.type = FCML_REG_SIMD; modrm.address.effective_address.index.reg = FCML_REG_XMM1; modrm.address.effective_address.index.size = FCML_DS_256; fcml_ceh_error error = fcml_fn_modrm_calculate_effective_address_size( &modrm, &effective_address_size ); STF_ASSERT( !(effective_address_size & FCML_EN_ASF_16) ); STF_ASSERT( effective_address_size & FCML_EN_ASF_32 ); STF_ASSERT( effective_address_size & FCML_EN_ASF_64 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); } /* Encode disp16*/ void fcml_tf_modrm_encoder_test_12(void) { fcml_st_modrm modrm; /* As displacement.*/ /* Exactly the same size.*/ fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.effective_address.displacement.size = FCML_DS_16; modrm.address.effective_address.displacement.int16 = (fcml_int16_t)0xF2F1; modrm.address.address_form = FCML_AF_OFFSET; fcml_st_modrm_encoder_context context; context.op_mode = FCML_OM_16_BIT; context.effective_address_size = FCML_DS_16; fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0xF1 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0xF2 ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 2 ); /* 8 bit sign extended.*/ fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.effective_address.displacement.size = FCML_DS_8; modrm.address.effective_address.displacement.int8 = (fcml_int8_t)0xF1; modrm.address.effective_address.displacement.is_signed = FCML_TRUE; modrm.address.address_form = FCML_AF_OFFSET; context.effective_address_size = FCML_DS_16; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0xF1 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0xFF ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 2 ); /* 32 bits - to 16 bits.*/ fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.effective_address.displacement.size = FCML_DS_32; modrm.address.effective_address.displacement.int32 = 0xFFFFFFF1; modrm.address.effective_address.displacement.is_signed = FCML_TRUE; modrm.address.address_form = FCML_AF_OFFSET; context.effective_address_size = FCML_DS_16; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0xF1 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0xFF ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 2 ); /* 64 bits - to 16 bits.*/ fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.effective_address.displacement.size = FCML_DS_64; modrm.address.effective_address.displacement.int64 = 0xFFFFFFFFFFFFFFF1ULL; modrm.address.effective_address.displacement.is_signed = FCML_TRUE; modrm.address.address_form = FCML_AF_OFFSET; context.effective_address_size = FCML_DS_16; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0xF1 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0xFF ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 2 ); /* 64 bits - to 16 bits, overflow.*/ fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.effective_address.displacement.size = FCML_DS_64; modrm.address.effective_address.displacement.int64 = 0x1FFFFFFFFFFFFFF1ULL; modrm.address.effective_address.displacement.is_signed = FCML_TRUE; modrm.address.address_form = FCML_AF_OFFSET; context.effective_address_size = FCML_DS_16; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_VALUE_OUT_OF_RANGE ); /* 32 bits - to 16 bits, overflow.*/ fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.effective_address.displacement.size = FCML_DS_64; modrm.address.effective_address.displacement.int64 = 0x1FFFFFF1ULL; modrm.address.effective_address.displacement.is_signed = FCML_TRUE; modrm.address.address_form = FCML_AF_OFFSET; context.effective_address_size = FCML_DS_16; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_VALUE_OUT_OF_RANGE ); } /* Encode disp8*/ void fcml_tf_modrm_encoder_test_13(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.effective_address.displacement.size = FCML_DS_8; modrm.address.effective_address.displacement.int8 = (fcml_int8_t)0xF1; modrm.address.effective_address.displacement.is_signed = FCML_FALSE; modrm.address.address_form = FCML_AF_OFFSET; fcml_st_modrm_encoder_context context; context.op_mode = FCML_OM_16_BIT; context.effective_address_size = FCML_DS_16; fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0xF1 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 2 ); } /* Encode disp16*/ void fcml_tf_modrm_encoder_test_14(void) { fcml_st_modrm modrm; /* As displacement.*/ /* Exactly the same size.*/ fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.offset.size = FCML_DS_16; modrm.address.offset.off16 = (fcml_int16_t)0xF2F1; modrm.address.address_form = FCML_AF_OFFSET; fcml_st_modrm_encoder_context context; context.op_mode = FCML_OM_16_BIT; context.effective_address_size = FCML_DS_16; fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0xF1 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0xF2 ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 2 ); /* 32 bits - to 16 bits.*/ fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.offset.size = FCML_DS_32; modrm.address.offset.off32 = 0xFFFFFFF1; modrm.address.offset.is_signed = FCML_TRUE; modrm.address.address_form = FCML_AF_OFFSET; context.effective_address_size = FCML_DS_16; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0xF1 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0xFF ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 2 ); /* 64 bits - to 16 bits.*/ fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.offset.size = FCML_DS_64; modrm.address.offset.off64 = 0xFFFFFFFFFFFFFFF1ULL; modrm.address.offset.is_signed = FCML_TRUE; modrm.address.address_form = FCML_AF_OFFSET; context.effective_address_size = FCML_DS_16; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0xF1 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0xFF ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 2 ); /* 64 bits - to 16 bits, overflow.*/ fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.offset.size = FCML_DS_64; modrm.address.offset.off64 = 0x1FFFFFFFFFFFFFF1ULL; modrm.address.offset.is_signed = FCML_TRUE; modrm.address.address_form = FCML_AF_OFFSET; context.effective_address_size = FCML_DS_16; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_VALUE_OUT_OF_RANGE ); /* 32 bits - to 16 bits, overflow.*/ fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); modrm.address.offset.size = FCML_DS_64; modrm.address.offset.off64 = 0x1FFFFFF1ULL; modrm.address.offset.is_signed = FCML_TRUE; modrm.address.address_form = FCML_AF_OFFSET; context.effective_address_size = FCML_DS_16; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_VALUE_OUT_OF_RANGE ); } /* Encode [BX+SI]*/ void fcml_tf_modrm_encoder_16_bit_encoding_1(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_16; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.size = FCML_DS_16; modrm.address.effective_address.base.reg = FCML_REG_BX; modrm.address.effective_address.index.type = FCML_REG_GPR; modrm.address.effective_address.index.size = FCML_DS_16; modrm.address.effective_address.index.reg = FCML_REG_SI; modrm.address.address_form = FCML_AF_COMBINED; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0 ); } /* Encode [BX+DI]*/ void fcml_tf_modrm_encoder_16_bit_encoding_2(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_16; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.size = FCML_DS_16; modrm.address.effective_address.base.reg = FCML_REG_BX; modrm.address.effective_address.index.type = FCML_REG_GPR; modrm.address.effective_address.index.size = FCML_DS_16; modrm.address.effective_address.index.reg = FCML_REG_DI; modrm.address.address_form = FCML_AF_COMBINED; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 1 ); } /* Encode [BP+SI]*/ void fcml_tf_modrm_encoder_16_bit_encoding_3(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_16; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.size = FCML_DS_16; modrm.address.effective_address.base.reg = FCML_REG_BP; modrm.address.effective_address.index.type = FCML_REG_GPR; modrm.address.effective_address.index.size = FCML_DS_16; modrm.address.effective_address.index.reg = FCML_REG_SI; modrm.address.address_form = FCML_AF_COMBINED; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 2 ); } /* Encode [BP+DI]*/ void fcml_tf_modrm_encoder_16_bit_encoding_4(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_16; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.size = FCML_DS_16; modrm.address.effective_address.base.reg = FCML_REG_BP; modrm.address.effective_address.index.type = FCML_REG_GPR; modrm.address.effective_address.index.size = FCML_DS_16; modrm.address.effective_address.index.reg = FCML_REG_DI; modrm.address.address_form = FCML_AF_COMBINED; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 3 ); } /* Encode [SI]*/ void fcml_tf_modrm_encoder_16_bit_encoding_5(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_16; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.size = FCML_DS_16; modrm.address.effective_address.base.reg = FCML_REG_SI; modrm.address.address_form = FCML_AF_COMBINED; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 4 ); } /* Encode [DI]*/ void fcml_tf_modrm_encoder_16_bit_encoding_6(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_16; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.size = FCML_DS_16; modrm.address.effective_address.base.reg = FCML_REG_DI; modrm.address.address_form = FCML_AF_COMBINED; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 5 ); } /* Encode [BP]*/ void fcml_tf_modrm_encoder_16_bit_encoding_7(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_16; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.size = FCML_DS_16; modrm.address.effective_address.base.reg = FCML_REG_BP; modrm.address.address_form = FCML_AF_COMBINED; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_INVALID_ADDRESSING_FORM ); } /* Encode [BX]*/ void fcml_tf_modrm_encoder_16_bit_encoding_8(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_16; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.size = FCML_DS_16; modrm.address.effective_address.base.reg = FCML_REG_BX; modrm.address.address_form = FCML_AF_COMBINED; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 7 ); } /* Encode [BX+DI]+disp8*/ void fcml_tf_modrm_encoder_16_bit_encoding_9(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_16; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.size = FCML_DS_16; modrm.address.effective_address.base.reg = FCML_REG_BX; modrm.address.effective_address.index.type = FCML_REG_GPR; modrm.address.effective_address.index.size = FCML_DS_16; modrm.address.effective_address.index.reg = FCML_REG_DI; modrm.address.effective_address.displacement.size = FCML_DS_8; modrm.address.effective_address.displacement.int8 = 0x12; modrm.address.effective_address.displacement.is_signed = FCML_FALSE; modrm.address.address_form = FCML_AF_COMBINED; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 1 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0x12 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x41 ); modrm.address.effective_address.displacement.size = FCML_DS_16; modrm.address.effective_address.displacement.int16 = 0x12; error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 1 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0x12 ); } /* Encode [BP]+disp8*/ void fcml_tf_modrm_encoder_16_bit_encoding_10(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_16; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.size = FCML_DS_16; modrm.address.effective_address.base.reg = FCML_REG_BP; modrm.address.effective_address.displacement.size = FCML_DS_8; modrm.address.effective_address.displacement.int8 = (fcml_int8_t)0xFF; modrm.address.address_form = FCML_AF_COMBINED; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 1 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0xFF ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x46 ); } /* Encode [SI]+disp16*/ void fcml_tf_modrm_encoder_16_bit_encoding_11(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_16; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.size = FCML_DS_16; modrm.address.effective_address.base.reg = FCML_REG_SI; modrm.address.effective_address.displacement.size = FCML_DS_16; modrm.address.effective_address.displacement.int16 = 0x0102; modrm.address.address_form = FCML_AF_COMBINED; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 2 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0x02 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0x01 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x84 ); } /* Encode [BX]+disp16*/ void fcml_tf_modrm_encoder_16_bit_encoding_12(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_16; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.size = FCML_DS_16; modrm.address.effective_address.base.reg = FCML_REG_BX; modrm.address.effective_address.displacement.size = FCML_DS_16; modrm.address.effective_address.displacement.int16 = (fcml_int16_t)0xFFF1; modrm.address.effective_address.displacement.is_signed = FCML_TRUE; modrm.address.address_form = FCML_AF_COMBINED; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 1 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0xF1 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x47 ); modrm.address.effective_address.displacement.int16 = 0x1FF1; error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 2 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0xF1 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0x1F ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x87 ); } /* Encode DX, BP*/ void fcml_tf_modrm_encoder_16_bit_encoding_13(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_16; modrm.reg.is_not_null = FCML_TRUE; modrm.reg.value = FCML_REG_DI; modrm.reg_opcode = FCML_REG_BP; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0xEF ); } /* Encode [EAX], EAX*/ void fcml_tf_modrm_encoder_3264_bit_encoding_1(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_EAX; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_EAX; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x00 ); } /* Encode [ECX], EDI*/ void fcml_tf_modrm_encoder_3264_bit_encoding_2(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_ECX; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_EDI; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x39 ); } /* Encode [RCX], RDI*/ void fcml_tf_modrm_encoder_3264_bit_encoding_3(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_64; context.op_mode = FCML_OM_64_BIT; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_RCX; modrm.address.effective_address.base.size = FCML_DS_64; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_RDI; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x39 ); } /* Encode [ECX], RDI*/ void fcml_tf_modrm_encoder_3264_bit_encoding_4(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_64; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_ECX; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_RDI; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_INVALID_ADDRESSING_FORM ); } /* Encode [R12D], EDI (failed, because 32 bit addressing is used.)*/ void fcml_tf_modrm_encoder_3264_bit_encoding_5(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; context.effective_address_size = FCML_DS_32; context.op_mode = FCML_OM_32_BIT; context.choose_sib_encoding = FCML_TRUE; context.chosen_effective_address_size = FCML_DS_32; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_R12D; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_EDI; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_INVALID_ADDRESSING_FORM ); } /* Encode [01020304], ECX*/ /* Encode [0102], ECX*/ /* Encode [01], ECX*/ void fcml_tf_modrm_encoder_3264_bit_encoding_6(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; modrm.address.effective_address.displacement.size = FCML_DS_32; modrm.address.effective_address.displacement.int32 = 0x01020304; modrm.address.address_form = FCML_AF_OFFSET; modrm.reg_opcode = FCML_REG_ECX; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 4 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0x04 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0x03 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[2], 0x02 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[3], 0x01 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x0D ); STF_ASSERT_EQUAL( context.is_sib_alternative, FCML_TRUE ); modrm.address.effective_address.displacement.size = FCML_DS_16; modrm.address.effective_address.displacement.int16 = 0x0102; modrm.reg_opcode = FCML_REG_ECX; error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 4 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0x02 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0x01 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[2], 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[3], 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x0D ); STF_ASSERT_EQUAL( context.is_sib_alternative, FCML_TRUE ); modrm.address.effective_address.displacement.size = FCML_DS_8; modrm.address.effective_address.displacement.int8 = 0x01; modrm.address.address_form = FCML_AF_OFFSET; modrm.reg_opcode = FCML_REG_ECX; error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 4 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0x01 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[2], 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[3], 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x0D ); STF_ASSERT_EQUAL( context.is_sib_alternative, FCML_TRUE ); } /* Encode [EDI], R12D*/ void fcml_tf_modrm_encoder_3264_bit_encoding_7(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; context.op_mode = FCML_OM_64_BIT; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_EDI; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_R12D; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 1 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x27 ); STF_ASSERT_EQUAL( context.is_sib_alternative, FCML_TRUE ); } /* Encode [EDX]+01020304, EBP*/ /* Encode [EDX]+0102, EBP*/ /* Encode [EDX]+01, EBP*/ void fcml_tf_modrm_encoder_3264_bit_encoding_8(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_EDX; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.effective_address.displacement.size = FCML_DS_32; modrm.address.effective_address.displacement.int32 = 0x01020304; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_EBP; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 4 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0x04 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0x03 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[2], 0x02 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[3], 0x01 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0xAA ); modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_EDX; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.effective_address.displacement.size = FCML_DS_16; modrm.address.effective_address.displacement.int16 = 0x0102; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_EBP; error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 4 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0x02 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0x01 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[2], 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[3], 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0xAA ); modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_EDX; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.effective_address.displacement.size = FCML_DS_8; modrm.address.effective_address.displacement.int8 = 0x01; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_EBP; error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 1 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0x01 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x6A ); modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_EDX; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.effective_address.displacement.size = FCML_DS_32; modrm.address.effective_address.displacement.int32 = 0x01; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_EBP; error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 1 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0x01 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x6A ); } /* Encode EBP, R12D*/ void fcml_tf_modrm_encoder_3264_bit_encoding_9(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; context.op_mode = FCML_OM_64_BIT; modrm.reg.is_not_null = FCML_TRUE; modrm.reg.value = FCML_REG_EBP; modrm.reg_opcode = FCML_REG_R12D; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 1 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0xE5 ); } /* Encode EBP+0x01, R12D*/ void fcml_tf_modrm_encoder_3264_bit_encoding_10(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; modrm.address.effective_address.displacement.size = FCML_DS_8; modrm.address.effective_address.displacement.int32 = 0x01; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg.is_not_null = FCML_TRUE; modrm.reg.value = FCML_REG_EBP; modrm.reg_opcode = FCML_REG_R12D; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_INVALID_ADDRESSING_FORM ); } /* Encode [R12D], EDI*/ void fcml_tf_modrm_encoder_3264_bit_encoding_11(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; context.op_mode = FCML_OM_64_BIT; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_R12D; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_EDI; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 1 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x3c ); } /* Encode [RAX], RDI (failed, 32 bits)*/ void fcml_tf_modrm_encoder_3264_bit_encoding_12(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_64; context.op_mode = FCML_OM_32_BIT; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_RAX; modrm.address.effective_address.base.size = FCML_DS_64; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_RDI; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_INVALID_ADDRESSING_FORM ); } /* Encode [EAX+EBX], ESP*/ void fcml_tf_modrm_sib_encoder_3264_bit_encoding_1(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_EAX; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.effective_address.index.type = FCML_REG_GPR; modrm.address.effective_address.index.reg = FCML_REG_EBX; modrm.address.effective_address.index.size = FCML_DS_32; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_ESP; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_TRUE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0x18 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x24 ); } /* Encode [EBP+EDX], ESP*/ void fcml_tf_modrm_sib_encoder_3264_bit_encoding_2(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_EBP; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.effective_address.index.type = FCML_REG_GPR; modrm.address.effective_address.index.reg = FCML_REG_EDX; modrm.address.effective_address.index.size = FCML_DS_32; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_ESP; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_TRUE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0x15 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x24 ); } /* Encode [EBP+EBP*2], ESP*/ void fcml_tf_modrm_sib_encoder_3264_bit_encoding_3(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_EBP; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.effective_address.index.type = FCML_REG_GPR; modrm.address.effective_address.index.reg = FCML_REG_EBP; modrm.address.effective_address.index.size = FCML_DS_32; modrm.address.effective_address.scale_factor = 2; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_ESP; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_TRUE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0x6D ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x24 ); } /* Encode [EBP+EBP*4], ESP*/ void fcml_tf_modrm_sib_encoder_3264_bit_encoding_4(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_EBP; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.effective_address.index.type = FCML_REG_GPR; modrm.address.effective_address.index.reg = FCML_REG_EBP; modrm.address.effective_address.index.size = FCML_DS_32; modrm.address.effective_address.scale_factor = 4; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_ESP; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_TRUE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0xAD ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x24 ); } /* Encode [EBP+EBP*8], ESP*/ void fcml_tf_modrm_sib_encoder_3264_bit_encoding_5(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context = {0}; context.effective_address_size = FCML_DS_32; context.op_mode = FCML_OM_32_BIT; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_EBP; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.effective_address.index.type = FCML_REG_GPR; modrm.address.effective_address.index.reg = FCML_REG_EBP; modrm.address.effective_address.index.size = FCML_DS_32; modrm.address.effective_address.scale_factor = 8; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_ESP; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_TRUE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0xED ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x24 ); } /* Encode [EBP+EBP*8]+disp8, ESP*/ void fcml_tf_modrm_sib_encoder_3264_bit_encoding_6(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; modrm.address.effective_address.displacement.size = FCML_DS_8; modrm.address.effective_address.displacement.int8 = 0x50; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_EBP; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.effective_address.index.type = FCML_REG_GPR; modrm.address.effective_address.index.reg = FCML_REG_EBP; modrm.address.effective_address.index.size = FCML_DS_32; modrm.address.effective_address.scale_factor = 8; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_ESP; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 1 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0x50 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_TRUE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0xED ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x64 ); } /* Encode [EBP+EBP*8]+disp16, ESP*/ void fcml_tf_modrm_sib_encoder_3264_bit_encoding_7(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; modrm.address.effective_address.displacement.size = FCML_DS_16; modrm.address.effective_address.displacement.int16 = 0x5051; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_EBP; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.effective_address.index.type = FCML_REG_GPR; modrm.address.effective_address.index.reg = FCML_REG_EBP; modrm.address.effective_address.index.size = FCML_DS_32; modrm.address.effective_address.scale_factor = 8; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_ESP; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 4 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0x51 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0x50 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[2], 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[3], 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_TRUE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0xED ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0xA4 ); } /* Encode [EBP+EBP*8]+disp32, ESP*/ void fcml_tf_modrm_sib_encoder_3264_bit_encoding_8(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; modrm.address.effective_address.displacement.size = FCML_DS_32; modrm.address.effective_address.displacement.int32 = 0x50515253; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_EBP; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.effective_address.index.type = FCML_REG_GPR; modrm.address.effective_address.index.reg = FCML_REG_EBP; modrm.address.effective_address.index.size = FCML_DS_32; modrm.address.effective_address.scale_factor = 8; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_ESP; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 4 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0x53 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0x52 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[2], 0x51 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[3], 0x50 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_TRUE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0xED ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0xA4 ); } /* Encode [EDX]+01020304, EBP*/ /* Encode [EDX]+0102, EBP*/ /* Encode [EDX]+01, EBP*/ void fcml_tf_modrm_sib_encoder_3264_bit_encoding_9(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; context.choose_sib_encoding = FCML_TRUE; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_EDX; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.effective_address.displacement.size = FCML_DS_32; modrm.address.effective_address.displacement.int32 = 0x01020304; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_EBP; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 4 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0x04 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0x03 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[2], 0x02 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[3], 0x01 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_TRUE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0x22 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0xAC ); modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_EDX; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.effective_address.displacement.size = FCML_DS_16; modrm.address.effective_address.displacement.int16 = 0x0102; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_EBP; error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 4 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0x02 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0x01 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[2], 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[3], 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_TRUE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0x22 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0xAC ); modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_EDX; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.effective_address.displacement.size = FCML_DS_8; modrm.address.effective_address.displacement.int8 = 0x01; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_EBP; error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 1 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0x01 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_TRUE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0x22 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x6C ); } /* Encode [R15D], R12D*/ void fcml_tf_modrm_sib_encoder_3264_bit_encoding_10(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; context.op_mode = FCML_OM_64_BIT; context.choose_sib_encoding = FCML_TRUE; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_R15D; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_R12D; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 1 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 1 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_TRUE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0x27 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x24 ); STF_ASSERT_EQUAL( context.is_sib_alternative, FCML_TRUE ); } /* Encode [R15D+R10D*4], R12D*/ void fcml_tf_modrm_sib_encoder_3264_bit_encoding_11(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; context.op_mode = FCML_OM_64_BIT; context.choose_sib_encoding = FCML_TRUE; modrm.address.effective_address.base.type = FCML_REG_GPR; modrm.address.effective_address.base.reg = FCML_REG_R15D; modrm.address.effective_address.base.size = FCML_DS_32; modrm.address.effective_address.index.type = FCML_REG_GPR; modrm.address.effective_address.index.reg = FCML_REG_R10D; modrm.address.effective_address.index.size = FCML_DS_32; modrm.address.effective_address.scale_factor = 4; modrm.address.address_form = FCML_AF_COMBINED; modrm.reg_opcode = FCML_REG_R12D; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 1 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 1 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 1 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_TRUE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0x97 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x24 ); STF_ASSERT_EQUAL( context.is_sib_alternative, FCML_FALSE ); } void fcml_tf_modrm_rip_encoder_3264_bit_encoding_1(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; context.op_mode = FCML_OM_64_BIT; context.choose_sib_encoding = FCML_TRUE; context.choose_rip_encoding = FCML_TRUE; modrm.address.effective_address.base.type = FCML_REG_UNDEFINED; modrm.address.effective_address.base.reg = 0; modrm.address.effective_address.base.size = 0; modrm.address.effective_address.index.type = FCML_REG_UNDEFINED; modrm.address.effective_address.index.reg = 0; modrm.address.effective_address.index.size = 0; modrm.address.effective_address.scale_factor = 0; modrm.reg_opcode = 0; modrm.address.offset.size = FCML_DS_32; modrm.address.offset.off32 = 0x00401008; modrm.address.address_form = FCML_AF_OFFSET; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); /* Displacement is not encoded yet.*/ STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x05 ); STF_ASSERT_EQUAL( encoded_modrm.is_rip, FCML_TRUE ); STF_ASSERT_EQUAL( encoded_modrm.rip_address, 0x00401008 ); fcml_uint8_t buff[4]; fcml_st_memory_stream stream; stream.base_address = &buff; stream.offset = 0; stream.size = 4; error = fcml_fn_modrm_encode_rip_offset( &stream, 0x0000000000401000ULL, 8, &encoded_modrm ); STF_ASSERT_EQUAL( buff[0], 0x00 ); STF_ASSERT_EQUAL( buff[1], 0x00 ); STF_ASSERT_EQUAL( buff[2], 0x00 ); STF_ASSERT_EQUAL( buff[3], 0x00 ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); } void fcml_tf_modrm_rip_encoder_3264_bit_encoding_2(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; context.op_mode = FCML_OM_64_BIT; context.choose_sib_encoding = FCML_TRUE; context.choose_rip_encoding = FCML_TRUE; modrm.address.effective_address.base.type = FCML_REG_UNDEFINED; modrm.address.effective_address.base.reg = 0; modrm.address.effective_address.base.size = 0; modrm.address.effective_address.index.type = FCML_REG_UNDEFINED; modrm.address.effective_address.index.reg = 0; modrm.address.effective_address.index.size = 0; modrm.address.effective_address.scale_factor = 0; modrm.reg_opcode = 0; modrm.address.offset.size = FCML_DS_32; modrm.address.address_form = FCML_AF_OFFSET; /* Dispalcement range sanity check.*/ modrm.address.offset.size = FCML_DS_32; modrm.address.offset.off32 = 0xFFFFFFFFU; modrm.address.offset.is_signed = FCML_FALSE; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); modrm.address.offset.size = FCML_DS_32; modrm.address.offset.off32 = 0x0U; error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); modrm.address.offset.size = FCML_DS_64; modrm.address.offset.off64 = 0x100000000U; error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_VALUE_OUT_OF_RANGE ); modrm.address.offset.size = FCML_DS_64; modrm.address.offset.off64 = 0xFFFFFFFFFFFFFFFFU; modrm.address.offset.is_signed = FCML_TRUE; error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); modrm.address.offset.size = FCML_DS_64; modrm.address.offset.off64 = 0xFFFFFFFFFFFFFFFFU; modrm.address.offset.is_signed = FCML_FALSE; error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_VALUE_OUT_OF_RANGE ); } void fcml_tf_modrm_rip_encoder_3264_bit_encoding_3(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; context.op_mode = FCML_OM_64_BIT; context.choose_sib_encoding = FCML_TRUE; context.choose_rip_encoding = FCML_TRUE; modrm.address.effective_address.base.type = FCML_REG_UNDEFINED; modrm.address.effective_address.base.reg = 0; modrm.address.effective_address.base.size = 0; modrm.address.effective_address.index.type = FCML_REG_UNDEFINED; modrm.address.effective_address.index.reg = 0; modrm.address.effective_address.index.size = 0; modrm.address.effective_address.scale_factor = 0; modrm.reg_opcode = 0; modrm.address.offset.size = FCML_DS_32; modrm.address.offset.off32 = 0x00000000; modrm.address.address_form = FCML_AF_OFFSET; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); /* Displacement is not encoded yet.*/ STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x05 ); STF_ASSERT_EQUAL( encoded_modrm.is_rip, FCML_TRUE ); STF_ASSERT_EQUAL( encoded_modrm.rip_address, 0x00000000 ); fcml_uint8_t buff[4]; fcml_st_memory_stream stream; stream.base_address = &buff; stream.offset = 0; stream.size = 4; error = fcml_fn_modrm_encode_rip_offset( &stream, 0x0000000000401000ULL, 8, &encoded_modrm ); STF_ASSERT_EQUAL( buff[0], 0xF8 ); STF_ASSERT_EQUAL( buff[1], 0xEF ); STF_ASSERT_EQUAL( buff[2], 0xBF ); STF_ASSERT_EQUAL( buff[3], 0xFF ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); } void fcml_tf_modrm_rip_encoder_3264_bit_encoding_4(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_32; context.op_mode = FCML_OM_64_BIT; context.choose_sib_encoding = FCML_TRUE; context.choose_rip_encoding = FCML_TRUE; modrm.address.effective_address.base.type = FCML_REG_UNDEFINED; modrm.address.effective_address.base.reg = 0; modrm.address.effective_address.base.size = 0; modrm.address.effective_address.index.type = FCML_REG_UNDEFINED; modrm.address.effective_address.index.reg = 0; modrm.address.effective_address.index.size = 0; modrm.address.effective_address.scale_factor = 0; modrm.reg_opcode = 0; modrm.address.offset.size = FCML_DS_32; modrm.address.offset.off32 = 0xFFFFFFFF; modrm.address.offset.is_signed = FCML_TRUE; modrm.address.address_form = FCML_AF_OFFSET; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); /* Displacement is not encoded yet.*/ STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x05 ); STF_ASSERT_EQUAL( encoded_modrm.is_rip, FCML_TRUE ); STF_ASSERT_EQUAL( encoded_modrm.rip_address, 0xFFFFFFFFFFFFFFFFLL ); fcml_uint8_t buff[4]; fcml_st_memory_stream stream; stream.base_address = &buff; stream.offset = 0; stream.size = 4; error = fcml_fn_modrm_encode_rip_offset( &stream, 0x0000000000401000ULL, 8, &encoded_modrm ); STF_ASSERT_EQUAL( buff[0], 0xF7 ); STF_ASSERT_EQUAL( buff[1], 0xEF ); STF_ASSERT_EQUAL( buff[2], 0xBF ); STF_ASSERT_EQUAL( buff[3], 0xFF ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); } void fcml_tf_modrm_rip_encoder_3264_bit_encoding_5(void) { fcml_st_modrm modrm; fcml_fn_env_memory_clear( &modrm, sizeof( modrm ) ); fcml_st_encoded_modrm encoded_modrm; fcml_fn_env_memory_clear( &encoded_modrm, sizeof( encoded_modrm ) ); fcml_st_modrm_encoder_context context; fcml_fn_env_memory_clear( &context, sizeof( context ) ); context.effective_address_size = FCML_DS_64; context.op_mode = FCML_OM_64_BIT; context.choose_rip_encoding = FCML_FALSE; modrm.address.effective_address.base.type = FCML_REG_IP; modrm.address.effective_address.base.reg = 0; modrm.address.effective_address.base.size = FCML_DS_64; modrm.address.effective_address.scale_factor = 0; modrm.address.effective_address.displacement.size = FCML_DS_32; modrm.address.effective_address.displacement.int32 = 0x100; modrm.address.effective_address.displacement.is_signed = FCML_TRUE; modrm.address.address_form = FCML_AF_COMBINED; fcml_ceh_error error = fcml_fn_modrm_encode( &context, &modrm, &encoded_modrm ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); /* Displacement is not encoded yet.*/ STF_ASSERT_EQUAL( encoded_modrm.displacement_size, 4 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[0], 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[1], 0x01 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[2], 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.displacement[3], 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.ext_b, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_r, 0 ); STF_ASSERT_EQUAL( encoded_modrm.ext_x, 0 ); STF_ASSERT_EQUAL( encoded_modrm.sib.is_not_null, FCML_FALSE ); STF_ASSERT_EQUAL( encoded_modrm.sib.value, 0x00 ); STF_ASSERT_EQUAL( encoded_modrm.modrm, 0x05 ); STF_ASSERT_EQUAL( encoded_modrm.is_rip, FCML_TRUE ); STF_ASSERT_EQUAL( encoded_modrm.is_rip_encoded, FCML_TRUE ); STF_ASSERT_EQUAL( encoded_modrm.rip_address, 0x0LL ); } fcml_stf_test_case fctl_ti_modrm_encoder[] = { { "fcml_tf_modrm_encoder_test_1", fcml_tf_modrm_encoder_test_1 }, { "fcml_tf_modrm_encoder_test_2", fcml_tf_modrm_encoder_test_2 }, { "fcml_tf_modrm_encoder_test_3", fcml_tf_modrm_encoder_test_3 }, { "fcml_tf_modrm_encoder_test_4", fcml_tf_modrm_encoder_test_4 }, { "fcml_tf_modrm_encoder_test_5", fcml_tf_modrm_encoder_test_5 }, { "fcml_tf_modrm_encoder_test_6", fcml_tf_modrm_encoder_test_6 }, { "fcml_tf_modrm_encoder_test_7", fcml_tf_modrm_encoder_test_7 }, { "fcml_tf_modrm_encoder_test_8", fcml_tf_modrm_encoder_test_8 }, { "fcml_tf_modrm_encoder_test_9", fcml_tf_modrm_encoder_test_9 }, { "fcml_tf_modrm_encoder_test_10", fcml_tf_modrm_encoder_test_10 }, { "fcml_tf_modrm_encoder_test_11", fcml_tf_modrm_encoder_test_11 }, { "fcml_tf_modrm_encoder_test_12", fcml_tf_modrm_encoder_test_12 }, { "fcml_tf_modrm_encoder_test_13", fcml_tf_modrm_encoder_test_13 }, { "fcml_tf_modrm_encoder_test_14", fcml_tf_modrm_encoder_test_14 }, { "fcml_tf_modrm_encoder_16_bit_encoding_1", fcml_tf_modrm_encoder_16_bit_encoding_1 }, { "fcml_tf_modrm_encoder_16_bit_encoding_2", fcml_tf_modrm_encoder_16_bit_encoding_2 }, { "fcml_tf_modrm_encoder_16_bit_encoding_3", fcml_tf_modrm_encoder_16_bit_encoding_3 }, { "fcml_tf_modrm_encoder_16_bit_encoding_4", fcml_tf_modrm_encoder_16_bit_encoding_4 }, { "fcml_tf_modrm_encoder_16_bit_encoding_5", fcml_tf_modrm_encoder_16_bit_encoding_5 }, { "fcml_tf_modrm_encoder_16_bit_encoding_6", fcml_tf_modrm_encoder_16_bit_encoding_6 }, { "fcml_tf_modrm_encoder_16_bit_encoding_7", fcml_tf_modrm_encoder_16_bit_encoding_7 }, { "fcml_tf_modrm_encoder_16_bit_encoding_8", fcml_tf_modrm_encoder_16_bit_encoding_8 }, { "fcml_tf_modrm_encoder_16_bit_encoding_9", fcml_tf_modrm_encoder_16_bit_encoding_9 }, { "fcml_tf_modrm_encoder_16_bit_encoding_10", fcml_tf_modrm_encoder_16_bit_encoding_10 }, { "fcml_tf_modrm_encoder_16_bit_encoding_11", fcml_tf_modrm_encoder_16_bit_encoding_11 }, { "fcml_tf_modrm_encoder_16_bit_encoding_12", fcml_tf_modrm_encoder_16_bit_encoding_12 }, { "fcml_tf_modrm_encoder_16_bit_encoding_13", fcml_tf_modrm_encoder_16_bit_encoding_13 }, { "fcml_tf_modrm_encoder_3264_bit_encoding_1", fcml_tf_modrm_encoder_3264_bit_encoding_1 }, { "fcml_tf_modrm_encoder_3264_bit_encoding_2", fcml_tf_modrm_encoder_3264_bit_encoding_2 }, { "fcml_tf_modrm_encoder_3264_bit_encoding_3", fcml_tf_modrm_encoder_3264_bit_encoding_3 }, { "fcml_tf_modrm_encoder_3264_bit_encoding_4", fcml_tf_modrm_encoder_3264_bit_encoding_4 }, { "fcml_tf_modrm_encoder_3264_bit_encoding_5", fcml_tf_modrm_encoder_3264_bit_encoding_5 }, { "fcml_tf_modrm_encoder_3264_bit_encoding_6", fcml_tf_modrm_encoder_3264_bit_encoding_6 }, { "fcml_tf_modrm_encoder_3264_bit_encoding_7", fcml_tf_modrm_encoder_3264_bit_encoding_7 }, { "fcml_tf_modrm_encoder_3264_bit_encoding_8", fcml_tf_modrm_encoder_3264_bit_encoding_8 }, { "fcml_tf_modrm_encoder_3264_bit_encoding_9", fcml_tf_modrm_encoder_3264_bit_encoding_9 }, { "fcml_tf_modrm_encoder_3264_bit_encoding_10", fcml_tf_modrm_encoder_3264_bit_encoding_10 }, { "fcml_tf_modrm_encoder_3264_bit_encoding_11", fcml_tf_modrm_encoder_3264_bit_encoding_11 }, { "fcml_tf_modrm_encoder_3264_bit_encoding_12", fcml_tf_modrm_encoder_3264_bit_encoding_12 }, { "fcml_tf_modrm_sib_encoder_3264_bit_encoding_1", fcml_tf_modrm_sib_encoder_3264_bit_encoding_1 }, { "fcml_tf_modrm_sib_encoder_3264_bit_encoding_2", fcml_tf_modrm_sib_encoder_3264_bit_encoding_2 }, { "fcml_tf_modrm_sib_encoder_3264_bit_encoding_3", fcml_tf_modrm_sib_encoder_3264_bit_encoding_3 }, { "fcml_tf_modrm_sib_encoder_3264_bit_encoding_4", fcml_tf_modrm_sib_encoder_3264_bit_encoding_4 }, { "fcml_tf_modrm_sib_encoder_3264_bit_encoding_5", fcml_tf_modrm_sib_encoder_3264_bit_encoding_5 }, { "fcml_tf_modrm_sib_encoder_3264_bit_encoding_6", fcml_tf_modrm_sib_encoder_3264_bit_encoding_6 }, { "fcml_tf_modrm_sib_encoder_3264_bit_encoding_7", fcml_tf_modrm_sib_encoder_3264_bit_encoding_7 }, { "fcml_tf_modrm_sib_encoder_3264_bit_encoding_8", fcml_tf_modrm_sib_encoder_3264_bit_encoding_8 }, { "fcml_tf_modrm_sib_encoder_3264_bit_encoding_9", fcml_tf_modrm_sib_encoder_3264_bit_encoding_9 }, { "fcml_tf_modrm_sib_encoder_3264_bit_encoding_10", fcml_tf_modrm_sib_encoder_3264_bit_encoding_10 }, { "fcml_tf_modrm_sib_encoder_3264_bit_encoding_11", fcml_tf_modrm_sib_encoder_3264_bit_encoding_11 }, { "fcml_tf_modrm_rip_encoder_3264_bit_encoding_1", fcml_tf_modrm_rip_encoder_3264_bit_encoding_1 }, { "fcml_tf_modrm_rip_encoder_3264_bit_encoding_2", fcml_tf_modrm_rip_encoder_3264_bit_encoding_2 }, { "fcml_tf_modrm_rip_encoder_3264_bit_encoding_3", fcml_tf_modrm_rip_encoder_3264_bit_encoding_3 }, { "fcml_tf_modrm_rip_encoder_3264_bit_encoding_4", fcml_tf_modrm_rip_encoder_3264_bit_encoding_4 }, { "fcml_tf_modrm_rip_encoder_3264_bit_encoding_5", fcml_tf_modrm_rip_encoder_3264_bit_encoding_5 }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_modrm_encoder = { "suite-modrm-encoder", fcml_tf_modrm_encoder_suite_init, fcml_tf_modrm_encoder_suite_cleanup, fctl_ti_modrm_encoder }; fcml-1.1.1/check/internal-tests/symbols_t.h0000644000175000017500000000172112560745216015602 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 SYMBOLS_T_H_ #define SYMBOLS_T_H_ #include extern fcml_stf_test_suite fctl_si_symbols; #endif /* SYMBOLS_T_H_ */ fcml-1.1.1/check/internal-tests/Makefile.am0000644000175000017500000000237612561175723015462 00000000000000noinst_PROGRAMS = fcml_internal_check # Include all tests. fcml_internal_check_SOURCES = main.c \ coll_t.c \ coll_t.h \ gas_parser_t.c \ gas_parser_t.h \ intel_parser_t.c \ intel_parser_t.h \ mnemonic_parser_t.c \ mnemonic_parser_t.h \ modrm_decoder_t.c \ modrm_decoder_t.h \ modrm_encoder_t.c \ modrm_encoder_t.h \ stream_t.c \ stream_t.h \ utils_t.c \ utils_t.h \ lag_assembler_t.c \ lag_assembler_t.h \ env_t.c \ env_t.h \ ceh_t.c \ ceh_t.h \ common_utils_t.c \ common_utils_t.h \ symbols_t.h \ symbols_t.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 $(top_srcdir)/src/libfcml.la check_SCRIPTS = fcml_internal_check TESTS = $(check_SCRIPTS) # Just in case, to rebuild missing files. fcml_intel_lexer.c fcml_intel_lexer.h: $(MAKE) $(AM_MAKEFLAGS) -C $(top_srcdir)/src fcml_intel_lexer.c fcml_gas_lexer.c fcml_gas_lexer.h: $(MAKE) $(AM_MAKEFLAGS) -C $(top_srcdir)/src fcml_gas_lexer.c fcml_intel_parser_def.h fcml_intel_parser_def.c: $(MAKE) $(AM_MAKEFLAGS) -C $(top_srcdir)/src fcml_intel_parser_def.y fcml_gas_parser_def.h fcml_gas_parser_def.c: $(MAKE) $(AM_MAKEFLAGS) -C $(top_srcdir)/src fcml_gas_parser_def.y fcml-1.1.1/check/internal-tests/env_t.c0000644000175000017500000000626012560745216014700 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "env_t.h" #include #include "fcml_env_int.h" fcml_int counter = 0; fcml_int realloc_counter = 0; fcml_fp_env_memory_alloc_handler default_alloc; fcml_fp_env_memory_realloc_handler default_realloc; fcml_fp_env_memory_free_handler default_free; fcml_ptr fcml_tf_env_memory_alloc_handler_counter( fcml_usize size ) { counter += 1; return default_alloc( size ); } fcml_ptr fcml_tf_env_memory_realloc_handler_counter( fcml_ptr ptr, fcml_usize size ) { realloc_counter += 1; return default_realloc( ptr, size ); } void fcml_tf_env_memory_free_handler_counter( fcml_ptr ptr ) { counter -= 1; default_free( ptr ); } fcml_bool fcml_tf_env_suite_init(void) { default_alloc = fcml_fn_env_register_memory_alloc_handler( &fcml_tf_env_memory_alloc_handler_counter ); default_realloc = fcml_fn_env_register_memory_realloc_handler( &fcml_tf_env_memory_realloc_handler_counter ); default_free = fcml_fn_env_register_memory_free_handler( &fcml_tf_env_memory_free_handler_counter ); return FCML_TRUE; } fcml_bool fcml_tf_env_suite_cleanup(void) { fcml_fn_env_register_memory_alloc_handler( default_alloc ); fcml_fn_env_register_memory_realloc_handler( default_realloc ); fcml_fn_env_register_memory_free_handler( default_free ); return FCML_TRUE; } void fcml_fn_env_test_memory_alloc(void) { fcml_st_symbol *symbol = (fcml_st_symbol*)fcml_fn_symbol_alloc( "TEST", 1 ); STF_ASSERT_PTR_NOT_NULL( symbol ); if( symbol ) { STF_ASSERT_EQUAL( counter, 2 ); // symbol+symbol_name string fcml_fn_symbol_free( symbol ); STF_ASSERT_EQUAL( counter, 0 ); } } void fcml_fn_env_test_memory_realloc(void) { fcml_ptr block = fcml_fn_env_memory_alloc( 100 ); STF_ASSERT_PTR_NOT_NULL( block ); if( block ) { STF_ASSERT_EQUAL( counter, 1 ); fcml_ptr block_realloc = fcml_fn_env_memory_realloc( block, 200 ); fcml_fn_env_memory_clear( block_realloc, 200 ); STF_ASSERT_PTR_NOT_NULL( block_realloc ); STF_ASSERT_EQUAL( realloc_counter, 1 ); fcml_fn_symbol_free( block_realloc ); STF_ASSERT_EQUAL( counter, 0 ); } } fcml_stf_test_case fcml_ti_env[] = { { "fcml_fn_env_test_memory_alloc", fcml_fn_env_test_memory_alloc }, { "fcml_fn_env_test_memory_realloc", fcml_fn_env_test_memory_realloc }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_env = { "suite-fcml-env", fcml_tf_env_suite_init, fcml_tf_env_suite_cleanup, fcml_ti_env }; fcml-1.1.1/check/internal-tests/intel_parser_t.c0000644000175000017500000012202212560745216016572 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 "intel_parser_t.h" #include #include #include #include #include #include #include #include fcml_st_dialect *internal_dialect_intel = NULL; fcml_st_parser_context internal_intel_context = {0}; fcml_bool fcml_tf_parser_suite_init(void) { fcml_fn_dialect_init_intel( FCML_INTEL_DIALECT_CF_DEFAULT, &internal_dialect_intel ); internal_intel_context.dialect = internal_dialect_intel; return internal_dialect_intel != NULL; } fcml_bool fcml_tf_parser_suite_cleanup(void) { if( internal_dialect_intel ) { fcml_fn_dialect_free( internal_dialect_intel ); } fcml_fn_symbol_table_free( internal_intel_context.symbol_table ); return FCML_TRUE; } void fcml_tf_parser_int_parse_test1(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov 80-90", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int8, (fcml_int8_t)-10 ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test2(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov 0xFF", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int8, (fcml_int8_t)0xFF ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test3(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov 0xFFF", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_16 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int16, (fcml_uint16_t)0x0FFF ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test4(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov 0xFFFF", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_16 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int16, (fcml_int16_t)0xFFFF ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test5(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov 0xFFFFF", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_32 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int32, (fcml_uint32_t)0x000FFFFF ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test6(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov 0xFFFFFFFF", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_32 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int32, (fcml_uint32_t)0xFFFFFFFF ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test7(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov 0xFFFFFFFFFFFFFFFF", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_64 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int64, 0xFFFFFFFFFFFFFFFFUL ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test8(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov -0xFFFFFFFFFFFFFFFF", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int8, (fcml_uint8_t)(fcml_int8_t)1 ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test9(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov -0xFF", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_16 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int16, (fcml_int16_t)-255 ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test10(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov 1+2", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int8, (fcml_uint8_t)(fcml_int8_t)3 ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test11(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov 1+2*8/(15-13)-1", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int8, (fcml_uint8_t)8 ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test12(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov 65535", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_16 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int16, (fcml_int16_t)0xFFFF ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test13(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov -32768", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_16 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int16, (fcml_int16_t)-32768 ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test14(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov (-2147483647 - 1)", &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_32 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int32, (fcml_uint32_t)(-2147483647 - 1) ); fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test15(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov (-9223372036854775807 - 1)", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_64 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int64, (fcml_uint64_t)(-9223372036854775807LL - 1) ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test16(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov 18446744073709551615", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_64 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int64, (fcml_uint64_t)18446744073709551615ULL ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test17(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov 5675", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_16 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int16, (fcml_uint16_t)5675 ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test18(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov 2147483647", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_32 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int32, (fcml_uint32_t)2147483647 ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test19(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov 4294967295", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_32 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int32, (fcml_uint32_t)4294967295U ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test20(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov 4294967296", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_64 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int64, (fcml_uint64_t)4294967296ULL ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test21(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov -0xFFFFFFFF", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_64 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int64, (fcml_uint64_t)-4294967295LL ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test22(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov 255", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int8, (fcml_int8_t)0xFF ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test23(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov 1", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int8, 1 ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test24(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov dword ptr [0x0000FFFF]", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_ADDRESS ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.address_form, FCML_AF_OFFSET ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.offset.size, FCML_DS_16 ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.offset.off16, (fcml_int16_t)0xFFFF ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test25(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov dword ptr [0xFF-1]", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_ADDRESS ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.address_form, FCML_AF_OFFSET ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.offset.size, FCML_DS_16 ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.offset.off16, 254 ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test26(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov dword ptr [-1]", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_ADDRESS ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.address_form, FCML_AF_OFFSET ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.offset.size, FCML_DS_16 ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.offset.off16, (fcml_int16_t)0xFFFF ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test27(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov dword ptr [0xFFFFFFFFFFFFFFFF]", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_ADDRESS ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.address_form, FCML_AF_OFFSET ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.offset.size, FCML_DS_64 ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.offset.off64, 0xFFFFFFFFFFFFFFFFULL ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test28(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov dword ptr [eax+0xFFFFFFFFFFFFFFFF]", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_ADDRESS ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.address_form, FCML_AF_COMBINED ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.effective_address.base.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.effective_address.base.reg, FCML_REG_EAX ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.effective_address.displacement.size, FCML_DS_64 ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.effective_address.displacement.int64, 0xFFFFFFFFFFFFFFFFULL ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test29(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "mov xmmword ptr [eax+0xFFFFFFFFFFFFFFFF]", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_ADDRESS ); STF_ASSERT_EQUAL( result.instruction->operands[0].hints, FCML_OP_HINT_MULTIMEDIA_INSTRUCTION ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.address_form, FCML_AF_COMBINED ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.effective_address.base.type, FCML_REG_GPR ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.effective_address.base.reg, FCML_REG_EAX ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.effective_address.displacement.size, FCML_DS_64 ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.effective_address.displacement.int64, 0xFFFFFFFFFFFFFFFFULL ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test30(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "lock mov 1", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int8, (fcml_uint8_t)1 ); STF_ASSERT_EQUAL( result.instruction->prefixes, FCML_PREFIX_LOCK ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test31(void) { /* Check if multiple prefixes are allowed.*/ fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "lock repne repe mov 1", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int8, (fcml_uint8_t)1 ); STF_ASSERT_EQUAL( result.instruction->prefixes, FCML_PREFIX_LOCK | FCML_PREFIX_REPE | FCML_PREFIX_REPNE ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test32(void) { /* Duplicated prefixes aren't allowed.*/ fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_intel_context, "lock lock mov 1", &result ), FCML_CEH_GEC_INVALID_INPUT ); if( result.instruction != NULL ) { STF_FAIL("Instruction should be NULL."); } else if( result.errors.errors ){ fcml_st_ceh_error_container *cont = &(result.errors); STF_ASSERT_EQUAL( cont->errors->level, FCML_EN_CEH_EL_ERROR ); STF_ASSERT_EQUAL( cont->errors->code, ( FCML_CEH_MEC_ERROR_INVALID_SYNTAX ) ); STF_ASSERT_STRING_EQUAL( "Doubled prefixes.", cont->errors->message ); } else { STF_FAIL("Errors can not be null here."); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test_symbols_1(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_intel; context.ip = 0x401000; context.symbol_table = NULL; context.configuration.alloc_symbol_table_if_needed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label:" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NULL( result.instruction ); STF_ASSERT_PTR_NOT_NULL( result.symbol ); STF_ASSERT_PTR_NOT_NULL( context.symbol_table ); STF_ASSERT_EQUAL( result.symbol->value, 0x401000 ); STF_ASSERT_STRING_EQUAL( result.symbol->symbol, FCML_TEXT( "label" ) ); STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "_label:" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NULL( result.instruction ); STF_ASSERT_PTR_NOT_NULL( result.symbol ); STF_ASSERT_EQUAL( result.symbol->value, 0x401000 ); STF_ASSERT_STRING_EQUAL( result.symbol->symbol, FCML_TEXT( "_label" ) ); fcml_fn_parser_result_free( &result ); fcml_fn_symbol_table_free( context.symbol_table ); } void fcml_tf_parser_int_parse_test_symbols_2(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_intel; context.configuration.override_labels = FCML_FALSE; context.configuration.alloc_symbol_table_if_needed = FCML_TRUE; context.ip = 0x401000; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: mov eax,1" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NOT_NULL( result.instruction ); STF_ASSERT_STRING_EQUAL( result.instruction->mnemonic, "mov" ); STF_ASSERT_PTR_NOT_NULL( result.symbol ); STF_ASSERT_EQUAL( result.symbol->value, 0x401000 ); STF_ASSERT_STRING_EQUAL( result.symbol->symbol, FCML_TEXT( "label" ) ); fcml_fn_parser_result_free( &result ); fcml_fn_symbol_table_free( context.symbol_table ); } void fcml_tf_parser_int_parse_test_symbols_3(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_intel; context.configuration.override_labels = FCML_FALSE; context.ip = 0x401000; context.configuration.alloc_symbol_table_if_needed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: mov eax,1" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NOT_NULL( result.instruction ); STF_ASSERT_STRING_EQUAL( result.instruction->mnemonic, "mov" ); STF_ASSERT_PTR_NOT_NULL( result.symbol ); STF_ASSERT_EQUAL( result.symbol->value, 0x401000 ); STF_ASSERT_STRING_EQUAL( result.symbol->symbol, FCML_TEXT( "label" ) ); /* Can not override symbol. */ STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: mov eax,1" ), &result ), FCML_CEH_GEC_INVALID_INPUT ); fcml_st_ceh_error_info *error = result.errors.errors; STF_ASSERT_PTR_NOT_NULL( error ); if( error ) { STF_ASSERT_EQUAL( error->code, FCML_CEH_MEC_ERROR_SYMBOL_ALREADY_DEFINED ); STF_ASSERT_STRING_EQUAL( error->message, FCML_TEXT( "Symbol already defined: label." ) ); } context.configuration.override_labels = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: add eax,1" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NOT_NULL( result.instruction ); STF_ASSERT_STRING_EQUAL( result.instruction->mnemonic, "add" ); STF_ASSERT_PTR_NOT_NULL( result.symbol ); STF_ASSERT_EQUAL( result.symbol->value, 0x401000 ); STF_ASSERT_STRING_EQUAL( result.symbol->symbol, FCML_TEXT( "label" ) ); fcml_fn_parser_result_free( &result ); fcml_fn_symbol_table_free( context.symbol_table ); } /* Undefined symbol. */ void fcml_tf_parser_int_parse_test_symbols_4(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_intel; context.ip = 0x401000; context.configuration.alloc_symbol_table_if_needed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: mov eax, symbol" ), &result ), FCML_CEH_GEC_UNDEFINED_SYMBOL ); STF_ASSERT_PTR_NULL( result.instruction ); STF_ASSERT_PTR_NULL( result.symbol ); fcml_st_ceh_error_info *error = result.errors.errors; STF_ASSERT_PTR_NOT_NULL( error ); if( error ) { STF_ASSERT_EQUAL( error->code, FCML_CEH_MEC_ERROR_UNDEFINED_SYMBOL ); STF_ASSERT_STRING_EQUAL( error->message, FCML_TEXT( "Undefined symbol: symbol." ) ); } fcml_fn_parser_result_free( &result ); fcml_fn_symbol_table_free( context.symbol_table ); } /* Ignore symbols. */ void fcml_tf_parser_int_parse_test_symbols_5(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_intel; context.ip = 0x401000; context.configuration.ignore_undefined_symbols = FCML_TRUE; context.configuration.override_labels = FCML_TRUE; context.configuration.alloc_symbol_table_if_needed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: mov eax, symbol" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NOT_NULL( result.instruction ); STF_ASSERT_PTR_NOT_NULL( result.symbol ); if( result.instruction ) { fcml_st_instruction *instruction = result.instruction; STF_ASSERT_EQUAL( instruction->operands[1].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( instruction->operands[1].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( instruction->operands[1].immediate.int8, 0 ); STF_ASSERT_EQUAL( instruction->operands[1].immediate.is_signed, FCML_TRUE ); } fcml_fn_parser_result_free( &result ); fcml_fn_symbol_table_free( context.symbol_table ); } /* Use defined symbol in the instruction. */ void fcml_tf_parser_int_parse_test_symbols_6(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_intel; context.ip = 0x401000; context.configuration.ignore_undefined_symbols = FCML_TRUE; context.configuration.override_labels = FCML_TRUE; context.configuration.alloc_symbol_table_if_needed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: mov eax, label" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NOT_NULL( result.instruction ); STF_ASSERT_PTR_NOT_NULL( result.symbol ); if( result.instruction ) { fcml_st_instruction *instruction = result.instruction; STF_ASSERT_EQUAL( instruction->operands[1].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( instruction->operands[1].immediate.size, FCML_DS_32 ); STF_ASSERT_EQUAL( instruction->operands[1].immediate.int32, 0x401000 ); // Symbols are always defined as signed values. STF_ASSERT_EQUAL( instruction->operands[1].immediate.is_signed, FCML_TRUE ); } fcml_fn_parser_result_free( &result ); fcml_fn_symbol_table_free( context.symbol_table ); } /* Multpile symbols in expression. */ void fcml_tf_parser_int_parse_test_symbols_7(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_intel; context.ip = 0x401000; context.configuration.ignore_undefined_symbols = FCML_TRUE; context.configuration.override_labels = FCML_TRUE; context.symbol_table = fcml_fn_symbol_table_alloc(); if( !context.symbol_table ) { STF_FAIL("Out of memory."); return; } STF_ASSERT_EQUAL( fcml_fn_symbol_add_raw( context.symbol_table, FCML_TEXT("symbol_1"), 10 ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( fcml_fn_symbol_add_raw( context.symbol_table, FCML_TEXT("symbol_2"), 5 ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( fcml_fn_symbol_add_raw( context.symbol_table, FCML_TEXT("symbol_3"), 2 ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: mov eax, label + ( ( symbol_1 * symbol_2 ) / symbol_3 )" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NOT_NULL( result.instruction ); STF_ASSERT_PTR_NOT_NULL( result.symbol ); if( result.instruction ) { fcml_st_instruction *instruction = result.instruction; STF_ASSERT_EQUAL( instruction->operands[1].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( instruction->operands[1].immediate.size, FCML_DS_32 ); STF_ASSERT_EQUAL( instruction->operands[1].immediate.int32, 0x401000 + 25 ); STF_ASSERT_EQUAL( instruction->operands[1].immediate.is_signed, FCML_FALSE ); } fcml_fn_parser_result_free( &result ); fcml_fn_symbol_table_free( context.symbol_table ); } /* Extracting symbols. */ void fcml_tf_parser_int_parse_test_symbols_8(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_intel; context.ip = 0x401000; context.configuration.ignore_undefined_symbols = FCML_TRUE; context.configuration.override_labels = FCML_TRUE; context.symbol_table = fcml_fn_symbol_table_alloc(); if( !context.symbol_table ) { STF_FAIL("Out of memory."); return; } STF_ASSERT_EQUAL( fcml_fn_symbol_add_raw( context.symbol_table, FCML_TEXT("symbol_1"), 10 ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( fcml_fn_symbol_add_raw( context.symbol_table, FCML_TEXT("symbol_2"), 5 ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( fcml_fn_symbol_add_raw( context.symbol_table, FCML_TEXT("symbol_3"), 2 ), FCML_CEH_GEC_NO_ERROR ); fcml_st_parser_ast ast = {0}; fcml_ceh_error error = fcml_fn_parse_to_ast( &context, FCML_TEXT( "label: mov eax, label + ( ( symbol_1 * symbol_2 ) / symbol_3 )" ), &ast ); if( !error ) { STF_ASSERT_PTR_NOT_NULL( ast.symbol ); STF_ASSERT_PTR_NOT_NULL( ast.tree ); if( ast.tree ) { fcml_st_coll_list *list = NULL; error = fcml_fn_ast_extract_used_symbols( ast.tree, &list ); if( !error ) { STF_ASSERT_EQUAL( list->size, 4 ); fcml_fn_coll_list_free( list, NULL, NULL ); } } } fcml_fn_parser_free_ast( &ast ); fcml_fn_symbol_table_free( context.symbol_table ); } void fcml_tf_parser_int_parse_test_symbols_9(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_intel; context.ip = 0x401000; context.symbol_table = NULL; context.configuration.disable_symbols_declaration = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label:" ), &result ), FCML_CEH_GEC_UNSUPPORTED_LABEL_DECLARATION ); STF_ASSERT_PTR_NULL( result.instruction ); STF_ASSERT_PTR_NULL( result.symbol ); STF_ASSERT_PTR_NULL( result.errors.errors ); STF_ASSERT_PTR_NULL( result.errors.last_error ); fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test_symbols_10(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_intel; context.ip = 0x401000; context.symbol_table = NULL; context.configuration.disable_symbols_declaration = FCML_FALSE; context.configuration.alloc_symbol_table_if_needed = FCML_FALSE; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: mov eax, 1" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NOT_NULL( result.instruction ); STF_ASSERT_PTR_NULL( result.symbol ); STF_ASSERT_PTR_NULL( result.errors.errors ); STF_ASSERT_PTR_NULL( result.errors.last_error ); STF_ASSERT_PTR_NULL( context.symbol_table ); fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_int_parse_test_symbols_11(void) { /* Symbol table not found and not allocated. */ fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_intel; context.configuration.override_labels = FCML_FALSE; context.configuration.alloc_symbol_table_if_needed = FCML_FALSE; context.ip = 0x401000; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: mov eax,1" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NOT_NULL( result.instruction ); STF_ASSERT_STRING_EQUAL( result.instruction->mnemonic, "mov" ); STF_ASSERT_PTR_NULL( result.symbol ); STF_ASSERT_PTR_NULL( context.symbol_table ); fcml_fn_parser_result_free( &result ); } /* Pseudo operations operands parsing. */ void fcml_tf_parser_intel_parse_test_pseudo_operation_1(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_intel; context.ip = 0x401000; context.configuration.ignore_undefined_symbols = FCML_TRUE; context.configuration.override_labels = FCML_TRUE; context.configuration.alloc_symbol_table_if_needed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: db 0x12" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NOT_NULL( result.instruction ); STF_ASSERT_PTR_NOT_NULL( result.symbol ); if( result.instruction ) { fcml_st_instruction *instruction = result.instruction; STF_ASSERT_STRING_EQUAL( "db", result.instruction->mnemonic ); STF_ASSERT_EQUAL( 1, instruction->operands_count ); STF_ASSERT_EQUAL( instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( instruction->operands[0].immediate.int8, 0x12 ); STF_ASSERT_EQUAL( instruction->operands[0].immediate.is_signed, FCML_FALSE ); } fcml_fn_parser_result_free( &result ); fcml_fn_symbol_table_free( context.symbol_table ); } fcml_stf_test_case fcml_ti_parser[] = { { "fcml_tf_parser_int_parse_test1", fcml_tf_parser_int_parse_test1 }, { "fcml_tf_parser_int_parse_test2", fcml_tf_parser_int_parse_test2 }, { "fcml_tf_parser_int_parse_test3", fcml_tf_parser_int_parse_test3 }, { "fcml_tf_parser_int_parse_test4", fcml_tf_parser_int_parse_test4 }, { "fcml_tf_parser_int_parse_test5", fcml_tf_parser_int_parse_test5 }, { "fcml_tf_parser_int_parse_test6", fcml_tf_parser_int_parse_test6 }, { "fcml_tf_parser_int_parse_test7", fcml_tf_parser_int_parse_test7 }, { "fcml_tf_parser_int_parse_test8", fcml_tf_parser_int_parse_test8 }, { "fcml_tf_parser_int_parse_test9", fcml_tf_parser_int_parse_test9 }, { "fcml_tf_parser_int_parse_test10", fcml_tf_parser_int_parse_test10 }, { "fcml_tf_parser_int_parse_test11", fcml_tf_parser_int_parse_test11 }, { "fcml_tf_parser_int_parse_test12", fcml_tf_parser_int_parse_test12 }, { "fcml_tf_parser_int_parse_test13", fcml_tf_parser_int_parse_test13 }, { "fcml_tf_parser_int_parse_test14", fcml_tf_parser_int_parse_test14 }, { "fcml_tf_parser_int_parse_test15", fcml_tf_parser_int_parse_test15 }, { "fcml_tf_parser_int_parse_test16", fcml_tf_parser_int_parse_test16 }, { "fcml_tf_parser_int_parse_test17", fcml_tf_parser_int_parse_test17 }, { "fcml_tf_parser_int_parse_test18", fcml_tf_parser_int_parse_test18 }, { "fcml_tf_parser_int_parse_test19", fcml_tf_parser_int_parse_test19 }, { "fcml_tf_parser_int_parse_test20", fcml_tf_parser_int_parse_test20 }, { "fcml_tf_parser_int_parse_test21", fcml_tf_parser_int_parse_test21 }, { "fcml_tf_parser_int_parse_test22", fcml_tf_parser_int_parse_test22 }, { "fcml_tf_parser_int_parse_test23", fcml_tf_parser_int_parse_test23 }, { "fcml_tf_parser_int_parse_test24", fcml_tf_parser_int_parse_test24 }, { "fcml_tf_parser_int_parse_test25", fcml_tf_parser_int_parse_test25 }, { "fcml_tf_parser_int_parse_test26", fcml_tf_parser_int_parse_test26 }, { "fcml_tf_parser_int_parse_test27", fcml_tf_parser_int_parse_test27 }, { "fcml_tf_parser_int_parse_test28", fcml_tf_parser_int_parse_test28 }, { "fcml_tf_parser_int_parse_test29", fcml_tf_parser_int_parse_test29 }, { "fcml_tf_parser_int_parse_test30", fcml_tf_parser_int_parse_test30 }, { "fcml_tf_parser_int_parse_test31", fcml_tf_parser_int_parse_test31 }, { "fcml_tf_parser_int_parse_test32", fcml_tf_parser_int_parse_test32 }, { "fcml_tf_parser_int_parse_test_symbols_1", fcml_tf_parser_int_parse_test_symbols_1 }, { "fcml_tf_parser_int_parse_test_symbols_2", fcml_tf_parser_int_parse_test_symbols_2 }, { "fcml_tf_parser_int_parse_test_symbols_3", fcml_tf_parser_int_parse_test_symbols_3 }, { "fcml_tf_parser_int_parse_test_symbols_4", fcml_tf_parser_int_parse_test_symbols_4 }, { "fcml_tf_parser_int_parse_test_symbols_5", fcml_tf_parser_int_parse_test_symbols_5 }, { "fcml_tf_parser_int_parse_test_symbols_6", fcml_tf_parser_int_parse_test_symbols_6 }, { "fcml_tf_parser_int_parse_test_symbols_7", fcml_tf_parser_int_parse_test_symbols_7 }, { "fcml_tf_parser_int_parse_test_symbols_8", fcml_tf_parser_int_parse_test_symbols_8 }, { "fcml_tf_parser_int_parse_test_symbols_9", fcml_tf_parser_int_parse_test_symbols_9 }, { "fcml_tf_parser_int_parse_test_symbols_10", fcml_tf_parser_int_parse_test_symbols_10 }, { "fcml_tf_parser_int_parse_test_symbols_11", fcml_tf_parser_int_parse_test_symbols_11 }, { "fcml_tf_parser_intel_parse_test_pseudo_operation_1", fcml_tf_parser_intel_parse_test_pseudo_operation_1 }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_intel_parser = { "suite-fcml-parser", fcml_tf_parser_suite_init, fcml_tf_parser_suite_cleanup, fcml_ti_parser }; fcml-1.1.1/check/internal-tests/stream_t.h0000644000175000017500000000171512560745216015410 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 STREAM_T_H_ #define STREAM_T_H_ #include extern fcml_stf_test_suite fctl_si_stream; #endif /* STREAM_T_H_ */ fcml-1.1.1/check/internal-tests/coll_t.c0000644000175000017500000003230112560745216015034 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 "coll_t.h" #include fcml_ptr last_free_key; fcml_ptr last_free_value; void fcml_itf_coll_map_entry_handler_test( fcml_ptr key, fcml_ptr value, fcml_ptr args ) { last_free_key = key; last_free_value = value; } fcml_bool fcml_tf_coll_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_coll_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_coll_test_put_the_same_key(void) { fcml_int error = FCML_COLL_ERROR_NO_ERROR; fcml_coll_map *map = fcml_fn_coll_map_alloc(&fcml_coll_map_descriptor_string, 10, &error ); if( map == NULL || error ) { STF_FAIL( "Can not create hash map." ); } else { fcml_fn_coll_map_put( map, "KEY_1", "VALUE_1", &error ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_1" ), "VALUE_1" ); fcml_fn_coll_map_put( map, "KEY_1", "VALUE_2", &error ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_1" ), "VALUE_2" ); fcml_fn_coll_map_put( map, "KEY_1", "VALUE_3", &error ); STF_ASSERT( fcml_fn_coll_map_size( map ) == 1 ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_1" ), "VALUE_3" ); } fcml_fn_coll_map_free( map ); } void fcml_tf_coll_test_put_different_keys(void) { fcml_int error = FCML_COLL_ERROR_NO_ERROR; fcml_coll_map *map = fcml_fn_coll_map_alloc(&fcml_coll_map_descriptor_string, 10, &error ); if( map == NULL || error ) { STF_FAIL( "Can not create hash map." ); } else { /* index 1.*/ fcml_fn_coll_map_put( map, "KEY_A", "VALUE_A", &error ); /* Conflict, both of the following keys are conflicted, but take into account*/ /* that it depends on default built-in implementation of hashing function.*/ fcml_fn_coll_map_put( map, "KEY_B", "VALUE_B", &error ); fcml_fn_coll_map_put( map, "KEY_R", "VALUE_R", &error ); fcml_fn_coll_map_put( map, "KEY_C", "VALUE_C", &error ); fcml_fn_coll_map_put( map, "KEY_D", "VALUE_D", &error ); fcml_fn_coll_map_put( map, "KEY_E", "VALUE_E", &error ); fcml_fn_coll_map_put( map, "KEY_F", "VALUE_F", &error ); fcml_fn_coll_map_put( map, "KEY_G", "VALUE_G", &error ); fcml_fn_coll_map_put( map, "KEY_H", "VALUE_H", &error ); STF_ASSERT( fcml_fn_coll_map_size( map ) == 9 ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_A" ), "VALUE_A" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_B" ), "VALUE_B" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_R" ), "VALUE_R" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_C" ), "VALUE_C" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_D" ), "VALUE_D" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_E" ), "VALUE_E" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_F" ), "VALUE_F" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_G" ), "VALUE_G" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_R" ), "VALUE_R" ); } fcml_fn_coll_map_free( map ); } void fcml_tf_coll_test_remove_keys(void) { fcml_int error = FCML_COLL_ERROR_NO_ERROR; fcml_st_coll_map_descriptor descriptor = fcml_coll_map_descriptor_string; descriptor.entry_free_function = fcml_itf_coll_map_entry_handler_test; fcml_coll_map *map = fcml_fn_coll_map_alloc(&descriptor, 10, &error ); if( map == NULL || error ) { STF_FAIL( "Can not create hash map." ); } else { /* index 1.*/ fcml_fn_coll_map_put( map, "KEY_A", "VALUE_A", &error ); /* Conflict, both of the following keys are conflicted, but take into account*/ /* that it depends on default builtin implementation of hashing function.*/ fcml_fn_coll_map_put( map, "KEY_B", "VALUE_B", &error ); fcml_fn_coll_map_put( map, "KEY_R", "VALUE_R", &error ); fcml_fn_coll_map_put( map, "KEY_C", "VALUE_C", &error ); fcml_fn_coll_map_put( map, "KEY_D", "VALUE_D", &error ); fcml_fn_coll_map_put( map, "KEY_E", "VALUE_E", &error ); fcml_fn_coll_map_put( map, "KEY_F", "VALUE_F", &error ); fcml_fn_coll_map_put( map, "KEY_G", "VALUE_G", &error ); fcml_fn_coll_map_put( map, "KEY_H", "VALUE_H", &error ); STF_ASSERT( fcml_fn_coll_map_size( map ) == 9 ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_A" ), "VALUE_A" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_B" ), "VALUE_B" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_R" ), "VALUE_R" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_C" ), "VALUE_C" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_D" ), "VALUE_D" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_E" ), "VALUE_E" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_F" ), "VALUE_F" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_G" ), "VALUE_G" ); /* Remove KEY_A*/ fcml_fn_coll_map_remove( map, "KEY_A" ); /* Check if memory was freed.*/ STF_ASSERT_PTR_NOT_NULL( last_free_key ); STF_ASSERT_PTR_NOT_NULL( last_free_value ); if( last_free_key != NULL ) { STF_ASSERT_STRING_EQUAL( last_free_key, "KEY_A" ); } if( last_free_value != NULL ) { STF_ASSERT_STRING_EQUAL( last_free_value, "VALUE_A" ); } /* Check if KEY_A has been successfully removed.*/ STF_ASSERT_PTR_NULL( fcml_fn_coll_map_get( map, "KEY_A" ) ); STF_ASSERT( fcml_fn_coll_map_size( map ) == 8 ); /* Check if the rest of keys are still there.*/ STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_B" ), "VALUE_B" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_R" ), "VALUE_R" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_C" ), "VALUE_C" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_D" ), "VALUE_D" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_E" ), "VALUE_E" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_F" ), "VALUE_F" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_G" ), "VALUE_G" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_H" ), "VALUE_H" ); /* Remove all keys.*/ fcml_fn_coll_map_remove( map, "KEY_B" ); fcml_fn_coll_map_remove( map, "KEY_R" ); fcml_fn_coll_map_remove( map, "KEY_C" ); fcml_fn_coll_map_remove( map, "KEY_D" ); fcml_fn_coll_map_remove( map, "KEY_E" ); fcml_fn_coll_map_remove( map, "KEY_F" ); fcml_fn_coll_map_remove( map, "KEY_G" ); fcml_fn_coll_map_remove( map, "KEY_H" ); /* And check if they have been removed as well.*/ STF_ASSERT_PTR_NULL( fcml_fn_coll_map_get( map, "KEY_B" ) ); STF_ASSERT_PTR_NULL( fcml_fn_coll_map_get( map, "KEY_R" ) ); STF_ASSERT_PTR_NULL( fcml_fn_coll_map_get( map, "KEY_C" ) ); STF_ASSERT_PTR_NULL( fcml_fn_coll_map_get( map, "KEY_D" ) ); STF_ASSERT_PTR_NULL( fcml_fn_coll_map_get( map, "KEY_E" ) ); STF_ASSERT_PTR_NULL( fcml_fn_coll_map_get( map, "KEY_F" ) ); STF_ASSERT_PTR_NULL( fcml_fn_coll_map_get( map, "KEY_G" ) ); STF_ASSERT_PTR_NULL( fcml_fn_coll_map_get( map, "KEY_H" ) ); STF_ASSERT( fcml_fn_coll_map_size( map ) == 0 ); } fcml_fn_coll_map_free( map ); } void fcml_tf_coll_test_clear(void) { fcml_int error = FCML_COLL_ERROR_NO_ERROR; fcml_st_coll_map_descriptor descriptor = fcml_coll_map_descriptor_string; descriptor.entry_free_function = fcml_itf_coll_map_entry_handler_test; fcml_coll_map *map = fcml_fn_coll_map_alloc(&descriptor, 10, &error ); if( map == NULL || error ) { STF_FAIL( "Can not create hash map." ); } else { /* index 1.*/ fcml_fn_coll_map_put( map, "KEY_A", "VALUE_A", &error ); /* Conflict, both of the following keys are conflicted, but take into account*/ /* that it depends on default builtin implementation of hashing function.*/ fcml_fn_coll_map_put( map, "KEY_B", "VALUE_B", &error ); fcml_fn_coll_map_put( map, "KEY_R", "VALUE_R", &error ); fcml_fn_coll_map_put( map, "KEY_C", "VALUE_C", &error ); fcml_fn_coll_map_put( map, "KEY_D", "VALUE_D", &error ); fcml_fn_coll_map_put( map, "KEY_E", "VALUE_E", &error ); fcml_fn_coll_map_put( map, "KEY_F", "VALUE_F", &error ); fcml_fn_coll_map_put( map, "KEY_G", "VALUE_G", &error ); fcml_fn_coll_map_put( map, "KEY_H", "VALUE_H", &error ); STF_ASSERT( fcml_fn_coll_map_size( map ) == 9 ); last_free_key = NULL; last_free_value = NULL; fcml_fn_coll_map_clear( map ); STF_ASSERT_PTR_NOT_NULL( last_free_key ); STF_ASSERT_PTR_NOT_NULL( last_free_value ); /* And check if they have been removed.*/ STF_ASSERT_PTR_NULL( fcml_fn_coll_map_get( map, "KEY_A" ) ); STF_ASSERT_PTR_NULL( fcml_fn_coll_map_get( map, "KEY_B" ) ); STF_ASSERT_PTR_NULL( fcml_fn_coll_map_get( map, "KEY_R" ) ); STF_ASSERT_PTR_NULL( fcml_fn_coll_map_get( map, "KEY_C" ) ); STF_ASSERT_PTR_NULL( fcml_fn_coll_map_get( map, "KEY_D" ) ); STF_ASSERT_PTR_NULL( fcml_fn_coll_map_get( map, "KEY_E" ) ); STF_ASSERT_PTR_NULL( fcml_fn_coll_map_get( map, "KEY_F" ) ); STF_ASSERT_PTR_NULL( fcml_fn_coll_map_get( map, "KEY_G" ) ); STF_ASSERT_PTR_NULL( fcml_fn_coll_map_get( map, "KEY_H" ) ); STF_ASSERT( fcml_fn_coll_map_size( map ) == 0 ); } fcml_fn_coll_map_free( map ); } int iterator_counter; void fcml_itf_coll_test_iterate_handler( fcml_ptr key, fcml_ptr value, fcml_ptr args ) { iterator_counter++; } void fcml_tf_coll_test_iterate(void) { iterator_counter = 0; fcml_int error = FCML_COLL_ERROR_NO_ERROR; fcml_st_coll_map_descriptor descriptor = fcml_coll_map_descriptor_string; descriptor.entry_free_function = fcml_itf_coll_map_entry_handler_test; fcml_coll_map *map = fcml_fn_coll_map_alloc(&descriptor, 10, &error ); if( map == NULL || error ) { STF_FAIL( "Can not create hash map." ); } else { /* index 1.*/ fcml_fn_coll_map_put( map, "KEY_A", "VALUE_A", &error ); /* Conflict, both of the following keys are conflicted, but take into account*/ /* that it depends on default built-in implementation of hashing function.*/ fcml_fn_coll_map_put( map, "KEY_B", "VALUE_B", &error ); fcml_fn_coll_map_put( map, "KEY_R", "VALUE_R", &error ); fcml_fn_coll_map_put( map, "KEY_C", "VALUE_C", &error ); fcml_fn_coll_map_put( map, "KEY_D", "VALUE_D", &error ); fcml_fn_coll_map_put( map, "KEY_E", "VALUE_E", &error ); fcml_fn_coll_map_put( map, "KEY_F", "VALUE_F", &error ); fcml_fn_coll_map_put( map, "KEY_G", "VALUE_G", &error ); fcml_fn_coll_map_put( map, "KEY_H", "VALUE_H", &error ); fcml_fn_coll_map_iterate( map, fcml_itf_coll_test_iterate_handler ); STF_ASSERT_EQUAL( iterator_counter, 9 ); iterator_counter = 0; fcml_fn_coll_map_clear( map ); fcml_fn_coll_map_iterate( map, fcml_itf_coll_test_iterate_handler ); STF_ASSERT_EQUAL( iterator_counter, 0 ); } fcml_fn_coll_map_free( map ); } void fcml_tf_coll_test_extend(void) { iterator_counter = 0; fcml_int error = FCML_COLL_ERROR_NO_ERROR; fcml_coll_map *map = fcml_fn_coll_map_alloc(&fcml_coll_map_descriptor_string, 2, &error ); if( map == NULL || error ) { STF_FAIL( "Can not create hash map." ); } else { /* index 1.*/ fcml_fn_coll_map_put( map, "KEY_A", "VALUE_A", &error ); fcml_fn_coll_map_put( map, "KEY_B", "VALUE_B", &error ); fcml_fn_coll_map_put( map, "KEY_R", "VALUE_R", &error ); fcml_fn_coll_map_put( map, "KEY_C", "VALUE_C", &error ); fcml_fn_coll_map_put( map, "KEY_D", "VALUE_D", &error ); fcml_fn_coll_map_put( map, "KEY_E", "VALUE_E", &error ); fcml_fn_coll_map_put( map, "KEY_F", "VALUE_F", &error ); fcml_fn_coll_map_put( map, "KEY_G", "VALUE_G", &error ); fcml_fn_coll_map_put( map, "KEY_H", "VALUE_H", &error ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_A" ), "VALUE_A" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_B" ), "VALUE_B" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_R" ), "VALUE_R" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_C" ), "VALUE_C" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_D" ), "VALUE_D" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_E" ), "VALUE_E" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_F" ), "VALUE_F" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_G" ), "VALUE_G" ); STF_ASSERT_STRING_EQUAL( fcml_fn_coll_map_get( map, "KEY_H" ), "VALUE_H" ); } fcml_fn_coll_map_free( map ); } fcml_stf_test_case fcml_ti_coll[] = { { "fcml_tf_coll_test_put_the_same_key", fcml_tf_coll_test_put_the_same_key }, { "fcml_tf_coll_test_put_different_keys", fcml_tf_coll_test_put_different_keys }, { "fcml_tf_coll_test_remove_keys", fcml_tf_coll_test_remove_keys }, { "fcml_tf_coll_test_clear", fcml_tf_coll_test_clear }, { "fcml_tf_coll_test_iterate", fcml_tf_coll_test_iterate }, { "fcml_tf_coll_test_extend", fcml_tf_coll_test_extend }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_coll = { "suite-fcml-coll", fcml_tf_coll_suite_init, fcml_tf_coll_suite_cleanup, fcml_ti_coll }; fcml-1.1.1/check/internal-tests/main.c0000644000175000017500000000334712560745216014514 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include #include /* Tests.*/ #include "modrm_encoder_t.h" #include "modrm_decoder_t.h" #include "stream_t.h" #include "coll_t.h" #include "utils_t.h" #include "intel_parser_t.h" #include "gas_parser_t.h" #include "mnemonic_parser_t.h" #include "lag_assembler_t.h" #include "env_t.h" #include "ceh_t.h" #include "common_utils_t.h" #include "symbols_t.h" fcml_stf_test_suite *fcml_arr_suites[] = { &fctl_si_modrm_encoder, &fctl_si_modrm_decoder, &fctl_si_stream, &fcml_si_coll, &fcml_si_utils, &fcml_si_intel_parser, &fcml_si_gas_parser, &fcml_si_mnemonic_parser, &fcml_si_lag_assembler, &fcml_si_env, &fcml_si_ceh, &fcml_si_common_utils, &fctl_si_symbols, FCML_STF_NULL_SUITE }; int main(int argc, char **argv) { /* Run tests.*/ fcml_bool result = fcml_stf_run_tests( FCML_TEXT( "Internal unit tests" ), fcml_arr_suites ); exit( result ? 0 : 1 ); } fcml-1.1.1/check/internal-tests/mnemonic_parser_t.c0000644000175000017500000002034112560745216017265 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 "mnemonic_parser_t.h" #include #include fcml_bool fcml_tf_mnemonic_parser_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_mnemonic_parser_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_mnemonic_parser_test_parse_mnemonics(void) { fcml_st_mp_mnemonic_set *mnemonics_set; fcml_ceh_error error = fcml_fn_mp_parse_mnemonics( "cmps[sb,mm];cmpsw[ts,o*,aw,sf,mr];cmpsd[ts,o*,ad,sf];cmpsq[ts,o*,aq,sf]", &mnemonics_set ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); fcml_st_coll_list_element *element = mnemonics_set->mnemonics->head; fcml_st_mp_mnemonic *mnemonic = (fcml_st_mp_mnemonic*)element->item; STF_ASSERT_STRING_EQUAL( mnemonic->mnemonic, "cmps" ); STF_ASSERT_EQUAL( mnemonic->is_shortcut, FCML_FALSE ); STF_ASSERT_EQUAL( mnemonic->supported_asa, FCML_DS_UNDEF ); STF_ASSERT_EQUAL( mnemonic->supported_osa, FCML_DS_UNDEF ); STF_ASSERT_EQUAL( mnemonic->is_byte_ds, FCML_TRUE ); STF_ASSERT_EQUAL( mnemonic->is_full_ds, FCML_FALSE ); STF_ASSERT_EQUAL( mnemonic->is_mode_mem_only, FCML_TRUE ); STF_ASSERT_EQUAL( mnemonic->is_mode_reg_only, FCML_FALSE ); element = element->next; mnemonic = (fcml_st_mp_mnemonic*)element->item; STF_ASSERT_STRING_EQUAL( mnemonic->mnemonic, "cmpsw" ); STF_ASSERT_EQUAL( mnemonic->is_shortcut, FCML_TRUE ); STF_ASSERT_EQUAL( mnemonic->supported_asa, FCML_DS_16 ); STF_ASSERT_EQUAL( mnemonic->supported_osa, FCML_DS_UNDEF ); STF_ASSERT_EQUAL( mnemonic->is_byte_ds, FCML_FALSE ); STF_ASSERT_EQUAL( mnemonic->is_full_ds, FCML_TRUE ); STF_ASSERT_EQUAL( mnemonic->is_mode_mem_only, FCML_FALSE ); STF_ASSERT_EQUAL( mnemonic->is_mode_reg_only, FCML_TRUE ); element = element->next; mnemonic = (fcml_st_mp_mnemonic*)element->item; STF_ASSERT_STRING_EQUAL( mnemonic->mnemonic, "cmpsd" ); STF_ASSERT_EQUAL( mnemonic->is_shortcut, FCML_TRUE ); STF_ASSERT_EQUAL( mnemonic->supported_asa, FCML_DS_32 ); STF_ASSERT_EQUAL( mnemonic->supported_osa, FCML_DS_UNDEF ); element = element->next; mnemonic = (fcml_st_mp_mnemonic*)element->item; STF_ASSERT_STRING_EQUAL( mnemonic->mnemonic, "cmpsq" ); STF_ASSERT_EQUAL( mnemonic->is_shortcut, FCML_TRUE ); STF_ASSERT_EQUAL( mnemonic->supported_asa, FCML_DS_64 ); STF_ASSERT_EQUAL( mnemonic->supported_osa, FCML_DS_UNDEF ); STF_ASSERT_PTR_NULL( element->next ); fcml_fn_mp_free_mnemonics( mnemonics_set ); } void fcml_tf_mnemonic_parser_test_parse_mnemonics_1(void) { fcml_st_mp_mnemonic_set *mnemonics_set; fcml_ceh_error error = fcml_fn_mp_parse_mnemonics( "cmps;", &mnemonics_set ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); fcml_st_coll_list_element *element = mnemonics_set->mnemonics->head; fcml_st_mp_mnemonic *mnemonic = (fcml_st_mp_mnemonic*)element->item; STF_ASSERT_STRING_EQUAL( mnemonic->mnemonic, "cmps" ); STF_ASSERT_EQUAL( mnemonic->is_shortcut, FCML_FALSE ); STF_ASSERT_EQUAL( mnemonic->supported_asa, FCML_DS_UNDEF ); STF_ASSERT_EQUAL( mnemonic->supported_osa, FCML_DS_UNDEF ); STF_ASSERT_PTR_NULL( element->next ); fcml_fn_mp_free_mnemonics( mnemonics_set ); } void fcml_tf_mnemonic_parser_test_parse_mnemonics_2(void) { fcml_st_mp_mnemonic_set *mnemonics_set; fcml_ceh_error error = fcml_fn_mp_parse_mnemonics( "cmps[ts];", &mnemonics_set ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); fcml_st_coll_list_element *element = mnemonics_set->mnemonics->head; fcml_st_mp_mnemonic *mnemonic = (fcml_st_mp_mnemonic*)element->item; STF_ASSERT_STRING_EQUAL( mnemonic->mnemonic, "cmps" ); STF_ASSERT_EQUAL( mnemonic->is_shortcut, FCML_TRUE ); STF_ASSERT_EQUAL( mnemonic->supported_asa, FCML_DS_UNDEF ); STF_ASSERT_EQUAL( mnemonic->supported_osa, FCML_DS_UNDEF ); STF_ASSERT_PTR_NULL( element->next ); fcml_fn_mp_free_mnemonics( mnemonics_set ); } fcml_string fcml_itb_bad_formatted_mnemonics[] = { "", ";", ";[", "[;", ";;;;", ";cmps", "cmps[;", "cmps[];", "cmps];", "cmps[[ts];", "cmps[ts]];", "cmps[ts;", "cmps[ts", "cmps[t", "cmps[t]", "cmps[bx]", "cmps[om]", "cm!ps", " cmps", "[]", "cmps[oda", "cmps]", "cmps[odadddf]", "cmps[od,,ad]", "cmps[,od]", "cmps[od,]", "cmps[,]", "cmps[,,]", "cmps[,", "cmps[ad;]", }; void fcml_tf_mnemonic_parser_test_parse_mnemonics_3(void) { int i; for( i = 0; i < sizeof( fcml_itb_bad_formatted_mnemonics ) / sizeof( fcml_string ); i++ ) { fcml_st_mp_mnemonic_set *mnemonics_set = NULL; fcml_string mnemonic = fcml_itb_bad_formatted_mnemonics[i]; fcml_ceh_error error = fcml_fn_mp_parse_mnemonics( mnemonic, &mnemonics_set ); /* printf("%d:%d\n", i, error);*/ STF_ASSERT_EQUAL( error, FCML_CEH_GEC_INVALID_INPUT ); STF_ASSERT_PTR_NULL( mnemonics_set ); } } void fcml_tf_mnemonic_parser_test_parse_mnemonics_4(void) { fcml_st_mp_mnemonic_set *mnemonics_set; fcml_ceh_error error = fcml_fn_mp_parse_mnemonics( "cmpordsd[p07]", &mnemonics_set ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); fcml_st_coll_list_element *element = mnemonics_set->mnemonics->head; fcml_st_mp_mnemonic *mnemonic = (fcml_st_mp_mnemonic*)element->item; STF_ASSERT_STRING_EQUAL( mnemonic->mnemonic, "cmpordsd" ); STF_ASSERT_EQUAL( mnemonic->is_shortcut, FCML_FALSE ); STF_ASSERT_EQUAL( mnemonic->supported_asa, FCML_DS_UNDEF ); STF_ASSERT_EQUAL( mnemonic->supported_osa, FCML_DS_UNDEF ); STF_ASSERT_EQUAL( mnemonic->pseudo_op.is_not_null, FCML_TRUE ); STF_ASSERT_EQUAL( mnemonic->pseudo_op.value, 0x07 ); STF_ASSERT_PTR_NULL( element->next ); fcml_fn_mp_free_mnemonics( mnemonics_set ); } void fcml_tf_mnemonic_parser_test_parse_mnemonics_5(void) { fcml_st_mp_mnemonic_set *mnemonics_set; fcml_ceh_error error = fcml_fn_mp_parse_mnemonics( "cmpordsd[S07]", &mnemonics_set ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); fcml_st_coll_list_element *element = mnemonics_set->mnemonics->head; fcml_st_mp_mnemonic *mnemonic = (fcml_st_mp_mnemonic*)element->item; STF_ASSERT_STRING_EQUAL( mnemonic->mnemonic, "cmpordsd" ); STF_ASSERT_EQUAL( mnemonic->is_shortcut, FCML_FALSE ); STF_ASSERT_EQUAL( mnemonic->supported_asa, FCML_DS_UNDEF ); STF_ASSERT_EQUAL( mnemonic->supported_osa, FCML_DS_UNDEF ); STF_ASSERT_EQUAL( mnemonic->suffix.is_not_null, FCML_TRUE ); STF_ASSERT_EQUAL( mnemonic->suffix.value, 0x07 ); STF_ASSERT_PTR_NULL( element->next ); fcml_fn_mp_free_mnemonics( mnemonics_set ); } fcml_stf_test_case fcml_ti_mnemonic_parser[] = { { "fcml_tf_mnemonic_parser_test_parse_mnemonics", fcml_tf_mnemonic_parser_test_parse_mnemonics }, { "fcml_tf_mnemonic_parser_test_parse_mnemonics_1", fcml_tf_mnemonic_parser_test_parse_mnemonics_1 }, { "fcml_tf_mnemonic_parser_test_parse_mnemonics_2", fcml_tf_mnemonic_parser_test_parse_mnemonics_2 }, { "fcml_tf_mnemonic_parser_test_parse_mnemonics_3", fcml_tf_mnemonic_parser_test_parse_mnemonics_3 }, { "fcml_tf_mnemonic_parser_test_parse_mnemonics_4", fcml_tf_mnemonic_parser_test_parse_mnemonics_4 }, { "fcml_tf_mnemonic_parser_test_parse_mnemonics_5", fcml_tf_mnemonic_parser_test_parse_mnemonics_5 }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_mnemonic_parser = { "suite-fcml-mnemonic-parser", fcml_tf_mnemonic_parser_suite_init, fcml_tf_mnemonic_parser_suite_cleanup, fcml_ti_mnemonic_parser }; fcml-1.1.1/check/internal-tests/gas_parser_t.c0000644000175000017500000006412212560745216016237 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 "gas_parser_t.h" #include #include #include #include #include #include #include fcml_st_dialect *internal_dialect_gas = NULL; fcml_st_parser_context internal_gas_context = {0}; fcml_bool fcml_tf_gas_parser_suite_init(void) { fcml_fn_dialect_init_gas( FCML_GAS_DIALECT_CF_DEFAULT, &internal_dialect_gas ); internal_gas_context.dialect = internal_dialect_gas; return internal_dialect_gas != NULL; } fcml_bool fcml_tf_gas_parser_suite_cleanup(void) { if( internal_dialect_gas ) { fcml_fn_dialect_free( internal_dialect_gas ); } if( internal_gas_context.symbol_table ) { fcml_fn_symbol_table_free( internal_gas_context.symbol_table ); } return FCML_TRUE; } void fcml_tf_parser_gas_parse_test1(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_gas_context, "mov $80-90", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_TRUE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int8, (fcml_int8_t)-10 ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_gas_parse_test2(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_gas_context, "mov (%eax)", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_ADDRESS ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.address_form, FCML_AF_COMBINED ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.effective_address.base.size, FCML_DS_32 ); STF_ASSERT_EQUAL( result.instruction->operands[0].address.effective_address.base.reg, FCML_REG_EAX ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_gas_parse_test3(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_gas_context, "movq $1,%cs:(%rax)", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int8, (fcml_uint8_t)(fcml_int8_t)1 ); STF_ASSERT_EQUAL( result.instruction->operands[1].type, FCML_OT_ADDRESS ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.address_form, FCML_AF_COMBINED ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.base.size, FCML_DS_64 ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.base.reg, FCML_REG_RAX ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.segment_selector.segment_selector.reg, FCML_REG_CS ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_gas_parse_test4(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_gas_context, "movq $1,%cs:(%rax,%rbx)", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int8, (fcml_int8_t)1 ); STF_ASSERT_EQUAL( result.instruction->operands[1].type, FCML_OT_ADDRESS ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.address_form, FCML_AF_COMBINED ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.base.size, FCML_DS_64 ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.base.reg, FCML_REG_RAX ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.index.size, FCML_DS_64 ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.index.reg, FCML_REG_RBX ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.segment_selector.segment_selector.reg, FCML_REG_CS ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_gas_parse_test5(void) { /* Index only.*/ fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_gas_context, "movq $1,%cs:(,%rbx)", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int8, (fcml_int8_t)1 ); STF_ASSERT_EQUAL( result.instruction->operands[1].type, FCML_OT_ADDRESS ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.address_form, FCML_AF_COMBINED ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.base.size, FCML_DS_UNDEF ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.base.reg, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.index.size, FCML_DS_64 ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.index.reg, FCML_REG_RBX ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.segment_selector.segment_selector.reg, FCML_REG_CS ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_gas_parse_test6(void) { /* Index only.*/ fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_gas_context, "movq $1,%cs:(,%rbx,4)", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int8, (fcml_int8_t)1 ); STF_ASSERT_EQUAL( result.instruction->operands[1].type, FCML_OT_ADDRESS ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.address_form, FCML_AF_COMBINED ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.base.size, FCML_DS_UNDEF ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.base.reg, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.index.size, FCML_DS_64 ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.index.reg, FCML_REG_RBX ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.scale_factor, 4 ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.segment_selector.segment_selector.reg, FCML_REG_CS ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_gas_parse_test7(void) { /* Index only.*/ fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_NOT_EQUAL( fcml_fn_parse( &internal_gas_context, "movq $1,%cs:(,%rbx,)", &result ), FCML_CEH_GEC_NO_ERROR ); fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_gas_parse_test8(void) { /* Index only.*/ fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_gas_context, "movq $1,%cs:0x100(,%rbx,4)", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int8, (fcml_int8_t)1 ); STF_ASSERT_EQUAL( result.instruction->operands[1].type, FCML_OT_ADDRESS ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.address_form, FCML_AF_COMBINED ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.base.size, FCML_DS_UNDEF ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.base.reg, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.index.size, FCML_DS_64 ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.index.reg, FCML_REG_RBX ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.scale_factor, 4 ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.displacement.size, FCML_DS_16 ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.displacement.int16, (fcml_uint16_t)0x100 ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.segment_selector.segment_selector.reg, FCML_REG_CS ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_gas_parse_test9(void) { /* Index only.*/ fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_gas_context, "movq $1,%cs:0x100", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int8, (fcml_int8_t)1 ); STF_ASSERT_EQUAL( result.instruction->operands[1].type, FCML_OT_ADDRESS ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.address_form, FCML_AF_OFFSET ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.offset.size, FCML_DS_16 ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.offset.off16, (fcml_uint16_t)0x100 ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.segment_selector.segment_selector.reg, FCML_REG_CS ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_gas_parse_test10(void) { /* Index only.*/ fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_gas_context, "movq $1,%cs:0x100(%rax,%rbx,4)", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int8, (fcml_int8_t)1 ); STF_ASSERT_EQUAL( result.instruction->operands[1].type, FCML_OT_ADDRESS ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.address_form, FCML_AF_COMBINED ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.base.size, FCML_DS_64 ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.base.reg, FCML_REG_RAX ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.index.size, FCML_DS_64 ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.index.reg, FCML_REG_RBX ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.scale_factor, 4 ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.displacement.size, FCML_DS_16 ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.displacement.int16, (fcml_uint16_t)0x100 ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.segment_selector.segment_selector.reg, FCML_REG_CS ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_gas_parse_test11(void) { /* RIP only.*/ fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_gas_context, "movq $1,0x100(%rip)", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.is_signed, FCML_FALSE ); STF_ASSERT_EQUAL( result.instruction->operands[0].immediate.int8, (fcml_int8_t)1 ); STF_ASSERT_EQUAL( result.instruction->operands[1].type, FCML_OT_ADDRESS ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.address_form, FCML_AF_COMBINED ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.base.reg, FCML_REG_UNDEFINED ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.base.size, FCML_DS_64 ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.base.type, FCML_REG_IP ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.displacement.size, FCML_DS_16 ); STF_ASSERT_EQUAL( result.instruction->operands[1].address.effective_address.displacement.int16, (fcml_uint16_t)0x100 ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_gas_parse_test12(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); STF_ASSERT_EQUAL( fcml_fn_parse( &internal_gas_context, "mov *0x80", &result ), FCML_CEH_GEC_NO_ERROR ); if( result.instruction != NULL ) { STF_ASSERT_EQUAL( result.instruction->operands[0].type, FCML_OT_ADDRESS ); STF_ASSERT_EQUAL( result.instruction->hints, FCML_HINT_INDIRECT_POINTER ); } else { STF_FAIL(); } fcml_fn_parser_result_free( &result ); } void fcml_tf_parser_gas_parse_test_symbols_1(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_gas; context.configuration.alloc_symbol_table_if_needed = FCML_TRUE; context.ip = 0x401000; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label:" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NULL( result.instruction ); STF_ASSERT_PTR_NOT_NULL( result.symbol ); if( result.symbol ) { STF_ASSERT_EQUAL( result.symbol->value, 0x401000 ); STF_ASSERT_STRING_EQUAL( result.symbol->symbol, FCML_TEXT( "label" ) ); } STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "_label:" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NULL( result.instruction ); STF_ASSERT_PTR_NOT_NULL( result.symbol ); if( result.symbol ) { STF_ASSERT_EQUAL( result.symbol->value, 0x401000 ); STF_ASSERT_STRING_EQUAL( result.symbol->symbol, FCML_TEXT( "_label" ) ); } fcml_fn_parser_result_free( &result ); fcml_fn_symbol_table_free( context.symbol_table ); } void fcml_tf_parser_gas_parse_test_symbols_2(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_gas; context.configuration.override_labels = FCML_FALSE; context.configuration.alloc_symbol_table_if_needed = FCML_TRUE; context.ip = 0x401000; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: mov %eax,1" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NOT_NULL( result.instruction ); if( result.instruction ) { STF_ASSERT_STRING_EQUAL( result.instruction->mnemonic, "mov" ); } STF_ASSERT_PTR_NOT_NULL( result.symbol ); if( result.symbol ) { STF_ASSERT_EQUAL( result.symbol->value, 0x401000 ); STF_ASSERT_STRING_EQUAL( result.symbol->symbol, FCML_TEXT( "label" ) ); } fcml_fn_parser_result_free( &result ); fcml_fn_symbol_table_free( context.symbol_table ); } void fcml_tf_parser_gas_parse_test_symbols_3(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_gas; context.configuration.override_labels = FCML_FALSE; context.configuration.alloc_symbol_table_if_needed = FCML_TRUE; context.ip = 0x401000; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: mov %eax,1" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NOT_NULL( result.instruction ); if( result.instruction ) { STF_ASSERT_STRING_EQUAL( result.instruction->mnemonic, "mov" ); } STF_ASSERT_PTR_NOT_NULL( result.symbol ); if( result.symbol ) { STF_ASSERT_EQUAL( result.symbol->value, 0x401000 ); STF_ASSERT_STRING_EQUAL( result.symbol->symbol, FCML_TEXT( "label" ) ); } STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: mov %eax,1" ), &result ), FCML_CEH_GEC_INVALID_INPUT ); fcml_st_ceh_error_info *error = result.errors.errors; STF_ASSERT_PTR_NOT_NULL( error ); if( error ) { STF_ASSERT_EQUAL( error->code, FCML_CEH_MEC_ERROR_SYMBOL_ALREADY_DEFINED ); STF_ASSERT_STRING_EQUAL( error->message, FCML_TEXT( "Symbol already defined: label." ) ); } context.configuration.override_labels = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: add %eax,1" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NOT_NULL( result.instruction ); if( result.instruction ) { STF_ASSERT_STRING_EQUAL( result.instruction->mnemonic, "add" ); } STF_ASSERT_PTR_NOT_NULL( result.symbol ); if( result.symbol ) { STF_ASSERT_EQUAL( result.symbol->value, 0x401000 ); STF_ASSERT_STRING_EQUAL( result.symbol->symbol, FCML_TEXT( "label" ) ); } fcml_fn_parser_result_free( &result ); fcml_fn_symbol_table_free( context.symbol_table ); } /* Undefined symbol. */ void fcml_tf_parser_gas_parse_test_symbols_4(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_gas; context.configuration.alloc_symbol_table_if_needed = FCML_TRUE; context.ip = 0x401000; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: mov %eax, symbol" ), &result ), FCML_CEH_GEC_UNDEFINED_SYMBOL ); STF_ASSERT_PTR_NULL( result.instruction ); STF_ASSERT_PTR_NULL( result.symbol ); fcml_st_ceh_error_info *error = result.errors.errors; STF_ASSERT_PTR_NOT_NULL( error ); if( error ) { STF_ASSERT_EQUAL( error->code, FCML_CEH_MEC_ERROR_UNDEFINED_SYMBOL ); STF_ASSERT_STRING_EQUAL( error->message, FCML_TEXT( "Undefined symbol: symbol." ) ); } fcml_fn_parser_result_free( &result ); fcml_fn_symbol_table_free( context.symbol_table ); } /* Ignore symbols. */ void fcml_tf_parser_gas_parse_test_symbols_5(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_gas; context.ip = 0x401000; context.configuration.ignore_undefined_symbols = FCML_TRUE; context.configuration.alloc_symbol_table_if_needed = FCML_TRUE; context.configuration.override_labels = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: mov %eax, $symbol" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NOT_NULL( result.instruction ); STF_ASSERT_PTR_NOT_NULL( result.symbol ); if( result.instruction ) { fcml_st_instruction *instruction = result.instruction; STF_ASSERT_EQUAL( instruction->operands[1].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( instruction->operands[1].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( instruction->operands[1].immediate.int8, 0 ); STF_ASSERT_EQUAL( instruction->operands[1].immediate.is_signed, FCML_TRUE ); } /* Label will be overriden. */ STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: mov %eax, symbol" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NOT_NULL( result.instruction ); STF_ASSERT_PTR_NOT_NULL( result.symbol ); if( result.instruction ) { fcml_st_instruction *instruction = result.instruction; STF_ASSERT_EQUAL( instruction->operands[1].type, FCML_OT_ADDRESS ); STF_ASSERT_EQUAL( instruction->operands[1].address.address_form, FCML_AF_OFFSET ); } fcml_fn_parser_result_free( &result ); fcml_fn_symbol_table_free( context.symbol_table ); } /* Use defined symbol in the instruction. */ void fcml_tf_parser_gas_parse_test_symbols_6(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_gas; context.ip = 0x401000; context.configuration.ignore_undefined_symbols = FCML_TRUE; context.configuration.override_labels = FCML_TRUE; context.configuration.alloc_symbol_table_if_needed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: mov %eax, $label" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NOT_NULL( result.instruction ); STF_ASSERT_PTR_NOT_NULL( result.symbol ); if( result.instruction ) { fcml_st_instruction *instruction = result.instruction; STF_ASSERT_EQUAL( instruction->operands[1].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( instruction->operands[1].immediate.size, FCML_DS_32 ); STF_ASSERT_EQUAL( instruction->operands[1].immediate.int32, 0x401000 ); STF_ASSERT_EQUAL( instruction->operands[1].immediate.is_signed, FCML_TRUE ); } fcml_fn_parser_result_free( &result ); fcml_fn_symbol_table_free( context.symbol_table ); } /* Pseudo operations operands parsing. */ void fcml_tf_parser_gas_parse_test_pseudo_operation_1(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_gas; context.ip = 0x401000; context.configuration.ignore_undefined_symbols = FCML_TRUE; context.configuration.override_labels = FCML_TRUE; context.configuration.alloc_symbol_table_if_needed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: .byte 0x12" ), &result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_PTR_NOT_NULL( result.instruction ); STF_ASSERT_PTR_NOT_NULL( result.symbol ); if( result.instruction ) { fcml_st_instruction *instruction = result.instruction; STF_ASSERT_STRING_EQUAL( ".byte", result.instruction->mnemonic ); STF_ASSERT_EQUAL( 1, instruction->operands_count ); STF_ASSERT_EQUAL( instruction->operands[0].type, FCML_OT_IMMEDIATE ); STF_ASSERT_EQUAL( instruction->operands[0].immediate.size, FCML_DS_8 ); STF_ASSERT_EQUAL( instruction->operands[0].immediate.int8, 0x12 ); STF_ASSERT_EQUAL( instruction->operands[0].immediate.is_signed, FCML_FALSE ); } fcml_fn_parser_result_free( &result ); fcml_fn_symbol_table_free( context.symbol_table ); } /* Pseudo operations operands parsing. */ void fcml_tf_parser_gas_parse_test_pseudo_operation_2(void) { fcml_st_parser_result result; fcml_fn_parser_result_prepare( &result ); fcml_st_parser_context context = {0}; context.dialect = internal_dialect_gas; context.ip = 0x401000; context.configuration.ignore_undefined_symbols = FCML_TRUE; context.configuration.override_labels = FCML_TRUE; context.configuration.alloc_symbol_table_if_needed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_parse( &context, FCML_TEXT( "label: .byte %rax" ), &result ), FCML_CEH_GEC_INVALID_INPUT ); STF_ASSERT_PTR_NULL( result.instruction ); STF_ASSERT_PTR_NULL( result.symbol ); fcml_fn_parser_result_free( &result ); fcml_fn_symbol_table_free( context.symbol_table ); } fcml_stf_test_case fcml_ti_parser_gas[] = { { "fcml_tf_parser_gas_parse_test1", fcml_tf_parser_gas_parse_test1 }, { "fcml_tf_parser_gas_parse_test2", fcml_tf_parser_gas_parse_test2 }, { "fcml_tf_parser_gas_parse_test3", fcml_tf_parser_gas_parse_test3 }, { "fcml_tf_parser_gas_parse_test4", fcml_tf_parser_gas_parse_test4 }, { "fcml_tf_parser_gas_parse_test5", fcml_tf_parser_gas_parse_test5 }, { "fcml_tf_parser_gas_parse_test6", fcml_tf_parser_gas_parse_test6 }, { "fcml_tf_parser_gas_parse_test7", fcml_tf_parser_gas_parse_test7 }, { "fcml_tf_parser_gas_parse_test8", fcml_tf_parser_gas_parse_test8 }, { "fcml_tf_parser_gas_parse_test9", fcml_tf_parser_gas_parse_test9 }, { "fcml_tf_parser_gas_parse_test10", fcml_tf_parser_gas_parse_test10 }, { "fcml_tf_parser_gas_parse_test11", fcml_tf_parser_gas_parse_test11 }, { "fcml_tf_parser_gas_parse_test12", fcml_tf_parser_gas_parse_test12 }, { "fcml_tf_parser_gas_parse_test_symbols_1", fcml_tf_parser_gas_parse_test_symbols_1 }, { "fcml_tf_parser_gas_parse_test_symbols_2", fcml_tf_parser_gas_parse_test_symbols_2 }, { "fcml_tf_parser_gas_parse_test_symbols_3", fcml_tf_parser_gas_parse_test_symbols_3 }, { "fcml_tf_parser_gas_parse_test_symbols_4", fcml_tf_parser_gas_parse_test_symbols_4 }, { "fcml_tf_parser_gas_parse_test_symbols_5", fcml_tf_parser_gas_parse_test_symbols_5 }, { "fcml_tf_parser_gas_parse_test_symbols_6", fcml_tf_parser_gas_parse_test_symbols_6 }, { "fcml_tf_parser_gas_parse_test_pseudo_operation_1", fcml_tf_parser_gas_parse_test_pseudo_operation_1 }, { "fcml_tf_parser_gas_parse_test_pseudo_operation_2", fcml_tf_parser_gas_parse_test_pseudo_operation_2 }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_gas_parser = { "suite-fcml-parser-gas", fcml_tf_gas_parser_suite_init, fcml_tf_gas_parser_suite_cleanup, fcml_ti_parser_gas }; fcml-1.1.1/check/internal-tests/utils_t.c0000644000175000017500000001417712560745216015256 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 "utils_t.h" #include fcml_bool fcml_tf_utils_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_utils_suite_cleanup(void) { return FCML_TRUE; } void fcml_fn_utils_test_sign_convert_imm_to_int8(void) { fcml_int8_t value; fcml_st_integer imm; imm.size = FCML_DS_8; imm.int8 = (fcml_int8_t)0xFF; imm.is_signed = FCML_FALSE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int8( &imm, &value ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( value, (fcml_int8_t)-1 ); imm.size = FCML_DS_8; imm.int8 = 45; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int8( &imm, &value ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( value, (fcml_int8_t)45 ); imm.size = FCML_DS_16; imm.int16 = (fcml_int16_t)0xFFFF; imm.is_signed = FCML_FALSE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int8( &imm, &value ), FCML_CEH_GEC_VALUE_OUT_OF_RANGE ); imm.size = FCML_DS_16; imm.int16 = (fcml_int16_t)0xFFFF; imm.is_signed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int8( &imm, &value ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( value, (fcml_int8_t)-1 ); imm.size = FCML_DS_32; imm.int32 = 0xFFFFFFFF; imm.is_signed = FCML_FALSE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int8( &imm, &value ), FCML_CEH_GEC_VALUE_OUT_OF_RANGE ); imm.size = FCML_DS_32; imm.int32 = 0xFFFFFFFF; imm.is_signed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int8( &imm, &value ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( value, (fcml_int8_t)-1 ); imm.size = FCML_DS_32; imm.int32 = 0x00FFFFFF; imm.is_signed = FCML_FALSE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int8( &imm, &value ), FCML_CEH_GEC_VALUE_OUT_OF_RANGE ); imm.size = FCML_DS_16; imm.int16 = 129; imm.is_signed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int8( &imm, &value ), FCML_CEH_GEC_VALUE_OUT_OF_RANGE ); imm.size = FCML_DS_32; imm.int32 = 129; imm.is_signed = FCML_FALSE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int8( &imm, &value ), FCML_CEH_GEC_VALUE_OUT_OF_RANGE ); } void fcml_fn_utils_test_sign_convert_imm_to_int16(void) { fcml_int16_t value; fcml_st_integer imm; imm.size = FCML_DS_8; imm.int8 = (fcml_int8_t)0xFF; imm.is_signed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int16( &imm, &value ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( value, (fcml_int16_t)-1 ); imm.size = FCML_DS_8; imm.int8 = 45; imm.is_signed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int16( &imm, &value ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( value, (fcml_int16_t)45 ); imm.size = FCML_DS_16; imm.int16 = (fcml_int16_t)0xFFFF; imm.is_signed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int16( &imm, &value ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( value, (fcml_int16_t)-1 ); imm.size = FCML_DS_16; imm.int16 = (fcml_int16_t)0xFFFF; imm.is_signed = FCML_FALSE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int16( &imm, &value ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( value, (fcml_int16_t)-1 ); imm.size = FCML_DS_32; imm.int32 = 0xFFFFFFFF; imm.is_signed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int16( &imm, &value ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( value, (fcml_int16_t)-1 ); imm.size = FCML_DS_32; imm.int32 = 0x00FFFFFF; imm.is_signed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int16( &imm, &value ), FCML_CEH_GEC_VALUE_OUT_OF_RANGE ); imm.size = FCML_DS_32; imm.int32 = 32768; imm.is_signed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int16( &imm, &value ), FCML_CEH_GEC_VALUE_OUT_OF_RANGE ); } void fcml_fn_utils_test_sign_convert_imm_to_int32(void) { fcml_int32_t value; fcml_st_integer imm; imm.size = FCML_DS_8; imm.int8 = (fcml_int8_t)0xFF; imm.is_signed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int32( &imm, &value ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( value, (fcml_int32_t)-1 ); imm.size = FCML_DS_8; imm.int8 = 45; imm.is_signed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int32( &imm, &value ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( value, (fcml_int32_t)45 ); imm.size = FCML_DS_16; imm.int16 = (fcml_int16_t)0xFFFF; imm.is_signed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int32( &imm, &value ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( value, (fcml_int32_t)-1 ); imm.size = FCML_DS_32; imm.int32 = 0xFFFFFFFF; imm.is_signed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int32( &imm, &value ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( value, (fcml_int32_t)-1 ); imm.size = FCML_DS_32; imm.int32 = 0x00FFFFFF; imm.is_signed = FCML_TRUE; STF_ASSERT_EQUAL( fcml_fn_utils_convert_integer_to_int32( &imm, &value ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( value, (fcml_int32_t)0x00FFFFFF ); } fcml_stf_test_case fcml_ti_utils[] = { { "fcml_fn_utils_test_sign_convert_imm_to_int8", fcml_fn_utils_test_sign_convert_imm_to_int8 }, { "fcml_fn_utils_test_sign_convert_imm_to_int16", fcml_fn_utils_test_sign_convert_imm_to_int16 }, { "fcml_fn_utils_test_sign_convert_imm_to_int32", fcml_fn_utils_test_sign_convert_imm_to_int32 }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_utils = { "suite-fcml-utils", fcml_tf_utils_suite_init, fcml_tf_utils_suite_cleanup, fcml_ti_utils }; fcml-1.1.1/check/internal-tests/lag_assembler_t.c0000644000175000017500000002172612560745216016714 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 "lag_assembler_t.h" #include #include #include #include #include fcml_bool fcml_tf_lag_assembler_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_lag_assembler_suite_cleanup(void) { return FCML_TRUE; } struct fcml_ist_t_lag_test_case { const fcml_string *code_str; const fcml_uint8_t *code_bin; const fcml_int code_size; }; const fcml_string fcml_iarr_lag_assembler_code_1_src[] = { "start: mov ebx, 1", "loop_big: inc ebx", " cmp ebx, 10", " je finish", "loop_small: mov eax, 1", "increment: inc eax", " cmp eax, 10", " je finish_small", " jmp increment", "finish_small:", " jmp loop_big", "finish: ret", NULL }; const fcml_uint8_t fcml_iarr_lag_assembler_code_1_bin[] = { 0xBB, 0x01, 0x00, 0x00, 0x00, 0x43, 0x83, 0xFB, 0x0A, 0x74, 0x0F, 0xB8, 0x01, 0x00, 0x00, 0x00, 0x40, 0x83, 0xF8, 0x0A, 0x74, 0x02, 0xEB, 0xF8, 0xEB, 0xEB, 0xC3 }; const fcml_string fcml_iarr_lag_assembler_code_2_src[] = { "jmp second", "start: jmp finish", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", " nop", "second: jmp second+249-(finish-start)", "finish: ret", NULL }; const fcml_uint8_t fcml_iarr_lag_assembler_code_2_bin[] = { 0xE9, 0x82, 0x00, 0x00, 0x00, 0xE9, 0x7F, 0x00, 0x00, 0x00, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0xEB, 0x73, 0xC3 }; const fcml_string fcml_iarr_lag_assembler_code_3_src[] = { "je finish", "ret", NULL }; struct fcml_ist_t_lag_test_case fcml_iarr_lag_test_cases[] = { { fcml_iarr_lag_assembler_code_1_src, fcml_iarr_lag_assembler_code_1_bin, sizeof( fcml_iarr_lag_assembler_code_1_bin ) }, { fcml_iarr_lag_assembler_code_2_src, fcml_iarr_lag_assembler_code_2_bin, sizeof( fcml_iarr_lag_assembler_code_2_bin ) }, { NULL, NULL, 0 } }; fcml_bool fcml_fn_lag_assemble_result_check( const fcml_st_lag_assembler_result *result, const fcml_uint8_t *code, const fcml_int size ) { fcml_int code_index = 0; fcml_st_assembled_instruction *current = result->instructions; while( current && code_index <= size ) { fcml_int code_length = current->code_length; int i; for( i = 0; i < code_length && code_index <= size; i++ ) { if( current->code[i] != code[code_index++] ) { printf( "Index %d should be: 0x%x was 0x%x.\n", code_index - 1, code[code_index - 1], current->code[i] ); return FCML_FALSE; } } current = current->next; } if( code_index != size ) { printf( "Instruction code do not match." ); return FCML_FALSE; } return FCML_TRUE; } void fcml_tf_lag_assembler_test(void) { fcml_ceh_error error; fcml_st_lag_assembler_result result; fcml_fn_lag_assembler_result_prepare( &result ); fcml_st_dialect *dialect; error = fcml_fn_dialect_init_intel( FCML_INTEL_DIALECT_CF_DEFAULT, &dialect ); if( error ) { STF_FAIL("Can not initialize dialect."); return; } fcml_st_assembler *assembler; error = fcml_fn_assembler_init( dialect, &assembler ); if( error ) { STF_FAIL("Can not initialize assembler."); return; } struct fcml_ist_t_lag_test_case *test_cases = &(fcml_iarr_lag_test_cases[0]); fcml_int counter = 0; while( test_cases->code_bin ) { fcml_st_lag_assembler_context context = {0}; context.assembler = assembler; context.entry_point.op_mode = FCML_OM_32_BIT; context.entry_point.ip = 0x00401000; error = fcml_fn_lag_assemble( &context, test_cases->code_str, &result ); if( error ) { STF_FAIL("Failed to assemble code."); return; } fcml_bool ok = fcml_fn_lag_assemble_result_check( &result, test_cases->code_bin, test_cases->code_size ); STF_ASSERT( ok ); if( !ok ) { printf("Failed instruction nr: %d.\n", counter ); } fcml_fn_symbol_table_free( context.symbol_table ); fcml_fn_lag_assembler_result_free( &result ); test_cases++; counter++; } fcml_fn_assembler_free( assembler ); fcml_fn_dialect_free( dialect ); } void fcml_tf_lag_assembler_test_1(void) { fcml_ceh_error error; fcml_st_lag_assembler_result result; fcml_fn_lag_assembler_result_prepare( &result ); fcml_st_dialect *dialect; //error = fcml_fn_dialect_init_gas( FCML_GAS_DIALECT_CF_DEFAULT, &dialect ); error = fcml_fn_dialect_init_intel( FCML_INTEL_DIALECT_CF_DEFAULT, &dialect ); if( error ) { STF_FAIL("Can not initialize dialect."); return; } fcml_st_assembler *assembler; error = fcml_fn_assembler_init( dialect, &assembler ); if( error ) { STF_FAIL("Can not initialize assembler."); return; } fcml_st_lag_assembler_context context = {0}; context.configuration.enable_error_messages = FCML_TRUE; context.assembler = assembler; context.entry_point.op_mode = FCML_OM_32_BIT; context.entry_point.ip = 0x00401000; error = fcml_fn_lag_assemble( &context, fcml_iarr_lag_assembler_code_3_src, &result ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_UNDEFINED_SYMBOL ); STF_ASSERT_PTR_NOT_NULL( result.errors.errors ); if( result.errors.errors ) { STF_ASSERT_STRING_EQUAL( result.errors.errors->message, FCML_TEXT( "Undefined symbol: finish." ) ); } fcml_fn_symbol_table_free( context.symbol_table ); fcml_fn_lag_assembler_result_free( &result ); fcml_fn_assembler_free( assembler ); fcml_fn_dialect_free( dialect ); } fcml_stf_test_case fcml_ti_lag_assembler[] = { { "fcml_tf_lag_assembler_test", fcml_tf_lag_assembler_test }, { "fcml_tf_lag_assembler_test_1", fcml_tf_lag_assembler_test_1 }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_lag_assembler = { "suite-fcml-lag-assembler", fcml_tf_lag_assembler_suite_init, fcml_tf_lag_assembler_suite_cleanup, fcml_ti_lag_assembler }; fcml-1.1.1/check/internal-tests/ceh_t.c0000644000175000017500000001201112560745216014636 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 "ceh_t.h" #include fcml_bool fcml_tf_ceh_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_ceh_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_ceh_test_remove_errors_by_level(void) { fcml_st_ceh_error_container conteiner = { NULL }; STF_ASSERT_PTR_NOT_NULL( fcml_fn_ceh_add_error( &conteiner, "Message 1.", 1, FCML_EN_CEH_EL_ERROR ) ); STF_ASSERT_PTR_NOT_NULL( fcml_fn_ceh_add_error( &conteiner, "Message 2.", 2, FCML_EN_CEH_EL_ERROR ) ); STF_ASSERT_PTR_NOT_NULL( fcml_fn_ceh_add_error( &conteiner, "Message 3.", 3, FCML_EN_CEH_EL_WARN ) ); STF_ASSERT_PTR_NOT_NULL( fcml_fn_ceh_add_error( &conteiner, "Message 4.", 4, FCML_EN_CEH_EL_WARN ) ); fcml_st_ceh_error_info *error = conteiner.errors; STF_ASSERT_EQUAL( error->code, 1 ); error = error->next_error; STF_ASSERT_EQUAL( error->code, 2 ); error = error->next_error; STF_ASSERT_EQUAL( error->code, 3 ); error = error->next_error; STF_ASSERT_EQUAL( error->code, 4 ); error = error->next_error; STF_ASSERT_PTR_NULL( error ); fcml_fn_ceh_free_errors_only_with_level( &conteiner, FCML_EN_CEH_EL_ERROR ); error = conteiner.errors; STF_ASSERT_EQUAL( error->code, 3 ); error = error->next_error; STF_ASSERT_EQUAL( error->code, 4 ); error = error->next_error; STF_ASSERT_PTR_NULL( error ); fcml_fn_ceh_free_errors_only_with_level( &conteiner, FCML_EN_CEH_EL_WARN ); STF_ASSERT_PTR_NULL( conteiner.errors ); STF_ASSERT_PTR_NULL( conteiner.last_error ); } void fcml_tf_ceh_test_remove_errors(void) { fcml_st_ceh_error_container conteiner = { NULL }; STF_ASSERT_PTR_NOT_NULL( fcml_fn_ceh_add_error( &conteiner, "Message 1.", 1, FCML_EN_CEH_EL_ERROR ) ); STF_ASSERT_PTR_NOT_NULL( fcml_fn_ceh_add_error( &conteiner, "Message 2.", 2, FCML_EN_CEH_EL_ERROR ) ); STF_ASSERT_PTR_NOT_NULL( fcml_fn_ceh_add_error( &conteiner, "Message 3.", 3, FCML_EN_CEH_EL_WARN ) ); STF_ASSERT_PTR_NOT_NULL( fcml_fn_ceh_add_error( &conteiner, "Message 4.", 4, FCML_EN_CEH_EL_WARN ) ); fcml_st_ceh_error_info *error = conteiner.errors; STF_ASSERT_EQUAL( error->code, 1 ); error = error->next_error; STF_ASSERT_EQUAL( error->code, 2 ); error = error->next_error; STF_ASSERT_EQUAL( error->code, 3 ); error = error->next_error; STF_ASSERT_EQUAL( error->code, 4 ); error = error->next_error; STF_ASSERT_PTR_NULL( error ); fcml_fn_ceh_free_errors_only( &conteiner ); STF_ASSERT_PTR_NULL( conteiner.errors ); STF_ASSERT_PTR_NULL( conteiner.last_error ); } void fcml_tf_ceh_test_move(void) { fcml_st_ceh_error_container conteiner = { NULL }; fcml_st_ceh_error_container conteiner_next = { NULL }; STF_ASSERT_PTR_NOT_NULL( fcml_fn_ceh_add_error( &conteiner, "Message 1.", 1, FCML_EN_CEH_EL_ERROR ) ); STF_ASSERT_PTR_NOT_NULL( fcml_fn_ceh_add_error( &conteiner, "Message 2.", 2, FCML_EN_CEH_EL_ERROR ) ); STF_ASSERT_PTR_NOT_NULL( fcml_fn_ceh_add_error( &conteiner, "Message 3.", 3, FCML_EN_CEH_EL_WARN ) ); STF_ASSERT_PTR_NOT_NULL( fcml_fn_ceh_add_error( &conteiner, "Message 4.", 4, FCML_EN_CEH_EL_WARN ) ); fcml_st_ceh_error_info *error = conteiner.errors; STF_ASSERT_EQUAL( error->code, 1 ); error = error->next_error; STF_ASSERT_EQUAL( error->code, 2 ); error = error->next_error; STF_ASSERT_EQUAL( error->code, 3 ); error = error->next_error; STF_ASSERT_EQUAL( error->code, 4 ); error = error->next_error; STF_ASSERT_PTR_NULL( error ); fcml_fn_ceh_move_errors( &conteiner_next, &conteiner ); STF_ASSERT_PTR_NULL( conteiner.errors ); STF_ASSERT_PTR_NULL( conteiner.last_error ); error = conteiner_next.errors; STF_ASSERT_EQUAL( error->code, 1 ); error = error->next_error; STF_ASSERT_EQUAL( error->code, 2 ); error = error->next_error; STF_ASSERT_EQUAL( error->code, 3 ); error = error->next_error; STF_ASSERT_EQUAL( error->code, 4 ); error = error->next_error; STF_ASSERT_PTR_NULL( error ); fcml_fn_ceh_free_errors_only( &conteiner_next ); } fcml_stf_test_case fcml_ti_ceh[] = { { "fcml_tf_ceh_test_remove_errors_by_level", fcml_tf_ceh_test_remove_errors_by_level }, { "fcml_tf_ceh_test_remove_errors", fcml_tf_ceh_test_remove_errors }, { "fcml_tf_ceh_test_move", fcml_tf_ceh_test_move }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_ceh = { "suite-fcml-ceh", fcml_tf_ceh_suite_init, fcml_tf_ceh_suite_cleanup, fcml_ti_ceh }; fcml-1.1.1/check/internal-tests/symbols_t.c0000644000175000017500000000321712560745216015577 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include "symbols_t.h" #include fcml_bool fcml_tf_symbols_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_symbols_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_symbols_alloc() { fcml_st_symbol_table table = fcml_fn_symbol_table_alloc(); STF_ASSERT_PTR_NOT_NULL( table ); if( table ) { fcml_st_symbol *symbol = fcml_fn_symbol_alloc( "MAX_PATH", 256 ); STF_ASSERT_PTR_NOT_NULL( symbol ); if( symbol ) { STF_ASSERT_EQUAL( fcml_fn_symbol_add( table, symbol ), FCML_CEH_GEC_NO_ERROR ); } fcml_fn_symbol_table_free( table ); } } fcml_stf_test_case fctl_ti_symbols[] = { { "fcml_tf_symbols_alloc", fcml_tf_symbols_alloc }, }; fcml_stf_test_suite fctl_si_symbols = { "suite-symbols", fcml_tf_symbols_suite_init, fcml_tf_symbols_suite_cleanup, fctl_ti_symbols }; fcml-1.1.1/check/internal-tests/common_utils_t.h0000644000175000017500000000174512560745216016630 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 COMMON_UTILS_T_H_ #define COMMON_UTILS_T_H_ #include extern fcml_stf_test_suite fcml_si_common_utils; #endif /* COMMON_UTILS_T_H_ */ fcml-1.1.1/check/internal-tests/modrm_encoder_t.h0000644000175000017500000000175112560745216016732 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 MODRM_ENCODER_T_H_ #define MODRM_ENCODER_T_H_ #include extern fcml_stf_test_suite fctl_si_modrm_encoder; #endif /* MODRM_ENCODER_T_H_ */ fcml-1.1.1/check/internal-tests/common_utils_t.c0000644000175000017500000000330712560745216016617 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 "common_utils_t.h" #include fcml_bool fcml_tf_common_utils_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_common_utils_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_common_utils_instruction_cloning(void) { fcml_st_instruction instruction = {0}; instruction.mnemonic = "adc"; fcml_st_instruction *cloned = (fcml_st_instruction*)fcml_fn_cu_clone_instruction( &instruction ); STF_ASSERT_PTR_NOT_NULL( cloned ); STF_ASSERT_STRING_EQUAL( "adc", cloned->mnemonic ); fcml_fn_cu_free_instruction( cloned ); } fcml_stf_test_case fcml_ti_common_utils[] = { { "fcml_tf_common_utils_instruction_cloning", fcml_tf_common_utils_instruction_cloning }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_common_utils = { "suite-fcml-common-utils", fcml_tf_common_utils_suite_init, fcml_tf_common_utils_suite_cleanup, fcml_ti_common_utils }; fcml-1.1.1/check/internal-tests/Makefile.in0000644000175000017500000017564412561443455015504 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # 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, # 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. @SET_MAKE@ VPATH = @srcdir@ 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 \ ?) ;; \ *) 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@ pkglibexecdir = $(libexecdir)/@PACKAGE@ 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 = @build@ host_triplet = @host@ noinst_PROGRAMS = fcml_internal_check$(EXEEXT) TESTS = $(am__EXEEXT_1) subdir = check/internal-tests 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 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.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 = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_fcml_internal_check_OBJECTS = fcml_internal_check-main.$(OBJEXT) \ fcml_internal_check-coll_t.$(OBJEXT) \ fcml_internal_check-gas_parser_t.$(OBJEXT) \ fcml_internal_check-intel_parser_t.$(OBJEXT) \ fcml_internal_check-mnemonic_parser_t.$(OBJEXT) \ fcml_internal_check-modrm_decoder_t.$(OBJEXT) \ fcml_internal_check-modrm_encoder_t.$(OBJEXT) \ fcml_internal_check-stream_t.$(OBJEXT) \ fcml_internal_check-utils_t.$(OBJEXT) \ fcml_internal_check-lag_assembler_t.$(OBJEXT) \ fcml_internal_check-env_t.$(OBJEXT) \ fcml_internal_check-ceh_t.$(OBJEXT) \ fcml_internal_check-common_utils_t.$(OBJEXT) \ fcml_internal_check-symbols_t.$(OBJEXT) fcml_internal_check_OBJECTS = $(am_fcml_internal_check_OBJECTS) fcml_internal_check_DEPENDENCIES = $(top_srcdir)/check/stf/libstf.la \ $(top_srcdir)/src/libfcml.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = 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)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=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 = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=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 = SOURCES = $(fcml_internal_check_SOURCES) DIST_SOURCES = $(fcml_internal_check_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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 am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck am__EXEEXT_1 = fcml_internal_check$(EXEEXT) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) 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@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FCML_IMPORT_LIB = @FCML_IMPORT_LIB@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ 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@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ 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@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # Include all tests. fcml_internal_check_SOURCES = main.c \ coll_t.c \ coll_t.h \ gas_parser_t.c \ gas_parser_t.h \ intel_parser_t.c \ intel_parser_t.h \ mnemonic_parser_t.c \ mnemonic_parser_t.h \ modrm_decoder_t.c \ modrm_decoder_t.h \ modrm_encoder_t.c \ modrm_encoder_t.h \ stream_t.c \ stream_t.h \ utils_t.c \ utils_t.h \ lag_assembler_t.c \ lag_assembler_t.h \ env_t.c \ env_t.h \ ceh_t.c \ ceh_t.h \ common_utils_t.c \ common_utils_t.h \ symbols_t.h \ symbols_t.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 $(top_srcdir)/src/libfcml.la check_SCRIPTS = fcml_internal_check all: all-am .SUFFIXES: .SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: $(srcdir)/Makefile.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) --gnu check/internal-tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu check/internal-tests/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_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-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list fcml_internal_check$(EXEEXT): $(fcml_internal_check_OBJECTS) $(fcml_internal_check_DEPENDENCIES) $(EXTRA_fcml_internal_check_DEPENDENCIES) @rm -f fcml_internal_check$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fcml_internal_check_OBJECTS) $(fcml_internal_check_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_internal_check-ceh_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_internal_check-coll_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_internal_check-common_utils_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_internal_check-env_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_internal_check-gas_parser_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_internal_check-intel_parser_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_internal_check-lag_assembler_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_internal_check-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_internal_check-mnemonic_parser_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_internal_check-modrm_decoder_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_internal_check-modrm_encoder_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_internal_check-stream_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_internal_check-symbols_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_internal_check-utils_t.Po@am__quote@ .c.o: @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@ $(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 -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< fcml_internal_check-main.o: main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-main.o -MD -MP -MF $(DEPDIR)/fcml_internal_check-main.Tpo -c -o fcml_internal_check-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-main.Tpo $(DEPDIR)/fcml_internal_check-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='fcml_internal_check-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c fcml_internal_check-main.obj: main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-main.obj -MD -MP -MF $(DEPDIR)/fcml_internal_check-main.Tpo -c -o fcml_internal_check-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-main.Tpo $(DEPDIR)/fcml_internal_check-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='fcml_internal_check-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` fcml_internal_check-coll_t.o: coll_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-coll_t.o -MD -MP -MF $(DEPDIR)/fcml_internal_check-coll_t.Tpo -c -o fcml_internal_check-coll_t.o `test -f 'coll_t.c' || echo '$(srcdir)/'`coll_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-coll_t.Tpo $(DEPDIR)/fcml_internal_check-coll_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='coll_t.c' object='fcml_internal_check-coll_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-coll_t.o `test -f 'coll_t.c' || echo '$(srcdir)/'`coll_t.c fcml_internal_check-coll_t.obj: coll_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-coll_t.obj -MD -MP -MF $(DEPDIR)/fcml_internal_check-coll_t.Tpo -c -o fcml_internal_check-coll_t.obj `if test -f 'coll_t.c'; then $(CYGPATH_W) 'coll_t.c'; else $(CYGPATH_W) '$(srcdir)/coll_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-coll_t.Tpo $(DEPDIR)/fcml_internal_check-coll_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='coll_t.c' object='fcml_internal_check-coll_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-coll_t.obj `if test -f 'coll_t.c'; then $(CYGPATH_W) 'coll_t.c'; else $(CYGPATH_W) '$(srcdir)/coll_t.c'; fi` fcml_internal_check-gas_parser_t.o: gas_parser_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-gas_parser_t.o -MD -MP -MF $(DEPDIR)/fcml_internal_check-gas_parser_t.Tpo -c -o fcml_internal_check-gas_parser_t.o `test -f 'gas_parser_t.c' || echo '$(srcdir)/'`gas_parser_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-gas_parser_t.Tpo $(DEPDIR)/fcml_internal_check-gas_parser_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gas_parser_t.c' object='fcml_internal_check-gas_parser_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-gas_parser_t.o `test -f 'gas_parser_t.c' || echo '$(srcdir)/'`gas_parser_t.c fcml_internal_check-gas_parser_t.obj: gas_parser_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-gas_parser_t.obj -MD -MP -MF $(DEPDIR)/fcml_internal_check-gas_parser_t.Tpo -c -o fcml_internal_check-gas_parser_t.obj `if test -f 'gas_parser_t.c'; then $(CYGPATH_W) 'gas_parser_t.c'; else $(CYGPATH_W) '$(srcdir)/gas_parser_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-gas_parser_t.Tpo $(DEPDIR)/fcml_internal_check-gas_parser_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gas_parser_t.c' object='fcml_internal_check-gas_parser_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-gas_parser_t.obj `if test -f 'gas_parser_t.c'; then $(CYGPATH_W) 'gas_parser_t.c'; else $(CYGPATH_W) '$(srcdir)/gas_parser_t.c'; fi` fcml_internal_check-intel_parser_t.o: intel_parser_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-intel_parser_t.o -MD -MP -MF $(DEPDIR)/fcml_internal_check-intel_parser_t.Tpo -c -o fcml_internal_check-intel_parser_t.o `test -f 'intel_parser_t.c' || echo '$(srcdir)/'`intel_parser_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-intel_parser_t.Tpo $(DEPDIR)/fcml_internal_check-intel_parser_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intel_parser_t.c' object='fcml_internal_check-intel_parser_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-intel_parser_t.o `test -f 'intel_parser_t.c' || echo '$(srcdir)/'`intel_parser_t.c fcml_internal_check-intel_parser_t.obj: intel_parser_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-intel_parser_t.obj -MD -MP -MF $(DEPDIR)/fcml_internal_check-intel_parser_t.Tpo -c -o fcml_internal_check-intel_parser_t.obj `if test -f 'intel_parser_t.c'; then $(CYGPATH_W) 'intel_parser_t.c'; else $(CYGPATH_W) '$(srcdir)/intel_parser_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-intel_parser_t.Tpo $(DEPDIR)/fcml_internal_check-intel_parser_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='intel_parser_t.c' object='fcml_internal_check-intel_parser_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-intel_parser_t.obj `if test -f 'intel_parser_t.c'; then $(CYGPATH_W) 'intel_parser_t.c'; else $(CYGPATH_W) '$(srcdir)/intel_parser_t.c'; fi` fcml_internal_check-mnemonic_parser_t.o: mnemonic_parser_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-mnemonic_parser_t.o -MD -MP -MF $(DEPDIR)/fcml_internal_check-mnemonic_parser_t.Tpo -c -o fcml_internal_check-mnemonic_parser_t.o `test -f 'mnemonic_parser_t.c' || echo '$(srcdir)/'`mnemonic_parser_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-mnemonic_parser_t.Tpo $(DEPDIR)/fcml_internal_check-mnemonic_parser_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mnemonic_parser_t.c' object='fcml_internal_check-mnemonic_parser_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-mnemonic_parser_t.o `test -f 'mnemonic_parser_t.c' || echo '$(srcdir)/'`mnemonic_parser_t.c fcml_internal_check-mnemonic_parser_t.obj: mnemonic_parser_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-mnemonic_parser_t.obj -MD -MP -MF $(DEPDIR)/fcml_internal_check-mnemonic_parser_t.Tpo -c -o fcml_internal_check-mnemonic_parser_t.obj `if test -f 'mnemonic_parser_t.c'; then $(CYGPATH_W) 'mnemonic_parser_t.c'; else $(CYGPATH_W) '$(srcdir)/mnemonic_parser_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-mnemonic_parser_t.Tpo $(DEPDIR)/fcml_internal_check-mnemonic_parser_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mnemonic_parser_t.c' object='fcml_internal_check-mnemonic_parser_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-mnemonic_parser_t.obj `if test -f 'mnemonic_parser_t.c'; then $(CYGPATH_W) 'mnemonic_parser_t.c'; else $(CYGPATH_W) '$(srcdir)/mnemonic_parser_t.c'; fi` fcml_internal_check-modrm_decoder_t.o: modrm_decoder_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-modrm_decoder_t.o -MD -MP -MF $(DEPDIR)/fcml_internal_check-modrm_decoder_t.Tpo -c -o fcml_internal_check-modrm_decoder_t.o `test -f 'modrm_decoder_t.c' || echo '$(srcdir)/'`modrm_decoder_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-modrm_decoder_t.Tpo $(DEPDIR)/fcml_internal_check-modrm_decoder_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='modrm_decoder_t.c' object='fcml_internal_check-modrm_decoder_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-modrm_decoder_t.o `test -f 'modrm_decoder_t.c' || echo '$(srcdir)/'`modrm_decoder_t.c fcml_internal_check-modrm_decoder_t.obj: modrm_decoder_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-modrm_decoder_t.obj -MD -MP -MF $(DEPDIR)/fcml_internal_check-modrm_decoder_t.Tpo -c -o fcml_internal_check-modrm_decoder_t.obj `if test -f 'modrm_decoder_t.c'; then $(CYGPATH_W) 'modrm_decoder_t.c'; else $(CYGPATH_W) '$(srcdir)/modrm_decoder_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-modrm_decoder_t.Tpo $(DEPDIR)/fcml_internal_check-modrm_decoder_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='modrm_decoder_t.c' object='fcml_internal_check-modrm_decoder_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-modrm_decoder_t.obj `if test -f 'modrm_decoder_t.c'; then $(CYGPATH_W) 'modrm_decoder_t.c'; else $(CYGPATH_W) '$(srcdir)/modrm_decoder_t.c'; fi` fcml_internal_check-modrm_encoder_t.o: modrm_encoder_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-modrm_encoder_t.o -MD -MP -MF $(DEPDIR)/fcml_internal_check-modrm_encoder_t.Tpo -c -o fcml_internal_check-modrm_encoder_t.o `test -f 'modrm_encoder_t.c' || echo '$(srcdir)/'`modrm_encoder_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-modrm_encoder_t.Tpo $(DEPDIR)/fcml_internal_check-modrm_encoder_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='modrm_encoder_t.c' object='fcml_internal_check-modrm_encoder_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-modrm_encoder_t.o `test -f 'modrm_encoder_t.c' || echo '$(srcdir)/'`modrm_encoder_t.c fcml_internal_check-modrm_encoder_t.obj: modrm_encoder_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-modrm_encoder_t.obj -MD -MP -MF $(DEPDIR)/fcml_internal_check-modrm_encoder_t.Tpo -c -o fcml_internal_check-modrm_encoder_t.obj `if test -f 'modrm_encoder_t.c'; then $(CYGPATH_W) 'modrm_encoder_t.c'; else $(CYGPATH_W) '$(srcdir)/modrm_encoder_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-modrm_encoder_t.Tpo $(DEPDIR)/fcml_internal_check-modrm_encoder_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='modrm_encoder_t.c' object='fcml_internal_check-modrm_encoder_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-modrm_encoder_t.obj `if test -f 'modrm_encoder_t.c'; then $(CYGPATH_W) 'modrm_encoder_t.c'; else $(CYGPATH_W) '$(srcdir)/modrm_encoder_t.c'; fi` fcml_internal_check-stream_t.o: stream_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-stream_t.o -MD -MP -MF $(DEPDIR)/fcml_internal_check-stream_t.Tpo -c -o fcml_internal_check-stream_t.o `test -f 'stream_t.c' || echo '$(srcdir)/'`stream_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-stream_t.Tpo $(DEPDIR)/fcml_internal_check-stream_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stream_t.c' object='fcml_internal_check-stream_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-stream_t.o `test -f 'stream_t.c' || echo '$(srcdir)/'`stream_t.c fcml_internal_check-stream_t.obj: stream_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-stream_t.obj -MD -MP -MF $(DEPDIR)/fcml_internal_check-stream_t.Tpo -c -o fcml_internal_check-stream_t.obj `if test -f 'stream_t.c'; then $(CYGPATH_W) 'stream_t.c'; else $(CYGPATH_W) '$(srcdir)/stream_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-stream_t.Tpo $(DEPDIR)/fcml_internal_check-stream_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stream_t.c' object='fcml_internal_check-stream_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-stream_t.obj `if test -f 'stream_t.c'; then $(CYGPATH_W) 'stream_t.c'; else $(CYGPATH_W) '$(srcdir)/stream_t.c'; fi` fcml_internal_check-utils_t.o: utils_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-utils_t.o -MD -MP -MF $(DEPDIR)/fcml_internal_check-utils_t.Tpo -c -o fcml_internal_check-utils_t.o `test -f 'utils_t.c' || echo '$(srcdir)/'`utils_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-utils_t.Tpo $(DEPDIR)/fcml_internal_check-utils_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utils_t.c' object='fcml_internal_check-utils_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-utils_t.o `test -f 'utils_t.c' || echo '$(srcdir)/'`utils_t.c fcml_internal_check-utils_t.obj: utils_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-utils_t.obj -MD -MP -MF $(DEPDIR)/fcml_internal_check-utils_t.Tpo -c -o fcml_internal_check-utils_t.obj `if test -f 'utils_t.c'; then $(CYGPATH_W) 'utils_t.c'; else $(CYGPATH_W) '$(srcdir)/utils_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-utils_t.Tpo $(DEPDIR)/fcml_internal_check-utils_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utils_t.c' object='fcml_internal_check-utils_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-utils_t.obj `if test -f 'utils_t.c'; then $(CYGPATH_W) 'utils_t.c'; else $(CYGPATH_W) '$(srcdir)/utils_t.c'; fi` fcml_internal_check-lag_assembler_t.o: lag_assembler_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-lag_assembler_t.o -MD -MP -MF $(DEPDIR)/fcml_internal_check-lag_assembler_t.Tpo -c -o fcml_internal_check-lag_assembler_t.o `test -f 'lag_assembler_t.c' || echo '$(srcdir)/'`lag_assembler_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-lag_assembler_t.Tpo $(DEPDIR)/fcml_internal_check-lag_assembler_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lag_assembler_t.c' object='fcml_internal_check-lag_assembler_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-lag_assembler_t.o `test -f 'lag_assembler_t.c' || echo '$(srcdir)/'`lag_assembler_t.c fcml_internal_check-lag_assembler_t.obj: lag_assembler_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-lag_assembler_t.obj -MD -MP -MF $(DEPDIR)/fcml_internal_check-lag_assembler_t.Tpo -c -o fcml_internal_check-lag_assembler_t.obj `if test -f 'lag_assembler_t.c'; then $(CYGPATH_W) 'lag_assembler_t.c'; else $(CYGPATH_W) '$(srcdir)/lag_assembler_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-lag_assembler_t.Tpo $(DEPDIR)/fcml_internal_check-lag_assembler_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lag_assembler_t.c' object='fcml_internal_check-lag_assembler_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-lag_assembler_t.obj `if test -f 'lag_assembler_t.c'; then $(CYGPATH_W) 'lag_assembler_t.c'; else $(CYGPATH_W) '$(srcdir)/lag_assembler_t.c'; fi` fcml_internal_check-env_t.o: env_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-env_t.o -MD -MP -MF $(DEPDIR)/fcml_internal_check-env_t.Tpo -c -o fcml_internal_check-env_t.o `test -f 'env_t.c' || echo '$(srcdir)/'`env_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-env_t.Tpo $(DEPDIR)/fcml_internal_check-env_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='env_t.c' object='fcml_internal_check-env_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-env_t.o `test -f 'env_t.c' || echo '$(srcdir)/'`env_t.c fcml_internal_check-env_t.obj: env_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-env_t.obj -MD -MP -MF $(DEPDIR)/fcml_internal_check-env_t.Tpo -c -o fcml_internal_check-env_t.obj `if test -f 'env_t.c'; then $(CYGPATH_W) 'env_t.c'; else $(CYGPATH_W) '$(srcdir)/env_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-env_t.Tpo $(DEPDIR)/fcml_internal_check-env_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='env_t.c' object='fcml_internal_check-env_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-env_t.obj `if test -f 'env_t.c'; then $(CYGPATH_W) 'env_t.c'; else $(CYGPATH_W) '$(srcdir)/env_t.c'; fi` fcml_internal_check-ceh_t.o: ceh_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-ceh_t.o -MD -MP -MF $(DEPDIR)/fcml_internal_check-ceh_t.Tpo -c -o fcml_internal_check-ceh_t.o `test -f 'ceh_t.c' || echo '$(srcdir)/'`ceh_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-ceh_t.Tpo $(DEPDIR)/fcml_internal_check-ceh_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ceh_t.c' object='fcml_internal_check-ceh_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-ceh_t.o `test -f 'ceh_t.c' || echo '$(srcdir)/'`ceh_t.c fcml_internal_check-ceh_t.obj: ceh_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-ceh_t.obj -MD -MP -MF $(DEPDIR)/fcml_internal_check-ceh_t.Tpo -c -o fcml_internal_check-ceh_t.obj `if test -f 'ceh_t.c'; then $(CYGPATH_W) 'ceh_t.c'; else $(CYGPATH_W) '$(srcdir)/ceh_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-ceh_t.Tpo $(DEPDIR)/fcml_internal_check-ceh_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ceh_t.c' object='fcml_internal_check-ceh_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-ceh_t.obj `if test -f 'ceh_t.c'; then $(CYGPATH_W) 'ceh_t.c'; else $(CYGPATH_W) '$(srcdir)/ceh_t.c'; fi` fcml_internal_check-common_utils_t.o: common_utils_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-common_utils_t.o -MD -MP -MF $(DEPDIR)/fcml_internal_check-common_utils_t.Tpo -c -o fcml_internal_check-common_utils_t.o `test -f 'common_utils_t.c' || echo '$(srcdir)/'`common_utils_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-common_utils_t.Tpo $(DEPDIR)/fcml_internal_check-common_utils_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common_utils_t.c' object='fcml_internal_check-common_utils_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-common_utils_t.o `test -f 'common_utils_t.c' || echo '$(srcdir)/'`common_utils_t.c fcml_internal_check-common_utils_t.obj: common_utils_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-common_utils_t.obj -MD -MP -MF $(DEPDIR)/fcml_internal_check-common_utils_t.Tpo -c -o fcml_internal_check-common_utils_t.obj `if test -f 'common_utils_t.c'; then $(CYGPATH_W) 'common_utils_t.c'; else $(CYGPATH_W) '$(srcdir)/common_utils_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-common_utils_t.Tpo $(DEPDIR)/fcml_internal_check-common_utils_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common_utils_t.c' object='fcml_internal_check-common_utils_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-common_utils_t.obj `if test -f 'common_utils_t.c'; then $(CYGPATH_W) 'common_utils_t.c'; else $(CYGPATH_W) '$(srcdir)/common_utils_t.c'; fi` fcml_internal_check-symbols_t.o: symbols_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-symbols_t.o -MD -MP -MF $(DEPDIR)/fcml_internal_check-symbols_t.Tpo -c -o fcml_internal_check-symbols_t.o `test -f 'symbols_t.c' || echo '$(srcdir)/'`symbols_t.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-symbols_t.Tpo $(DEPDIR)/fcml_internal_check-symbols_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='symbols_t.c' object='fcml_internal_check-symbols_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-symbols_t.o `test -f 'symbols_t.c' || echo '$(srcdir)/'`symbols_t.c fcml_internal_check-symbols_t.obj: symbols_t.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_internal_check-symbols_t.obj -MD -MP -MF $(DEPDIR)/fcml_internal_check-symbols_t.Tpo -c -o fcml_internal_check-symbols_t.obj `if test -f 'symbols_t.c'; then $(CYGPATH_W) 'symbols_t.c'; else $(CYGPATH_W) '$(srcdir)/symbols_t.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_internal_check-symbols_t.Tpo $(DEPDIR)/fcml_internal_check-symbols_t.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='symbols_t.c' object='fcml_internal_check-symbols_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_internal_check_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_internal_check-symbols_t.obj `if test -f 'symbols_t.c'; then $(CYGPATH_W) 'symbols_t.c'; else $(CYGPATH_W) '$(srcdir)/symbols_t.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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 # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all $(check_SCRIPTS) @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? fcml_internal_check.log: fcml_internal_check$(EXEEXT) @p='fcml_internal_check$(EXEEXT)'; \ b='fcml_internal_check'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) 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 $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(PROGRAMS) 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: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: 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." clean: clean-am clean-am: clean-generic clean-libtool 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 \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ clean-generic clean-libtool clean-noinstPROGRAMS cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool 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 mostlyclean-libtool pdf pdf-am ps ps-am \ recheck tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Just in case, to rebuild missing files. fcml_intel_lexer.c fcml_intel_lexer.h: $(MAKE) $(AM_MAKEFLAGS) -C $(top_srcdir)/src fcml_intel_lexer.c fcml_gas_lexer.c fcml_gas_lexer.h: $(MAKE) $(AM_MAKEFLAGS) -C $(top_srcdir)/src fcml_gas_lexer.c fcml_intel_parser_def.h fcml_intel_parser_def.c: $(MAKE) $(AM_MAKEFLAGS) -C $(top_srcdir)/src fcml_intel_parser_def.y fcml_gas_parser_def.h fcml_gas_parser_def.c: $(MAKE) $(AM_MAKEFLAGS) -C $(top_srcdir)/src fcml_gas_parser_def.y # 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: fcml-1.1.1/check/internal-tests/intel_parser_t.h0000644000175000017500000000175612560745216016611 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_INTEL_PARSER_H_ #define FCML_INTEL_PARSER_H_ #include extern fcml_stf_test_suite fcml_si_intel_parser; #endif /* FCML_INTEL_PARSER_H_ */ fcml-1.1.1/check/internal-tests/gas_parser_t.h0000644000175000017500000000175412560745216016246 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_GAS_PARSER_T_H_ #define FCML_GAS_PARSER_T_H_ #include extern fcml_stf_test_suite fcml_si_gas_parser; #endif /* FCML_GAS_PARSER_T_H_ */ fcml-1.1.1/check/internal-tests/coll_t.h0000644000175000017500000000172412560745216015046 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_COLL_T_H_ #define FCML_COLL_T_H_ #include extern fcml_stf_test_suite fcml_si_coll; #endif /* FCML_COLL_T_H_ */ fcml-1.1.1/check/internal-tests/stream_t.c0000644000175000017500000004425412560745216015410 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include #include "stream_t.h" fcml_uint8_t buffer[128]; fcml_bool fcml_tf_stream_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_stream_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_stream_read_byte(void) { buffer[0] = 1; buffer[1] = 2; buffer[2] = 3; buffer[3] = 4; fcml_st_memory_stream stream; stream.base_address = buffer; stream.offset = 0; stream.size = 4; fcml_bool result; fcml_uint8_t data; data = fcml_fn_stream_read( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 1 ); data = fcml_fn_stream_read( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 2 ); data = fcml_fn_stream_read( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 3 ); data = fcml_fn_stream_read( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 4 ); data = fcml_fn_stream_read( &stream, &result ); STF_ASSERT( result == FCML_FALSE ); stream.base_address = buffer; stream.offset = 0; stream.size = 0; data = fcml_fn_stream_read( &stream, &result ); STF_ASSERT( result == FCML_FALSE ); } void fcml_tf_stream_write_byte(void) { memset( buffer, 0, sizeof( buffer ) ); fcml_st_memory_stream stream; stream.base_address = buffer; stream.offset = 0; stream.size = 4; fcml_bool result; result = fcml_fn_stream_write( &stream, 1 ); STF_ASSERT( result == FCML_TRUE ); result = fcml_fn_stream_write( &stream, 2 ); STF_ASSERT( result == FCML_TRUE ); result = fcml_fn_stream_write( &stream, 3 ); STF_ASSERT( result == FCML_TRUE ); result = fcml_fn_stream_write( &stream, 4 ); STF_ASSERT( result == FCML_TRUE ); result = fcml_fn_stream_write( &stream, 5 ); STF_ASSERT( result == FCML_FALSE ); STF_ASSERT(buffer[0] == 1); STF_ASSERT(buffer[1] == 2); STF_ASSERT(buffer[2] == 3); STF_ASSERT(buffer[3] == 4); stream.base_address = buffer; stream.offset = 0; stream.size = 0; result = fcml_fn_stream_write( &stream, 1 ); STF_ASSERT( result == FCML_FALSE ); } void fcml_tf_stream_read_word(void) { buffer[0] = 1; buffer[1] = 2; buffer[2] = 3; buffer[3] = 4; buffer[4] = 5; buffer[5] = 6; buffer[6] = 7; buffer[7] = 8; fcml_st_memory_stream stream; stream.base_address = buffer; stream.offset = 0; stream.size = 8; fcml_bool result; fcml_uint16_t data; data = fcml_fn_stream_read_word( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 0x0201 ); data = fcml_fn_stream_read_word( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 0x0403 ); data = fcml_fn_stream_read_word( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 0x0605 ); data = fcml_fn_stream_read_word( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 0x0807 ); data = fcml_fn_stream_read_word( &stream, &result ); STF_ASSERT( result == FCML_FALSE ); stream.base_address = buffer; stream.offset = 0; stream.size = 1; data = fcml_fn_stream_read_word( &stream, &result ); STF_ASSERT( result == FCML_FALSE ); stream.base_address = buffer; stream.offset = 0; stream.size = 0; data = fcml_fn_stream_read_word( &stream, &result ); STF_ASSERT( result == FCML_FALSE ); stream.base_address = buffer; stream.offset = 0; stream.size = 2; data = fcml_fn_stream_read_word( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 0x0201 ); } void fcml_tf_stream_write_word(void) { memset( buffer, 0, sizeof( buffer ) ); fcml_st_memory_stream stream; stream.base_address = buffer; stream.offset = 0; stream.size = 8; fcml_bool result; result = fcml_fn_stream_write_word( &stream, 0x0201 ); STF_ASSERT( result == FCML_TRUE ); result = fcml_fn_stream_write_word( &stream, 0x0403 ); STF_ASSERT( result == FCML_TRUE ); result = fcml_fn_stream_write_word( &stream, 0x0605 ); STF_ASSERT( result == FCML_TRUE ); result = fcml_fn_stream_write_word( &stream, 0x0807 ); STF_ASSERT( result == FCML_TRUE ); result = fcml_fn_stream_write_word( &stream, 0x0F09 ); STF_ASSERT( result == FCML_FALSE ); STF_ASSERT(buffer[0] == 1); STF_ASSERT(buffer[1] == 2); STF_ASSERT(buffer[2] == 3); STF_ASSERT(buffer[3] == 4); STF_ASSERT(buffer[4] == 5); STF_ASSERT(buffer[5] == 6); STF_ASSERT(buffer[6] == 7); STF_ASSERT(buffer[7] == 8); stream.base_address = buffer; stream.offset = 0; stream.size = 0; result = fcml_fn_stream_write_word( &stream, 0x0102 ); STF_ASSERT( result == FCML_FALSE ); stream.base_address = buffer; stream.offset = 0; stream.size = 1; result = fcml_fn_stream_write_word( &stream, 0x0102 ); STF_ASSERT( result == FCML_FALSE ); stream.base_address = buffer; stream.offset = 0; stream.size = 2; result = fcml_fn_stream_write_word( &stream, 0x0A0B ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT(buffer[0] == 0x0B); STF_ASSERT(buffer[1] == 0x0A); } void fcml_tf_stream_read_dword(void) { buffer[0] = 1; buffer[1] = 2; buffer[2] = 3; buffer[3] = 4; buffer[4] = 5; buffer[5] = 6; buffer[6] = 7; buffer[7] = 8; fcml_st_memory_stream stream; stream.base_address = buffer; stream.offset = 0; stream.size = 8; fcml_bool result; fcml_uint32_t data; data = fcml_fn_stream_read_dword( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 0x04030201 ); data = fcml_fn_stream_read_dword( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 0x08070605 ); data = fcml_fn_stream_read_dword( &stream, &result ); STF_ASSERT( result == FCML_FALSE ); stream.base_address = buffer; stream.offset = 0; stream.size = 0; data = fcml_fn_stream_read_dword( &stream, &result ); STF_ASSERT( result == FCML_FALSE ); stream.base_address = buffer; stream.offset = 0; stream.size = 3; data = fcml_fn_stream_read_dword( &stream, &result ); STF_ASSERT( result == FCML_FALSE ); stream.base_address = buffer; stream.offset = 0; stream.size = 4; data = fcml_fn_stream_read_dword( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 0x04030201 ); } void fcml_tf_stream_write_dword(void) { memset( buffer, 0, sizeof( buffer ) ); fcml_st_memory_stream stream; stream.base_address = buffer; stream.offset = 0; stream.size = 8; fcml_bool result; result = fcml_fn_stream_write_dword( &stream, 0x04030201 ); STF_ASSERT( result == FCML_TRUE ); result = fcml_fn_stream_write_dword( &stream, 0x08070605 ); STF_ASSERT( result == FCML_TRUE ); result = fcml_fn_stream_write_dword( &stream, 0x090A0B0C ); STF_ASSERT( result == FCML_FALSE ); STF_ASSERT(buffer[0] == 1); STF_ASSERT(buffer[1] == 2); STF_ASSERT(buffer[2] == 3); STF_ASSERT(buffer[3] == 4); STF_ASSERT(buffer[4] == 5); STF_ASSERT(buffer[5] == 6); STF_ASSERT(buffer[6] == 7); STF_ASSERT(buffer[7] == 8); stream.base_address = buffer; stream.offset = 0; stream.size = 0; result = fcml_fn_stream_write_dword( &stream, 0x01020304 ); STF_ASSERT( result == FCML_FALSE ); stream.base_address = buffer; stream.offset = 0; stream.size = 3; result = fcml_fn_stream_write_dword( &stream, 0x01020304 ); STF_ASSERT( result == FCML_FALSE ); stream.base_address = buffer; stream.offset = 0; stream.size = 4; result = fcml_fn_stream_write_dword( &stream, 0x0A0B0C0D ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT(buffer[0] == 0x0D); STF_ASSERT(buffer[1] == 0x0C); STF_ASSERT(buffer[2] == 0x0B); STF_ASSERT(buffer[3] == 0x0A); } void fcml_tf_stream_read_qword(void) { buffer[0] = 1; buffer[1] = 2; buffer[2] = 3; buffer[3] = 4; buffer[4] = 5; buffer[5] = 6; buffer[6] = 7; buffer[7] = 8; buffer[8] = 9; buffer[9] = 10; buffer[10] = 11; buffer[11] = 12; buffer[12] = 13; buffer[13] = 14; buffer[14] = 15; buffer[15] = 0; fcml_st_memory_stream stream; stream.base_address = buffer; stream.offset = 0; stream.size = 16; fcml_bool result; fcml_uint64_t data; data = fcml_fn_stream_read_qword( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 0x0807060504030201 ); data = fcml_fn_stream_read_qword( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 0x000F0E0D0C0B0A09 ); data = fcml_fn_stream_read_qword( &stream, &result ); STF_ASSERT( result == FCML_FALSE ); stream.base_address = buffer; stream.offset = 0; stream.size = 0; data = fcml_fn_stream_read_qword( &stream, &result ); STF_ASSERT( result == FCML_FALSE ); stream.base_address = buffer; stream.offset = 0; stream.size = 7; data = fcml_fn_stream_read_qword( &stream, &result ); STF_ASSERT( result == FCML_FALSE ); stream.base_address = buffer; stream.offset = 0; stream.size = 8; data = fcml_fn_stream_read_qword( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 0x0807060504030201 ); } void fcml_tf_stream_write_qword(void) { memset( buffer, 0, sizeof( buffer ) ); fcml_st_memory_stream stream; stream.base_address = buffer; stream.offset = 0; stream.size = 16; fcml_bool result; result = fcml_fn_stream_write_qword( &stream, 0x0706050403020100 ); STF_ASSERT( result == FCML_TRUE ); result = fcml_fn_stream_write_qword( &stream, 0x0F0E0D0C0B0A0908 ); STF_ASSERT( result == FCML_TRUE ); result = fcml_fn_stream_write_qword( &stream, 0x0706050403020100 ); STF_ASSERT( result == FCML_FALSE ); STF_ASSERT(buffer[0] == 0); STF_ASSERT(buffer[1] == 1); STF_ASSERT(buffer[2] == 2); STF_ASSERT(buffer[3] == 3); STF_ASSERT(buffer[4] == 4); STF_ASSERT(buffer[5] == 5); STF_ASSERT(buffer[6] == 6); STF_ASSERT(buffer[7] == 7); STF_ASSERT(buffer[8] == 8); STF_ASSERT(buffer[9] == 9); STF_ASSERT(buffer[10] == 0x0A); STF_ASSERT(buffer[11] == 0x0B); STF_ASSERT(buffer[12] == 0x0C); STF_ASSERT(buffer[13] == 0x0D); STF_ASSERT(buffer[14] == 0x0E); STF_ASSERT(buffer[15] == 0x0F); stream.base_address = buffer; stream.offset = 0; stream.size = 0; result = fcml_fn_stream_write_qword( &stream, 0x0706050403020100 ); STF_ASSERT( result == FCML_FALSE ); stream.base_address = buffer; stream.offset = 0; stream.size = 7; result = fcml_fn_stream_write_qword( &stream, 0x0706050403020100 ); STF_ASSERT( result == FCML_FALSE ); stream.base_address = buffer; stream.offset = 0; stream.size = 8; memset(buffer, 0, sizeof(buffer)); result = fcml_fn_stream_write_qword( &stream, 0x0706050403020100 ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT(buffer[0] == 0); STF_ASSERT(buffer[1] == 1); STF_ASSERT(buffer[2] == 2); STF_ASSERT(buffer[3] == 3); STF_ASSERT(buffer[4] == 4); STF_ASSERT(buffer[5] == 5); STF_ASSERT(buffer[6] == 6); STF_ASSERT(buffer[7] == 7); } void fcml_tf_stream_read_bytes(void) { buffer[0] = 1; buffer[1] = 2; buffer[2] = 3; buffer[3] = 4; buffer[4] = 5; buffer[5] = 6; buffer[6] = 7; buffer[7] = 8; buffer[8] = 9; buffer[9] = 10; buffer[10] = 11; buffer[11] = 12; buffer[12] = 13; buffer[13] = 14; buffer[14] = 15; buffer[15] = 0; fcml_st_memory_stream stream; stream.base_address = buffer; stream.offset = 0; stream.size = 16; fcml_uint8_t buff[4]; fcml_uint64_t data = fcml_fn_stream_read_bytes( &stream, buff, sizeof( buff ) ); STF_ASSERT( data == 4 ); STF_ASSERT( buff[0] == 1 ); STF_ASSERT( buff[1] == 2 ); STF_ASSERT( buff[2] == 3 ); STF_ASSERT( buff[3] == 4 ); stream.size = 3; stream.offset = 0; memset( buff, 0, sizeof( buff ) ); data = fcml_fn_stream_read_bytes( &stream, buff, 4 ); STF_ASSERT( data == 3 ); STF_ASSERT( buff[0] == 1 ); STF_ASSERT( buff[1] == 2 ); STF_ASSERT( buff[2] == 3 ); STF_ASSERT( buff[3] == 0 ); stream.size = 0; stream.offset = 0; memset( buff, 0, sizeof( buff ) ); data = fcml_fn_stream_read_bytes( &stream, buff, 4 ); STF_ASSERT( data == 0 ); } void fcml_tf_stream_write_bytes(void) { memset( buffer, 0, sizeof( buffer ) ); fcml_uint8_t buff[5]; buff[0] = 1; buff[1] = 2; buff[2] = 3; buff[3] = 4; buff[4] = 5; fcml_st_memory_stream stream; stream.base_address = buffer; stream.offset = 0; stream.size = 16; fcml_uint64_t data = fcml_fn_stream_write_bytes( &stream, buff, sizeof( buff ) ); STF_ASSERT( data == 5 ); STF_ASSERT( buffer[0] == 1 ); STF_ASSERT( buffer[1] == 2 ); STF_ASSERT( buffer[2] == 3 ); STF_ASSERT( buffer[3] == 4 ); STF_ASSERT( buffer[4] == 5 ); stream.size = 3; stream.offset = 0; memset( buffer, 0, sizeof( buffer ) ); data = fcml_fn_stream_write_bytes( &stream, buff, sizeof( buff ) ); STF_ASSERT( data == 3 ); STF_ASSERT( buffer[0] == 1 ); STF_ASSERT( buffer[1] == 2 ); STF_ASSERT( buffer[2] == 3 ); STF_ASSERT( buffer[3] == 0 ); stream.size = 0; stream.offset = 0; memset( buff, 0, sizeof( buff ) ); data = fcml_fn_stream_read_bytes( &stream, buff, 4 ); STF_ASSERT( data == 0 ); } void fcml_tf_stream_peek() { buffer[0] = 1; buffer[1] = 2; buffer[2] = 3; buffer[3] = 4; fcml_st_memory_stream stream; stream.base_address = buffer; stream.offset = 0; stream.size = 4; fcml_bool result; fcml_uint8_t data; data = fcml_fn_stream_read( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 1 ); STF_ASSERT( stream.offset == 1 ); data = fcml_fn_stream_peek( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 2 ); STF_ASSERT( stream.offset == 1 ); } void fcml_tf_stream_seek() { buffer[0] = 1; buffer[1] = 2; buffer[2] = 3; buffer[3] = 4; fcml_st_memory_stream stream; stream.base_address = buffer; stream.offset = 0; stream.size = 4; fcml_bool result; fcml_uint8_t data; data = fcml_fn_stream_read( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 1 ); STF_ASSERT( stream.offset == 1 ); fcml_fn_stream_seek( &stream, 3, FCML_EN_ST_START ); data = fcml_fn_stream_read( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 4 ); STF_ASSERT( stream.offset == 4 ); fcml_fn_stream_seek( &stream, -3, FCML_EN_ST_CURRENT ); data = fcml_fn_stream_read( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 2 ); STF_ASSERT( stream.offset == 2 ); fcml_fn_stream_seek( &stream, -4, FCML_EN_ST_END ); data = fcml_fn_stream_read( &stream, &result ); STF_ASSERT( result == FCML_TRUE ); STF_ASSERT( data == 1 ); STF_ASSERT( stream.offset == 1 ); fcml_fn_stream_seek( &stream, -8, FCML_EN_ST_END ); STF_ASSERT( stream.offset == 0 ); fcml_fn_stream_seek( &stream, 8, FCML_EN_ST_END ); STF_ASSERT( stream.offset == 4 ); fcml_fn_stream_seek( &stream, 8, FCML_EN_ST_START ); STF_ASSERT( stream.offset == 4 ); } void fcml_tf_stream_size() { fcml_st_memory_stream stream; stream.base_address = buffer; stream.offset = 0; stream.size = 4; fcml_int32_t size = fcml_fn_stream_size( &stream ); STF_ASSERT( size == 4 ); stream.size = 5; size = fcml_fn_stream_size( &stream ); STF_ASSERT( size == 5 ); stream.size = -1; size = fcml_fn_stream_size( &stream ); STF_ASSERT( size == -1 ); stream.size = 5; stream.offset = 3; size = fcml_fn_stream_size( &stream ); STF_ASSERT( size == 2 ); } void fcml_tf_stream_save_restore_point() { fcml_st_memory_stream stream; stream.base_address = buffer; stream.offset = 2; stream.size = 4; fcml_stream_pointer point = fcml_fn_stream_save_point( &stream ); stream.offset = 1; fcml_fn_stream_restore_point( &stream, point ); STF_ASSERT(stream.offset = 2); } fcml_stf_test_case fctl_ti_stream[] = { { "fcml_tf_stream_read_byte", fcml_tf_stream_read_byte }, { "fcml_tf_stream_write_byte", fcml_tf_stream_write_byte }, { "fcml_tf_stream_read_word", fcml_tf_stream_read_word }, { "fcml_tf_stream_write_word", fcml_tf_stream_write_word }, { "fcml_tf_stream_read_dword", fcml_tf_stream_read_dword }, { "fcml_tf_stream_write_dword", fcml_tf_stream_write_dword }, { "fcml_tf_stream_read_qword", fcml_tf_stream_read_qword }, { "fcml_tf_stream_write_qword", fcml_tf_stream_write_qword }, { "fcml_tf_stream_read_bytes", fcml_tf_stream_read_bytes }, { "fcml_tf_stream_write_bytes", fcml_tf_stream_write_bytes }, { "fcml_tf_stream_peek", fcml_tf_stream_peek }, { "fcml_tf_stream_seek", fcml_tf_stream_seek }, { "fcml_tf_stream_size", fcml_tf_stream_size }, { "fcml_tf_stream_save_restore_point", fcml_tf_stream_save_restore_point }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fctl_si_stream = { "suite-stream", fcml_tf_stream_suite_init, fcml_tf_stream_suite_cleanup, fctl_ti_stream }; fcml-1.1.1/check/Makefile.am0000644000175000017500000000025012561443347012473 00000000000000 if CPP_WRAPPER CPPDIR = cpp-tests endif if ENABLE_INTERNAL_TESTS INTERNAL_TESTS_DIR = internal-tests endif SUBDIRS = stf $(INTERNAL_TESTS_DIR) public-tests $(CPPDIR) fcml-1.1.1/check/cpp-tests/0000755000175000017500000000000012561462632012442 500000000000000fcml-1.1.1/check/cpp-tests/parser_t.cpp0000644000175000017500000000525512560745216014715 00000000000000/* * parser_t.cpp * * Created on: Aug 6, 2014 * Author: tas */ #include "parser_t.hpp" #include #include #include using namespace fcml; fcml_bool fcml_tf_cpp_parser_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_cpp_parser_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_cpp_parser(void) { try { IntelDialect dialect; ParserContext ctx(0x401000); Parser parser(dialect); ParserResult result; try { STF_ASSERT_EQUAL( parser.parse( ctx, _FT("mov eax, dword [0x0401000]"), result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( parser.parse( ctx, _FT("mov eax, dword [0x0401000]"), result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( parser.parse( ctx, _FT("mov eax, dword [0x0401000]"), result ), FCML_CEH_GEC_NO_ERROR ); STF_ASSERT_EQUAL( parser.parse( ctx, _FT("mov eax, dword [0x0401000]"), result ), FCML_CEH_GEC_NO_ERROR ); } catch( ParsingFailedException &exc ) { STF_FAIL("Parsing failed."); } const Instruction &instruction = result.getInstruction(); STF_ASSERT_EQUAL( instruction.isConditional(), false ); STF_ASSERT_EQUAL( instruction.getCondition().getConditionType(), Condition::CONDITION_O ); STF_ASSERT_EQUAL( instruction.getMnemonic(), fcml_cstring( _FT("mov") ) ); STF_ASSERT_EQUAL( instruction.getOperandsCount(), 2 ); STF_ASSERT_EQUAL( instruction.getPrefixes(), 0 ); } catch( std::exception &exc ) { STF_FAIL("Unexpected exception."); } catch( fcml::BaseException &exc ) { STF_FAIL("Unexpected exception."); } } void fcml_tf_cpp_parser_error(void) { try { IntelDialect dialect; ParserContext ctx(0x401000); Parser parser(dialect); ParserResult result; fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; try { parser.parse( ctx, _FT("mov eax1, dword [0x0401000]"), result ); STF_FAIL("Parsing failed."); } catch( ParsingFailedException &exc ) { error = exc.getError(); STF_ASSERT_EQUAL( exc.getMsg(), FCML_TEXT( "Parsing failed: Undefined symbol: eax1." ) ); } STF_ASSERT_EQUAL( result.getErrors().getFirstErrorMessage(), FCML_TEXT( "Undefined symbol: eax1." ) ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_UNDEFINED_SYMBOL ); } catch( std::exception &exc ) { STF_FAIL("Unexpected exception."); } catch( fcml::BaseException &exc ) { STF_FAIL("Unexpected exception."); } } fcml_stf_test_case fcml_ti_cpp_parser[] = { { "fcml_tf_cpp_parser", fcml_tf_cpp_parser }, { "fcml_tf_cpp_parser_error", fcml_tf_cpp_parser_error }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_cpp_parser = { "suite-fcml-cpp-parser", fcml_tf_cpp_parser_suite_init, fcml_tf_cpp_parser_suite_cleanup, fcml_ti_cpp_parser }; fcml-1.1.1/check/cpp-tests/assembler_t.cpp0000644000175000017500000005204012560745216015370 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /* Test suite initialization. */ #include "assembler_t.hpp" #include #include #include #include #include #include #include #include using namespace fcml; using namespace fcml::intel; fcml_bool fcml_tf_cpp_assembler_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_cpp_assembler_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_cpp_assemble_instruction_long_form(void) { Instruction instruction; instruction.setMnemonic(fcml::intel::M_MOV); instruction.setHints(FCML_HINT_FAR_POINTER | FCML_HINT_LONG_FORM_POINTER); instruction.getCondition().setConditionType(Condition::CONDITION_BE); instruction.getCondition().setNegation(FCML_TRUE); instruction.setOperandsCount(2); instruction.setPrefixes(FCML_PREFIX_LOCK | FCML_PREFIX_REPE); instruction[0].setOperandType(Operand::OT_REGISTER); instruction[0].getRegister().setReg(FCML_REG_EAX); instruction[0].getRegister().setSize(FCML_DS_32); instruction[0].getRegister().setType(Register::REG_GPR); instruction[1].setOperandType(Operand::OT_ADDRESS); instruction[1].getAddress().setAddressForm(Address::AF_OFFSET); instruction[1].getAddress().getOffset().setSigned(FCML_TRUE); instruction[1].getAddress().getOffset().setInt32(0x401000); instruction[1].getAddress().getOffset().setSize(FCML_DS_32); instruction[1].getAddress().setSizeOperator(FCML_DS_32); fcml_st_instruction instStr; TypeConverter::convert( instruction, instStr ); STF_ASSERT_EQUAL( instStr.mnemonic, M_MOV ); STF_ASSERT_EQUAL( instStr.hints, FCML_HINT_FAR_POINTER | FCML_HINT_LONG_FORM_POINTER ); STF_ASSERT_EQUAL( instStr.operands_count, 2 ); STF_ASSERT_EQUAL( instStr.prefixes, FCML_PREFIX_LOCK | FCML_PREFIX_REPE ); STF_ASSERT_EQUAL( instStr.condition.condition_type, static_cast( instruction.getCondition().getConditionType() ) ); STF_ASSERT_EQUAL( FCML_OT_REGISTER, instStr.operands[0].type ); STF_ASSERT_EQUAL( FCML_REG_EAX, instStr.operands[0].reg.reg ); STF_ASSERT_EQUAL( FCML_DS_32, instStr.operands[0].reg.size ); STF_ASSERT_EQUAL( FCML_REG_GPR, instStr.operands[0].reg.type ); STF_ASSERT_EQUAL( FCML_OT_ADDRESS, instStr.operands[1].type ); STF_ASSERT_EQUAL( FCML_AF_OFFSET, instStr.operands[1].address.address_form ); STF_ASSERT_EQUAL( FCML_TRUE, instStr.operands[1].address.offset.is_signed ); STF_ASSERT_EQUAL( 0x401000, instStr.operands[1].address.offset.off32 ); STF_ASSERT_EQUAL( FCML_DS_32, instStr.operands[1].address.offset.size ); STF_ASSERT_EQUAL( FCML_DS_32, instStr.operands[1].address.size_operator ); TypeConverter::free( instStr ); } void fcml_tf_cpp_assemble_instruction_short_form(void) { Instruction instruction; instruction.setMnemonic(FCML_TEXT("mov")); instruction.setHints(FCML_HINT_FAR_POINTER | FCML_HINT_LONG_FORM_POINTER); instruction.getCondition().setConditionType(Condition::CONDITION_BE); instruction.getCondition().setNegation(FCML_TRUE); instruction.setOperandsCount(2); instruction.setPrefixes(FCML_PREFIX_LOCK | FCML_PREFIX_REPE); instruction[0].reg( Register::EAX() ); instruction[1].off( (fcml_int32_t)0x401000, FCML_DS_32 ); fcml_st_instruction instStr; TypeConverter::convert( instruction, instStr ); STF_ASSERT_STRING_EQUAL( instStr.mnemonic, FCML_TEXT("mov") ); STF_ASSERT_EQUAL( instStr.hints, FCML_HINT_FAR_POINTER | FCML_HINT_LONG_FORM_POINTER ); STF_ASSERT_EQUAL( instStr.operands_count, 2 ); STF_ASSERT_EQUAL( instStr.prefixes, FCML_PREFIX_LOCK | FCML_PREFIX_REPE ); STF_ASSERT_EQUAL( instStr.condition.condition_type, static_cast( instruction.getCondition().getConditionType() ) ); STF_ASSERT_EQUAL( FCML_OT_REGISTER, instStr.operands[0].type ); STF_ASSERT_EQUAL( FCML_REG_EAX, instStr.operands[0].reg.reg ); STF_ASSERT_EQUAL( FCML_DS_32, instStr.operands[0].reg.size ); STF_ASSERT_EQUAL( FCML_REG_GPR, instStr.operands[0].reg.type ); STF_ASSERT_EQUAL( FCML_OT_ADDRESS, instStr.operands[1].type ); STF_ASSERT_EQUAL( FCML_AF_OFFSET, instStr.operands[1].address.address_form ); STF_ASSERT_EQUAL( FCML_TRUE, instStr.operands[1].address.offset.is_signed ); STF_ASSERT_EQUAL( 0x401000, instStr.operands[1].address.offset.off32 ); STF_ASSERT_EQUAL( FCML_DS_32, instStr.operands[1].address.offset.size ); STF_ASSERT_EQUAL( FCML_DS_32, instStr.operands[1].address.size_operator ); TypeConverter::free( instStr ); } void fcml_tf_cpp_assemble_instruction_builder_short(void) { Instruction instruction; // Long form, don't be afraid short alternatives are presented below. instruction = IB::inst(_FT("mov")).farPtr().longFormPtr().lock().repe().reg( Register::EAX() ).off( (fcml_int32_t)0x401000, FCML_DS_32 ).build(); fcml_st_instruction instStr; TypeConverter::convert( instruction, instStr ); STF_ASSERT_STRING_EQUAL( instStr.mnemonic, FCML_TEXT("mov") ); STF_ASSERT_EQUAL( instStr.hints, FCML_HINT_FAR_POINTER | FCML_HINT_LONG_FORM_POINTER ); STF_ASSERT_EQUAL( instStr.operands_count, 2 ); STF_ASSERT_EQUAL( instStr.prefixes, FCML_PREFIX_LOCK | FCML_PREFIX_REPE ); STF_ASSERT_EQUAL( instStr.condition.condition_type, static_cast( instruction.getCondition().getConditionType() ) ); STF_ASSERT_EQUAL( FCML_OT_REGISTER, instStr.operands[0].type ); STF_ASSERT_EQUAL( FCML_REG_EAX, instStr.operands[0].reg.reg ); STF_ASSERT_EQUAL( FCML_DS_32, instStr.operands[0].reg.size ); STF_ASSERT_EQUAL( FCML_REG_GPR, instStr.operands[0].reg.type ); STF_ASSERT_EQUAL( FCML_OT_ADDRESS, instStr.operands[1].type ); STF_ASSERT_EQUAL( FCML_AF_OFFSET, instStr.operands[1].address.address_form ); STF_ASSERT_EQUAL( FCML_TRUE, instStr.operands[1].address.offset.is_signed ); STF_ASSERT_EQUAL( 0x401000, instStr.operands[1].address.offset.off32 ); STF_ASSERT_EQUAL( FCML_DS_32, instStr.operands[1].address.offset.size ); STF_ASSERT_EQUAL( FCML_DS_32, instStr.operands[1].address.size_operator ); TypeConverter::free( instStr ); } void fcml_tf_util_check_instruction( Instruction &instruction ) { fcml_st_instruction instStr; TypeConverter::convert( instruction, instStr ); STF_ASSERT_STRING_EQUAL( instStr.mnemonic, FCML_TEXT("mov") ); STF_ASSERT_EQUAL( instStr.hints, 0 ); STF_ASSERT_EQUAL( instStr.operands_count, 2 ); STF_ASSERT_EQUAL( instStr.prefixes, 0 ); STF_ASSERT_EQUAL( instStr.condition.condition_type, static_cast( instruction.getCondition().getConditionType() ) ); STF_ASSERT_EQUAL( FCML_OT_ADDRESS, instStr.operands[0].type ); STF_ASSERT_EQUAL( FCML_AF_COMBINED, instStr.operands[0].address.address_form ); STF_ASSERT_EQUAL( FCML_REG_EAX, instStr.operands[0].address.effective_address.base.reg ); STF_ASSERT_EQUAL( FCML_DS_32, instStr.operands[0].address.effective_address.base.size ); STF_ASSERT_EQUAL( FCML_REG_GPR, instStr.operands[0].address.effective_address.base.type ); STF_ASSERT_EQUAL( FCML_FALSE, instStr.operands[0].address.effective_address.base.x64_exp ); STF_ASSERT_EQUAL( FCML_DS_8, instStr.operands[0].address.size_operator ); STF_ASSERT_EQUAL( FCML_OT_REGISTER, instStr.operands[1].type ); STF_ASSERT_EQUAL( FCML_REG_ECX, instStr.operands[1].reg.reg ); STF_ASSERT_EQUAL( FCML_DS_32, instStr.operands[1].reg.size ); STF_ASSERT_EQUAL( FCML_REG_GPR, instStr.operands[1].reg.type ); TypeConverter::free( instStr ); } void fcml_tf_cpp_assemble_instruction_builder_shortest(void) { Instruction instruction; instruction = IB(M_MOV).eff( EAX, 8 ).reg( ECX ).build(); fcml_tf_util_check_instruction( instruction ); instruction = IB::inst(M_MOV).eff( EAX, 8 ).reg( ECX ).build(); fcml_tf_util_check_instruction( instruction ); instruction = IB::inst(M_MOV).eff( EAX, 8 ).reg( ECX ); fcml_tf_util_check_instruction( instruction ); instruction = IB(M_MOV).eff( EAX, 8 ).reg( ECX ); instruction = IB(M_MOV) << OB::eff( EAX, 8 ) << OB::reg( ECX ); fcml_tf_util_check_instruction( instruction ); instruction = IB(M_MOV) << OB::effb( EAX ) << OB::reg( ECX ); fcml_tf_util_check_instruction( instruction ); } void fcml_tf_cpp_assemble_instruction_builder_hints_prefixes(void) { Instruction instruction; instruction = IB(M_MOV) << IB::LOCK() << IB::REP() << IB::INDIRECT_PTR() << IB::NEAR_PTR() << OB::effb( EAX ) << OB::reg( ECX ); STF_ASSERT( instruction.getMnemonic() == fcml_cstring(FCML_TEXT("mov")) ); STF_ASSERT( instruction.getMnemonic() == M_MOV ); STF_ASSERT_EQUAL( instruction.getPrefixes(), FCML_PREFIX_LOCK | FCML_PREFIX_REP ); STF_ASSERT( instruction.isLock() ); STF_ASSERT( instruction.isRep() ); STF_ASSERT_EQUAL( instruction.getHints(), FCML_HINT_INDIRECT_POINTER | FCML_HINT_NEAR_POINTER ); STF_ASSERT( instruction.isIndirectPointer() ); STF_ASSERT( instruction.isNearPointer() ); } fcml_bool fcml_tf_cmp_instruction( const AssembledInstruction *assembledInstruction, fcml_uint8_t *instruction, fcml_usize len ) { if( !assembledInstruction ) { return FCML_FALSE; } if( assembledInstruction->getCodeLength() == len ) { for( fcml_usize i = 0; i < len; i++ ) { if( assembledInstruction->getCode()[i] != instruction[i] ) { return FCML_FALSE; } } return FCML_TRUE; } return FCML_FALSE; } const fcml_string fcml_iarr_lag_assembler_code_src[] = { "start: mov ebx, 1", "loop_big: inc ebx", " cmp ebx, 10", " je finish", "loop_small: mov eax, 1", "increment: inc eax", " cmp eax, 10", " je finish_small", " jmp increment", "finish_small:", " jmp loop_big", "finish: ret", NULL }; const fcml_uint8_t fcml_iarr_lag_assembler_code_bin[] = { 0xBB, 0x01, 0x00, 0x00, 0x00, 0x43, 0x83, 0xFB, 0x0A, 0x74, 0x0F, 0xB8, 0x01, 0x00, 0x00, 0x00, 0x40, 0x83, 0xF8, 0x0A, 0x74, 0x02, 0xEB, 0xF8, 0xEB, 0xEB, 0xC3 }; const fcml_string fcml_iarr_lag_assembler_code_src_error[] = { "start: mov ebx, 1", "loop_big: inc ebx", " cmp ebx, 10", " je finish_xxxxxx", // Unknown symbol. "loop_small: mov eax, 1", "increment: inc eax", " cmp eax, 10", " je finish_small", " jmp increment", "finish_small:", " jmp loop_big", "finish: ret", NULL }; const fcml_string fcml_iarr_lag_assembler_code_src_error_1[] = { "start: mov ebx, 1", "loop_big: inc eb, p][]s ddx", // Syntax error. " cmp ebx, 10", " je finish", // Unknown symbol. "loop_small: mov eax, 1", "increment: inc eax", " cmp eax, 10", " je finish_small", " jmp increment", "finish_small:", " jmp loop_big", "finish: ret", NULL }; void fcml_tf_cpp_multi_pass_assemble(void) { fcml_ceh_error error; try { IntelDialect dialect; MultiPassAssemblerContext ctx( EntryPoint::OM_32_BIT, 0x401000 ); MultiPassAssemblerResult result; MultiPassAssembler assembler(dialect); error = assembler.assemble( ctx, fcml_iarr_lag_assembler_code_src, result ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); if( !error ) { fcml_int i = 0; CodeIterator it = result.getCodeIterator(); while( it.hasNext() ) { fcml_uint8_t codeByte = it.next(); if( codeByte != fcml_iarr_lag_assembler_code_bin[i++] ) { STF_FAIL( "Assembled code is not the same." ); } } if( i != sizeof( fcml_iarr_lag_assembler_code_bin ) ) { STF_FAIL( "Assembled code is not the same." ); } } } catch( BaseException &exc ) { STF_FAIL("Exception while assembling the code."); } } void fcml_tf_cpp_multi_pass_assemble_error(void) { try { IntelDialect dialect; MultiPassAssemblerContext ctx( EntryPoint::OM_32_BIT, 0x401000 ); MultiPassAssemblerResult result; MultiPassAssembler assembler(dialect); try { assembler.assemble( ctx, fcml_iarr_lag_assembler_code_src_error, result ); STF_FAIL( "Should fail!" ); } catch( AssemblingFailedException &exc ) { // Undefined symbol, see the assembled source code. STF_ASSERT_EQUAL( exc.getMsg(), fcml_cstring( FCML_TEXT( "Assembling failed: Undefined symbol: finish_xxxxxx." ) ) ); STF_ASSERT_EQUAL( exc.getError(), FCML_CEH_GEC_UNDEFINED_SYMBOL ); STF_ASSERT( true ); // OK. } } catch( BaseException &exc ) { STF_FAIL("Exception while assembling the code."); } } void fcml_tf_cpp_multi_pass_assemble_error_1(void) { try { IntelDialect dialect; MultiPassAssemblerContext ctx( EntryPoint::OM_32_BIT, 0x401000 ); MultiPassAssemblerResult result; MultiPassAssembler assembler(dialect); try { assembler.assemble( ctx, fcml_iarr_lag_assembler_code_src_error_1, result ); STF_FAIL( "Should fail!" ); } catch( AssemblingFailedException &exc ) { // Undefined symbol, see the assembled source code. STF_ASSERT_EQUAL( exc.getMsg(), fcml_cstring( FCML_TEXT( "Assembling failed: syntax error" ) ) ); STF_ASSERT_EQUAL( exc.getError(), FCML_CEH_GEC_INVALID_INPUT ); STF_ASSERT( true ); // OK. } } catch( BaseException &exc ) { STF_FAIL("Exception while assembling the code."); } } void fcml_tf_cpp_assemble(void) { fcml_ceh_error error; try { IntelDialect dialect; AssemblerContext ctx( EntryPoint::OM_32_BIT, 0x401000 ); AssemblerResult result; Assembler assembler(dialect); Instruction instruction = IB(M_MOV) << OB::reg(EAX) << OB::offd( 0x40302010 ); error = assembler.assemble( ctx, instruction, result ); STF_ASSERT_EQUAL( error, FCML_CEH_GEC_NO_ERROR ); if( !error ) { fcml_uint8_t inst[] = {0xA1, 0x10, 0x20, 0x30, 0x40}; STF_ASSERT( fcml_tf_cmp_instruction( result.getChosenInstruction(), inst, 5 ) ); // Checks access to the constant assembled instruction. const AssembledInstruction chosenInstruction = *result.getChosenInstruction(); const fcml_uint8_t *buffer = chosenInstruction.getCode(); STF_ASSERT_PTR_NOT_NULL( buffer ); fcml_usize len = chosenInstruction.getCodeLength(); STF_ASSERT_EQUAL( len, 5 ); const ErrorContainer &errors = chosenInstruction.getWarningContainer(); STF_ASSERT_EQUAL( errors.getSize(), 0 ); try { errors.getFirstError(); STF_FAIL("Container is empty."); } catch( IllegalStateException &exc ) { STF_ASSERT( true ); } STF_ASSERT("" == errors.getFirstErrorMessage() ); } } catch( BaseException &exc ) { STF_FAIL("Exception while assembling the code."); } } /* A 64-bit GDB dump used as an example. Dump of assembler code for function main(int, char**): 0x0000000000404ddc <+0>: 55 push %rbp 0x0000000000404ddd <+1>: 48 89 e5 mov %rsp,%rbp 0x0000000000404de0 <+4>: 48 83 ec 20 sub $0x20,%rsp 0x0000000000404de4 <+8>: 89 7d ec mov %edi,-0x14(%rbp) 0x0000000000404de7 <+11>: 48 89 75 e0 mov %rsi,-0x20(%rbp) 0x0000000000404deb <+15>: be 60 d2 62 00 mov $0x62d260,%esi 0x0000000000404df0 <+20>: bf e8 db 41 00 mov $0x41dbe8,%edi 0x0000000000404df5 <+25>: e8 1f 89 01 00 callq 0x41d719 */ fcml_uint8_t fcml_iarr_stateful_assembler_result_expected[] = { 0x55, 0x48, 0x8b, 0xec, // (It's just a different way to encode "mov %rsp,%rbp", everything is OK.) 0x48, 0x83, 0xec, 0x20, 0x89, 0x7d, 0xec, 0x48, 0x89, 0x75, 0xe0, 0xbe, 0x60, 0xd2, 0x62, 0x00, 0xbf, 0xe8, 0xdb, 0x41, 0x00, 0xe8, 0x1f, 0x89, 0x01, 0x00 }; /* Tests CodeBuffer helper class. */ void fcml_tf_cpp_assemble_statefull_assembler(void) { try { // Only because Intel mnemonics had been already included. IntelDialect dialect; AssemblerContext ctx( EntryPoint::OM_64_BIT, 0x404ddc ); Assembler assembler(dialect); StatefulAssembler sasm(assembler, ctx); sasm << M_PUSH << OB::reg(RBP); sasm << M_MOV << OB::reg(RBP) << OB::reg(RSP); // Check direct use of the immediate and register operands. sasm << M_SUB << RSP << 0x20; sasm << M_MOV << OB::effd(RBP,-0x14) << OB::reg(EDI); sasm << M_MOV << OB::effq(RBP,-0x20) << OB::reg(RSI); sasm << M_MOV << OB::reg(ESI) << OB::imm(0x62d260); // And using plain methods. sasm.inst(M_MOV).op(EDI).op(0x41dbe8); // Flush instruction builder immediately. sasm << M_CALL << InstructionHint::DIRECT_POINTER() << OB::offq(0x41d719) << StatefulAssembler::FLUSH(); fcml_uint8_t *result_bytes = fcml_iarr_stateful_assembler_result_expected; bool failed = false; CodeIterator it = sasm.getCodeIterator(); while( it.hasNext() ) { fcml_uint8_t b = it.next(); if( *result_bytes++ != b ) { failed = true; break; } } if( failed ) { STF_FAIL( "Assembled code and result differs." ); } else { STF_ASSERT( true ); } } catch( BaseException &exc ) { STF_FAIL("Exception while assembling the code."); } } /* Tests CodeBuffer helper class. */ void fcml_tf_cpp_assemble_stateful_assembler_with_parser(void) { try { // Only because Intel mnemonics had been already included. IntelDialect dialect; AssemblerContext ctx( EntryPoint::OM_64_BIT, 0x404ddc ); Assembler assembler(dialect); StatefulAssembler sasm(assembler, ctx, true); // Enable symbols support. sasm.getParserConfig().setDisableSymbolsDeclaration(false); // By the way, check if symbols works as expected. SymbolTable st; st.add( _FT("_start"), 0x41d719 ); sasm.setSymbolTable( &st ); sasm << _FT( "push rbp" ); sasm << _FT( "mov rbp, rsp" ); sasm << _FT( "sub rsp, 0x20" ); sasm << _FT( "_label: mov dword [rbp-0x14], edi" ); sasm << _FT( "mov qword [rbp-0x20], rsi" ); sasm << _FT( "mov esi, 0x62d260" ); sasm << _FT( "mov edi, 0x41dbe8" ); sasm << _FT( "call _start" ); Symbol symbol = st.get( _FT("_label") ); const Symbol symbolConst = symbol; STF_ASSERT( !symbolConst.isEmpty() ); STF_ASSERT_EQUAL( symbolConst.getValue(), 0x404de4 ); const SymbolTable &stConst = st; fcml_int64_t label = stConst.get( _FT("_label") ); STF_ASSERT_EQUAL( label, 0x404de4 ); // Check if generated code is the same as expected one. fcml_uint8_t *result_bytes = fcml_iarr_stateful_assembler_result_expected; bool failed = false; CodeIterator it = sasm.getCodeIterator(); while( it.hasNext() ) { fcml_uint8_t b = it.next(); if( *result_bytes++ != b ) { failed = true; break; } } if( failed ) { STF_FAIL( "Assembled code and result differs." ); } else { STF_ASSERT( true ); } std::vector& instructions = sasm.getAssembledInstructions(); STF_ASSERT_EQUAL( instructions.size(), 8 ); } catch( BaseException &exc ) { STF_FAIL("Exception while assembling the code."); } } fcml_stf_test_case fcml_ti_cpp_assembler[] = { { "fcml_tf_cpp_assemble_instruction_long_form", fcml_tf_cpp_assemble_instruction_long_form }, { "fcml_tf_cpp_assemble_instruction_short_form", fcml_tf_cpp_assemble_instruction_short_form }, { "fcml_tf_cpp_assemble_instruction_builder_short", fcml_tf_cpp_assemble_instruction_builder_short }, { "fcml_tf_cpp_assemble_instruction_builder_shortest", fcml_tf_cpp_assemble_instruction_builder_shortest }, { "fcml_tf_cpp_assemble_instruction_builder_hints_prefixes", fcml_tf_cpp_assemble_instruction_builder_hints_prefixes }, { "fcml_tf_cpp_multi_pass_assemble", fcml_tf_cpp_multi_pass_assemble }, { "fcml_tf_cpp_multi_pass_assemble_error", fcml_tf_cpp_multi_pass_assemble_error }, { "fcml_tf_cpp_multi_pass_assemble_error_1", fcml_tf_cpp_multi_pass_assemble_error_1 }, { "fcml_tf_cpp_assemble", fcml_tf_cpp_assemble }, { "fcml_tf_cpp_assemble_statefull_assembler", fcml_tf_cpp_assemble_statefull_assembler }, { "fcml_tf_cpp_assemble_stateful_assembler_with_parser", fcml_tf_cpp_assemble_stateful_assembler_with_parser }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_cpp_assembler = { "suite-fcml-cpp-assembler", fcml_tf_cpp_assembler_suite_init, fcml_tf_cpp_assembler_suite_cleanup, fcml_ti_cpp_assembler }; fcml-1.1.1/check/cpp-tests/main.cpp0000644000175000017500000000167012560745216014017 00000000000000/* * main.cpp * * Created on: Jul 5, 2014 * Author: tas */ #include #include // Include mnemonics and register definitions into the destination image file. #include #include #include #include "dialect_t.hpp" #include "common_t.hpp" #include "assembler_t.hpp" #include "disassembler_t.hpp" #include "errors_t.hpp" #include "parser_t.hpp" fcml_stf_test_suite *fcml_arr_cpp_suites[] = { &fcml_si_cpp_dialect, &fcml_si_cpp_common, &fcml_si_cpp_assembler, &fcml_si_cpp_disassembler, &fcml_si_cpp_errors, &fcml_si_cpp_parser, &fcml_si_cpp_assembler, FCML_STF_NULL_SUITE }; #include using namespace fcml; int main(int argc, char **argv) { /* Run tests.*/ fcml_bool result = fcml_stf_run_tests( FCML_TEXT("CPP wrappers tests"), fcml_arr_cpp_suites ); exit( result ? 0 : 1 ); } fcml-1.1.1/check/cpp-tests/Makefile.am0000644000175000017500000000107012560745216014415 00000000000000noinst_PROGRAMS = fcml_cpp_check # Include all tests. fcml_cpp_check_SOURCES = main.cpp \ dialect_t.cpp \ dialect_t.hpp \ common_t.cpp \ common_t.hpp \ assembler_t.cpp \ assembler_t.hpp \ disassembler_t.cpp \ disassembler_t.hpp \ errors_t.cpp \ errors_t.hpp \ parser_t.cpp \ parser_t.hpp fcml_cpp_check_CPPFLAGS = -Wall -Wno-write-strings -I$(top_srcdir)/include -I$(top_srcdir)/check/stf @FCML_IMPORT_LIB@ fcml_cpp_check_LDADD = $(top_srcdir)/src/libfcml.la $(top_srcdir)/check/stf/libstf.la check_SCRIPTS = fcml_cpp_check TESTS = $(check_SCRIPTS) fcml-1.1.1/check/cpp-tests/errors_t.cpp0000644000175000017500000000632112560745216014730 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /* Test suite initialization. */ #include "errors_t.hpp" #include #include using namespace fcml; fcml_bool fcml_tf_cpp_errors_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_cpp_errors_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_cpp_errors(void) { fcml_st_ceh_error_info info1; info1.code = FCML_CEH_GEC_FEATURE_NOT_SUPPORTED; info1.level = FCML_EN_CEH_EL_WARN; info1.message = FCML_TEXT("Some error1"); fcml_st_ceh_error_info info2; info2.code = FCML_CEH_GEC_FEATURE_NOT_SUPPORTED; info2.level = FCML_EN_CEH_EL_ERROR; info2.message = FCML_TEXT("Some error2"); fcml_st_ceh_error_info info3; info3.code = FCML_CEH_GEC_FEATURE_NOT_SUPPORTED; info3.level = FCML_EN_CEH_EL_ERROR; info3.message = FCML_TEXT("Some error3"); fcml_st_ceh_error_container errors; errors.errors = &info1; errors.last_error = &info3; info3.next_error = NULL; info2.next_error = &info3; info1.next_error = &info2; // Do not copy, just wrap. ErrorContainer container; ErrorTypeConverter::convert( errors, container ); if( !container.isEmpty() ) { ErrorInfo &errorInfo = container.getFirstError(); STF_ASSERT_EQUAL( errorInfo.getMessage(), fcml_cstring( FCML_TEXT("Some error1") ) ); STF_ASSERT_EQUAL( errorInfo.getLevel(), ErrorInfo::EL_WARN ); STF_ASSERT_EQUAL( errorInfo.getCode(), FCML_CEH_GEC_FEATURE_NOT_SUPPORTED ); } // Iterating over the errors. if( !container.isEmpty() ) { STF_ASSERT_EQUAL( container.getSize(), 3 ); for( fcml_usize i = 0; i < container.getSize(); i++ ) { const ErrorInfo &info = container[i]; switch(i) { case 0: STF_ASSERT_EQUAL( info.getMessage(), FCML_TEXT("Some error1") ); break; case 1: STF_ASSERT_EQUAL( info.getMessage(), FCML_TEXT("Some error2") ); break; case 2: STF_ASSERT_EQUAL( info.getMessage(), FCML_TEXT("Some error3") ); break; } } } } fcml_stf_test_case fcml_ti_cpp_errors[] = { { "fcml_tf_cpp_errors", fcml_tf_cpp_errors }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_cpp_errors = { "suite-fcml-cpp-errors", fcml_tf_cpp_errors_suite_init, fcml_tf_cpp_errors_suite_cleanup, fcml_ti_cpp_errors }; fcml-1.1.1/check/cpp-tests/assembler_t.hpp0000644000175000017500000000174312560745216015401 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 ASSEMBLER_T_HPP_ #define ASSEMBLER_T_HPP_ #include extern fcml_stf_test_suite fcml_si_cpp_assembler; #endif /* ASSEMBLER_T_HPP_ */ fcml-1.1.1/check/cpp-tests/parser_t.hpp0000644000175000017500000000033212560745216014711 00000000000000/* * parser_t.hpp * * Created on: Aug 6, 2014 * Author: tas */ #ifndef PARSER_T_HPP_ #define PARSER_T_HPP_ #include extern fcml_stf_test_suite fcml_si_cpp_parser; #endif /* PARSER_T_HPP_ */ fcml-1.1.1/check/cpp-tests/errors_t.hpp0000644000175000017500000000172712560745216014742 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 ERRORS_T_HPP_ #define ERRORS_T_HPP_ #include extern fcml_stf_test_suite fcml_si_cpp_errors; #endif /* ERRORS_T_HPP_ */ fcml-1.1.1/check/cpp-tests/common_t.cpp0000644000175000017500000006013012560745216014702 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /* Test suite initialization. */ #include "common_t.hpp" #include #include #include #include using namespace fcml; fcml_bool fcml_tf_cpp_common_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_cpp_common_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_cpp_integer(void) { Integer i1_fcml_uint8_t((fcml_uint8_t)0xFF); Integer i1_fcml_int8_t((fcml_int8_t)0xFF); Integer i1_fcml_uint16_t((fcml_uint16_t)0xFFFF); Integer i1_fcml_int16_t((fcml_int16_t)0xFFFF); Integer i1_fcml_uint32_t((fcml_uint32_t)0xFFFFFFFF); Integer i1_fcml_int32_t((fcml_int32_t)0xFFFFFFFF); Integer i1_fcml_uint64_t((fcml_uint64_t)0xFFFFFFFFFFFFFFFFUL); Integer i1_fcml_int64_t((fcml_int64_t)0xFFFFFFFFFFFFFFFFUL); STF_ASSERT_EQUAL( (fcml_uint8_t)i1_fcml_uint8_t.getInt8(), (fcml_uint8_t)0xFF ); STF_ASSERT_EQUAL( i1_fcml_uint8_t.isSigned(), FCML_FALSE ); STF_ASSERT_EQUAL( i1_fcml_uint8_t.getSize(), FCML_DS_8 ); STF_ASSERT_EQUAL( (fcml_int8_t)i1_fcml_int8_t.getInt8(), (fcml_int8_t)0xFF ); STF_ASSERT_EQUAL( i1_fcml_int8_t.isSigned(), FCML_TRUE ); STF_ASSERT_EQUAL( i1_fcml_int8_t.getSize(), FCML_DS_8 ); STF_ASSERT_EQUAL( (fcml_uint16_t)i1_fcml_uint16_t.getInt16(), (fcml_uint16_t)0xFFFF ); STF_ASSERT_EQUAL( i1_fcml_uint16_t.isSigned(), FCML_FALSE ); STF_ASSERT_EQUAL( i1_fcml_uint16_t.getSize(), FCML_DS_16 ); STF_ASSERT_EQUAL( (fcml_int16_t)i1_fcml_int16_t.getInt16(), (fcml_int16_t)0xFFFF ); STF_ASSERT_EQUAL( i1_fcml_int16_t.isSigned(), FCML_TRUE ); STF_ASSERT_EQUAL( i1_fcml_int16_t.getSize(), FCML_DS_16 ); STF_ASSERT_EQUAL( (fcml_uint32_t)i1_fcml_uint32_t.getInt32(), (fcml_uint32_t)0xFFFFFFFF ); STF_ASSERT_EQUAL( i1_fcml_uint32_t.isSigned(), FCML_FALSE ); STF_ASSERT_EQUAL( i1_fcml_uint32_t.getSize(), FCML_DS_32 ); STF_ASSERT_EQUAL( (fcml_int32_t)i1_fcml_int32_t.getInt32(), (fcml_int32_t)0xFFFFFFFF ); STF_ASSERT_EQUAL( i1_fcml_int32_t.isSigned(), FCML_TRUE ); STF_ASSERT_EQUAL( i1_fcml_int32_t.getSize(), FCML_DS_32 ); STF_ASSERT_EQUAL( (fcml_uint64_t)i1_fcml_uint64_t.getInt64(), (fcml_uint64_t)0xFFFFFFFFFFFFFFFFUL ); STF_ASSERT_EQUAL( i1_fcml_uint64_t.isSigned(), FCML_FALSE ); STF_ASSERT_EQUAL( i1_fcml_uint64_t.getSize(), FCML_DS_64 ); STF_ASSERT_EQUAL( (fcml_int64_t)i1_fcml_int64_t.getInt64(), (fcml_int64_t)0xFFFFFFFFFFFFFFFFUL ); STF_ASSERT_EQUAL( i1_fcml_int64_t.isSigned(), FCML_TRUE ); STF_ASSERT_EQUAL( i1_fcml_int64_t.getSize(), FCML_DS_64 ); } void fcml_tf_cpp_integer_operator(void) { Integer i1_fcml_uint8_t = (fcml_uint8_t)0xFF; Integer i1_fcml_int8_t = (fcml_int8_t)0xFF; Integer i1_fcml_uint16_t = (fcml_uint16_t)0xFFFF; Integer i1_fcml_int16_t = (fcml_int16_t)0xFFFF; Integer i1_fcml_uint32_t = (fcml_uint32_t)0xFFFFFFFF; Integer i1_fcml_int32_t = (fcml_int32_t)0xFFFFFFFF; Integer i1_fcml_uint64_t = (fcml_uint64_t)0xFFFFFFFFFFFFFFFFUL; Integer i1_fcml_int64_t = (fcml_int64_t)0xFFFFFFFFFFFFFFFFUL; STF_ASSERT_EQUAL( (fcml_uint8_t)i1_fcml_uint8_t.getInt8(), (fcml_uint8_t)0xFF ); STF_ASSERT_EQUAL( i1_fcml_uint8_t.isSigned(), FCML_FALSE ); STF_ASSERT_EQUAL( i1_fcml_uint8_t.getSize(), FCML_DS_8 ); STF_ASSERT_EQUAL( (fcml_int8_t)i1_fcml_int8_t.getInt8(), (fcml_int8_t)0xFF ); STF_ASSERT_EQUAL( i1_fcml_int8_t.isSigned(), FCML_TRUE ); STF_ASSERT_EQUAL( i1_fcml_int8_t.getSize(), FCML_DS_8 ); STF_ASSERT_EQUAL( (fcml_uint16_t)i1_fcml_uint16_t.getInt16(), (fcml_uint16_t)0xFFFF ); STF_ASSERT_EQUAL( i1_fcml_uint16_t.isSigned(), FCML_FALSE ); STF_ASSERT_EQUAL( i1_fcml_uint16_t.getSize(), FCML_DS_16 ); STF_ASSERT_EQUAL( (fcml_int16_t)i1_fcml_int16_t.getInt16(), (fcml_int16_t)0xFFFF ); STF_ASSERT_EQUAL( i1_fcml_int16_t.isSigned(), FCML_TRUE ); STF_ASSERT_EQUAL( i1_fcml_int16_t.getSize(), FCML_DS_16 ); STF_ASSERT_EQUAL( (fcml_uint32_t)i1_fcml_uint32_t.getInt32(), (fcml_uint32_t)0xFFFFFFFF ); STF_ASSERT_EQUAL( i1_fcml_uint32_t.isSigned(), FCML_FALSE ); STF_ASSERT_EQUAL( i1_fcml_uint32_t.getSize(), FCML_DS_32 ); STF_ASSERT_EQUAL( (fcml_int32_t)i1_fcml_int32_t.getInt32(), (fcml_int32_t)0xFFFFFFFF ); STF_ASSERT_EQUAL( i1_fcml_int32_t.isSigned(), FCML_TRUE ); STF_ASSERT_EQUAL( i1_fcml_int32_t.getSize(), FCML_DS_32 ); STF_ASSERT_EQUAL( (fcml_uint64_t)i1_fcml_uint64_t.getInt64(), (fcml_uint64_t)0xFFFFFFFFFFFFFFFFUL ); STF_ASSERT_EQUAL( i1_fcml_uint64_t.isSigned(), FCML_FALSE ); STF_ASSERT_EQUAL( i1_fcml_uint64_t.getSize(), FCML_DS_64 ); STF_ASSERT_EQUAL( (fcml_int64_t)i1_fcml_int64_t.getInt64(), (fcml_int64_t)0xFFFFFFFFFFFFFFFFUL ); STF_ASSERT_EQUAL( i1_fcml_int64_t.isSigned(), FCML_TRUE ); STF_ASSERT_EQUAL( i1_fcml_int64_t.getSize(), FCML_DS_64 ); } void fcml_tf_cpp_integer_copy(void) { Integer i1c_fcml_uint8_t = (fcml_uint8_t)0xFF; Integer i1c_fcml_int8_t = (fcml_int8_t)0xFF; Integer i1c_fcml_uint16_t = (fcml_uint16_t)0xFFFF; Integer i1c_fcml_int16_t = (fcml_int16_t)0xFFFF; Integer i1c_fcml_uint32_t = (fcml_uint32_t)0xFFFFFFFF; Integer i1c_fcml_int32_t = (fcml_int32_t)0xFFFFFFFF; Integer i1c_fcml_uint64_t = (fcml_uint64_t)0xFFFFFFFFFFFFFFFFUL; Integer i1c_fcml_int64_t = (fcml_int64_t)0xFFFFFFFFFFFFFFFFUL; Integer i1_fcml_uint8_t = i1c_fcml_uint8_t; Integer i1_fcml_int8_t = i1c_fcml_int8_t; Integer i1_fcml_uint16_t = i1c_fcml_uint16_t; Integer i1_fcml_int16_t = i1c_fcml_int16_t; Integer i1_fcml_uint32_t = i1c_fcml_uint32_t; Integer i1_fcml_int32_t = i1c_fcml_int32_t; Integer i1_fcml_uint64_t = i1c_fcml_uint64_t; Integer i1_fcml_int64_t = i1c_fcml_int64_t; i1c_fcml_uint8_t = 0; i1c_fcml_int8_t = 0; i1c_fcml_uint16_t = 0; i1c_fcml_int16_t = 0; i1c_fcml_uint32_t = 0; i1c_fcml_int32_t = 0; i1c_fcml_uint64_t = 0; i1c_fcml_int64_t = 0; STF_ASSERT_EQUAL( (fcml_uint8_t)i1_fcml_uint8_t.getInt8(), (fcml_uint8_t)0xFF ); STF_ASSERT_EQUAL( i1_fcml_uint8_t.isSigned(), FCML_FALSE ); STF_ASSERT_EQUAL( i1_fcml_uint8_t.getSize(), FCML_DS_8 ); STF_ASSERT_EQUAL( (fcml_int8_t)i1_fcml_int8_t.getInt8(), (fcml_int8_t)0xFF ); STF_ASSERT_EQUAL( i1_fcml_int8_t.isSigned(), FCML_TRUE ); STF_ASSERT_EQUAL( i1_fcml_int8_t.getSize(), FCML_DS_8 ); STF_ASSERT_EQUAL( (fcml_uint16_t)i1_fcml_uint16_t.getInt16(), (fcml_uint16_t)0xFFFF ); STF_ASSERT_EQUAL( i1_fcml_uint16_t.isSigned(), FCML_FALSE ); STF_ASSERT_EQUAL( i1_fcml_uint16_t.getSize(), FCML_DS_16 ); STF_ASSERT_EQUAL( (fcml_int16_t)i1_fcml_int16_t.getInt16(), (fcml_int16_t)0xFFFF ); STF_ASSERT_EQUAL( i1_fcml_int16_t.isSigned(), FCML_TRUE ); STF_ASSERT_EQUAL( i1_fcml_int16_t.getSize(), FCML_DS_16 ); STF_ASSERT_EQUAL( (fcml_uint32_t)i1_fcml_uint32_t.getInt32(), (fcml_uint32_t)0xFFFFFFFF ); STF_ASSERT_EQUAL( i1_fcml_uint32_t.isSigned(), FCML_FALSE ); STF_ASSERT_EQUAL( i1_fcml_uint32_t.getSize(), FCML_DS_32 ); STF_ASSERT_EQUAL( (fcml_int32_t)i1_fcml_int32_t.getInt32(), (fcml_int32_t)0xFFFFFFFF ); STF_ASSERT_EQUAL( i1_fcml_int32_t.isSigned(), FCML_TRUE ); STF_ASSERT_EQUAL( i1_fcml_int32_t.getSize(), FCML_DS_32 ); STF_ASSERT_EQUAL( (fcml_uint64_t)i1_fcml_uint64_t.getInt64(), (fcml_uint64_t)0xFFFFFFFFFFFFFFFFUL ); STF_ASSERT_EQUAL( i1_fcml_uint64_t.isSigned(), FCML_FALSE ); STF_ASSERT_EQUAL( i1_fcml_uint64_t.getSize(), FCML_DS_64 ); STF_ASSERT_EQUAL( (fcml_int64_t)i1_fcml_int64_t.getInt64(), (fcml_int64_t)0xFFFFFFFFFFFFFFFFUL ); STF_ASSERT_EQUAL( i1_fcml_int64_t.isSigned(), FCML_TRUE ); STF_ASSERT_EQUAL( i1_fcml_int64_t.getSize(), FCML_DS_64 ); } void fcml_tf_cpp_integer_casting(void) { Integer i1c_fcml_uint8_t = (fcml_uint8_t)0xFF; Integer i1c_fcml_int8_t = (fcml_int8_t)0xFF; Integer i1c_fcml_uint16_t = (fcml_uint16_t)0xFFFF; Integer i1c_fcml_int16_t = (fcml_int16_t)0xFFFF; Integer i1c_fcml_uint32_t = (fcml_uint32_t)0xFFFFFFFF; Integer i1c_fcml_int32_t = (fcml_int32_t)0xFFFFFFFF; Integer i1c_fcml_uint64_t = (fcml_uint64_t)0xFFFFFFFFFFFFFFFFUL; Integer i1c_fcml_int64_t = (fcml_int64_t)0xFFFFFFFFFFFFFFFFUL; fcml_uint8_t i1_fcml_uint8_t = i1c_fcml_uint8_t; fcml_int8_t i1_fcml_int8_t = i1c_fcml_int8_t; fcml_uint16_t i1_fcml_uint16_t = i1c_fcml_uint16_t; fcml_int16_t i1_fcml_int16_t = i1c_fcml_int16_t; fcml_uint32_t i1_fcml_uint32_t = i1c_fcml_uint32_t; fcml_int32_t i1_fcml_int32_t = i1c_fcml_int32_t; fcml_uint64_t i1_fcml_uint64_t = i1c_fcml_uint64_t; fcml_int64_t i1_fcml_int64_t = i1c_fcml_int64_t; STF_ASSERT_EQUAL( i1_fcml_uint8_t, (fcml_uint8_t)0xFF ); STF_ASSERT_EQUAL( i1_fcml_int8_t, (fcml_int8_t)0xFF ); STF_ASSERT_EQUAL( i1_fcml_uint16_t, (fcml_uint16_t)0xFFFF ); STF_ASSERT_EQUAL( i1_fcml_int16_t, (fcml_int16_t)0xFFFF ); STF_ASSERT_EQUAL( i1_fcml_uint32_t, (fcml_uint32_t)0xFFFFFFFF ); STF_ASSERT_EQUAL( i1_fcml_int32_t, (fcml_int32_t)0xFFFFFFFF ); STF_ASSERT_EQUAL( i1_fcml_uint64_t, (fcml_uint64_t)0xFFFFFFFFFFFFFFFFUL ); STF_ASSERT_EQUAL( i1_fcml_int64_t, (fcml_int64_t)0xFFFFFFFFFFFFFFFFUL ); // Conversion. fcml_uint8_t conveted = i1c_fcml_int64_t; STF_ASSERT_EQUAL( conveted, (fcml_uint8_t)0xFF ); } void fcml_tf_cpp_integer_comparisions(void) { Integer int1 = (fcml_int16_t)-1; Integer int2 = (fcml_int8_t)-1; Integer int3 = (fcml_int8_t)18; STF_ASSERT( int1 == int2 ); STF_ASSERT( !(int1 != int2) ); STF_ASSERT( int1 != int3 ); Integer int4 = (fcml_uint8_t)0xFF; Integer int5 = (fcml_uint16_t)0xFFFF; Integer int6 = (fcml_uint32_t)0xFFFF; STF_ASSERT( int4 != int5 ); STF_ASSERT( int5 == int6 ); } void fcml_tf_cpp_integer_expressions(void) { const Integer i1c_fcml_uint8_t = (fcml_uint8_t)0xFF; const Integer i1c_fcml_int64_t = (fcml_int64_t)0xFFFFFFFFFFFFFFFFUL; // 255 + -1 = 254 const Integer resultInt = i1c_fcml_int64_t + i1c_fcml_uint8_t; STF_ASSERT_EQUAL( resultInt.getSize(), FCML_DS_64 ); STF_ASSERT_EQUAL( resultInt.isSigned(), FCML_TRUE ); STF_ASSERT_EQUAL( resultInt.getInt64(), (fcml_int64_t)254 ); fcml_uint8_t result = i1c_fcml_int64_t + i1c_fcml_uint8_t; STF_ASSERT_EQUAL( result, (fcml_uint8_t)254 ); Integer i1i_fcml_uint8_t = (fcml_uint8_t)4; Integer i1i_fcml_int64_t = (fcml_int64_t)8; result = i1i_fcml_int64_t / i1i_fcml_uint8_t; STF_ASSERT_EQUAL( result, (fcml_uint8_t)2 ); result = i1i_fcml_int64_t * i1i_fcml_uint8_t; STF_ASSERT_EQUAL( result, (fcml_uint8_t)32 ); result = i1i_fcml_int64_t - i1i_fcml_uint8_t; STF_ASSERT_EQUAL( result, (fcml_uint8_t)4 ); Integer op_pp; op_pp += 10; STF_ASSERT_EQUAL( (fcml_uint64_t)op_pp.getInt64(), (fcml_uint64_t)10 ); op_pp *= 2; STF_ASSERT_EQUAL( (fcml_uint64_t)op_pp.getInt64(), (fcml_uint64_t)20 ); op_pp /= 4; STF_ASSERT_EQUAL( (fcml_uint64_t)op_pp.getInt64(), (fcml_uint64_t)5 ); op_pp -= 1; STF_ASSERT_EQUAL( (fcml_uint64_t)op_pp.getInt64(), (fcml_uint64_t)4 ); Integer value_1((fcml_uint8_t)0xFE); Integer value_2((fcml_uint8_t)0x01); Integer value_3 = value_1 + value_2; value_1 = *(&value_2); STF_ASSERT_EQUAL( value_3.getSize(), FCML_DS_8 ); STF_ASSERT_EQUAL( value_3.isSigned(), FCML_FALSE ); STF_ASSERT_EQUAL( (fcml_uint8_t)value_3.getInt8(), (fcml_uint8_t)0xFF ); } void fcml_tf_cpp_integer_example(void) { Integer v1 = static_cast( 10 ); Integer v2 = static_cast( 20 ); fcml_uint8_t sum = v1 + v2; STF_ASSERT( sum == 30 ); } void fcml_tf_cpp_integer_example_1(void) { Integer v1 = (fcml_int64_t)10; Integer v2 = (fcml_uint8_t)20; Integer sum = v2 + v1; STF_ASSERT( sum == 30 ); STF_ASSERT( !sum.isSigned() ); STF_ASSERT_EQUAL( sum.getSize(), 8 ); } void fcml_tf_cpp_registers(void) { const Register ® = AL; if( reg == Register::AL() ) { STF_ASSERT( true ); } STF_ASSERT_EQUAL( reg.getReg(), FCML_REG_AL ); STF_ASSERT_EQUAL( reg.getSize(), FCML_DS_8 ); STF_ASSERT_EQUAL( reg.getType(), Register::REG_GPR ); STF_ASSERT_EQUAL( reg.getX64Exp(), FCML_FALSE ); Register regCons( FCML_REG_AL, FCML_DS_8 ); STF_ASSERT_EQUAL( regCons.getReg(), FCML_REG_AL ); STF_ASSERT_EQUAL( regCons.getSize(), FCML_DS_8 ); STF_ASSERT_EQUAL( regCons.getType(), Register::REG_GPR ); STF_ASSERT_EQUAL( regCons.getX64Exp(), FCML_FALSE ); STF_ASSERT( Register::EAX() == EAX ); STF_ASSERT( !(Register::EAX() == Register::ECX()) ); STF_ASSERT( Register::EAX() != Register::EBX() ); STF_ASSERT( !(Register::EAX() != Register::EAX()) ); } void fcml_tf_cpp_far_pointer(void) { FarPointer fp = FarPointer(0x3000, 0x000401000 ); STF_ASSERT_EQUAL( fp.getSegment(), 0x3000 ); STF_ASSERT_EQUAL( fp.getOffset16(), 0x0000 ); STF_ASSERT_EQUAL( fp.getOffset32(), 0x000401000 ); STF_ASSERT_EQUAL( fp.getOffsetSize(), FCML_DS_32 ); fp = FarPointer::off32( 0x3000, 0x000401000 ); STF_ASSERT_EQUAL( fp.getSegment(), 0x3000 ); STF_ASSERT_EQUAL( fp.getOffset16(), 0x0000 ); STF_ASSERT_EQUAL( fp.getOffset32(), 0x000401000 ); STF_ASSERT_EQUAL( fp.getOffsetSize(), FCML_DS_32 ); fp = FarPointer(0x3000, (fcml_int16_t)0x1212 ); STF_ASSERT_EQUAL( fp.getSegment(), 0x3000 ); STF_ASSERT_EQUAL( fp.getOffset16(), 0x1212 ); STF_ASSERT_EQUAL( fp.getOffset32(), 0x0000 ); STF_ASSERT_EQUAL( fp.getOffsetSize(), FCML_DS_16 ); fp = FarPointer::off16( 0x3000, 0x01212 ); STF_ASSERT_EQUAL( fp.getSegment(), 0x3000 ); STF_ASSERT_EQUAL( fp.getOffset16(), 0x1212 ); STF_ASSERT_EQUAL( fp.getOffset32(), 0x0000 ); STF_ASSERT_EQUAL( fp.getOffsetSize(), FCML_DS_16 ); } void fcml_tf_cpp_segment_selector(void) { SegmentSelector ss(Register::CS(),true); STF_ASSERT_EQUAL( ss.getSegmentSelector().getReg(), FCML_REG_CS ); ss = EAX; STF_ASSERT_EQUAL( ss.getSegmentSelector().getReg(), FCML_REG_EAX ); Register reg; reg = ss; STF_ASSERT_EQUAL( reg.getReg(), FCML_REG_EAX ); } void fcml_tf_cpp_effective_address(void) { EffectiveAddress empty; STF_ASSERT_EQUAL( empty.getBase(), Register::UNDEF() ); STF_ASSERT_EQUAL( empty.getIndex(), Register::UNDEF() ); STF_ASSERT_EQUAL( empty.getScaleFactor(), (fcml_uint8_t)0 ); STF_ASSERT_EQUAL( empty.getDisplacement(), Integer() ); EffectiveAddress base( Register::EAX() ); STF_ASSERT_EQUAL( base.getBase(), Register::EAX() ); STF_ASSERT_EQUAL( base.getIndex(), Register::UNDEF() ); STF_ASSERT_EQUAL( base.getScaleFactor(), 0 ); STF_ASSERT_EQUAL( base.getDisplacement(), Integer::int8(0) ); EffectiveAddress base_disp( Register::EAX(), Integer::int8(67) ); STF_ASSERT_EQUAL( base_disp.getBase(), Register::EAX() ); STF_ASSERT_EQUAL( base_disp.getIndex(), Register::UNDEF() ); STF_ASSERT_EQUAL( base_disp.getScaleFactor(), 0 ); STF_ASSERT_EQUAL( base_disp.getDisplacement(), Integer::int8(67) ); EffectiveAddress index_scale_disp( Register::EAX(), 4, Integer::int32(400) ); STF_ASSERT_EQUAL( index_scale_disp.getBase(), Register::UNDEF() ); STF_ASSERT_EQUAL( index_scale_disp.getIndex(), Register::EAX() ); STF_ASSERT_EQUAL( index_scale_disp.getScaleFactor(), 4 ); STF_ASSERT_EQUAL( index_scale_disp.getDisplacement(), Integer::int16(400) ); EffectiveAddress base_index( Register::EAX(), Register::ECX() ); STF_ASSERT_EQUAL( base_index.getBase(), Register::EAX() ); STF_ASSERT_EQUAL( base_index.getIndex(), Register::ECX() ); STF_ASSERT_EQUAL( base_index.getScaleFactor(), 0 ); STF_ASSERT_EQUAL( base_index.getDisplacement(), Integer::int8(0) ); EffectiveAddress base_index_scale( Register::EAX(), Register::ECX(), 4 ); STF_ASSERT_EQUAL( base_index_scale.getBase(), Register::EAX() ); STF_ASSERT_EQUAL( base_index_scale.getIndex(), Register::ECX() ); STF_ASSERT_EQUAL( base_index_scale.getScaleFactor(), 4 ); EffectiveAddress full( Register::EAX(), Register::EDX(), 1, Integer::int8(67) ); STF_ASSERT_EQUAL( full.getBase(), Register::EAX() ); STF_ASSERT_EQUAL( full.getIndex(), Register::EDX() ); STF_ASSERT_EQUAL( full.getScaleFactor(), 1 ); STF_ASSERT_EQUAL( full.getDisplacement(), Integer::int8(67) ); } void fcml_tf_cpp_effective_address_factory_methods(void) { EffectiveAddress base = EffectiveAddress::addr( Register::EAX() ); STF_ASSERT_EQUAL( base.getBase(), Register::EAX() ); STF_ASSERT_EQUAL( base.getIndex(), Register::UNDEF() ); STF_ASSERT_EQUAL( base.getScaleFactor(), 0 ); STF_ASSERT_EQUAL( base.getDisplacement(), Integer::int8(0) ); EffectiveAddress base_disp = EffectiveAddress::addr( Register::EAX(), Integer::int8(67) ); STF_ASSERT_EQUAL( base_disp.getBase(), Register::EAX() ); STF_ASSERT_EQUAL( base_disp.getIndex(), Register::UNDEF() ); STF_ASSERT_EQUAL( base_disp.getScaleFactor(), 0 ); STF_ASSERT_EQUAL( base_disp.getDisplacement(), Integer::int8(67) ); EffectiveAddress index_scale_disp = EffectiveAddress::addr( Register::EAX(), 4, Integer::int32(400) ); STF_ASSERT_EQUAL( index_scale_disp.getBase(), Register::UNDEF() ); STF_ASSERT_EQUAL( index_scale_disp.getIndex(), Register::EAX() ); STF_ASSERT_EQUAL( index_scale_disp.getScaleFactor(), 4 ); STF_ASSERT_EQUAL( index_scale_disp.getDisplacement(), Integer::int16(400) ); EffectiveAddress base_index = EffectiveAddress::addr( Register::EAX(), Register::ECX() ); STF_ASSERT_EQUAL( base_index.getBase(), Register::EAX() ); STF_ASSERT_EQUAL( base_index.getIndex(), Register::ECX() ); STF_ASSERT_EQUAL( base_index.getScaleFactor(), 0 ); STF_ASSERT_EQUAL( base_index.getDisplacement(), Integer::int8(0) ); EffectiveAddress base_index_scale = EffectiveAddress::addr( Register::EAX(), Register::ECX(), 4 ); STF_ASSERT_EQUAL( base_index_scale.getBase(), Register::EAX() ); STF_ASSERT_EQUAL( base_index_scale.getIndex(), Register::ECX() ); STF_ASSERT_EQUAL( base_index_scale.getScaleFactor(), 4 ); EffectiveAddress full = EffectiveAddress::addr( Register::EAX(), Register::EDX(), 1, Integer::int8(67) ); STF_ASSERT_EQUAL( full.getBase(), Register::EAX() ); STF_ASSERT_EQUAL( full.getIndex(), Register::EDX() ); STF_ASSERT_EQUAL( full.getScaleFactor(), 1 ); STF_ASSERT_EQUAL( full.getDisplacement(), Integer::int8(67) ); } void fcml_tf_cpp_address(void) { Address address((fcml_uint32_t)0x401000); STF_ASSERT_EQUAL( address.getAddressForm(), Address::AF_OFFSET ); STF_ASSERT_EQUAL( address.getSizeOperator(), FCML_DS_UNDEF ); STF_ASSERT_EQUAL( address.isOffset(), true ); STF_ASSERT( address.getOffset().getInt32() == 0x401000 ); STF_ASSERT_EQUAL( address.getOffset().getSize(), FCML_DS_32 ); STF_ASSERT_EQUAL( address.isEffectiveAddress(), false ); Address addressEffective(EffectiveAddress::addr(Register::EAX()), FCML_DS_32); STF_ASSERT_EQUAL( addressEffective.getAddressForm(), Address::AF_COMBINED ); STF_ASSERT_EQUAL( addressEffective.getSizeOperator(), FCML_DS_32 ); STF_ASSERT_EQUAL( addressEffective.isOffset(), false ); STF_ASSERT_EQUAL( addressEffective.getEffectiveAddress().getBase(), Register::EAX() ); STF_ASSERT_EQUAL( addressEffective.isEffectiveAddress(), true ); addressEffective = Address::effective(EAX, FCML_DS_32); STF_ASSERT_EQUAL( addressEffective.getAddressForm(), Address::AF_COMBINED ); STF_ASSERT_EQUAL( addressEffective.getSizeOperator(), FCML_DS_32 ); STF_ASSERT_EQUAL( addressEffective.isOffset(), false ); STF_ASSERT_EQUAL( addressEffective.getEffectiveAddress().getBase(), Register::EAX() ); STF_ASSERT_EQUAL( addressEffective.isEffectiveAddress(), true ); } void fcml_tf_cpp_condition() { Condition condition( Condition::CONDITION_LE, true ); STF_ASSERT_EQUAL( condition, Condition::NLE() ); if( condition.isNLE() && condition.isNegation() ) { STF_ASSERT( true ); } else { STF_ASSERT( false ); } if( condition == Condition::NLE() ) { STF_ASSERT( true ); } else { STF_ASSERT( false ); } } void fcml_tf_cpp_operand() { Operand imm(0x201000); STF_ASSERT( imm.getImmediate() == (fcml_int32_t)0x201000 ); STF_ASSERT( imm.isImm() ); Operand far_ptr(FarPointer(0x1020, (fcml_int16_t)0x3030)); STF_ASSERT( far_ptr.getFarPointer().getSegment() == (fcml_int16_t)0x1020 ); STF_ASSERT( far_ptr.getFarPointer().getOffset16() == (fcml_int16_t)0x3030 ); STF_ASSERT( far_ptr.isFar() ); Operand operandImm = OB::imm( 0x401000 ); fcml_uint32_t value = operandImm.getImmediate(); STF_ASSERT_EQUAL( value, 0x401000 ); Operand operand; operand.far_ptr(FarPointer(0x1020, (fcml_int16_t)0x3030)); STF_ASSERT( operand.getFarPointer().getSegment() == (fcml_int16_t)0x1020 ); STF_ASSERT( operand.getFarPointer().getOffset16() == (fcml_int16_t)0x3030 ); STF_ASSERT( operand.isFar() ); operand = OB::far_ptr(0x1020, (fcml_int16_t)0x3030); STF_ASSERT( operand.getFarPointer().getSegment() == (fcml_int16_t)0x1020 ); STF_ASSERT( operand.getFarPointer().getOffset16() == (fcml_int16_t)0x3030 ); STF_ASSERT( operand.isFar() ); Operand addrSimple = OB::addr(EffectiveAddress(Register::EAX())); STF_ASSERT( addrSimple.getAddress().isEffectiveAddress() ); STF_ASSERT_EQUAL( addrSimple.getAddress().getEffectiveAddress().getBase(), Register::EAX() ); STF_ASSERT( addrSimple.isAddr() ); Operand operandEA; operandEA.addr(EffectiveAddress(Register::EAX())); STF_ASSERT( operandEA.getAddress().isEffectiveAddress() ); STF_ASSERT_EQUAL( operandEA.getAddress().getEffectiveAddress().getBase(), Register::EAX() ); STF_ASSERT( operandEA.isAddr() ); Operand address = Operand(Address(EffectiveAddress(Register::EAX()))); STF_ASSERT( address.getAddress().isEffectiveAddress() ); STF_ASSERT_EQUAL( address.getAddress().getEffectiveAddress().getBase(), Register::EAX() ); STF_ASSERT( address.isAddr() ); Operand regSimple = OB::reg(Register::EAX()); STF_ASSERT( regSimple.isReg() ); STF_ASSERT_EQUAL( regSimple.getRegister(), Register::EAX() ); } void fcml_tf_cpp_entry_point() { EntryPoint entryPoint( EntryPoint::OM_32_BIT, 0x401000 ); STF_ASSERT_EQUAL( entryPoint.getOpMode(), EntryPoint::OM_32_BIT ); STF_ASSERT_EQUAL( entryPoint.getIP(), 0x401000 ); } fcml_stf_test_case fcml_ti_cpp_common[] = { { "fcml_tf_cpp_integer", fcml_tf_cpp_integer }, { "fcml_tf_cpp_integer_operator", fcml_tf_cpp_integer_operator }, { "fcml_tf_cpp_integer_casting", fcml_tf_cpp_integer_casting }, { "fcml_tf_cpp_integer_expressions", fcml_tf_cpp_integer_expressions }, { "fcml_tf_cpp_integer_comparisions", fcml_tf_cpp_integer_comparisions }, { "fcml_tf_cpp_registers", fcml_tf_cpp_registers }, { "fcml_tf_cpp_far_pointer", fcml_tf_cpp_far_pointer }, { "fcml_tf_cpp_effective_address", fcml_tf_cpp_effective_address }, { "fcml_tf_cpp_effective_address_factory_methods", fcml_tf_cpp_effective_address_factory_methods }, { "fcml_tf_cpp_address", fcml_tf_cpp_address }, { "fcml_tf_cpp_operand", fcml_tf_cpp_operand }, { "fcml_tf_cpp_segment_selector", fcml_tf_cpp_segment_selector }, { "fcml_tf_cpp_entry_point", fcml_tf_cpp_entry_point }, { "fcml_tf_cpp_integer_example", fcml_tf_cpp_integer_example }, { "fcml_tf_cpp_integer_example_1", fcml_tf_cpp_integer_example_1 }, { "fcml_tf_cpp_condition", fcml_tf_cpp_condition }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_cpp_common = { "suite-fcml-cpp-common", fcml_tf_cpp_common_suite_init, fcml_tf_cpp_common_suite_cleanup, fcml_ti_cpp_common }; fcml-1.1.1/check/cpp-tests/dialect_t.cpp0000644000175000017500000000355512560745216015027 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /* Test suite initialization. */ #include "dialect_t.hpp" #include #include using namespace fcml; class DialectExtractor: public DialectAware { }; fcml_bool fcml_tf_cpp_dialect_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_cpp_dialect_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_cpp_init_intel(void) { IntelDialect intel; DialectExtractor extractor; STF_ASSERT_PTR_NOT_NULL( extractor.extractDialect( intel ) ); IntelDialect *intelPTR = new IntelDialect(FCML_INTEL_DIALECT_CF_DEFAULT); STF_ASSERT_PTR_NOT_NULL( extractor.extractDialect( *intelPTR ) ); delete intelPTR; } void fcml_tf_cpp_init_gas(void) { } fcml_stf_test_case fcml_ti_cpp_dialect[] = { { "fcml_tf_cpp_init_intel", fcml_tf_cpp_init_intel }, { "fcml_tf_cpp_init_gas", fcml_tf_cpp_init_gas }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_cpp_dialect = { "suite-fcml-cpp-dialect", fcml_tf_cpp_dialect_suite_init, fcml_tf_cpp_dialect_suite_cleanup, fcml_ti_cpp_dialect }; fcml-1.1.1/check/cpp-tests/common_t.hpp0000644000175000017500000000175712560745216014721 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 STRUCT_WRAPPER_T_HPP_ #define STRUCT_WRAPPER_T_HPP_ #include extern fcml_stf_test_suite fcml_si_cpp_common; #endif /* STRUCT_WRAPPER_T_HPP_ */ fcml-1.1.1/check/cpp-tests/Makefile.in0000644000175000017500000013556412561443455014447 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # 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, # 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. @SET_MAKE@ VPATH = @srcdir@ 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 \ ?) ;; \ *) 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@ pkglibexecdir = $(libexecdir)/@PACKAGE@ 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 = @build@ host_triplet = @host@ noinst_PROGRAMS = fcml_cpp_check$(EXEEXT) TESTS = $(am__EXEEXT_1) subdir = check/cpp-tests 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 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.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 = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_fcml_cpp_check_OBJECTS = fcml_cpp_check-main.$(OBJEXT) \ fcml_cpp_check-dialect_t.$(OBJEXT) \ fcml_cpp_check-common_t.$(OBJEXT) \ fcml_cpp_check-assembler_t.$(OBJEXT) \ fcml_cpp_check-disassembler_t.$(OBJEXT) \ fcml_cpp_check-errors_t.$(OBJEXT) \ fcml_cpp_check-parser_t.$(OBJEXT) fcml_cpp_check_OBJECTS = $(am_fcml_cpp_check_OBJECTS) fcml_cpp_check_DEPENDENCIES = $(top_srcdir)/src/libfcml.la \ $(top_srcdir)/check/stf/libstf.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = 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)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=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 = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=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 = SOURCES = $(fcml_cpp_check_SOURCES) DIST_SOURCES = $(fcml_cpp_check_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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 am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck am__EXEEXT_1 = fcml_cpp_check$(EXEEXT) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) 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@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FCML_IMPORT_LIB = @FCML_IMPORT_LIB@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ 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@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ 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@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # Include all tests. fcml_cpp_check_SOURCES = main.cpp \ dialect_t.cpp \ dialect_t.hpp \ common_t.cpp \ common_t.hpp \ assembler_t.cpp \ assembler_t.hpp \ disassembler_t.cpp \ disassembler_t.hpp \ errors_t.cpp \ errors_t.hpp \ parser_t.cpp \ parser_t.hpp fcml_cpp_check_CPPFLAGS = -Wall -Wno-write-strings -I$(top_srcdir)/include -I$(top_srcdir)/check/stf @FCML_IMPORT_LIB@ fcml_cpp_check_LDADD = $(top_srcdir)/src/libfcml.la $(top_srcdir)/check/stf/libstf.la check_SCRIPTS = fcml_cpp_check all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: $(srcdir)/Makefile.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) --gnu check/cpp-tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu check/cpp-tests/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_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-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list fcml_cpp_check$(EXEEXT): $(fcml_cpp_check_OBJECTS) $(fcml_cpp_check_DEPENDENCIES) $(EXTRA_fcml_cpp_check_DEPENDENCIES) @rm -f fcml_cpp_check$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(fcml_cpp_check_OBJECTS) $(fcml_cpp_check_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_cpp_check-assembler_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_cpp_check-common_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_cpp_check-dialect_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_cpp_check-disassembler_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_cpp_check-errors_t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_cpp_check-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_cpp_check-parser_t.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< fcml_cpp_check-main.o: main.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fcml_cpp_check-main.o -MD -MP -MF $(DEPDIR)/fcml_cpp_check-main.Tpo -c -o fcml_cpp_check-main.o `test -f 'main.cpp' || echo '$(srcdir)/'`main.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_cpp_check-main.Tpo $(DEPDIR)/fcml_cpp_check-main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='main.cpp' object='fcml_cpp_check-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fcml_cpp_check-main.o `test -f 'main.cpp' || echo '$(srcdir)/'`main.cpp fcml_cpp_check-main.obj: main.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fcml_cpp_check-main.obj -MD -MP -MF $(DEPDIR)/fcml_cpp_check-main.Tpo -c -o fcml_cpp_check-main.obj `if test -f 'main.cpp'; then $(CYGPATH_W) 'main.cpp'; else $(CYGPATH_W) '$(srcdir)/main.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_cpp_check-main.Tpo $(DEPDIR)/fcml_cpp_check-main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='main.cpp' object='fcml_cpp_check-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fcml_cpp_check-main.obj `if test -f 'main.cpp'; then $(CYGPATH_W) 'main.cpp'; else $(CYGPATH_W) '$(srcdir)/main.cpp'; fi` fcml_cpp_check-dialect_t.o: dialect_t.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fcml_cpp_check-dialect_t.o -MD -MP -MF $(DEPDIR)/fcml_cpp_check-dialect_t.Tpo -c -o fcml_cpp_check-dialect_t.o `test -f 'dialect_t.cpp' || echo '$(srcdir)/'`dialect_t.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_cpp_check-dialect_t.Tpo $(DEPDIR)/fcml_cpp_check-dialect_t.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dialect_t.cpp' object='fcml_cpp_check-dialect_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fcml_cpp_check-dialect_t.o `test -f 'dialect_t.cpp' || echo '$(srcdir)/'`dialect_t.cpp fcml_cpp_check-dialect_t.obj: dialect_t.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fcml_cpp_check-dialect_t.obj -MD -MP -MF $(DEPDIR)/fcml_cpp_check-dialect_t.Tpo -c -o fcml_cpp_check-dialect_t.obj `if test -f 'dialect_t.cpp'; then $(CYGPATH_W) 'dialect_t.cpp'; else $(CYGPATH_W) '$(srcdir)/dialect_t.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_cpp_check-dialect_t.Tpo $(DEPDIR)/fcml_cpp_check-dialect_t.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dialect_t.cpp' object='fcml_cpp_check-dialect_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fcml_cpp_check-dialect_t.obj `if test -f 'dialect_t.cpp'; then $(CYGPATH_W) 'dialect_t.cpp'; else $(CYGPATH_W) '$(srcdir)/dialect_t.cpp'; fi` fcml_cpp_check-common_t.o: common_t.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fcml_cpp_check-common_t.o -MD -MP -MF $(DEPDIR)/fcml_cpp_check-common_t.Tpo -c -o fcml_cpp_check-common_t.o `test -f 'common_t.cpp' || echo '$(srcdir)/'`common_t.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_cpp_check-common_t.Tpo $(DEPDIR)/fcml_cpp_check-common_t.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common_t.cpp' object='fcml_cpp_check-common_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fcml_cpp_check-common_t.o `test -f 'common_t.cpp' || echo '$(srcdir)/'`common_t.cpp fcml_cpp_check-common_t.obj: common_t.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fcml_cpp_check-common_t.obj -MD -MP -MF $(DEPDIR)/fcml_cpp_check-common_t.Tpo -c -o fcml_cpp_check-common_t.obj `if test -f 'common_t.cpp'; then $(CYGPATH_W) 'common_t.cpp'; else $(CYGPATH_W) '$(srcdir)/common_t.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_cpp_check-common_t.Tpo $(DEPDIR)/fcml_cpp_check-common_t.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common_t.cpp' object='fcml_cpp_check-common_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fcml_cpp_check-common_t.obj `if test -f 'common_t.cpp'; then $(CYGPATH_W) 'common_t.cpp'; else $(CYGPATH_W) '$(srcdir)/common_t.cpp'; fi` fcml_cpp_check-assembler_t.o: assembler_t.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fcml_cpp_check-assembler_t.o -MD -MP -MF $(DEPDIR)/fcml_cpp_check-assembler_t.Tpo -c -o fcml_cpp_check-assembler_t.o `test -f 'assembler_t.cpp' || echo '$(srcdir)/'`assembler_t.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_cpp_check-assembler_t.Tpo $(DEPDIR)/fcml_cpp_check-assembler_t.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='assembler_t.cpp' object='fcml_cpp_check-assembler_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fcml_cpp_check-assembler_t.o `test -f 'assembler_t.cpp' || echo '$(srcdir)/'`assembler_t.cpp fcml_cpp_check-assembler_t.obj: assembler_t.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fcml_cpp_check-assembler_t.obj -MD -MP -MF $(DEPDIR)/fcml_cpp_check-assembler_t.Tpo -c -o fcml_cpp_check-assembler_t.obj `if test -f 'assembler_t.cpp'; then $(CYGPATH_W) 'assembler_t.cpp'; else $(CYGPATH_W) '$(srcdir)/assembler_t.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_cpp_check-assembler_t.Tpo $(DEPDIR)/fcml_cpp_check-assembler_t.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='assembler_t.cpp' object='fcml_cpp_check-assembler_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fcml_cpp_check-assembler_t.obj `if test -f 'assembler_t.cpp'; then $(CYGPATH_W) 'assembler_t.cpp'; else $(CYGPATH_W) '$(srcdir)/assembler_t.cpp'; fi` fcml_cpp_check-disassembler_t.o: disassembler_t.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fcml_cpp_check-disassembler_t.o -MD -MP -MF $(DEPDIR)/fcml_cpp_check-disassembler_t.Tpo -c -o fcml_cpp_check-disassembler_t.o `test -f 'disassembler_t.cpp' || echo '$(srcdir)/'`disassembler_t.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_cpp_check-disassembler_t.Tpo $(DEPDIR)/fcml_cpp_check-disassembler_t.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='disassembler_t.cpp' object='fcml_cpp_check-disassembler_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fcml_cpp_check-disassembler_t.o `test -f 'disassembler_t.cpp' || echo '$(srcdir)/'`disassembler_t.cpp fcml_cpp_check-disassembler_t.obj: disassembler_t.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fcml_cpp_check-disassembler_t.obj -MD -MP -MF $(DEPDIR)/fcml_cpp_check-disassembler_t.Tpo -c -o fcml_cpp_check-disassembler_t.obj `if test -f 'disassembler_t.cpp'; then $(CYGPATH_W) 'disassembler_t.cpp'; else $(CYGPATH_W) '$(srcdir)/disassembler_t.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_cpp_check-disassembler_t.Tpo $(DEPDIR)/fcml_cpp_check-disassembler_t.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='disassembler_t.cpp' object='fcml_cpp_check-disassembler_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fcml_cpp_check-disassembler_t.obj `if test -f 'disassembler_t.cpp'; then $(CYGPATH_W) 'disassembler_t.cpp'; else $(CYGPATH_W) '$(srcdir)/disassembler_t.cpp'; fi` fcml_cpp_check-errors_t.o: errors_t.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fcml_cpp_check-errors_t.o -MD -MP -MF $(DEPDIR)/fcml_cpp_check-errors_t.Tpo -c -o fcml_cpp_check-errors_t.o `test -f 'errors_t.cpp' || echo '$(srcdir)/'`errors_t.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_cpp_check-errors_t.Tpo $(DEPDIR)/fcml_cpp_check-errors_t.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='errors_t.cpp' object='fcml_cpp_check-errors_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fcml_cpp_check-errors_t.o `test -f 'errors_t.cpp' || echo '$(srcdir)/'`errors_t.cpp fcml_cpp_check-errors_t.obj: errors_t.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fcml_cpp_check-errors_t.obj -MD -MP -MF $(DEPDIR)/fcml_cpp_check-errors_t.Tpo -c -o fcml_cpp_check-errors_t.obj `if test -f 'errors_t.cpp'; then $(CYGPATH_W) 'errors_t.cpp'; else $(CYGPATH_W) '$(srcdir)/errors_t.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_cpp_check-errors_t.Tpo $(DEPDIR)/fcml_cpp_check-errors_t.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='errors_t.cpp' object='fcml_cpp_check-errors_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fcml_cpp_check-errors_t.obj `if test -f 'errors_t.cpp'; then $(CYGPATH_W) 'errors_t.cpp'; else $(CYGPATH_W) '$(srcdir)/errors_t.cpp'; fi` fcml_cpp_check-parser_t.o: parser_t.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fcml_cpp_check-parser_t.o -MD -MP -MF $(DEPDIR)/fcml_cpp_check-parser_t.Tpo -c -o fcml_cpp_check-parser_t.o `test -f 'parser_t.cpp' || echo '$(srcdir)/'`parser_t.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_cpp_check-parser_t.Tpo $(DEPDIR)/fcml_cpp_check-parser_t.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parser_t.cpp' object='fcml_cpp_check-parser_t.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fcml_cpp_check-parser_t.o `test -f 'parser_t.cpp' || echo '$(srcdir)/'`parser_t.cpp fcml_cpp_check-parser_t.obj: parser_t.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT fcml_cpp_check-parser_t.obj -MD -MP -MF $(DEPDIR)/fcml_cpp_check-parser_t.Tpo -c -o fcml_cpp_check-parser_t.obj `if test -f 'parser_t.cpp'; then $(CYGPATH_W) 'parser_t.cpp'; else $(CYGPATH_W) '$(srcdir)/parser_t.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_cpp_check-parser_t.Tpo $(DEPDIR)/fcml_cpp_check-parser_t.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parser_t.cpp' object='fcml_cpp_check-parser_t.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_cpp_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o fcml_cpp_check-parser_t.obj `if test -f 'parser_t.cpp'; then $(CYGPATH_W) 'parser_t.cpp'; else $(CYGPATH_W) '$(srcdir)/parser_t.cpp'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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 # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all $(check_SCRIPTS) @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? fcml_cpp_check.log: fcml_cpp_check$(EXEEXT) @p='fcml_cpp_check$(EXEEXT)'; \ b='fcml_cpp_check'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) 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 $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(PROGRAMS) 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: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: 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." clean: clean-am clean-am: clean-generic clean-libtool 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 \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ clean-generic clean-libtool clean-noinstPROGRAMS cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool 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 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. .NOEXPORT: fcml-1.1.1/check/cpp-tests/dialect_t.hpp0000644000175000017500000000173312560745216015030 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 DIALECT_T_HPP_ #define DIALECT_T_HPP_ #include extern fcml_stf_test_suite fcml_si_cpp_dialect; #endif /* DIALECT_T_HPP_ */ fcml-1.1.1/check/cpp-tests/disassembler_t.hpp0000644000175000017500000000176012560745216016100 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 DISASSEMBLER_T_HPP_ #define DISASSEMBLER_T_HPP_ #include extern fcml_stf_test_suite fcml_si_cpp_disassembler; #endif /* DISASSEMBLER_T_HPP_ */ fcml-1.1.1/check/cpp-tests/disassembler_t.cpp0000644000175000017500000001524012560745216016071 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 */ /* Test suite initialization. */ #include "disassembler_t.hpp" #include #include #include #include #include #include #include #include using namespace fcml; using namespace fcml::gas; fcml_bool fcml_tf_cpp_disassembler_suite_init(void) { return FCML_TRUE; } fcml_bool fcml_tf_cpp_disassembler_suite_cleanup(void) { return FCML_TRUE; } void fcml_tf_cpp_disassemble(void) { fcml_uint8_t code[] = {0x80, 0x54, 0x01, 0x02, 0x03}; try { IntelDialect dialect; Disassembler disassembler( dialect ); DisassemblerContext ctx( code , sizeof( code ) ); ctx.setIP(0x401000); ctx.setOperatingMode(EntryPoint::OM_32_BIT); DisassemblerResult result; disassembler.disassemble( ctx, result ); const Instruction &instruction = result.getInstruction(); STF_ASSERT( instruction.getMnemonic() == M_ADC ); Renderer renderer( dialect ); RenderConfig config; fcml_cstring instructionMnemonic; renderer.render( config, result, instructionMnemonic ); STF_ASSERT_STRING_EQUAL( instructionMnemonic.c_str(), FCML_TEXT("adc byte ptr [ecx+eax+2],3") ); } catch( BaseException &exc ) { STF_FAIL("Exception while disassembling the code."); } } /* A 64-bit GDB dump used as an example. Dump of assembler code for function main(int, char**): 0x0000000000404ddc <+0>: 55 push %rbp 0x0000000000404ddd <+1>: 48 89 e5 mov %rsp,%rbp 0x0000000000404de0 <+4>: 48 83 ec 20 sub $0x20,%rsp 0x0000000000404de4 <+8>: 89 7d ec mov %edi,-0x14(%rbp) 0x0000000000404de7 <+11>: 48 89 75 e0 mov %rsi,-0x20(%rbp) 0x0000000000404deb <+15>: be 60 d2 62 00 mov $0x62d260,%esi 0x0000000000404df0 <+20>: bf e8 db 41 00 mov $0x41dbe8,%edi 0x0000000000404df5 <+25>: e8 1f 89 01 00 callq 0x41d719 */ fcml_uint8_t fcml_iarr_instruction_buffer_binary_code[] = { 0x55, 0x48, 0x89, 0xe5, 0x48, 0x83, 0xec, 0x20, 0x89, 0x7d, 0xec, 0x48, 0x89, 0x75, 0xe0, 0xbe, 0x60, 0xd2, 0x62, 0x00, 0xbf, 0xe8, 0xdb, 0x41, 0x00, 0xe8, 0x1f, 0x89, 0x01, 0x00 }; void fcml_tf_cpp_disassemble_instruction_buffer_disassemble_only(void) { try { GASDialect dialect; Disassembler disassembler( dialect ); DisassemblerContext ctx( fcml_iarr_instruction_buffer_binary_code , sizeof( fcml_iarr_instruction_buffer_binary_code ) ); ctx.setIP(0x404ddc); ctx.setOperatingMode(EntryPoint::OM_64_BIT); StatefulDisassembler disas( disassembler, ctx, true ); Instruction instruction; disas >> instruction; STF_ASSERT( instruction.getMnemonic() == M_PUSH ); disas >> instruction; STF_ASSERT( instruction.getMnemonic() == M_MOV ); } catch( BaseException &exc ) { STF_FAIL("Exception while disassembling the code."); } } void fcml_tf_cpp_disassemble_instruction_buffer_disassemble_render(void) { try { GASDialect dialect; Disassembler disassembler( dialect ); DisassemblerContext ctx( fcml_iarr_instruction_buffer_binary_code , sizeof( fcml_iarr_instruction_buffer_binary_code ) ); ctx.setIP(0x404ddc); ctx.setOperatingMode(EntryPoint::OM_64_BIT); StatefulDisassembler disas( disassembler, ctx, true ); fcml_cstring instruction; disas >> instruction; STF_ASSERT( instruction == FCML_TEXT( "push %rbp" ) ); disas >> instruction; STF_ASSERT( instruction == FCML_TEXT( "mov %rsp,%rbp" ) ); disas >> instruction; STF_ASSERT( instruction == FCML_TEXT( "sub $32,%rsp" ) ); disas >> instruction; STF_ASSERT( instruction == FCML_TEXT( "mov %edi,-20(%ebp)" ) ); disas >> instruction; STF_ASSERT( instruction == FCML_TEXT( "mov %rsi,-32(%ebp)" ) ); disas >> instruction; STF_ASSERT( instruction == FCML_TEXT( "mov $6476384,%esi" ) ); disas >> instruction; STF_ASSERT( instruction == FCML_TEXT( "mov $4316136,%edi" ) ); disas >> instruction; STF_ASSERT( instruction == FCML_TEXT( "callq 0x000000000041d719" ) ); } catch( BaseException &exc ) { STF_FAIL("Exception while disassembling the code."); } } void fcml_tf_cpp_disassemble_instruction_buffer_disassemble_only_stream(void) { try { GASDialect dialect; Disassembler disassembler( dialect ); DisassemblerContext ctx( fcml_iarr_instruction_buffer_binary_code , sizeof( fcml_iarr_instruction_buffer_binary_code ) ); ctx.setIP(0x404ddc); ctx.setOperatingMode(EntryPoint::OM_64_BIT); StatefulDisassembler disas( disassembler, ctx, true ); fcml_costream ostream; disas >> ostream; disas >> ostream; fcml_cstring src = ostream.str(); #if defined(_WIN32) STF_ASSERT( src == _FT("push %rbp\r\nmov %rsp,%rbp\r\n") ); #else STF_ASSERT( src == _FT("push %rbp\nmov %rsp,%rbp\n") ); #endif } catch( BaseException &exc ) { STF_FAIL("Exception while disassembling the code."); } } fcml_stf_test_case fcml_ti_cpp_disassembler[] = { { "fcml_tf_cpp_disassemble", fcml_tf_cpp_disassemble }, { "fcml_tf_cpp_disassemble_instruction_buffer_disassemble_only", fcml_tf_cpp_disassemble_instruction_buffer_disassemble_only }, { "fcml_tf_cpp_disassemble_instruction_buffer_disassemble_render", fcml_tf_cpp_disassemble_instruction_buffer_disassemble_render }, { "fcml_tf_cpp_disassemble_instruction_buffer_disassemble_only_stream", fcml_tf_cpp_disassemble_instruction_buffer_disassemble_only_stream }, FCML_STF_NULL_TEST }; fcml_stf_test_suite fcml_si_cpp_disassembler = { "suite-fcml-cpp-disassembler", fcml_tf_cpp_disassembler_suite_init, fcml_tf_cpp_disassembler_suite_cleanup, fcml_ti_cpp_disassembler }; fcml-1.1.1/check/stf/0000755000175000017500000000000012561462632011314 500000000000000fcml-1.1.1/check/stf/fcml_stf.c0000644000175000017500000001276512560745216013211 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_stf.h" #include #include #include /* Failed asserts and counters are stored here.*/ fcml_stf_test_result fcml_gl_stf_test_result = { 0 }; /* Assert's counters for running test.*/ fcml_stf_test_counter current_test_counters = { 0 }; /* Tested suite.*/ fcml_stf_test_suite *current_suite; /* tested test case.*/ fcml_stf_test_case *current_test; fcml_bool LIB_CALL_STF fcml_str_run_assert( fcml_bool condition, const fcml_string file, fcml_int line, const fcml_string message ) { if( !condition ) { /* Assert failed, so allocate and save some information about this event.*/ fcml_stf_result_element *element = (fcml_stf_result_element*)malloc( sizeof( fcml_stf_result_element ) ); if( !element ) { printf("Can not allocate memory for assert result."); return condition; } memset( element, 0, sizeof( fcml_stf_result_element ) ); element->file = file; element->line = line; element->message = message; element->test_case = current_test; element->suite = current_suite; if( !fcml_gl_stf_test_result.first ) { fcml_gl_stf_test_result.first = element; } else { fcml_gl_stf_test_result.last->next = element; } fcml_gl_stf_test_result.last = element; current_test_counters.failed++; } else { current_test_counters.passed++; } return condition; } fcml_bool LIB_CALL_STF fcml_stf_run_tests( const fcml_string test_name, fcml_stf_test_suite **suite ) { /* Execute suites one by one.*/ fcml_stf_test_suite **current = suite; while( *current ) { fcml_stf_test_suite *suite = *current; fcml_stf_test_case *test_case = suite->test_cases; current_suite = suite; /* Check if there are any test cases for current suite.*/ if( test_case ) { /* True if at least one test failed.*/ fcml_bool test_failed = FCML_FALSE; /* Initialize test suit.*/ if( suite->init_function ) { if( !suite->init_function() ) { test_failed = FCML_TRUE; } } /* Last test which is also an array guard has NULL name.*/ while( test_case->name ) { current_test = test_case; /* Clear current counters.*/ current_test_counters.failed = 0; current_test_counters.passed = 0; /* Run test function.*/ if( test_case->test_function ) { test_case->test_function(); } fcml_gl_stf_test_result.asserts.failed += current_test_counters.failed; fcml_gl_stf_test_result.asserts.passed += current_test_counters.passed; if( current_test_counters.failed ) { /* There are assert failures, so test has failed.*/ fcml_gl_stf_test_result.tests.failed++; test_failed = FCML_TRUE; } else { fcml_gl_stf_test_result.tests.passed++; } test_case++; } /* Cleanup test suite.*/ if( suite->cleanup_function ) { if( !suite->cleanup_function() ) { test_failed = FCML_TRUE; } } /* Count suites.*/ if( test_failed ) { fcml_gl_stf_test_result.suites.failed++; } else { fcml_gl_stf_test_result.suites.passed++; } } else { /* Guard.*/ break; } current++; } /* Report first 100 asserts errors.*/ printf("\nTest [%s]:", test_name ); current_suite = NULL; current_test = NULL; int counter = 0; int asserts_counter = 0; fcml_stf_result_element *assert = fcml_gl_stf_test_result.first; while( assert && counter <= 100 ) { fcml_stf_test_suite *suite = assert->suite; fcml_stf_test_case *test_case = assert->test_case; if( current_suite != suite || current_test != test_case ) { current_suite = suite; current_test = test_case; asserts_counter = 0; } if( asserts_counter == 0 ) { printf( "\nSuite %s, Test %s had failures:\n", current_suite->name, current_test->name ); } printf( " %4d. %s:%-6d \"%s\"\n", asserts_counter+++1, assert->file, assert->line, assert->message ); assert = assert->next; counter++; } /* Print counters report.*/ fcml_stf_test_counter suites = fcml_gl_stf_test_result.suites; fcml_stf_test_counter tests = fcml_gl_stf_test_result.tests; fcml_stf_test_counter asserts = fcml_gl_stf_test_result.asserts; printf("\nRun Summary: Type Ran Passed Failed\n"); printf(" suites %10d %10d %10d\n", suites.failed + suites.passed, suites.passed, suites.failed ); printf(" tests %10d %10d %10d\n", tests.failed + tests.passed, tests.passed, tests.failed ); printf(" asserts %10d %10d %10d\n", asserts.failed + asserts.passed, asserts.passed, asserts.failed ); /* Free all reported asserts.*/ fcml_stf_result_element *element = fcml_gl_stf_test_result.first; while( element ) { fcml_stf_result_element *tmp = element; element = tmp->next; free( tmp ); } return fcml_gl_stf_test_result.suites.failed == 0; } fcml-1.1.1/check/stf/Makefile.am0000644000175000017500000000023012560745216013264 00000000000000noinst_LTLIBRARIES = libstf.la libstf_la_SOURCES = fcml_stf.h fcml_stf.c libstf_la_CPPFLAGS = -I$(top_srcdir)/include libstf_la_LDFLAGS = -no-undefined fcml-1.1.1/check/stf/Makefile.in0000644000175000017500000004500612561443455013310 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # 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, # 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. @SET_MAKE@ VPATH = @srcdir@ 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 \ ?) ;; \ *) 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@ pkglibexecdir = $(libexecdir)/@PACKAGE@ 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 = @build@ host_triplet = @host@ subdir = check/stf 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 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.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 = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libstf_la_LIBADD = am_libstf_la_OBJECTS = libstf_la-fcml_stf.lo libstf_la_OBJECTS = $(am_libstf_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libstf_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libstf_la_LDFLAGS) $(LDFLAGS) -o $@ 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)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=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 = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=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 = SOURCES = $(libstf_la_SOURCES) DIST_SOURCES = $(libstf_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FCML_IMPORT_LIB = @FCML_IMPORT_LIB@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ 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@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ 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@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libstf.la libstf_la_SOURCES = fcml_stf.h fcml_stf.c libstf_la_CPPFLAGS = -I$(top_srcdir)/include libstf_la_LDFLAGS = -no-undefined all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.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) --gnu check/stf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu check/stf/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_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-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libstf.la: $(libstf_la_OBJECTS) $(libstf_la_DEPENDENCIES) $(EXTRA_libstf_la_DEPENDENCIES) $(AM_V_CCLD)$(libstf_la_LINK) $(libstf_la_OBJECTS) $(libstf_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstf_la-fcml_stf.Plo@am__quote@ .c.o: @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@ $(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 -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libstf_la-fcml_stf.lo: fcml_stf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstf_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libstf_la-fcml_stf.lo -MD -MP -MF $(DEPDIR)/libstf_la-fcml_stf.Tpo -c -o libstf_la-fcml_stf.lo `test -f 'fcml_stf.c' || echo '$(srcdir)/'`fcml_stf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstf_la-fcml_stf.Tpo $(DEPDIR)/libstf_la-fcml_stf.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcml_stf.c' object='libstf_la-fcml_stf.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstf_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libstf_la-fcml_stf.lo `test -f 'fcml_stf.c' || echo '$(srcdir)/'`fcml_stf.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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 $(LTLIBRARIES) 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: 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." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ 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 \ mostlyclean-libtool 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-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool 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 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. .NOEXPORT: fcml-1.1.1/check/stf/fcml_stf.h0000644000175000017500000000760412560745216013212 00000000000000/* * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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_STF_H_ #define FCML_STF_H_ #ifdef HAVE_CONFIG_H #include #endif #if _WIN32 || __CYGWIN__ #define LIB_CALL_STF __stdcall #ifdef DLL_EXPORT #define LIB_EXPORT_STF __declspec(dllexport) #else #ifdef LIBSTF_DLL_IMPORT #define LIB_EXPORT_STF __declspec(dllimport) #endif #endif #endif #ifndef LIB_EXPORT_STF #define LIB_EXPORT_STF #endif #ifndef LIB_CALL_STF #define LIB_CALL_STF #endif #define FCML_STF_NULL_SUITE NULL #define FCML_STF_NULL_TEST { NULL, NULL } #include #include #ifdef __cplusplus extern "C" { #endif typedef fcml_bool (*fcml_stf_test_init_function)(void); typedef void (*fcml_stf_test_case_function)(void); typedef struct fcml_stf_test_case { const fcml_string name; fcml_stf_test_case_function test_function; } fcml_stf_test_case; typedef struct fcml_stf_test_suite { const fcml_string name; fcml_stf_test_init_function init_function; fcml_stf_test_init_function cleanup_function; fcml_stf_test_case *test_cases; } fcml_stf_test_suite; typedef struct fcml_stf_result_element { struct fcml_stf_result_element *next; fcml_int line; const fcml_string file; const fcml_string message; fcml_stf_test_case *test_case; fcml_stf_test_suite *suite; } fcml_stf_result_element; typedef struct fcml_stf_test_counter { fcml_int passed; fcml_int failed; } fcml_stf_test_counter; typedef struct fcml_stf_test_result { fcml_stf_result_element *first; fcml_stf_result_element *last; /* Counters.*/ fcml_stf_test_counter suites; fcml_stf_test_counter tests; fcml_stf_test_counter asserts; } fcml_stf_test_result; extern fcml_stf_test_result fcml_gl_stf_test_result; /* Asserts */ fcml_bool LIB_CALL_STF LIB_EXPORT_STF fcml_str_run_assert( fcml_bool condition, const fcml_string file, fcml_int line, const fcml_string message ); /* Equals.*/ #define STF_ASSERT_EQUAL(actual, expected) \ ( fcml_str_run_assert( (actual) == (expected), __FILE__, __LINE__, ("STF_ASSERT_EQUAL(" #actual "," #expected ")") ) ) /* Not equal.*/ #define STF_ASSERT_NOT_EQUAL(actual, expected) \ ( fcml_str_run_assert( (actual) != (expected), __FILE__, __LINE__, ("STF_ASSERT_NOT_EQUAL(" #actual "," #expected ")") ) ) /* Boolean.*/ #define STF_ASSERT(condition) \ fcml_str_run_assert( (condition), __FILE__, __LINE__, ("STF_ASSERT(" #condition ")") ) /* Not NULL.*/ #define STF_ASSERT_PTR_NOT_NULL(value) \ fcml_str_run_assert( ( value ) != NULL, __FILE__, __LINE__, ("STF_ASSERT_PTR_NOT_NULL(" #value ")") ) /* Not NULL.*/ #define STF_ASSERT_PTR_NULL(value) \ fcml_str_run_assert( ( value ) == NULL, __FILE__, __LINE__, ("STF_ASSERT_PTR_NULL(" #value ")") ) /* Fail immediate.*/ #define STF_FAIL(value) \ fcml_str_run_assert( FCML_FALSE, __FILE__, __LINE__, ("STF_FAIL()") ) /* String equal.*/ #define STF_ASSERT_STRING_EQUAL(actual, expected) \ fcml_str_run_assert( (strcmp(actual,expected)==0), __FILE__, __LINE__, ("STF_ASSERT_STRING_EQUAL(" #actual "," #expected ")") ) fcml_bool LIB_CALL_STF LIB_EXPORT_STF fcml_stf_run_tests( const fcml_string test_name, fcml_stf_test_suite **suite ); #ifdef __cplusplus } #endif #endif /* FCML_STF_H_ */ fcml-1.1.1/check/Makefile.in0000644000175000017500000004444612561443455012523 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # 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, # 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. @SET_MAKE@ VPATH = @srcdir@ 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 \ ?) ;; \ *) 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@ pkglibexecdir = $(libexecdir)/@PACKAGE@ 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 = @build@ host_triplet = @host@ subdir = check 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 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.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 = CONFIG_CLEAN_VPATH_FILES = 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 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir 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 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`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FCML_IMPORT_LIB = @FCML_IMPORT_LIB@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ 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@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ 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@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @CPP_WRAPPER_TRUE@CPPDIR = cpp-tests @ENABLE_INTERNAL_TESTS_TRUE@INTERNAL_TESTS_DIR = internal-tests SUBDIRS = stf $(INTERNAL_TESTS_DIR) public-tests $(CPPDIR) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.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) --gnu check/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu check/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_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): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(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-recursive 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-recursive 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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive 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: 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." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ 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 \ installdirs-am maintainer-clean maintainer-clean-generic \ 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. .NOEXPORT: fcml-1.1.1/docs/0000755000175000017500000000000012561462632010373 500000000000000fcml-1.1.1/docs/doxygen/0000755000175000017500000000000012561462632012050 500000000000000fcml-1.1.1/docs/doxygen/Makefile.am0000644000175000017500000000072512560745216014031 00000000000000docpkg = $(PACKAGE_TARNAME)-doxy-$(PACKAGE_VERSION).tar.gz doc_DATA = $(docpkg) $(docpkg): doxygen.stamp tar chof - html | gzip -9 -c >$@ doxygen.stamp: doxyfile $(DOXYGEN) $(DOXYFLAGS) $< echo Timestamp > $@ install-data-hook: cd $(DESTDIR)$(docdir) && tar xf $(docpkg) uninstall-hook: cd $(DESTDIR)$(docdir) && rm -rf html cd $(DESTDIR)$(docdir) && rm -rf latex CLEANFILES = doxywarn.txt doxygen.stamp $(docpkg) clean-local: rm -rf html rm -rf latexfcml-1.1.1/docs/doxygen/doxyfile.in0000644000175000017500000000073612560745216014152 00000000000000PROJECT_NAME = @PACKAGE_NAME@ PROJECT_NUMBER = @PACKAGE_VERSION@ STRIP_FROM_PATH = @top_srcdir@ INPUT = @top_srcdir@/include INCLUDE_PATH = @top_srcdir@/include EXCLUDE_PATTERNS = *_parser_def.c *_parser_def.h *_lexer.c *_lexer.h FILE_PATTERNS = *.c *.h *.cpp *.hpp RECURSIVE = NO GENERATE_LATEX = YES GENERATE_HTML = YES JAVADOC_AUTOBRIEF = YES ENUM_VALUES_PER_LINE = 1 WARN_IF_UNDOCUMENTED = NO fcml-1.1.1/docs/doxygen/Makefile.in0000644000175000017500000003562612561443455014053 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # 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, # 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. @SET_MAKE@ VPATH = @srcdir@ 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 \ ?) ;; \ *) 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@ pkglibexecdir = $(libexecdir)/@PACKAGE@ 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 = @build@ host_triplet = @host@ subdir = docs/doxygen 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 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.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 = doxyfile CONFIG_CLEAN_VPATH_FILES = 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 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(docdir)" DATA = $(doc_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/doxyfile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FCML_IMPORT_LIB = @FCML_IMPORT_LIB@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ 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@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ 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@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ docpkg = $(PACKAGE_TARNAME)-doxy-$(PACKAGE_VERSION).tar.gz doc_DATA = $(docpkg) CLEANFILES = doxywarn.txt doxygen.stamp $(docpkg) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.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) --gnu docs/doxygen/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/doxygen/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_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): @HAVE_DOXYGEN_TRUE@doxyfile: $(top_builddir)/config.status $(srcdir)/doxyfile.in @HAVE_DOXYGEN_TRUE@ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-docDATA: $(doc_DATA) @$(NORMAL_INSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done uninstall-docDATA: @$(NORMAL_UNINSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: 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 $(DATA) installdirs: for dir in "$(DESTDIR)$(docdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done 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." clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-docDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook 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 -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-docDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: install-am install-data-am install-strip uninstall-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ clean-local cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-data-hook install-docDATA 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-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-docDATA uninstall-hook .PRECIOUS: Makefile $(docpkg): doxygen.stamp tar chof - html | gzip -9 -c >$@ doxygen.stamp: doxyfile $(DOXYGEN) $(DOXYFLAGS) $< echo Timestamp > $@ install-data-hook: cd $(DESTDIR)$(docdir) && tar xf $(docpkg) uninstall-hook: cd $(DESTDIR)$(docdir) && rm -rf html cd $(DESTDIR)$(docdir) && rm -rf latex clean-local: rm -rf html rm -rf latex # 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: fcml-1.1.1/config.sub0000755000175000017500000010664612560745327011367 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-03-04' # 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 # 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 . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx | dvp \ | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | 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 \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | 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?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mipsEE* | ee | ps2) basic_machine=mips64r5900el-scei case $os in -linux*) ;; *) os=-elf ;; esac ;; iop) basic_machine=mipsel-scei os=-irx ;; dvp) basic_machine=dvp-scei os=-elf ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -irx* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: fcml-1.1.1/compile0000755000175000017500000001624512560745326010754 00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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, 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 . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: fcml-1.1.1/example/0000755000175000017500000000000012561462632011076 500000000000000fcml-1.1.1/example/Makefile.am0000644000175000017500000000020712560745216013052 00000000000000SUBDIRS = fcml-asm fcml-disasm EXTRA_DIST = hsdis/hsdis.c \ hsdis/hsdis.h \ hsdis/Makefile.am \ hsdis/Makefile.in \ hsdis/COPYING fcml-1.1.1/example/fcml-disasm/0000755000175000017500000000000012561462632013275 500000000000000fcml-1.1.1/example/fcml-disasm/Makefile.am0000644000175000017500000000026212560745216015252 00000000000000noinst_PROGRAMS = fcml_disasm fcml_disasm_SOURCES = main.c fcml_disasm_CPPFLAGS = -I$(top_srcdir)/include @FCML_IMPORT_LIB@ fcml_disasm_LDADD = $(top_srcdir)/src/libfcml.la fcml-1.1.1/example/fcml-disasm/main.c0000644000175000017500000005735012560745216014320 00000000000000/** * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include #include #include #include #include #include #include #include fcml_string conditions[] = { "o", "b", "e", "be", "s", "p", "l", "le" }; fcml_string prefix_types[] = { "FCML_PT_GROUP_UNKNOWN", "FCML_PT_GROUP_1", "FCML_PT_GROUP_2", "FCML_PT_GROUP_3", "FCML_PT_GROUP_4", "FCML_PT_REX", "FCML_PT_VEX", "FCML_PT_XOP", }; fcml_string operand_types[] = { "FCML_EOT_NONE", "FCML_EOT_IMMEDIATE", "FCML_EOT_FAR_POINTER", "FCML_EOT_ADDRESS", "FCML_EOT_REGISTER" }; fcml_string register_type[] = { "FCML_REG_UNDEFINED", "FCML_REG_GPR", "FCML_REG_SIMD", "FCML_REG_FPU", "FCML_REG_SEG", "FCML_REG_CR", "FCML_REG_DR", "FCML_REG_IP" }; fcml_string fcml_reg_symbol_table[7][16] = { { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "st(0)", "st(1)", "st(2)", "st(3)", "st(4)", "st(5)", "st(6)", "st(7)", "", "", "", "", "", "", "", "" }, { "es", "cs", "ss", "ds", "fs", "gs", "", "", "", "", "", "", "", "", "", "" }, { "cr0", "", "cr2", "cr3", "cr4", "", "", "", "cr8", "", "", "", "", "", "", "" }, { "dr0", "dr1", "dr2", "dr3", "dr4", "dr5", "dr6", "dr7", "", "", "", "", "", "", "", "" } }; fcml_string fcml_reg_gpr_symbol_table[4][16] = { { "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh", "r8l", "r9l", "r10l", "r11l", "r12l", "r13l", "r14l", "r15l" }, { "ax", "cx", "dx", "bx", "sp", "bp", "si", "di", "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w" }, { "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi", "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d" }, { "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15" } }; fcml_string fcml_reg_symbol_table_rex[7][16] = { { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, { "st(0)", "st(1)", "st(2)", "st(3)", "st(4)", "st(5)", "st(6)", "st(7)", "", "", "", "", "", "", "", "" }, { "es", "cs", "ss", "ds", "fs", "gs", "", "", "", "", "", "", "", "", "", "" }, { "cr0", "", "cr2", "cr3", "cr4", "", "", "", "cr8", "", "", "", "", "", "", "" }, { "dr0", "dr1", "dr2", "dr3", "dr4", "dr5", "dr6", "dr7", "", "", "", "", "", "", "", "" } }; fcml_string fcml_reg_gpr_symbol_table_ip[4] = { "", "ip", "eip", "rip" }; fcml_string fcml_reg_gpr_symbol_table_rex[4][16] = { { "al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil", "r8l", "r9l", "r10l", "r11l", "r12l", "r13l", "r14l", "r15l" }, { "ax", "cx", "dx", "bx", "sp", "bp", "si", "di", "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w" }, { "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi", "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d" }, { "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15" } }; fcml_string fcml_reg_sidm_symbol_table[3][16] = { { "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7", "", "", "", "", "", "", "", "" }, { "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15" }, { "ymm0", "ymm1", "ymm2", "ymm3", "ymm4", "ymm5", "ymm6", "ymm7", "ymm8", "ymm9", "ymm10", "ymm11", "ymm12", "ymm13", "ymm14", "ymm15" } }; fcml_string get_register( const fcml_st_register *reg, fcml_bool is_rex ) { fcml_string printable_reg; fcml_int rs = 0; if (reg->type != FCML_REG_SIMD) { switch (reg->size) { case 8: rs = 0; break; case 16: rs = 1; break; case 32: rs = 2; break; case 64: rs = 3; break; } if ( reg->type == FCML_REG_IP ) { printable_reg = fcml_reg_gpr_symbol_table_ip[rs]; } else { if (is_rex) { if (reg->type == FCML_REG_GPR) { printable_reg = fcml_reg_gpr_symbol_table_rex[rs][reg->reg]; } else { printable_reg = fcml_reg_symbol_table_rex[reg->type][reg->reg]; } } else { if (reg->type == FCML_REG_GPR) { printable_reg = fcml_reg_gpr_symbol_table[rs][reg->reg]; } else { printable_reg = fcml_reg_symbol_table[reg->type][reg->reg]; } } } } else { switch (reg->size) { case 64: rs = 0; break; case 128: rs = 1; break; case 256: rs = 2; break; default: return "Invalid register"; } printable_reg = fcml_reg_sidm_symbol_table[rs][reg->reg]; } return printable_reg; } void print_error_msg( fcml_st_ceh_error_container *errors ) { fcml_st_ceh_error_info *error = errors->errors; while( error ) { // Print error message. if( error->level == FCML_EN_CEH_EL_WARN ) { printf("WARN: "); } else if( error->level == FCML_EN_CEH_EL_ERROR ) { printf("ERROR: "); } printf("%3d: %s\n", error->code, error->message ); error = error->next_error; } } fcml_string get_boolean( fcml_bool b ) { return b ? "true" : "false"; } void print_address( fcml_st_address *address, fcml_bool is_rex ) { printf(" Address form: "); switch( address->address_form ) { case FCML_AF_UNDEFINED: printf("Undefined.\n"); break; case FCML_AF_OFFSET: printf("Offset.\n"); break; case FCML_AF_COMBINED: printf("Combined (Effective address).\n"); break; default: printf("Unknown.\n"); } printf(" Segment register: %s (default: %s)\n", get_register( &(address->segment_selector.segment_selector), is_rex ), get_boolean( address->segment_selector.is_default_reg ) ); printf(" Size operator: %d\n", address->size_operator ); if( address->address_form == FCML_AF_OFFSET ) { printf(" Offset:\n" ); printf(" Size: %d\n", address->offset.size ); printf(" Signed: %s\n", get_boolean( address->offset.is_signed ) ); switch( address->offset.size ) { case FCML_DS_16: printf(" Value: 0x%04x\n", address->offset.off16 ); break; case FCML_DS_32: printf(" Value: 0x%08x\n", address->offset.off32 ); break; case FCML_DS_64: printf(" Value: 0x%016lx\n", (uint64_t)address->offset.off64 ); break; } } else if( address->address_form == FCML_AF_COMBINED ) { printf(" Effective address:\n" ); printf(" Base: %s\n", get_register( &(address->effective_address.base), is_rex ) ); printf(" Index: %s\n", get_register( &(address->effective_address.index), is_rex ) ); printf(" Scale factor: %d\n", address->effective_address.scale_factor ); fcml_st_integer *displacement = &(address->effective_address.displacement); printf(" Displacement:\n" ); printf(" Size: %d\n", displacement->size ); printf(" Signed: %s\n", get_boolean( displacement->is_signed ) ); switch( displacement->size ) { case FCML_DS_8: printf(" Value: 0x%02x\n", displacement->int8 ); break; case FCML_DS_16: printf(" Value: 0x%04x\n", displacement->int16 ); break; case FCML_DS_32: printf(" Value: 0x%08x\n", displacement->int32 ); break; case FCML_DS_64: printf(" Value: 0x%016lx\n", displacement->int64 ); break; } } } void print_immediate( fcml_st_integer *immediate ) { printf(" Signed: %s\n", get_boolean( immediate->is_signed ) ); printf(" Size: %d\n", immediate->size ); printf(" Value: " ); switch( immediate->size ) { case FCML_DS_8: printf("0x%02x\n", immediate->int8); break; case FCML_DS_16: printf("0x%04x\n", immediate->int16); break; case FCML_DS_32: printf("0x%08x\n", immediate->int32); break; case FCML_DS_64: printf("0x%016lx\n", immediate->int64); break; } } void print_far_pointer( fcml_st_far_pointer *far_pointer ) { printf(" Segment: 0x%04x\n", far_pointer->segment ); printf(" Offset size: %d\n", far_pointer->offset_size ); if( far_pointer->offset_size == FCML_DS_16 ) { printf(" Offset: 0x%04x\n", far_pointer->offset16 ); } if( far_pointer->offset_size == FCML_DS_32 ) { printf(" Offset: 0x%08x\n", far_pointer->offset32 ); } } void print_instruction_details( fcml_st_dialect *dialect, fcml_st_disassembler_result *result, fcml_st_render_config *render_config ) { int i; fcml_char buffer[FCML_REND_MAX_BUFF_LEN]; fcml_ceh_error error = fcml_fn_render( dialect, render_config, buffer, sizeof( buffer ), result ); if( error ) { printf( "Can not render instruction. Error code: %d\n", error ); return; } printf("Basic information:\n"); printf(" Disassembled instruction: %s\n", buffer); fcml_st_instruction *instruction = &(result->instruction); printf(" Mnemonic: %s\n", instruction->mnemonic ); if( instruction->is_conditional ) { char neg[2] = {0}; if( instruction->condition.is_negation ) { neg[0] = 'n'; } printf(" Conditional instruction. Condition: \"%s%s\".\n", neg, conditions[ instruction->condition.condition_type ] ); } if( instruction->hints ) { printf(" Instruction hints:"); if( instruction->hints & FCML_HINT_FAR_POINTER ) { printf(" FCML_HINT_FAR_POINTER"); } if( instruction->hints & FCML_HINT_NEAR_POINTER ) { printf(" FCML_HINT_NEAR_POINTER"); } if( instruction->hints & FCML_HINT_LONG_FORM_POINTER ) { printf(" FCML_HINT_LONG_FORM_POINTER"); } if( instruction->hints & FCML_HINT_INDIRECT_POINTER ) { printf(" FCML_HINT_INDIRECT_POINTER"); } printf("\n"); } if( instruction->prefixes ) { printf(" Explicit prefixes:"); if( instruction->prefixes & FCML_PREFIX_LOCK ) { printf(" FCML_PREFIX_LOCK"); } if( instruction->prefixes & FCML_PREFIX_REPNE ) { printf(" FCML_PREFIX_REPNE"); } if( instruction->prefixes & FCML_PREFIX_REP ) { printf(" FCML_PREFIX_REP"); } if( instruction->prefixes & FCML_PREFIX_XACQUIRE ) { printf(" FCML_PREFIX_XACQUIRE"); } if( instruction->prefixes & FCML_PREFIX_XRELEASE ) { printf(" FCML_PREFIX_XRELEASE"); } if( instruction->prefixes & FCML_PREFIX_BRANCH_HINT ) { printf(" FCML_PREFIX_BRANCH_HINT"); } if( instruction->prefixes & FCML_PREFIX_NOBRANCH_HINT ) { printf(" FCML_PREFIX_NOBRANCH_HINT"); } printf("\n"); } printf( " Number of operands: %d\n", instruction->operands_count ); printf( " Operands:\n" ); for( i = 0; i < instruction->operands_count; i++ ) { printf(" Operand: %d\n", i + 1 ); fcml_st_operand *operand = &(instruction->operands[i]); printf(" Type: %s\n", operand_types[ operand->type ] ); switch( operand->type ) { case FCML_OT_IMMEDIATE: { print_immediate( &(operand->immediate) ); break; } case FCML_OT_FAR_POINTER: { print_far_pointer( &(operand->far_pointer) ); break; } case FCML_OT_ADDRESS: { print_address( &(operand->address), result->instruction_details.prefixes_details.is_rex ); break; } case FCML_OT_REGISTER: printf( " Register: %s (Type: %s, Size: %d)\n", get_register( &(operand->reg), result->instruction_details.prefixes_details.is_rex ), register_type[operand->reg.type], operand->reg.size ); break; } } printf( "Details:\n" ); fcml_st_instruction_details *details = &(result->instruction_details); printf(" Instruction code: 0x"); for( i = 0; i < details->instruction_size; i++ ) { printf( "%02x", details->instruction_code[i] ); } printf("\n"); printf( " Instruction code length: %d\n", details->instruction_size ); printf( " Pseudo-op: %s\n", details->is_pseudo_op ? "true" : "false" ); printf( " Shortcut: %s\n", details->is_shortcut ? "true" : "false" ); /* ModR/M */ fcml_st_decoded_modrm_details *modrm_details = &(details->modrm_details); if( modrm_details ) { printf( " ModR/M details:\n" ); printf( " Is RIP: %s\n", get_boolean( modrm_details->is_rip ) ); printf( " ModR/M byte: 0x%02x\n", modrm_details->modrm ); if( modrm_details->sib.is_not_null ) { printf( " SIB byte: 0x%02x\n", modrm_details->sib.value ); } } /* Prefixes details. */ fcml_st_prefixes_details *prefixes_details = &(details->prefixes_details); if( prefixes_details->prefixes_bytes_count ) { printf( " Prefixes details:\n" ); printf( " Prefixes size in bytes: %d\n", prefixes_details->prefixes_bytes_count ); printf( " Number of available prefixes: %d\n", prefixes_details->prefixes_count ); printf( " Available prefixes (flags):" ); if( prefixes_details->is_branch ) { printf(" branch"); } if( prefixes_details->is_lock ) { printf(" lock"); } if( prefixes_details->is_nobranch ) { printf(" nobranch"); } if( prefixes_details->is_rep ) { printf(" rep"); } if( prefixes_details->is_repne ) { printf(" repne"); } if( prefixes_details->is_rex ) { printf(" rex"); } if( prefixes_details->is_vex ) { printf(" vex"); } if( prefixes_details->is_xacquire ) { printf(" xacquire"); } if( prefixes_details->is_xrelease ) { printf(" xrelease"); } if( prefixes_details->is_xop ) { printf(" xop"); } printf( "\n Prefixes fields:"); if( prefixes_details->is_vex || prefixes_details->is_xop ) printf( " mmmm:%d", prefixes_details->mmmm ); if( prefixes_details->is_vex || prefixes_details->is_xop || prefixes_details->is_rex ) printf( " r:%d", prefixes_details->r ); if( prefixes_details->is_vex || prefixes_details->is_xop || prefixes_details->is_rex ) printf( " x:%d", prefixes_details->x ); if( prefixes_details->is_vex || prefixes_details->is_xop || prefixes_details->is_rex ) printf( " b:%d", prefixes_details->b ); if( prefixes_details->is_vex || prefixes_details->is_xop || prefixes_details->is_rex ) printf( " w:%d", prefixes_details->w ); if( prefixes_details->is_vex || prefixes_details->is_xop ) printf( " vvvv:%d", prefixes_details->vvvv ); if( prefixes_details->is_vex || prefixes_details->is_xop ) printf( " l:%d", prefixes_details->l ); if( prefixes_details->is_vex || prefixes_details->is_xop ) printf( " pp:%d", prefixes_details->pp ); printf( "\n Available prefixes (details):\n" ); for( i = 0; i < prefixes_details->prefixes_count; i++ ) { fcml_st_instruction_prefix *prefix = &(prefixes_details->prefixes[i]); printf(" Byte: 0x%02x, Type %s, Mandatory: %s, XOP/VEX bytes: 0x%02x, 0x%02x.\n", prefix->prefix, prefix_types[ prefix->prefix_type ], get_boolean( prefix->mandatory_prefix ), prefix->vex_xop_bytes[0], prefix->vex_xop_bytes[1] ); } } printf( " Operands details:\n" ); for( i = 0; i < instruction->operands_count; i++ ) { printf(" Operand: %d\n", i + 1 ); fcml_st_operand_details *operand_details = &(details->operand_details[i]); printf(" Access mode:" ); if( operand_details->access_mode & FCML_AM_READ ) { printf( " FCML_AM_READ" ); } if( operand_details->access_mode & FCML_AM_WRITE ) { printf( " FCML_AM_WRITE" ); } printf("\n"); } } int main(int argc, char **argv) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; /* Interpret arguments. */ if( argc <= 1 ) { printf("Bad arguments.\n"); exit(1); } fcml_st_disassembler_context context = {0}; fcml_st_render_config render_config = {0}; fcml_bool gas_dialect = 0; fcml_uint8_t code[FCML_INSTRUCTION_SIZE] = {0}; fcml_int code_length = 0; int i; for( i = 1; i < argc; i++ ) { if( strcmp( argv[i], "-m16" ) == 0 ) { context.entry_point.op_mode = FCML_OM_16_BIT; } else if( strcmp( argv[i], "-m32" ) == 0 ) { context.entry_point.op_mode = FCML_OM_32_BIT; } else if( strcmp( argv[i], "-m64" ) == 0 ) { context.entry_point.op_mode = FCML_OM_64_BIT; } else if( strcmp( argv[i], "-asa16" ) == 0 ) { context.entry_point.address_size_attribute = FCML_DS_16; } else if( strcmp( argv[i], "-asa32" ) == 0 ) { context.entry_point.address_size_attribute = FCML_DS_32; } else if( strcmp( argv[i], "-asa64" ) == 0 ) { context.entry_point.address_size_attribute = FCML_DS_64; } else if( strcmp( argv[i], "-osa16" ) == 0 ) { context.entry_point.operand_size_attribute = FCML_DS_16; } else if( strcmp( argv[i], "-osa32" ) == 0 ) { context.entry_point.operand_size_attribute = FCML_DS_32; } else if( strcmp( argv[i], "-osa64" ) == 0 ) { context.entry_point.operand_size_attribute = FCML_DS_64; } else if( strcmp( argv[i], "-ip" ) == 0 ) { if( ++i < argc ) { char *res; errno = 0; context.entry_point.ip = strtoll( argv[i], &res, 16 ); if ((errno == ERANGE && (context.entry_point.ip == FCML_INT64_MAX || context.entry_point.ip == FCML_INT64_MIN)) || (errno != 0 && context.entry_point.ip == 0) || (argv[i] == res) ) { perror("Wrong instruction pointer."); exit(EXIT_FAILURE); } } else { printf("IP not set.\n"); exit(1); } } else if( strcmp( argv[i], "-s" ) == 0 ) { context.configuration.short_forms = FCML_TRUE; } else if( strcmp( argv[i], "-e" ) == 0 ) { context.configuration.extend_disp_to_asa = FCML_TRUE; } else if( strcmp( argv[i], "-rc" ) == 0 ) { render_config.render_flags |= FCML_REND_FLAG_RENDER_CODE; } else if( strcmp( argv[i], "-rh" ) == 0 ) { render_config.render_flags |= FCML_REND_FLAG_HEX_IMM | FCML_REND_FLAG_HEX_DISPLACEMENT; } else if( strcmp( argv[i], "-rz" ) == 0 ) { render_config.render_flags |= FCML_REND_FLAG_REMOVE_LEADING_ZEROS; } else if( strcmp( argv[i], "-rs" ) == 0 ) { render_config.render_flags |= FCML_REND_FLAG_RENDER_DEFAULT_SEG; } else if( strcmp( argv[i], "-gas" ) == 0 ) { gas_dialect = FCML_TRUE; } else if( strcmp( argv[i], "--help" ) == 0 ) { printf("usage: fcml_disasm [-s] [-e] [-rc] [-rh] [-rz] [-rs] [-gas] \n" \ " [-asa] [-osa] <-m> <-ip address> \n\n" \ " -m16 16 bit addressing mode\n" \ " -m32 32 bit addressing mode\n" \ " -m64 64 bit addressing mode\n" \ " -asa16 16 bit address size attribute\n" \ " -asa32 32 bit address size attribute\n" \ " -asa64 63 bit address size attribute\n" \ " -osa16 16 bit operand size attribute\n" \ " -osa32 32 bit operand size attribute\n" \ " -osa64 63 bit operand size attribute\n" \ " -ip Instruction pointer address\n" \ " -s Prefer short instruction forms\n" \ " -e Extend displacement size to address size attribute\n" \ " -rc Render instruction code\n" \ " -rh Render immediate values and displacement as HEX\n" \ " -rz Remove leading zeros\n" \ " -gas Use GNU assembler/AT&T dialect (Intel dialect is used by default)\n\n" \ "example: fcml_disasm -m32 -ip 0x4001000 0x678316010203\n\n" \ ); exit(0); } else if( i + 1 == argc ) { /* Parse instruction code. */ char buff[3] = {0}; char *code_str = argv[i]; fcml_int code_str_size = strlen( code_str ); fcml_int j, index = 0; for( j = 0; j < code_str_size; j += 2 ) { buff[0] = code_str[j]; buff[1] = 0; if( j + 2 <= code_str_size ) { buff[1] = code_str[j + 1]; } if( j == 0 && strcmp( buff, "0x" ) == 0 ) { continue; } char *res; errno = 0; code[index++] = (fcml_uint8_t)strtol( buff, &res, 16 ); fcml_int8_t code_byte = code[index - 1]; if ((errno == ERANGE && (code_byte == FCML_INT8_MAX || code_byte == FCML_INT8_MIN)) || (errno != 0 && code_byte == 0) || (buff == res) ) { printf("Wrong instruction code: %s\n", code_str ); exit(EXIT_FAILURE); } } code_length = index; } } context.configuration.enable_error_messages = FCML_TRUE; if( !context.entry_point.op_mode ) { printf("Addressing mode not specified.\n"); exit(1); } if( !code_length ) { printf("Instruction code not specified.\n"); exit(1); } /* Initialize dialect to use with disassembler. */ fcml_st_dialect *dialect; if( gas_dialect ) { error = fcml_fn_dialect_init_gas( FCML_GAS_DIALECT_CF_DEFAULT, &dialect ); } else { error = fcml_fn_dialect_init_intel( FCML_INTEL_DIALECT_CF_DEFAULT, &dialect ); } if( error ) { printf( "Can not initialize dialect, error: %d\n", error ); exit(1); } /* Initialize disassembler for used dialect. */ fcml_st_disassembler *disassembler; error = fcml_fn_disassembler_init( dialect, &disassembler ); if( error ) { fcml_fn_dialect_free( dialect ); printf( "Can not initialize assembler, error: %d\n", error ); exit(1); } /* Prepare disassembler context. */ context.disassembler = disassembler; context.code = code; context.code_length = code_length; fcml_st_disassembler_result result; fcml_fn_disassembler_result_prepare( &result ); error = fcml_fn_disassemble( &context, &result ); if( !error ) { print_instruction_details( dialect, &result, &render_config ); } else { printf("Disassembling failed with error code: %d\n", error ); print_error_msg( &(result.errors) ); } fcml_fn_disassembler_result_free( &result ); /* Free everything. */ fcml_fn_disassembler_free( disassembler ); fcml_fn_dialect_free( dialect ); return 0; } fcml-1.1.1/example/fcml-disasm/Makefile.in0000644000175000017500000004620512561443455015273 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # 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, # 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. @SET_MAKE@ VPATH = @srcdir@ 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 \ ?) ;; \ *) 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@ pkglibexecdir = $(libexecdir)/@PACKAGE@ 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 = @build@ host_triplet = @host@ noinst_PROGRAMS = fcml_disasm$(EXEEXT) subdir = example/fcml-disasm 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 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.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 = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_fcml_disasm_OBJECTS = fcml_disasm-main.$(OBJEXT) fcml_disasm_OBJECTS = $(am_fcml_disasm_OBJECTS) fcml_disasm_DEPENDENCIES = $(top_srcdir)/src/libfcml.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = 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)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=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 = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=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 = SOURCES = $(fcml_disasm_SOURCES) DIST_SOURCES = $(fcml_disasm_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FCML_IMPORT_LIB = @FCML_IMPORT_LIB@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ 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@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ 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@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ fcml_disasm_SOURCES = main.c fcml_disasm_CPPFLAGS = -I$(top_srcdir)/include @FCML_IMPORT_LIB@ fcml_disasm_LDADD = $(top_srcdir)/src/libfcml.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.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) --gnu example/fcml-disasm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu example/fcml-disasm/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_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-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list fcml_disasm$(EXEEXT): $(fcml_disasm_OBJECTS) $(fcml_disasm_DEPENDENCIES) $(EXTRA_fcml_disasm_DEPENDENCIES) @rm -f fcml_disasm$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fcml_disasm_OBJECTS) $(fcml_disasm_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_disasm-main.Po@am__quote@ .c.o: @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@ $(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 -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< fcml_disasm-main.o: main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_disasm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_disasm-main.o -MD -MP -MF $(DEPDIR)/fcml_disasm-main.Tpo -c -o fcml_disasm-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_disasm-main.Tpo $(DEPDIR)/fcml_disasm-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='fcml_disasm-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_disasm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_disasm-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c fcml_disasm-main.obj: main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_disasm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_disasm-main.obj -MD -MP -MF $(DEPDIR)/fcml_disasm-main.Tpo -c -o fcml_disasm-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_disasm-main.Tpo $(DEPDIR)/fcml_disasm-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='fcml_disasm-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_disasm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_disasm-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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 $(PROGRAMS) 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: 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." clean: clean-am clean-am: clean-generic clean-libtool 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 \ mostlyclean-libtool 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-libtool clean-noinstPROGRAMS cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool 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 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. .NOEXPORT: fcml-1.1.1/example/fcml-asm/0000755000175000017500000000000012561462632012575 500000000000000fcml-1.1.1/example/fcml-asm/Makefile.am0000644000175000017500000000024512560745216014553 00000000000000noinst_PROGRAMS = fcml_asm fcml_asm_SOURCES = main.c fcml_asm_CPPFLAGS = -I$(top_srcdir)/include @FCML_IMPORT_LIB@ fcml_asm_LDADD = $(top_srcdir)/src/libfcml.la fcml-1.1.1/example/fcml-asm/main.c0000644000175000017500000001760612560745216013620 00000000000000/** * FCML - Free Code Manipulation Library. * Copyright (C) 2010-2015 Slawomir Wojtasiak * * 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 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 * Lesser General Public License for more details. * * 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 #include #include #include #include #include #include #include void print_error_msg( fcml_st_ceh_error_container *errors ) { fcml_st_ceh_error_info *error = errors->errors; while( error ) { // Print error message. if( error->level == FCML_EN_CEH_EL_WARN ) { printf("WARN: "); } else if( error->level == FCML_EN_CEH_EL_ERROR ) { printf("ERROR: "); } printf("%3d: %s\n", error->code, error->message ); error = error->next_error; } } int main(int argc, char **argv) { fcml_ceh_error error = FCML_CEH_GEC_NO_ERROR; /* Interpret arguments. */ if( argc <= 1 ) { printf("Bad arguments.\n"); exit(1); } fcml_st_assembler_context context = {0}; context.configuration.enable_error_messages = FCML_TRUE; fcml_bool gas_dialect = 0; fcml_ip ip = 0; fcml_string instruction = NULL; int i; for( i = 1; i < argc; i++ ) { if( strcmp( argv[i], "-m16" ) == 0 ) { context.entry_point.op_mode = FCML_OM_16_BIT; } else if( strcmp( argv[i], "-m32" ) == 0 ) { context.entry_point.op_mode = FCML_OM_32_BIT; } else if( strcmp( argv[i], "-m64" ) == 0 ) { context.entry_point.op_mode = FCML_OM_64_BIT; } else if( strcmp( argv[i], "-asa16" ) == 0 ) { context.entry_point.address_size_attribute = FCML_DS_16; } else if( strcmp( argv[i], "-asa32" ) == 0 ) { context.entry_point.address_size_attribute = FCML_DS_32; } else if( strcmp( argv[i], "-asa64" ) == 0 ) { context.entry_point.address_size_attribute = FCML_DS_64; } else if( strcmp( argv[i], "-osa16" ) == 0 ) { context.entry_point.operand_size_attribute = FCML_DS_16; } else if( strcmp( argv[i], "-osa32" ) == 0 ) { context.entry_point.operand_size_attribute = FCML_DS_32; } else if( strcmp( argv[i], "-osa64" ) == 0 ) { context.entry_point.operand_size_attribute = FCML_DS_64; } else if( strcmp( argv[i], "-ip" ) == 0 ) { if( ++i < argc ) { char *res; errno = 0; ip = strtoll( argv[i], &res, 16 ); if ((errno == ERANGE && (ip == FCML_INT64_MAX || ip == FCML_INT64_MIN)) || (errno != 0 && ip == 0) || (argv[i] == res) ) { perror("Wrong instruction pointer."); exit(EXIT_FAILURE); } } else { printf("IP not set.\n"); exit(1); } } else if( strcmp( argv[i], "-abs" ) == 0 ) { context.configuration.choose_abs_encoding = FCML_TRUE; } else if( strcmp( argv[i], "-sib" ) == 0 ) { context.configuration.choose_sib_encoding = FCML_TRUE; } else if( strcmp( argv[i], "-rex" ) == 0 ) { context.configuration.force_rex_prefix = FCML_TRUE; } else if( strcmp( argv[i], "-3b" ) == 0 ) { context.configuration.force_three_byte_VEX = FCML_TRUE; } else if( strcmp( argv[i], "-gas" ) == 0 ) { gas_dialect = FCML_TRUE; } else if( strcmp( argv[i], "--help" ) == 0 ) { printf("usage: fcml_asm [-abs] [-sib] [-rex] [-gas] [-asa] [-osa]\n" \ " <-m> <-ip address> \n\n" \ " -m16 16 bit addressing mode\n" \ " -m32 32 bit addressing mode\n" \ " -m64 64 bit addressing mode\n" \ " -asa16 16 bit address size attribute\n" \ " -asa32 32 bit address size attribute\n" \ " -asa64 63 bit address size attribute\n" \ " -osa16 16 bit operand size attribute\n" \ " -osa32 32 bit operand size attribute\n" \ " -osa64 63 bit operand size attribute\n" \ " -ip Instruction pointer address (IP/EIP/RIP register)\n" \ " -abs Choose absolute memory addressing if there is any choice\n" \ " (Especially useful in 64 bit mode, see RIP addressing.)\n" \ " -sib If instruction can be encoded using SIB byte do it\n" \ " -rex Use REX prefix even if it is optional for assembled instruction\n" \ " -gas Use GNU assembler/AT&T dialect (Intel dialect is used by default)\n\n" \ "example: fcml_asm -m32 -ip 0x4001000 \"add eax,1\"\n\n" \ ); exit(0); } else if( i + 1 == argc ) { // Instruction mnemonic. instruction = argv[i]; } } if( !instruction ) { printf("Instruction mnemonic not found.\n"); exit(EXIT_FAILURE); } context.entry_point.ip = ip; /* Initialize dialect to use with assembler/parser. */ fcml_st_dialect *dialect; if( gas_dialect ) { error = fcml_fn_dialect_init_gas( FCML_GAS_DIALECT_CF_DEFAULT, &dialect ); } else { error = fcml_fn_dialect_init_intel( FCML_INTEL_DIALECT_CF_DEFAULT, &dialect ); } if( error ) { printf( "Can not initialize a dialect, error: %d\n", error ); exit(EXIT_FAILURE); } /* Initialize parser. */ fcml_st_parser_context parser_context = {0}; parser_context.dialect = dialect; parser_context.ip = ip; parser_context.symbol_table = NULL; /* We do not use symbols in case of one line assembler. */ parser_context.configuration.ignore_undefined_symbols = FCML_FALSE; /* Parse instruction mnemonic. */ fcml_st_parser_result parser_result; fcml_fn_parser_result_prepare( &parser_result ); error = fcml_fn_parse( &parser_context, instruction, &parser_result ); if( error ) { fcml_fn_dialect_free( dialect ); printf( "Can not parse the instruction mnemonic, error: %d\n", error ); print_error_msg( &(parser_result.errors) ); exit(EXIT_FAILURE); } /* Assemble parsed instruction. */ fcml_st_assembler *assembler; error = fcml_fn_assembler_init( dialect, &assembler ); if( error ) { fcml_fn_parser_result_free( &parser_result ); fcml_fn_dialect_free( dialect ); printf( "Can not initialize the assembler, error: %d\n", error ); print_error_msg( &(parser_result.errors) ); exit(EXIT_FAILURE); } context.assembler = assembler; fcml_st_assembler_result asm_result; fcml_fn_assembler_result_prepare( &asm_result ); error = fcml_fn_assemble( &context, parser_result.instruction, &asm_result ); if( error ) { fcml_fn_assembler_free( assembler ); fcml_fn_parser_result_free( &parser_result ); fcml_fn_dialect_free( dialect ); printf( "Can not assemble the instruction, error: %d\n", error ); print_error_msg( &(parser_result.errors) ); exit(EXIT_FAILURE); } /* Print result. */ printf("Number of the assembled instructions: %d\n", asm_result.number_of_instructions ); fcml_st_assembled_instruction *assembled_instruction = asm_result.instructions; int chosen = 0; int index = 0; while( assembled_instruction ) { int i; printf( "Instruction: %d\n", ++index ); printf( " Code: " ); for( i = 0; i < assembled_instruction->code_length; i++ ) { printf("%02x", assembled_instruction->code[i] ); } printf( "\n Code length: %d\n", assembled_instruction->code_length ); if( assembled_instruction == asm_result.chosen_instruction ) { chosen = index; } assembled_instruction = assembled_instruction->next; } if( chosen ) { printf("Best instruction chosen by the assembler: %d\n", chosen ); } fcml_fn_assembler_result_free( &asm_result ); fcml_fn_assembler_free( assembler ); fcml_fn_parser_result_free( &parser_result ); fcml_fn_dialect_free( dialect ); } fcml-1.1.1/example/fcml-asm/Makefile.in0000644000175000017500000004600712561443455014573 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # 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, # 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. @SET_MAKE@ VPATH = @srcdir@ 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 \ ?) ;; \ *) 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@ pkglibexecdir = $(libexecdir)/@PACKAGE@ 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 = @build@ host_triplet = @host@ noinst_PROGRAMS = fcml_asm$(EXEEXT) subdir = example/fcml-asm 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 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.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 = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_fcml_asm_OBJECTS = fcml_asm-main.$(OBJEXT) fcml_asm_OBJECTS = $(am_fcml_asm_OBJECTS) fcml_asm_DEPENDENCIES = $(top_srcdir)/src/libfcml.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = 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)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=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 = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=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 = SOURCES = $(fcml_asm_SOURCES) DIST_SOURCES = $(fcml_asm_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FCML_IMPORT_LIB = @FCML_IMPORT_LIB@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ 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@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ 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@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ fcml_asm_SOURCES = main.c fcml_asm_CPPFLAGS = -I$(top_srcdir)/include @FCML_IMPORT_LIB@ fcml_asm_LDADD = $(top_srcdir)/src/libfcml.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.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) --gnu example/fcml-asm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu example/fcml-asm/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_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-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list fcml_asm$(EXEEXT): $(fcml_asm_OBJECTS) $(fcml_asm_DEPENDENCIES) $(EXTRA_fcml_asm_DEPENDENCIES) @rm -f fcml_asm$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fcml_asm_OBJECTS) $(fcml_asm_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcml_asm-main.Po@am__quote@ .c.o: @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@ $(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 -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< fcml_asm-main.o: main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_asm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_asm-main.o -MD -MP -MF $(DEPDIR)/fcml_asm-main.Tpo -c -o fcml_asm-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_asm-main.Tpo $(DEPDIR)/fcml_asm-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='fcml_asm-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_asm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_asm-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c fcml_asm-main.obj: main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_asm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fcml_asm-main.obj -MD -MP -MF $(DEPDIR)/fcml_asm-main.Tpo -c -o fcml_asm-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fcml_asm-main.Tpo $(DEPDIR)/fcml_asm-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='fcml_asm-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fcml_asm_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fcml_asm-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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 $(PROGRAMS) 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: 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." clean: clean-am clean-am: clean-generic clean-libtool 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 \ mostlyclean-libtool 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-libtool clean-noinstPROGRAMS cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool 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 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. .NOEXPORT: fcml-1.1.1/example/Makefile.in0000644000175000017500000004436412561443455013100 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # 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, # 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. @SET_MAKE@ VPATH = @srcdir@ 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 \ ?) ;; \ *) 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@ pkglibexecdir = $(libexecdir)/@PACKAGE@ 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 = @build@ host_triplet = @host@ subdir = example 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 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.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 = CONFIG_CLEAN_VPATH_FILES = 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 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir 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 DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FCML_IMPORT_LIB = @FCML_IMPORT_LIB@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ 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@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ 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@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = fcml-asm fcml-disasm EXTRA_DIST = hsdis/hsdis.c \ hsdis/hsdis.h \ hsdis/Makefile.am \ hsdis/Makefile.in \ hsdis/COPYING all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.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) --gnu example/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu example/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_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): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(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-recursive 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-recursive 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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive 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: 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." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ 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 \ installdirs-am maintainer-clean maintainer-clean-generic \ 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. .NOEXPORT: fcml-1.1.1/example/hsdis/0000755000175000017500000000000012561462632012210 500000000000000fcml-1.1.1/example/hsdis/COPYING0000644000175000017500000004325412560745216013174 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. fcml-1.1.1/example/hsdis/hsdis.h0000644000175000017500000000317212561200360013402 00000000000000/** * FCML - Free Code Manipulation Library. * Copyright (C) 2014-2015 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 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef FCML_HSDIS_H_ #define FCML_HSDIS_H_ #include #ifdef FCML_MSCC #ifdef HSDIS_EXPORT_DLL #define HSDIS_API __declspec(dllexport) #endif #ifdef HSDIS_IMPORT_DLL #define HSDIS_API __declspec(dllimport) #endif #endif #ifndef HSDIS_API #define HSDIS_API #endif #ifdef FCML_MSCC #define HSDIS_CALL __cdecl #else #define HSDIS_CALL #endif #ifdef __cplusplus extern "C" { #endif typedef void* (*jvm_event_callback) (void *env_pv, const char *ev, void *arg); typedef int (*jvm_printf_callback)(void *env_pv, const char *format, ...); /* Called directly by jvm.so/jvm.dll. */ HSDIS_API void* HSDIS_CALL decode_instructions( void* start, void* end, jvm_event_callback, void* event_stream, jvm_printf_callback, void* printf_stream, const char* options ); #ifdef __cplusplus } #endif #endif /* FCML_HSDIS_H_ */ fcml-1.1.1/example/hsdis/Makefile.am0000644000175000017500000000033512560745216014166 00000000000000# Make sure that FCML is built. SUBDIRS = ../../src lib_LTLIBRARIES = libhsdis.la libhsdis_la_SOURCES = hsdis.c hsdis.h libhsdis_la_CPPFLAGS = -I$(top_srcdir)/include libhsdis_la_LIBADD = $(top_srcdir)/src/libfcml.la fcml-1.1.1/example/hsdis/hsdis.c0000644000175000017500000002023212561200340013367 00000000000000/** * FCML - Free Code Manipulation Library. * Copyright (C) 2014-2015 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 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include #include #include #include #include #include #include /* * -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly -XX:+LogCompilation \ * -XX:PrintAssemblyOptions=intel,mpad=10,cpad=10,code */ #include "hsdis.h" #if _M_X64 || __x86_64__ #define MACH_ARCH "amd64" #define ADDR_FORM FCML_OM_64_BIT /* 64-bit */ #else #define MACH_ARCH "i386" #define ADDR_FORM FCML_OM_32_BIT #endif char HELP[] = "Optional arguments:\n" \ " code - Print machine code before mnemonic.\n" \ " intel - Use intel dialect.\n" \ " gas - Use GNU assembler dialect (AT&T).\n" \ " dec - IMM and displacement as decimal values.\n" \ " mpad=XX - Padding for mnemonic part of the instruction.\n" \ " cpad=XX - Padding for machine code.\n" \ " seg - Show default segment registers.\n" \ " zeros - Show leading zeros in case of HEX values.\n" \ ""; typedef struct hdis_config { fcml_bool enable_code; fcml_bool enable_seg; fcml_bool intel; fcml_bool dec; fcml_bool seg; fcml_bool zeros; fcml_uint16_t code_padding; fcml_uint16_t mnemonic_padding; } hdis_config; typedef struct hsdis_app { fcml_st_dialect *dialect; fcml_st_disassembler *disassembler; jvm_event_callback event_callback; void *printf_stream; jvm_printf_callback printf_callback; const char *options; hdis_config config; } hsdis_app; void parse_options( hsdis_app *app ); void prepare_render_config( fcml_st_render_config *config, hsdis_app *app ); void* HSDIS_CALL decode_instructions( void* start, void* end, jvm_event_callback event_callback, void* event_stream, jvm_printf_callback printf_callback, void* printf_stream, const char* options ) { hsdis_app app = {0}; app.event_callback = event_callback; app.printf_callback = printf_callback; app.printf_stream = printf_stream; app.options = options; /* Parse options passed by: -XX:PrintAssemblyOptions. */ parse_options( &app ); fcml_char buffer[FCML_REND_MAX_BUFF_LEN] = {0}; /* Current instruction pointer. */ fcml_ip ip = (fcml_ip) start; intptr_t code_length = (intptr_t)end - (intptr_t)start; #if __x86_64__ || _M_X64 (*printf_callback)(printf_stream, "RIP: 0x%llx Code size: 0x%08x\n", (intptr_t)start, code_length ); #else (*printf_callback)(printf_stream, "RIP: 0x%x Code size: 0x%08x\n", (intptr_t)start, code_length ); #endif /* Inform internal disassembler about used architecture. */ (*event_callback)(event_stream, "mach", (void*) MACH_ARCH); /* Initialize INTEL dialect. */ fcml_ceh_error error; if( app.config.intel ) { error = fcml_fn_dialect_init_intel( FCML_INTEL_DIALECT_CF_DEFAULT, &(app.dialect) ); } else { error = fcml_fn_dialect_init_gas( FCML_GAS_DIALECT_CF_DEFAULT, &(app.dialect) ); } if( error ) { (*printf_callback)(printf_stream, "Fatal error: Can not initialize Intel dialect. Error code: %d", error ); return start; } /* Initialize assembler. */ error = fcml_fn_disassembler_init( app.dialect, &(app.disassembler) ); if( error ) { (*printf_callback)(printf_stream, "Fatal error: Can not initialize disassembler. Error code: %d", error ); fcml_fn_dialect_free( app.dialect ); return start; } /* Prepare structures for disassembler results. */ fcml_st_disassembler_result disassembler_result; fcml_fn_disassembler_result_prepare( &disassembler_result ); fcml_bool finish = FCML_FALSE; /* Prepares disassembler context. */ fcml_st_disassembler_context context = {0}; context.configuration.short_forms = FCML_FALSE; context.configuration.extend_disp_to_asa = FCML_TRUE; context.disassembler = app.disassembler; context.entry_point.op_mode = ADDR_FORM; /* Prepares renderer configuration. */ fcml_st_render_config config = {0}; prepare_render_config( &config, &app ); while ( ip < (fcml_ip) end ) { context.code = (fcml_ptr)ip; context.code_length = (fcml_usize)code_length; context.entry_point.ip = ip; /* Inform internal disassembler about newly assembled instruction. */ (*event_callback)(event_stream, "insn", (void*) ip); error = fcml_fn_disassemble( &context, &disassembler_result ); if( error ) { (*printf_callback)(printf_stream, "Fatal error: Disassembling failed with error code: %d", error ); break; } fcml_usize code_len = disassembler_result.instruction_details.instruction_size; /* Skip to the next instruction. */ ip += code_len; error = fcml_fn_render( app.dialect, &config, buffer, sizeof( buffer ), &disassembler_result ); if( error ) { (*printf_callback)(printf_stream, "Fatal error: Rendering failed with error code: %d", error ); break; } (*printf_callback)(printf_stream, "%s", buffer ); /* End current instruction. */ (*event_callback)(event_stream, "/insn", (void*) ip); (*printf_callback)(printf_stream, "\n"); code_length -= code_len; } fcml_fn_disassembler_result_free( &disassembler_result ); fcml_fn_disassembler_free( app.disassembler ); fcml_fn_dialect_free( app.dialect ); return (void*) ip; } void prepare_render_config( fcml_st_render_config *config, hsdis_app *app ) { config->render_flags = ( FCML_REND_FLAG_RENDER_INDIRECT_HINT | FCML_REND_FLAG_RENDER_ABS_HINT | FCML_REND_FLAG_MNEMONIC_PADDING ); /* Remove leading zeros. */ if( !app->config.zeros ) { config->render_flags |= ( FCML_REND_FLAG_REMOVE_LEADING_ZEROS ); } /* Decimal IMM and displacement. */ if( !app->config.dec ) { config->render_flags |= ( FCML_REND_FLAG_HEX_IMM | FCML_REND_FLAG_HEX_DISPLACEMENT ); } /* Show default segment registers. */ if( app->config.seg ) { config->render_flags |= FCML_REND_FLAG_RENDER_DEFAULT_SEG; } /* Enable binary code rendering. */ if( app->config.enable_code ) { config->render_flags |= ( FCML_REND_FLAG_RENDER_CODE | FCML_REND_FLAG_CODE_PADDING ); config->prefered_code_padding = app->config.code_padding ? app->config.code_padding : 10; config->prefered_mnemonic_padding = app->config.mnemonic_padding ? app->config.mnemonic_padding : 7; } } void parse_options( hsdis_app *app ) { #ifdef FCML_MSCC /* Intel dialect by default for Microsoft compilers. */ app->config.intel = FCML_TRUE; #else /* In case of different systems AT&T dialect seems to be a good * choice since it will be GNU/Linux or another Unix like system * in 99%. */ app->config.intel = FCML_FALSE; #endif int index = 0; const char *current = app->options; while( current ) { /* Skip comma. */ if( *current == ',' ) { current++; } if( strncmp( current, "intel", 5 ) == 0 ) { app->config.intel = FCML_TRUE; } else if( strncmp( current, "help", 3 ) == 0 ) { app->printf_callback( app->printf_stream, HELP ); } else if( strncmp( current, "gas", 3 ) == 0 ) { app->config.intel = FCML_FALSE; } else if( strncmp( current, "seg", 3 ) == 0 ) { app->config.seg = FCML_TRUE; } else if( strncmp( current, "dec", 3 ) == 0 ) { app->config.dec = FCML_TRUE; } else if( strncmp( current, "code", 4 ) == 0 ) { app->config.enable_code = FCML_TRUE; } else if( strncmp( current, "zeros", 5 ) == 0 ) { app->config.zeros = FCML_TRUE; } else if( strncmp( current, "mpad=", 5 ) == 0 ) { app->config.mnemonic_padding = atoi( current + 5 ); } else if( strncmp( current, "cpad=", 5 ) == 0 ) { app->config.code_padding = atoi( current + 5 ); } else { app->printf_callback( app->printf_stream, "Argument %d is unknown.", index ); } current = strchr( current, ',' ); } } fcml-1.1.1/example/hsdis/Makefile.in0000644000175000017500000006204712561443455014210 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # 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, # 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. @SET_MAKE@ VPATH = @srcdir@ 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 \ ?) ;; \ *) 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@ pkglibexecdir = $(libexecdir)/@PACKAGE@ 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 = @build@ host_triplet = @host@ subdir = example/hsdis 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 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.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 = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libhsdis_la_DEPENDENCIES = $(top_srcdir)/src/libfcml.la am_libhsdis_la_OBJECTS = libhsdis_la-hsdis.lo libhsdis_la_OBJECTS = $(am_libhsdis_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = 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)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=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 = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=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 = SOURCES = $(libhsdis_la_SOURCES) DIST_SOURCES = $(libhsdis_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir 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 DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp COPYING DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FCML_IMPORT_LIB = @FCML_IMPORT_LIB@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ 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@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ 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@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # Make sure that FCML is built. SUBDIRS = ../../src lib_LTLIBRARIES = libhsdis.la libhsdis_la_SOURCES = hsdis.c hsdis.h libhsdis_la_CPPFLAGS = -I$(top_srcdir)/include libhsdis_la_LIBADD = $(top_srcdir)/src/libfcml.la all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.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) --gnu example/hsdis/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu example/hsdis/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_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): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libhsdis.la: $(libhsdis_la_OBJECTS) $(libhsdis_la_DEPENDENCIES) $(EXTRA_libhsdis_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(libhsdis_la_OBJECTS) $(libhsdis_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhsdis_la-hsdis.Plo@am__quote@ .c.o: @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@ $(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 -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libhsdis_la-hsdis.lo: hsdis.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhsdis_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhsdis_la-hsdis.lo -MD -MP -MF $(DEPDIR)/libhsdis_la-hsdis.Tpo -c -o libhsdis_la-hsdis.lo `test -f 'hsdis.c' || echo '$(srcdir)/'`hsdis.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhsdis_la-hsdis.Tpo $(DEPDIR)/libhsdis_la-hsdis.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hsdis.c' object='libhsdis_la-hsdis.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhsdis_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhsdis_la-hsdis.lo `test -f 'hsdis.c' || echo '$(srcdir)/'`hsdis.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(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-recursive 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-recursive 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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive 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: 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." clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libLTLIBRARIES \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ 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-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES .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. .NOEXPORT: fcml-1.1.1/configure.ac0000644000175000017500000000757712561443347011673 00000000000000# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) AC_INIT([fcml], [1.1.1], [bugs@fcml-lib.com]) AM_INIT_AUTOMAKE LT_PREREQ([2.2]) LT_INIT[win32-dll] AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([include/fcml_common.h]) AC_CONFIG_HEADERS([config.h]) # Checks for programs. AC_PROG_CC AC_PROG_CC_STDC AC_PROG_CXX AC_PROG_CPP AC_PROG_AWK AC_PROG_INSTALL AM_PROG_LEX AC_PROG_YACC AM_PROG_CC_C_O AC_PROG_LN_S AC_PROG_MAKE_SET # Configure options: --enable-debug[=no]. AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], [enable debug code @<:@default=no@:>@])], [debug="$withval"], [debug=no]) # Configure options: --disable-cpp-wrapper[=no]. AC_ARG_ENABLE([cpp_wrapper], [AS_HELP_STRING([--disable-cpp-wrapper], [disables c++ wrapper tests])], [], [cpp_wrapper=yes]) # Checks for libraries. # Checks for header files. AC_FUNC_ALLOCA AC_CHECK_HEADERS([inttypes.h libintl.h malloc.h stddef.h stdint.h stdlib.h string.h unistd.h limits.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_INLINE AC_TYPE_INT16_T AC_TYPE_INT32_T AC_TYPE_INT64_T AC_TYPE_INT8_T AC_TYPE_SIZE_T AC_TYPE_UINT16_T AC_TYPE_UINT32_T AC_TYPE_UINT64_T AC_TYPE_UINT8_T # Checks for library functions. AC_FUNC_MALLOC AC_FUNC_REALLOC AC_CHECK_FUNCS([memset strtoul strtoull vsnprintf memcpy strchr strtol]) # Configure DEBUG source code, if requested. AS_IF([test "x$debug" = xyes], [AC_DEFINE([FCML_DEBUG], [1], [Define to enable FCML debug features])]) # Doxygen AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen]) if test -z "$DOXYGEN"; then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support]) fi # Disable the internal part of unit tests for cygwin and mingw, # due to the way Windows exports symbols in shared libraries. AS_CASE( [$host_os], [cygwin*|mingw*], [internal_test=no # Maybe not the most beatiful way to write it, but as least it doesn't have # to be written in one line and Eclipse's parser doesn't complain. internal_test_msg="(Don't be afraid of disabled internal unit tests for" internal_test_msg="$internal_test_msg"$'\n'" this configuration. Integration tests which are" internal_test_msg="$internal_test_msg"$'\n'" built on top of the public API are still executed.)" ], [internal_test=yes] ) AM_CONDITIONAL([CPP_WRAPPER], [ [test -n "$CXX"] && [test "x$cpp_wrapper" = xyes] ]) AM_CONDITIONAL([ENABLE_INTERNAL_TESTS], [test "x$internal_test" = xyes]) AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"]) AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/doxygen/doxyfile])]) # Configuration files. AC_CONFIG_FILES([Makefile src/Makefile check/Makefile check/stf/Makefile check/internal-tests/Makefile check/public-tests/Makefile check/cpp-tests/Makefile example/Makefile example/fcml-disasm/Makefile example/fcml-asm/Makefile example/hsdis/Makefile include/Makefile docs/doxygen/Makefile]) # Enable __declspec(dllimport) for linking public tests with shared DLL. AC_CANONICAL_HOST AS_CASE( [$enable_shared], [yes], [AS_CASE( [$host_os], [cygwin*|mingw*], [FCML_IMPORT_LIB="-DLIBFCML_DLL_IMPORT" AC_SUBST([FCML_IMPORT_LIB])] )] ) AC_OUTPUT echo "*************************************************** ${PACKAGE_NAME} version ${PACKAGE_VERSION} Host CPU.............: $host_cpu Host OS:.............: $host_os Prefix:..............: ${prefix} Debug Build..........: $debug C++ wrapper tests....: ${cpp_wrapper:-no} Internal unit tests..: ${internal_test} ${internal_test_msg} Shared Library.......: $enable_shared C Compiler...........: ${CC} ${CFLAGS} ${CPPFLAGS} C++ Compiler.........: ${CXX} ${CXXFLAGS} Linker...............: $LD $LDFLAGS $LIBS Doxygen..............: ${DOXYGEN:-NONE} *************************************************** " fcml-1.1.1/README0000644000175000017500000000155612560745216010253 00000000000000This is a general purpose machine code manipulation library for IA-32 and Intel 64 architectures. The library supports UNIX-like systems as well as Windows and is highly portable. The FCML library is free for commercial and non-commercial use as long as the terms of the LGPL license are met. Currently it supports such features as: * A one-line disassembler * A one-line assembler * An experimental multi-pass load-and-go assembler (Multi line!) * Support for the Intel and AT&T syntax * An instruction renderer * An instruction parser * Instructions represented as generic models * UNIX/GNU/Linux and Windows support * Portable - written entirely in C (no external dependencies) * Supported instruction sets: MMX, 3D-Now!, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, SSE4A, AVX, AVX2, AES, TBM, BMI1, BMI2, HLE, ADX, CLMUL, RDRAND, RDSEED, FMA, FMA4, LWP, SVM, XOP, VMX, SMX fcml-1.1.1/install-sh0000755000175000017500000003452312560745327011402 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2013-12-25.23; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: fcml-1.1.1/Makefile.in0000644000175000017500000006705712561443454011450 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # 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, # 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. @SET_MAKE@ VPATH = @srcdir@ 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 \ ?) ;; \ *) 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@ pkglibexecdir = $(libexecdir)/@PACKAGE@ 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 = @build@ host_triplet = @host@ subdir = . 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 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.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 CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = 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 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # 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 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) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FCML_IMPORT_LIB = @FCML_IMPORT_LIB@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ 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@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ YACC = @YACC@ YFLAGS = @YFLAGS@ 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@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = win32/dist.bat \ win32/vs2008/fcml/fcml-check/fcml-check.vcproj \ win32/vs2008/fcml/fcml-check-cpp/fcml-check-cpp.vcproj \ win32/vs2008/fcml/fcml.sln \ win32/vs2008/fcml/fcml/dllmain.c \ win32/vs2008/fcml/fcml/fcml.def \ win32/vs2008/fcml/fcml/fcml.rc \ win32/vs2008/fcml/fcml/fcml.vcproj \ win32/vs2008/fcml/fcml/resource.h \ win32/vs2008/fcml/fcml/resource1.h \ win32/vs2008/fcml/examples/hsdis/dllmain.cpp \ win32/vs2008/fcml/examples/hsdis/hsdis.def \ win32/vs2008/fcml/examples/hsdis/hsdis.rc \ 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 \ win32/vs2010/fcml/fcml-check-cpp/fcml-check-cpp.vcxproj.filters \ win32/vs2010/fcml/fcml.sln \ win32/vs2010/fcml/fcml/dllmain.c \ win32/vs2010/fcml/fcml/fcml.def \ win32/vs2010/fcml/fcml/fcml.rc \ win32/vs2010/fcml/fcml/fcml.vcxproj \ win32/vs2010/fcml/fcml/fcml.vcxproj.filters \ win32/vs2010/fcml/fcml/resource.h \ win32/vs2010/fcml/fcml/resource1.h \ win32/vs2010/fcml/examples/hsdis/dllmain.cpp \ win32/vs2010/fcml/examples/hsdis/hsdis.def \ win32/vs2010/fcml/examples/hsdis/hsdis.rc \ win32/vs2010/fcml/examples/hsdis/resource.h \ 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 \ win32/vs2013/fcml/fcml-check-cpp/fcml-check-cpp.vcxproj.filters \ win32/vs2013/fcml/fcml.sln \ win32/vs2013/fcml/fcml/dllmain.c \ win32/vs2013/fcml/fcml/fcml.def \ win32/vs2013/fcml/fcml/fcml.rc \ win32/vs2013/fcml/fcml/fcml.vcxproj \ win32/vs2013/fcml/fcml/fcml.vcxproj.filters \ win32/vs2013/fcml/fcml/resource.h \ win32/vs2013/fcml/fcml/resource1.h \ win32/vs2013/fcml/examples/hsdis/dllmain.cpp \ win32/vs2013/fcml/examples/hsdis/hsdis.def \ win32/vs2013/fcml/examples/hsdis/hsdis.rc \ win32/vs2013/fcml/examples/hsdis/resource.h \ 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 @HAVE_DOXYGEN_TRUE@DOXYDIR = docs/doxygen SUBDIRS = include src check example $(DOXYDIR) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @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 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(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-recursive 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" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive 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 -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(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) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) 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/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 \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive 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: 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." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-generic \ distclean-hdr distclean-libtool distclean-tags distcleancheck \ distdir distuninstallcheck 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 installdirs-am maintainer-clean \ maintainer-clean-generic 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. .NOEXPORT: fcml-1.1.1/config.h.in0000644000175000017500000001363512561443533011415 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* Define to enable FCML debug features */ #undef FCML_DEBUG /* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the `memcpy' function. */ #undef HAVE_MEMCPY /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL /* Define to 1 if you have the `strtoull' function. */ #undef HAVE_STRTOULL /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER /* Define for Solaris 2.5.1 so the uint32_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT32_T /* Define for Solaris 2.5.1 so the uint64_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT64_T /* Define for Solaris 2.5.1 so the uint8_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT8_T /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to the type of a signed integer type of width exactly 16 bits if such a type exists and the standard includes do not define it. */ #undef int16_t /* Define to the type of a signed integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ #undef int32_t /* Define to the type of a signed integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ #undef int64_t /* Define to the type of a signed integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ #undef int8_t /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to the type of an unsigned integer type of width exactly 16 bits if such a type exists and the standard includes do not define it. */ #undef uint16_t /* Define to the type of an unsigned integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ #undef uint32_t /* Define to the type of an unsigned integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ #undef uint64_t /* Define to the type of an unsigned integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ #undef uint8_t