diff options
author | Ulrich Drepper <drepper@redhat.com> | 2008-01-03 07:41:03 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2008-01-03 07:41:03 +0000 |
commit | 515d8d71521740a084d422b7bb7941ed5f3ee837 (patch) | |
tree | b89c20c6e4e0e7bf89f53f59040fb9871af9f413 /libcpu/i386_data.h | |
parent | f231e276bda6395770ebb2fc2d1469def46c2707 (diff) | |
download | elfutils-515d8d71521740a084d422b7bb7941ed5f3ee837.tar.gz |
Rewrite matcher to allow easier handling of SSE instructions.
A\\Correct/add copyrights.
Diffstat (limited to 'libcpu/i386_data.h')
-rw-r--r-- | libcpu/i386_data.h | 57 |
1 files changed, 26 insertions, 31 deletions
diff --git a/libcpu/i386_data.h b/libcpu/i386_data.h index 38e99354..b0bab10d 100644 --- a/libcpu/i386_data.h +++ b/libcpu/i386_data.h @@ -1,3 +1,29 @@ +/* Helper routines for disassembler for x86-64. + Copyright (C) 2007, 2008 Red Hat, Inc. + This file is part of Red Hat elfutils. + Written by Ulrich Drepper <drepper@redhat.com>, 2007. + + Red Hat elfutils is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by the + Free Software Foundation; version 2 of the License. + + Red Hat elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License along + with Red Hat elfutils; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. + + Red Hat elfutils is an included package of the Open Invention Network. + An included package of the Open Invention Network is a package for which + Open Invention Network licensees cross-license their patents. No patent + license is granted, either expressly or impliedly, by designation as an + included package. Should you wish to participate in the Open Invention + Network licensing program, please visit www.openinventionnetwork.com + <http://www.openinventionnetwork.com>. */ + #include <inttypes.h> #include <stddef.h> #include <stdio.h> @@ -922,37 +948,6 @@ FCT_mmxreg (GElf_Addr addr __attribute__ ((unused)), return 0; } -static int -FCT_mmxreg2 (GElf_Addr addr __attribute__ ((unused)), - int *prefixes __attribute__ ((unused)), - const char *op1str __attribute__ ((unused)), - size_t opoff1 __attribute__ ((unused)), - size_t opoff2 __attribute__ ((unused)), - size_t opoff3 __attribute__ ((unused)), - char *bufp __attribute__ ((unused)), - size_t *bufcntp __attribute__ ((unused)), - size_t bufsize __attribute__ ((unused)), - const uint8_t *data __attribute__ ((unused)), - const uint8_t **param_start __attribute__ ((unused)), - const uint8_t *end __attribute__ ((unused)), - DisasmGetSymCB_t symcb __attribute__ ((unused)), - void *symcbarg __attribute__ ((unused))) -{ - uint_fast8_t byte = data[opoff1 / 8]; - assert (opoff1 % 8 == 2 || opoff1 % 8 == 5); - byte = (byte >> (5 - opoff1 % 8)) & 7; - size_t avail = bufsize - *bufcntp; - int needed; - if (*prefixes & (has_rep | has_repne)) - needed = snprintf (&bufp[*bufcntp], avail, "%%%s", regs[byte]); - else - needed = snprintf (&bufp[*bufcntp], avail, "%%mm%" PRIxFAST8, byte); - if ((size_t) needed > avail) - return needed - avail; - *bufcntp += needed; - return 0; -} - static int FCT_mod$r_m (GElf_Addr addr __attribute__ ((unused)), |