binutils: build libopcodes.

git-svn-id: svn://kolibrios.org@5221 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2014-12-06 08:39:39 +00:00
parent b0a0820151
commit ecd34cd9d9
17 changed files with 85494 additions and 14 deletions

View File

@ -15,7 +15,7 @@ CFLAGS = -c $(CFLAGS_OPT)
LDFLAGS = -nostdlib -shared -s --image-base 0 -T ../newlib/dll.lds -e _DllStartup
LDFLAGS+= --out-implib
SUBDIRS = libiberty bfd binutils ld
SUBDIRS = libiberty bfd opcodes binutils gas ld
# targets

View File

@ -19,13 +19,13 @@ LDFLAGS = -static -nostdlib --stack 12582912 -T$(SDK_DIR)/sources/newlib/app.lds
SRCS = \
arparse.c arlex.c ar.c \
not-ranlib.c arsup.c \
binemul.c emul_vanilla.c \
objcopy.c not-strip.c rename.c \
rddbg.c debug.c stabs.c ieee.c \
rdcoff.c wrstabs.c bucomm.c \
version.c filemode.c
ar.c arlex.c arparse.c arsup.c \
binemul.c bucomm.c debug.c \
emul_vanilla.c filemode.c ieee.c\
is-strip.c not-ranlib.c \
not-strip.c objcopy.c rdcoff.c \
rddbg.c rename.c stabs.c \
version.c wrstabs.c
OCOPY = \
objcopy.o not-strip.o rename.o \
@ -39,9 +39,15 @@ OAR = \
binemul.o emul_vanilla.o \
bucomm.o version.o filemode.o
OSTRIP = \
objcopy.o is-strip.o rename.o \
rddbg.o debug.o stabs.o ieee.o \
rdcoff.o wrstabs.o bucomm.o \
version.o filemode.o
# targets
all: objcopy ar
all: objcopy ar strip
objcopy: $(OCOPY) Makefile
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(OCOPY) $(LIBS)
@ -51,6 +57,10 @@ ar: $(OAR) Makefile
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(OAR) $(LIBS)
kos32-objcopy $@ -O binary
strip: $(OSTRIP) Makefile
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(OSTRIP) $(LIBS)
kos32-objcopy $@ -O binary
%.o : %.c Makefile
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<

View File

@ -883,7 +883,7 @@ open_inarch (const char *archive_filename, const char *file)
if (!operation_alters_arch)
{
fprintf (stderr, "%s: ", program_name);
// perror (archive_filename);
perror (archive_filename);
maybequit ();
return NULL;
}
@ -1050,7 +1050,7 @@ extract_file (bfd *abfd)
ostream = fopen (bfd_get_filename (abfd), FOPEN_WB);
if (ostream == NULL)
{
// perror (bfd_get_filename (abfd));
perror (bfd_get_filename (abfd));
xexit (1);
}
@ -1078,7 +1078,7 @@ extract_file (bfd *abfd)
ostream = fopen (bfd_get_filename (abfd), FOPEN_WB);
if (ostream == NULL)
{
// perror (bfd_get_filename (abfd));
perror (bfd_get_filename (abfd));
xexit (1);
}

View File

@ -0,0 +1,23 @@
/* Copyright 2007 Free Software Foundation, Inc.
This file is part of GNU Binutils.
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, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
/* Linked with objcopy.o to flag that this program is 'strip' (not
'objcopy'). */
int is_strip = 1;

View File

@ -2320,8 +2320,7 @@ def_file_parse (const char *filename, def_file *add_to)
linenumber = 1;
if (!the_file)
{
//perror (filename);
printf("Error %s\n", filename);
perror (filename);
return 0;
}
if (add_to)

View File

@ -0,0 +1,29 @@
CFLAGS_OPT = -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -U_MSC_VER -O2
CFLAGS_OPT+= -fomit-frame-pointer -fno-ident -mno-ms-bitfields
CFLAGS_OPT+= -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format -Werror
CFLAGS = -c $(CFLAGS_OPT)
INCLUDES= -I. -I../bfd -I../include -I$(SDK_DIR)/sources/newlib/libc/include
DEFINES= -DHAVE_CONFIG_H
SRCS = \
dis-buf.c disassemble.c \
dis-init.o i386-dis.o \
i386-opc.o
OBJS = $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SRCS)))
# targets
all: libopcodes.a
libopcodes.a: $(OBJS) MAkefile
$(AR) crs $@ $(OBJS)
mv -f $@ $(SDK_DIR)/lib
%.o : %.c Makefile
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<

View File

@ -0,0 +1,120 @@
/* config.h. Generated from config.in by configure. */
/* config.in. Generated from configure.in by autoheader. */
/* Check that config.h is #included before system headers
(this works only for glibc, but that should be enough). */
#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
# error config.h must be #included before system headers
#endif
#define __CONFIG_H__ 1
/* Define to 1 if translation of program messages to the user's native
language is requested. */
/* #undef ENABLE_NLS */
/* Define to 1 if you have the declaration of `basename', and to 0 if you
don't. */
#define HAVE_DECL_BASENAME 0
/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
*/
#define HAVE_DECL_STPCPY 0
/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Name of package */
#define PACKAGE "opcodes"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME ""
/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION ""
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if you can safely include both <string.h> and <strings.h>. */
#define STRING_WITH_STRINGS 1
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# define _ALL_SOURCE 1
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# define _POSIX_PTHREAD_SEMANTICS 1
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# define _TANDEM_SOURCE 1
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
#endif
/* Version number of package */
#define VERSION "2.24"
/* Define to 1 if on MINIX. */
/* #undef _MINIX */
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
/* #undef _POSIX_1_SOURCE */
/* Define to 1 if you need to in order for `stat' and other things to work. */
/* #undef _POSIX_SOURCE */

View File

@ -0,0 +1,105 @@
/* Disassemble from a buffer, for GNU.
Copyright 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2005,
2007, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU opcodes library.
This library 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, or (at your option)
any later version.
It 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 "sysdep.h"
#include "dis-asm.h"
#include <errno.h>
#include "opintl.h"
/* Get LENGTH bytes from info's buffer, at target address memaddr.
Transfer them to myaddr. */
int
buffer_read_memory (bfd_vma memaddr,
bfd_byte *myaddr,
unsigned int length,
struct disassemble_info *info)
{
unsigned int opb = info->octets_per_byte;
unsigned int end_addr_offset = length / opb;
unsigned int max_addr_offset = info->buffer_length / opb;
unsigned int octets = (memaddr - info->buffer_vma) * opb;
if (memaddr < info->buffer_vma
|| memaddr - info->buffer_vma > max_addr_offset
|| memaddr - info->buffer_vma + end_addr_offset > max_addr_offset)
/* Out of bounds. Use EIO because GDB uses it. */
return EIO;
memcpy (myaddr, info->buffer + octets, length);
return 0;
}
/* Print an error message. We can assume that this is in response to
an error return from buffer_read_memory. */
void
perror_memory (int status,
bfd_vma memaddr,
struct disassemble_info *info)
{
if (status != EIO)
/* Can't happen. */
info->fprintf_func (info->stream, _("Unknown error %d\n"), status);
else
{
char buf[30];
/* Actually, address between memaddr and memaddr + len was
out of bounds. */
sprintf_vma (buf, memaddr);
info->fprintf_func (info->stream,
_("Address 0x%s is out of bounds.\n"), buf);
}
}
/* This could be in a separate file, to save miniscule amounts of space
in statically linked executables. */
/* Just print the address is hex. This is included for completeness even
though both GDB and objdump provide their own (to print symbolic
addresses). */
void
generic_print_address (bfd_vma addr, struct disassemble_info *info)
{
char buf[30];
sprintf_vma (buf, addr);
(*info->fprintf_func) (info->stream, "0x%s", buf);
}
/* Just return true. */
int
generic_symbol_at_address (bfd_vma addr ATTRIBUTE_UNUSED,
struct disassemble_info *info ATTRIBUTE_UNUSED)
{
return 1;
}
/* Just return TRUE. */
bfd_boolean
generic_symbol_is_valid (asymbol * sym ATTRIBUTE_UNUSED,
struct disassemble_info *info ATTRIBUTE_UNUSED)
{
return TRUE;
}

View File

@ -0,0 +1,46 @@
/* Initialize "struct disassemble_info".
Copyright 2003, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU opcodes library.
This library 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, or (at your option)
any later version.
It 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 "sysdep.h"
#include "dis-asm.h"
#include "bfd.h"
void
init_disassemble_info (struct disassemble_info *info, void *stream,
fprintf_ftype fprintf_func)
{
memset (info, 0, sizeof (*info));
info->flavour = bfd_target_unknown_flavour;
info->arch = bfd_arch_unknown;
info->endian = BFD_ENDIAN_UNKNOWN;
info->endian_code = info->endian;
info->octets_per_byte = 1;
info->fprintf_func = fprintf_func;
info->stream = stream;
info->read_memory_func = buffer_read_memory;
info->memory_error_func = perror_memory;
info->print_address_func = generic_print_address;
info->symbol_at_address_func = generic_symbol_at_address;
info->symbol_is_valid = generic_symbol_is_valid;
info->display_endian = BFD_ENDIAN_UNKNOWN;
}

View File

@ -0,0 +1,632 @@
/* Select disassembly routine for specified architecture.
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
This file is part of the GNU opcodes library.
This library 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, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
#include "sysdep.h"
#include "dis-asm.h"
#ifdef ARCH_all
#define ARCH_aarch64
#define ARCH_alpha
#define ARCH_arc
#define ARCH_arm
#define ARCH_avr
#define ARCH_bfin
#define ARCH_cr16
#define ARCH_cris
#define ARCH_crx
#define ARCH_d10v
#define ARCH_d30v
#define ARCH_dlx
#define ARCH_epiphany
#define ARCH_fr30
#define ARCH_frv
#define ARCH_h8300
#define ARCH_h8500
#define ARCH_hppa
#define ARCH_i370
#define ARCH_i386
#define ARCH_i860
#define ARCH_i960
#define ARCH_ia64
#define ARCH_ip2k
#define ARCH_iq2000
#define ARCH_lm32
#define ARCH_m32c
#define ARCH_m32r
#define ARCH_m68hc11
#define ARCH_m68hc12
#define ARCH_m68k
#define ARCH_m88k
#define ARCH_mcore
#define ARCH_mep
#define ARCH_metag
#define ARCH_microblaze
#define ARCH_mips
#define ARCH_mmix
#define ARCH_mn10200
#define ARCH_mn10300
#define ARCH_moxie
#define ARCH_mt
#define ARCH_msp430
#define ARCH_nios2
#define ARCH_ns32k
#define ARCH_openrisc
#define ARCH_or32
#define ARCH_pdp11
#define ARCH_pj
#define ARCH_powerpc
#define ARCH_rs6000
#define ARCH_rl78
#define ARCH_rx
#define ARCH_s390
#define ARCH_score
#define ARCH_sh
#define ARCH_sparc
#define ARCH_spu
#define ARCH_tic30
#define ARCH_tic4x
#define ARCH_tic54x
#define ARCH_tic6x
#define ARCH_tic80
#define ARCH_tilegx
#define ARCH_tilepro
#define ARCH_v850
#define ARCH_vax
#define ARCH_w65
#define ARCH_xstormy16
#define ARCH_xc16x
#define ARCH_xgate
#define ARCH_xtensa
#define ARCH_z80
#define ARCH_z8k
#define INCLUDE_SHMEDIA
#endif
#ifdef ARCH_m32c
#include "m32c-desc.h"
#endif
disassembler_ftype
disassembler (abfd)
bfd *abfd;
{
enum bfd_architecture a = bfd_get_arch (abfd);
disassembler_ftype disassemble;
switch (a)
{
/* If you add a case to this table, also add it to the
ARCH_all definition right above this function. */
#ifdef ARCH_aarch64
case bfd_arch_aarch64:
disassemble = print_insn_aarch64;
break;
#endif
#ifdef ARCH_alpha
case bfd_arch_alpha:
disassemble = print_insn_alpha;
break;
#endif
#ifdef ARCH_arc
case bfd_arch_arc:
disassemble = arc_get_disassembler (abfd);
break;
#endif
#ifdef ARCH_arm
case bfd_arch_arm:
if (bfd_big_endian (abfd))
disassemble = print_insn_big_arm;
else
disassemble = print_insn_little_arm;
break;
#endif
#ifdef ARCH_avr
case bfd_arch_avr:
disassemble = print_insn_avr;
break;
#endif
#ifdef ARCH_bfin
case bfd_arch_bfin:
disassemble = print_insn_bfin;
break;
#endif
#ifdef ARCH_cr16
case bfd_arch_cr16:
disassemble = print_insn_cr16;
break;
#endif
#ifdef ARCH_cris
case bfd_arch_cris:
disassemble = cris_get_disassembler (abfd);
break;
#endif
#ifdef ARCH_crx
case bfd_arch_crx:
disassemble = print_insn_crx;
break;
#endif
#ifdef ARCH_d10v
case bfd_arch_d10v:
disassemble = print_insn_d10v;
break;
#endif
#ifdef ARCH_d30v
case bfd_arch_d30v:
disassemble = print_insn_d30v;
break;
#endif
#ifdef ARCH_dlx
case bfd_arch_dlx:
/* As far as I know we only handle big-endian DLX objects. */
disassemble = print_insn_dlx;
break;
#endif
#ifdef ARCH_h8300
case bfd_arch_h8300:
if (bfd_get_mach (abfd) == bfd_mach_h8300h
|| bfd_get_mach (abfd) == bfd_mach_h8300hn)
disassemble = print_insn_h8300h;
else if (bfd_get_mach (abfd) == bfd_mach_h8300s
|| bfd_get_mach (abfd) == bfd_mach_h8300sn
|| bfd_get_mach (abfd) == bfd_mach_h8300sx
|| bfd_get_mach (abfd) == bfd_mach_h8300sxn)
disassemble = print_insn_h8300s;
else
disassemble = print_insn_h8300;
break;
#endif
#ifdef ARCH_h8500
case bfd_arch_h8500:
disassemble = print_insn_h8500;
break;
#endif
#ifdef ARCH_hppa
case bfd_arch_hppa:
disassemble = print_insn_hppa;
break;
#endif
#ifdef ARCH_i370
case bfd_arch_i370:
disassemble = print_insn_i370;
break;
#endif
#ifdef ARCH_i386
case bfd_arch_i386:
case bfd_arch_l1om:
case bfd_arch_k1om:
disassemble = print_insn_i386;
break;
#endif
#ifdef ARCH_i860
case bfd_arch_i860:
disassemble = print_insn_i860;
break;
#endif
#ifdef ARCH_i960
case bfd_arch_i960:
disassemble = print_insn_i960;
break;
#endif
#ifdef ARCH_ia64
case bfd_arch_ia64:
disassemble = print_insn_ia64;
break;
#endif
#ifdef ARCH_ip2k
case bfd_arch_ip2k:
disassemble = print_insn_ip2k;
break;
#endif
#ifdef ARCH_epiphany
case bfd_arch_epiphany:
disassemble = print_insn_epiphany;
break;
#endif
#ifdef ARCH_fr30
case bfd_arch_fr30:
disassemble = print_insn_fr30;
break;
#endif
#ifdef ARCH_lm32
case bfd_arch_lm32:
disassemble = print_insn_lm32;
break;
#endif
#ifdef ARCH_m32r
case bfd_arch_m32r:
disassemble = print_insn_m32r;
break;
#endif
#if defined(ARCH_m68hc11) || defined(ARCH_m68hc12) \
|| defined(ARCH_9s12x) || defined(ARCH_m9s12xg)
case bfd_arch_m68hc11:
disassemble = print_insn_m68hc11;
break;
case bfd_arch_m68hc12:
disassemble = print_insn_m68hc12;
break;
case bfd_arch_m9s12x:
disassemble = print_insn_m9s12x;
break;
case bfd_arch_m9s12xg:
disassemble = print_insn_m9s12xg;
break;
#endif
#ifdef ARCH_m68k
case bfd_arch_m68k:
disassemble = print_insn_m68k;
break;
#endif
#ifdef ARCH_m88k
case bfd_arch_m88k:
disassemble = print_insn_m88k;
break;
#endif
#ifdef ARCH_mt
case bfd_arch_mt:
disassemble = print_insn_mt;
break;
#endif
#ifdef ARCH_microblaze
case bfd_arch_microblaze:
disassemble = print_insn_microblaze;
break;
#endif
#ifdef ARCH_msp430
case bfd_arch_msp430:
disassemble = print_insn_msp430;
break;
#endif
#ifdef ARCH_ns32k
case bfd_arch_ns32k:
disassemble = print_insn_ns32k;
break;
#endif
#ifdef ARCH_mcore
case bfd_arch_mcore:
disassemble = print_insn_mcore;
break;
#endif
#ifdef ARCH_mep
case bfd_arch_mep:
disassemble = print_insn_mep;
break;
#endif
#ifdef ARCH_metag
case bfd_arch_metag:
disassemble = print_insn_metag;
break;
#endif
#ifdef ARCH_mips
case bfd_arch_mips:
if (bfd_big_endian (abfd))
disassemble = print_insn_big_mips;
else
disassemble = print_insn_little_mips;
break;
#endif
#ifdef ARCH_mmix
case bfd_arch_mmix:
disassemble = print_insn_mmix;
break;
#endif
#ifdef ARCH_mn10200
case bfd_arch_mn10200:
disassemble = print_insn_mn10200;
break;
#endif
#ifdef ARCH_mn10300
case bfd_arch_mn10300:
disassemble = print_insn_mn10300;
break;
#endif
#ifdef ARCH_nios2
case bfd_arch_nios2:
if (bfd_big_endian (abfd))
disassemble = print_insn_big_nios2;
else
disassemble = print_insn_little_nios2;
break;
#endif
#ifdef ARCH_openrisc
case bfd_arch_openrisc:
disassemble = print_insn_openrisc;
break;
#endif
#ifdef ARCH_or32
case bfd_arch_or32:
if (bfd_big_endian (abfd))
disassemble = print_insn_big_or32;
else
disassemble = print_insn_little_or32;
break;
#endif
#ifdef ARCH_pdp11
case bfd_arch_pdp11:
disassemble = print_insn_pdp11;
break;
#endif
#ifdef ARCH_pj
case bfd_arch_pj:
disassemble = print_insn_pj;
break;
#endif
#ifdef ARCH_powerpc
case bfd_arch_powerpc:
if (bfd_big_endian (abfd))
disassemble = print_insn_big_powerpc;
else
disassemble = print_insn_little_powerpc;
break;
#endif
#ifdef ARCH_rs6000
case bfd_arch_rs6000:
if (bfd_get_mach (abfd) == bfd_mach_ppc_620)
disassemble = print_insn_big_powerpc;
else
disassemble = print_insn_rs6000;
break;
#endif
#ifdef ARCH_rl78
case bfd_arch_rl78:
disassemble = print_insn_rl78;
break;
#endif
#ifdef ARCH_rx
case bfd_arch_rx:
disassemble = print_insn_rx;
break;
#endif
#ifdef ARCH_s390
case bfd_arch_s390:
disassemble = print_insn_s390;
break;
#endif
#ifdef ARCH_score
case bfd_arch_score:
if (bfd_big_endian (abfd))
disassemble = print_insn_big_score;
else
disassemble = print_insn_little_score;
break;
#endif
#ifdef ARCH_sh
case bfd_arch_sh:
disassemble = print_insn_sh;
break;
#endif
#ifdef ARCH_sparc
case bfd_arch_sparc:
disassemble = print_insn_sparc;
break;
#endif
#ifdef ARCH_spu
case bfd_arch_spu:
disassemble = print_insn_spu;
break;
#endif
#ifdef ARCH_tic30
case bfd_arch_tic30:
disassemble = print_insn_tic30;
break;
#endif
#ifdef ARCH_tic4x
case bfd_arch_tic4x:
disassemble = print_insn_tic4x;
break;
#endif
#ifdef ARCH_tic54x
case bfd_arch_tic54x:
disassemble = print_insn_tic54x;
break;
#endif
#ifdef ARCH_tic6x
case bfd_arch_tic6x:
disassemble = print_insn_tic6x;
break;
#endif
#ifdef ARCH_tic80
case bfd_arch_tic80:
disassemble = print_insn_tic80;
break;
#endif
#ifdef ARCH_v850
case bfd_arch_v850:
case bfd_arch_v850_rh850:
disassemble = print_insn_v850;
break;
#endif
#ifdef ARCH_w65
case bfd_arch_w65:
disassemble = print_insn_w65;
break;
#endif
#ifdef ARCH_xgate
case bfd_arch_xgate:
disassemble = print_insn_xgate;
break;
#endif
#ifdef ARCH_xstormy16
case bfd_arch_xstormy16:
disassemble = print_insn_xstormy16;
break;
#endif
#ifdef ARCH_xc16x
case bfd_arch_xc16x:
disassemble = print_insn_xc16x;
break;
#endif
#ifdef ARCH_xtensa
case bfd_arch_xtensa:
disassemble = print_insn_xtensa;
break;
#endif
#ifdef ARCH_z80
case bfd_arch_z80:
disassemble = print_insn_z80;
break;
#endif
#ifdef ARCH_z8k
case bfd_arch_z8k:
if (bfd_get_mach(abfd) == bfd_mach_z8001)
disassemble = print_insn_z8001;
else
disassemble = print_insn_z8002;
break;
#endif
#ifdef ARCH_vax
case bfd_arch_vax:
disassemble = print_insn_vax;
break;
#endif
#ifdef ARCH_frv
case bfd_arch_frv:
disassemble = print_insn_frv;
break;
#endif
#ifdef ARCH_moxie
case bfd_arch_moxie:
disassemble = print_insn_moxie;
break;
#endif
#ifdef ARCH_iq2000
case bfd_arch_iq2000:
disassemble = print_insn_iq2000;
break;
#endif
#ifdef ARCH_m32c
case bfd_arch_m32c:
disassemble = print_insn_m32c;
break;
#endif
#ifdef ARCH_tilegx
case bfd_arch_tilegx:
disassemble = print_insn_tilegx;
break;
#endif
#ifdef ARCH_tilepro
case bfd_arch_tilepro:
disassemble = print_insn_tilepro;
break;
#endif
default:
return 0;
}
return disassemble;
}
void
disassembler_usage (stream)
FILE * stream ATTRIBUTE_UNUSED;
{
#ifdef ARCH_aarch64
print_aarch64_disassembler_options (stream);
#endif
#ifdef ARCH_arm
print_arm_disassembler_options (stream);
#endif
#ifdef ARCH_mips
print_mips_disassembler_options (stream);
#endif
#ifdef ARCH_powerpc
print_ppc_disassembler_options (stream);
#endif
#ifdef ARCH_i386
print_i386_disassembler_options (stream);
#endif
#ifdef ARCH_s390
print_s390_disassembler_options (stream);
#endif
return;
}
void
disassemble_init_for_target (struct disassemble_info * info)
{
if (info == NULL)
return;
switch (info->arch)
{
#ifdef ARCH_aarch64
case bfd_arch_aarch64:
info->symbol_is_valid = aarch64_symbol_is_valid;
info->disassembler_needs_relocs = TRUE;
break;
#endif
#ifdef ARCH_arm
case bfd_arch_arm:
info->symbol_is_valid = arm_symbol_is_valid;
info->disassembler_needs_relocs = TRUE;
break;
#endif
#ifdef ARCH_ia64
case bfd_arch_ia64:
info->skip_zeroes = 16;
break;
#endif
#ifdef ARCH_tic4x
case bfd_arch_tic4x:
info->skip_zeroes = 32;
break;
#endif
#ifdef ARCH_mep
case bfd_arch_mep:
info->skip_zeroes = 256;
info->skip_zeroes_at_end = 0;
break;
#endif
#ifdef ARCH_metag
case bfd_arch_metag:
info->disassembler_needs_relocs = TRUE;
break;
#endif
#ifdef ARCH_m32c
case bfd_arch_m32c:
/* This processor in fact is little endian. The value set here
reflects the way opcodes are written in the cgen description. */
info->endian = BFD_ENDIAN_BIG;
if (! info->insn_sets)
{
info->insn_sets = cgen_bitset_create (ISA_MAX);
if (info->mach == bfd_mach_m16c)
cgen_bitset_set (info->insn_sets, ISA_M16C);
else
cgen_bitset_set (info->insn_sets, ISA_M32C);
}
break;
#endif
#ifdef ARCH_powerpc
case bfd_arch_powerpc:
#endif
#ifdef ARCH_rs6000
case bfd_arch_rs6000:
#endif
#if defined (ARCH_powerpc) || defined (ARCH_rs6000)
disassemble_init_powerpc (info);
break;
#endif
default:
break;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,815 @@
/* This file is automatically generated by i386-gen. Do not edit! */
/* Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013
Free Software Foundation, Inc.
This file is part of the GNU opcodes library.
This library 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, or (at your option)
any later version.
It 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. */
#define CPU_UNKNOWN_FLAGS \
{ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 0, 1, 1 } }
#define CPU_GENERIC32_FLAGS \
{ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 1, \
1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
#define OPERAND_TYPE_IMM32_32S_64_DISP32_64 \
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, \
1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
#define OPERAND_TYPE_VEC_IMM4 \
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 } }
#define OPERAND_TYPE_REGBND \
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 } }
#define OPERAND_TYPE_VEC_DISP8 \
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 } }

View File

@ -0,0 +1,33 @@
/* Intel 80386 opcode table
Copyright 2007
Free Software Foundation, Inc.
This file is part of the GNU opcodes library.
This library 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, or (at your option)
any later version.
It 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 "sysdep.h"
#include "libiberty.h"
#include "i386-opc.h"
#include "i386-tbl.h"
/* Segment stuff. */
const seg_entry cs = { "cs", 0x2e };
const seg_entry ds = { "ds", 0x3e };
const seg_entry ss = { "ss", 0x36 };
const seg_entry es = { "es", 0x26 };
const seg_entry fs = { "fs", 0x64 };
const seg_entry gs = { "gs", 0x65 };

View File

@ -0,0 +1,854 @@
/* Declarations for Intel 80386 opcode table
Copyright 2007, 2008, 2009, 2010, 2012
Free Software Foundation, Inc.
This file is part of the GNU opcodes library.
This library 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, or (at your option)
any later version.
It is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
#include "opcode/i386.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifndef CHAR_BIT
#define CHAR_BIT 8
#endif
/* Position of cpu flags bitfiled. */
enum
{
/* i186 or better required */
Cpu186 = 0,
/* i286 or better required */
Cpu286,
/* i386 or better required */
Cpu386,
/* i486 or better required */
Cpu486,
/* i585 or better required */
Cpu586,
/* i686 or better required */
Cpu686,
/* CLFLUSH Instruction support required */
CpuClflush,
/* NOP Instruction support required */
CpuNop,
/* SYSCALL Instructions support required */
CpuSYSCALL,
/* Floating point support required */
Cpu8087,
/* i287 support required */
Cpu287,
/* i387 support required */
Cpu387,
/* i686 and floating point support required */
Cpu687,
/* SSE3 and floating point support required */
CpuFISTTP,
/* MMX support required */
CpuMMX,
/* SSE support required */
CpuSSE,
/* SSE2 support required */
CpuSSE2,
/* 3dnow! support required */
Cpu3dnow,
/* 3dnow! Extensions support required */
Cpu3dnowA,
/* SSE3 support required */
CpuSSE3,
/* VIA PadLock required */
CpuPadLock,
/* AMD Secure Virtual Machine Ext-s required */
CpuSVME,
/* VMX Instructions required */
CpuVMX,
/* SMX Instructions required */
CpuSMX,
/* SSSE3 support required */
CpuSSSE3,
/* SSE4a support required */
CpuSSE4a,
/* ABM New Instructions required */
CpuABM,
/* SSE4.1 support required */
CpuSSE4_1,
/* SSE4.2 support required */
CpuSSE4_2,
/* AVX support required */
CpuAVX,
/* AVX2 support required */
CpuAVX2,
/* Intel AVX-512 Foundation Instructions support required */
CpuAVX512F,
/* Intel AVX-512 Conflict Detection Instructions support required */
CpuAVX512CD,
/* Intel AVX-512 Exponential and Reciprocal Instructions support
required */
CpuAVX512ER,
/* Intel AVX-512 Prefetch Instructions support required */
CpuAVX512PF,
/* Intel L1OM support required */
CpuL1OM,
/* Intel K1OM support required */
CpuK1OM,
/* Xsave/xrstor New Instructions support required */
CpuXsave,
/* Xsaveopt New Instructions support required */
CpuXsaveopt,
/* AES support required */
CpuAES,
/* PCLMUL support required */
CpuPCLMUL,
/* FMA support required */
CpuFMA,
/* FMA4 support required */
CpuFMA4,
/* XOP support required */
CpuXOP,
/* LWP support required */
CpuLWP,
/* BMI support required */
CpuBMI,
/* TBM support required */
CpuTBM,
/* MOVBE Instruction support required */
CpuMovbe,
/* CMPXCHG16B instruction support required. */
CpuCX16,
/* EPT Instructions required */
CpuEPT,
/* RDTSCP Instruction support required */
CpuRdtscp,
/* FSGSBASE Instructions required */
CpuFSGSBase,
/* RDRND Instructions required */
CpuRdRnd,
/* F16C Instructions required */
CpuF16C,
/* Intel BMI2 support required */
CpuBMI2,
/* LZCNT support required */
CpuLZCNT,
/* HLE support required */
CpuHLE,
/* RTM support required */
CpuRTM,
/* INVPCID Instructions required */
CpuINVPCID,
/* VMFUNC Instruction required */
CpuVMFUNC,
/* Intel MPX Instructions required */
CpuMPX,
/* 64bit support available, used by -march= in assembler. */
CpuLM,
/* RDRSEED instruction required. */
CpuRDSEED,
/* Multi-presisionn add-carry instructions are required. */
CpuADX,
/* Supports prefetchw and prefetch instructions. */
CpuPRFCHW,
/* SMAP instructions required. */
CpuSMAP,
/* SHA instructions required. */
CpuSHA,
/* VREX support required */
CpuVREX,
/* 64bit support required */
Cpu64,
/* Not supported in the 64bit mode */
CpuNo64,
/* The last bitfield in i386_cpu_flags. */
CpuMax = CpuNo64
};
#define CpuNumOfUints \
(CpuMax / sizeof (unsigned int) / CHAR_BIT + 1)
#define CpuNumOfBits \
(CpuNumOfUints * sizeof (unsigned int) * CHAR_BIT)
/* If you get a compiler error for zero width of the unused field,
comment it out. */
#define CpuUnused (CpuMax + 1)
/* We can check if an instruction is available with array instead
of bitfield. */
typedef union i386_cpu_flags
{
struct
{
unsigned int cpui186:1;
unsigned int cpui286:1;
unsigned int cpui386:1;
unsigned int cpui486:1;
unsigned int cpui586:1;
unsigned int cpui686:1;
unsigned int cpuclflush:1;
unsigned int cpunop:1;
unsigned int cpusyscall:1;
unsigned int cpu8087:1;
unsigned int cpu287:1;
unsigned int cpu387:1;
unsigned int cpu687:1;
unsigned int cpufisttp:1;
unsigned int cpummx:1;
unsigned int cpusse:1;
unsigned int cpusse2:1;
unsigned int cpua3dnow:1;
unsigned int cpua3dnowa:1;
unsigned int cpusse3:1;
unsigned int cpupadlock:1;
unsigned int cpusvme:1;
unsigned int cpuvmx:1;
unsigned int cpusmx:1;
unsigned int cpussse3:1;
unsigned int cpusse4a:1;
unsigned int cpuabm:1;
unsigned int cpusse4_1:1;
unsigned int cpusse4_2:1;
unsigned int cpuavx:1;
unsigned int cpuavx2:1;
unsigned int cpuavx512f:1;
unsigned int cpuavx512cd:1;
unsigned int cpuavx512er:1;
unsigned int cpuavx512pf:1;
unsigned int cpul1om:1;
unsigned int cpuk1om:1;
unsigned int cpuxsave:1;
unsigned int cpuxsaveopt:1;
unsigned int cpuaes:1;
unsigned int cpupclmul:1;
unsigned int cpufma:1;
unsigned int cpufma4:1;
unsigned int cpuxop:1;
unsigned int cpulwp:1;
unsigned int cpubmi:1;
unsigned int cputbm:1;
unsigned int cpumovbe:1;
unsigned int cpucx16:1;
unsigned int cpuept:1;
unsigned int cpurdtscp:1;
unsigned int cpufsgsbase:1;
unsigned int cpurdrnd:1;
unsigned int cpuf16c:1;
unsigned int cpubmi2:1;
unsigned int cpulzcnt:1;
unsigned int cpuhle:1;
unsigned int cpurtm:1;
unsigned int cpuinvpcid:1;
unsigned int cpuvmfunc:1;
unsigned int cpumpx:1;
unsigned int cpulm:1;
unsigned int cpurdseed:1;
unsigned int cpuadx:1;
unsigned int cpuprfchw:1;
unsigned int cpusmap:1;
unsigned int cpusha:1;
unsigned int cpuvrex:1;
unsigned int cpu64:1;
unsigned int cpuno64:1;
#ifdef CpuUnused
unsigned int unused:(CpuNumOfBits - CpuUnused);
#endif
} bitfield;
unsigned int array[CpuNumOfUints];
} i386_cpu_flags;
/* Position of opcode_modifier bits. */
enum
{
/* has direction bit. */
D = 0,
/* set if operands can be words or dwords encoded the canonical way */
W,
/* Skip the current insn and use the next insn in i386-opc.tbl to swap
operand in encoding. */
S,
/* insn has a modrm byte. */
Modrm,
/* register is in low 3 bits of opcode */
ShortForm,
/* special case for jump insns. */
Jump,
/* call and jump */
JumpDword,
/* loop and jecxz */
JumpByte,
/* special case for intersegment leaps/calls */
JumpInterSegment,
/* FP insn memory format bit, sized by 0x4 */
FloatMF,
/* src/dest swap for floats. */
FloatR,
/* has float insn direction bit. */
FloatD,
/* needs size prefix if in 32-bit mode */
Size16,
/* needs size prefix if in 16-bit mode */
Size32,
/* needs size prefix if in 64-bit mode */
Size64,
/* check register size. */
CheckRegSize,
/* instruction ignores operand size prefix and in Intel mode ignores
mnemonic size suffix check. */
IgnoreSize,
/* default insn size depends on mode */
DefaultSize,
/* b suffix on instruction illegal */
No_bSuf,
/* w suffix on instruction illegal */
No_wSuf,
/* l suffix on instruction illegal */
No_lSuf,
/* s suffix on instruction illegal */
No_sSuf,
/* q suffix on instruction illegal */
No_qSuf,
/* long double suffix on instruction illegal */
No_ldSuf,
/* instruction needs FWAIT */
FWait,
/* quick test for string instructions */
IsString,
/* quick test if branch instruction is MPX supported */
BNDPrefixOk,
/* quick test for lockable instructions */
IsLockable,
/* fake an extra reg operand for clr, imul and special register
processing for some instructions. */
RegKludge,
/* The first operand must be xmm0 */
FirstXmm0,
/* An implicit xmm0 as the first operand */
Implicit1stXmm0,
/* The HLE prefix is OK:
1. With a LOCK prefix.
2. With or without a LOCK prefix.
3. With a RELEASE (0xf3) prefix.
*/
#define HLEPrefixNone 0
#define HLEPrefixLock 1
#define HLEPrefixAny 2
#define HLEPrefixRelease 3
HLEPrefixOk,
/* An instruction on which a "rep" prefix is acceptable. */
RepPrefixOk,
/* Convert to DWORD */
ToDword,
/* Convert to QWORD */
ToQword,
/* Address prefix changes operand 0 */
AddrPrefixOp0,
/* opcode is a prefix */
IsPrefix,
/* instruction has extension in 8 bit imm */
ImmExt,
/* instruction don't need Rex64 prefix. */
NoRex64,
/* instruction require Rex64 prefix. */
Rex64,
/* deprecated fp insn, gets a warning */
Ugh,
/* insn has VEX prefix:
1: 128bit VEX prefix.
2: 256bit VEX prefix.
3: Scalar VEX prefix.
*/
#define VEX128 1
#define VEX256 2
#define VEXScalar 3
Vex,
/* How to encode VEX.vvvv:
0: VEX.vvvv must be 1111b.
1: VEX.NDS. Register-only source is encoded in VEX.vvvv where
the content of source registers will be preserved.
VEX.DDS. The second register operand is encoded in VEX.vvvv
where the content of first source register will be overwritten
by the result.
VEX.NDD2. The second destination register operand is encoded in
VEX.vvvv for instructions with 2 destination register operands.
For assembler, there are no difference between VEX.NDS, VEX.DDS
and VEX.NDD2.
2. VEX.NDD. Register destination is encoded in VEX.vvvv for
instructions with 1 destination register operand.
3. VEX.LWP. Register destination is encoded in VEX.vvvv and one
of the operands can access a memory location.
*/
#define VEXXDS 1
#define VEXNDD 2
#define VEXLWP 3
VexVVVV,
/* How the VEX.W bit is used:
0: Set by the REX.W bit.
1: VEX.W0. Should always be 0.
2: VEX.W1. Should always be 1.
*/
#define VEXW0 1
#define VEXW1 2
VexW,
/* VEX opcode prefix:
0: VEX 0x0F opcode prefix.
1: VEX 0x0F38 opcode prefix.
2: VEX 0x0F3A opcode prefix
3: XOP 0x08 opcode prefix.
4: XOP 0x09 opcode prefix
5: XOP 0x0A opcode prefix.
*/
#define VEX0F 0
#define VEX0F38 1
#define VEX0F3A 2
#define XOP08 3
#define XOP09 4
#define XOP0A 5
VexOpcode,
/* number of VEX source operands:
0: <= 2 source operands.
1: 2 XOP source operands.
2: 3 source operands.
*/
#define XOP2SOURCES 1
#define VEX3SOURCES 2
VexSources,
/* instruction has VEX 8 bit imm */
VexImmExt,
/* Instruction with vector SIB byte:
1: 128bit vector register.
2: 256bit vector register.
3: 512bit vector register.
*/
#define VecSIB128 1
#define VecSIB256 2
#define VecSIB512 3
VecSIB,
/* SSE to AVX support required */
SSE2AVX,
/* No AVX equivalent */
NoAVX,
/* insn has EVEX prefix:
1: 512bit EVEX prefix.
2: 128bit EVEX prefix.
3: 256bit EVEX prefix.
4: Length-ignored (LIG) EVEX prefix.
*/
#define EVEX512 1
#define EVEX128 2
#define EVEX256 3
#define EVEXLIG 4
EVex,
/* AVX512 masking support:
1: Zeroing-masking.
2: Merging-masking.
3: Both zeroing and merging masking.
*/
#define ZEROING_MASKING 1
#define MERGING_MASKING 2
#define BOTH_MASKING 3
Masking,
/* Input element size of vector insn:
0: 32bit.
1: 64bit.
*/
VecESize,
/* Broadcast factor.
0: No broadcast.
1: 1to16 broadcast.
2: 1to8 broadcast.
*/
#define NO_BROADCAST 0
#define BROADCAST_1TO16 1
#define BROADCAST_1TO8 2
Broadcast,
/* Static rounding control is supported. */
StaticRounding,
/* Supress All Exceptions is supported. */
SAE,
/* Copressed Disp8*N attribute. */
Disp8MemShift,
/* Default mask isn't allowed. */
NoDefMask,
/* Compatible with old (<= 2.8.1) versions of gcc */
OldGcc,
/* AT&T mnemonic. */
ATTMnemonic,
/* AT&T syntax. */
ATTSyntax,
/* Intel syntax. */
IntelSyntax,
/* The last bitfield in i386_opcode_modifier. */
Opcode_Modifier_Max
};
typedef struct i386_opcode_modifier
{
unsigned int d:1;
unsigned int w:1;
unsigned int s:1;
unsigned int modrm:1;
unsigned int shortform:1;
unsigned int jump:1;
unsigned int jumpdword:1;
unsigned int jumpbyte:1;
unsigned int jumpintersegment:1;
unsigned int floatmf:1;
unsigned int floatr:1;
unsigned int floatd:1;
unsigned int size16:1;
unsigned int size32:1;
unsigned int size64:1;
unsigned int checkregsize:1;
unsigned int ignoresize:1;
unsigned int defaultsize:1;
unsigned int no_bsuf:1;
unsigned int no_wsuf:1;
unsigned int no_lsuf:1;
unsigned int no_ssuf:1;
unsigned int no_qsuf:1;
unsigned int no_ldsuf:1;
unsigned int fwait:1;
unsigned int isstring:1;
unsigned int bndprefixok:1;
unsigned int islockable:1;
unsigned int regkludge:1;
unsigned int firstxmm0:1;
unsigned int implicit1stxmm0:1;
unsigned int hleprefixok:2;
unsigned int repprefixok:1;
unsigned int todword:1;
unsigned int toqword:1;
unsigned int addrprefixop0:1;
unsigned int isprefix:1;
unsigned int immext:1;
unsigned int norex64:1;
unsigned int rex64:1;
unsigned int ugh:1;
unsigned int vex:2;
unsigned int vexvvvv:2;
unsigned int vexw:2;
unsigned int vexopcode:3;
unsigned int vexsources:2;
unsigned int veximmext:1;
unsigned int vecsib:2;
unsigned int sse2avx:1;
unsigned int noavx:1;
unsigned int evex:3;
unsigned int masking:2;
unsigned int vecesize:1;
unsigned int broadcast:3;
unsigned int staticrounding:1;
unsigned int sae:1;
unsigned int disp8memshift:3;
unsigned int nodefmask:1;
unsigned int oldgcc:1;
unsigned int attmnemonic:1;
unsigned int attsyntax:1;
unsigned int intelsyntax:1;
} i386_opcode_modifier;
/* Position of operand_type bits. */
enum
{
/* 8bit register */
Reg8 = 0,
/* 16bit register */
Reg16,
/* 32bit register */
Reg32,
/* 64bit register */
Reg64,
/* Floating pointer stack register */
FloatReg,
/* MMX register */
RegMMX,
/* SSE register */
RegXMM,
/* AVX registers */
RegYMM,
/* AVX512 registers */
RegZMM,
/* Vector Mask registers */
RegMask,
/* Control register */
Control,
/* Debug register */
Debug,
/* Test register */
Test,
/* 2 bit segment register */
SReg2,
/* 3 bit segment register */
SReg3,
/* 1 bit immediate */
Imm1,
/* 8 bit immediate */
Imm8,
/* 8 bit immediate sign extended */
Imm8S,
/* 16 bit immediate */
Imm16,
/* 32 bit immediate */
Imm32,
/* 32 bit immediate sign extended */
Imm32S,
/* 64 bit immediate */
Imm64,
/* 8bit/16bit/32bit displacements are used in different ways,
depending on the instruction. For jumps, they specify the
size of the PC relative displacement, for instructions with
memory operand, they specify the size of the offset relative
to the base register, and for instructions with memory offset
such as `mov 1234,%al' they specify the size of the offset
relative to the segment base. */
/* 8 bit displacement */
Disp8,
/* 16 bit displacement */
Disp16,
/* 32 bit displacement */
Disp32,
/* 32 bit signed displacement */
Disp32S,
/* 64 bit displacement */
Disp64,
/* Accumulator %al/%ax/%eax/%rax */
Acc,
/* Floating pointer top stack register %st(0) */
FloatAcc,
/* Register which can be used for base or index in memory operand. */
BaseIndex,
/* Register to hold in/out port addr = dx */
InOutPortReg,
/* Register to hold shift count = cl */
ShiftCount,
/* Absolute address for jump. */
JumpAbsolute,
/* String insn operand with fixed es segment */
EsSeg,
/* RegMem is for instructions with a modrm byte where the register
destination operand should be encoded in the mod and regmem fields.
Normally, it will be encoded in the reg field. We add a RegMem
flag to the destination register operand to indicate that it should
be encoded in the regmem field. */
RegMem,
/* Memory. */
Mem,
/* BYTE memory. */
Byte,
/* WORD memory. 2 byte */
Word,
/* DWORD memory. 4 byte */
Dword,
/* FWORD memory. 6 byte */
Fword,
/* QWORD memory. 8 byte */
Qword,
/* TBYTE memory. 10 byte */
Tbyte,
/* XMMWORD memory. */
Xmmword,
/* YMMWORD memory. */
Ymmword,
/* ZMMWORD memory. */
Zmmword,
/* Unspecified memory size. */
Unspecified,
/* Any memory size. */
Anysize,
/* Vector 4 bit immediate. */
Vec_Imm4,
/* Bound register. */
RegBND,
/* Vector 8bit displacement */
Vec_Disp8,
/* The last bitfield in i386_operand_type. */
OTMax
};
#define OTNumOfUints \
(OTMax / sizeof (unsigned int) / CHAR_BIT + 1)
#define OTNumOfBits \
(OTNumOfUints * sizeof (unsigned int) * CHAR_BIT)
/* If you get a compiler error for zero width of the unused field,
comment it out. */
#define OTUnused (OTMax + 1)
typedef union i386_operand_type
{
struct
{
unsigned int reg8:1;
unsigned int reg16:1;
unsigned int reg32:1;
unsigned int reg64:1;
unsigned int floatreg:1;
unsigned int regmmx:1;
unsigned int regxmm:1;
unsigned int regymm:1;
unsigned int regzmm:1;
unsigned int regmask:1;
unsigned int control:1;
unsigned int debug:1;
unsigned int test:1;
unsigned int sreg2:1;
unsigned int sreg3:1;
unsigned int imm1:1;
unsigned int imm8:1;
unsigned int imm8s:1;
unsigned int imm16:1;
unsigned int imm32:1;
unsigned int imm32s:1;
unsigned int imm64:1;
unsigned int disp8:1;
unsigned int disp16:1;
unsigned int disp32:1;
unsigned int disp32s:1;
unsigned int disp64:1;
unsigned int acc:1;
unsigned int floatacc:1;
unsigned int baseindex:1;
unsigned int inoutportreg:1;
unsigned int shiftcount:1;
unsigned int jumpabsolute:1;
unsigned int esseg:1;
unsigned int regmem:1;
unsigned int mem:1;
unsigned int byte:1;
unsigned int word:1;
unsigned int dword:1;
unsigned int fword:1;
unsigned int qword:1;
unsigned int tbyte:1;
unsigned int xmmword:1;
unsigned int ymmword:1;
unsigned int zmmword:1;
unsigned int unspecified:1;
unsigned int anysize:1;
unsigned int vec_imm4:1;
unsigned int regbnd:1;
unsigned int vec_disp8:1;
#ifdef OTUnused
unsigned int unused:(OTNumOfBits - OTUnused);
#endif
} bitfield;
unsigned int array[OTNumOfUints];
} i386_operand_type;
typedef struct insn_template
{
/* instruction name sans width suffix ("mov" for movl insns) */
char *name;
/* how many operands */
unsigned int operands;
/* base_opcode is the fundamental opcode byte without optional
prefix(es). */
unsigned int base_opcode;
#define Opcode_D 0x2 /* Direction bit:
set if Reg --> Regmem;
unset if Regmem --> Reg. */
#define Opcode_FloatR 0x8 /* Bit to swap src/dest for float insns. */
#define Opcode_FloatD 0x400 /* Direction bit for float insns. */
/* extension_opcode is the 3 bit extension for group <n> insns.
This field is also used to store the 8-bit opcode suffix for the
AMD 3DNow! instructions.
If this template has no extension opcode (the usual case) use None
Instructions */
unsigned int extension_opcode;
#define None 0xffff /* If no extension_opcode is possible. */
/* Opcode length. */
unsigned char opcode_length;
/* cpu feature flags */
i386_cpu_flags cpu_flags;
/* the bits in opcode_modifier are used to generate the final opcode from
the base_opcode. These bits also are used to detect alternate forms of
the same instruction */
i386_opcode_modifier opcode_modifier;
/* operand_types[i] describes the type of operand i. This is made
by OR'ing together all of the possible type masks. (e.g.
'operand_types[i] = Reg|Imm' specifies that operand i can be
either a register or an immediate operand. */
i386_operand_type operand_types[MAX_OPERANDS];
}
insn_template;
extern const insn_template i386_optab[];
/* these are for register name --> number & type hash lookup */
typedef struct
{
char *reg_name;
i386_operand_type reg_type;
unsigned char reg_flags;
#define RegRex 0x1 /* Extended register. */
#define RegRex64 0x2 /* Extended 8 bit register. */
#define RegVRex 0x4 /* Extended vector register. */
unsigned char reg_num;
#define RegRip ((unsigned char ) ~0)
#define RegEip (RegRip - 1)
/* EIZ and RIZ are fake index registers. */
#define RegEiz (RegEip - 1)
#define RegRiz (RegEiz - 1)
/* FLAT is a fake segment register (Intel mode). */
#define RegFlat ((unsigned char) ~0)
signed char dw2_regnum[2];
#define Dw2Inval (-1)
}
reg_entry;
/* Entries in i386_regtab. */
#define REGNAM_AL 1
#define REGNAM_AX 25
#define REGNAM_EAX 41
extern const reg_entry i386_regtab[];
extern const unsigned int i386_regtab_size;
typedef struct
{
char *seg_name;
unsigned int seg_prefix;
}
seg_entry;
extern const seg_entry cs;
extern const seg_entry ds;
extern const seg_entry ss;
extern const seg_entry es;
extern const seg_entry fs;
extern const seg_entry gs;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,52 @@
/* opintl.h - opcodes specific header for gettext code.
Copyright 1998, 1999, 2000, 2005, 2007, 2009 Free Software Foundation, Inc.
Written by Tom Tromey <tromey@cygnus.com>
This file is part of the GNU opcodes library.
This library 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, or (at your option)
any later version.
It 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 file; see the file COPYING. If not, write to the
Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
#ifdef ENABLE_NLS
# include <libintl.h>
/* Note the use of dgetext() and PACKAGE here, rather than gettext().
This is because the code in this directory is used to build a library which
will be linked with code in other directories to form programs. We want to
maintain a seperate translation file for this directory however, rather
than being forced to merge it with that of any program linked to
libopcodes. This is a library, so it cannot depend on the catalog
currently loaded.
In order to do this, we have to make sure that when we extract messages we
use the OPCODES domain rather than the domain of the program that included
the opcodes library, (eg OBJDUMP). Hence we use dgettext (PACKAGE, String)
and define PACKAGE to be 'opcodes'. (See the code in configure). */
# define _(String) dgettext (PACKAGE, String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
#else
# define gettext(Msgid) (Msgid)
# define dgettext(Domainname, Msgid) (Msgid)
# define dcgettext(Domainname, Msgid, Category) (Msgid)
# define textdomain(Domainname) while (0) /* nothing */
# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
# define _(String) (String)
# define N_(String) (String)
#endif