bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/16893] libopcodes decodes some x86 prefixes incorrectly


From: cvs-commit at gcc dot gnu.org
Subject: [Bug binutils/16893] libopcodes decodes some x86 prefixes incorrectly
Date: Mon, 05 May 2014 21:33:37 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=16893

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
       via  285ca99246160d12a3173076a661b6c524338baf (commit)
      from  c888a17da5c7b06eec4b1ed21e4afe84f9a41347 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=285ca99246160d12a3173076a661b6c524338baf

commit 285ca99246160d12a3173076a661b6c524338baf
Author: H.J. Lu <address@hidden>
Date:   Fri May 2 11:22:04 2014 -0700

    Properly handle multiple opcode prefixes

    This patch updates multiple opcode prefix processing:

    1. Always print prefix together with bad opcode.
    2. Since the last seen segment register prefix is active, we only print
    the active segment register in the memory operand.
    3. The 0xf2 and 0xf3 prefixes take precedence over the 0x66 prefix as the
    opcode prefix.  Also the last of the 0xf2 and 0xf3 prefixes wins.
    4. Ignore invalid 0xf2/0xf3 prefixes if they aren't mandatory.

    gas/testsuite/

        PR binutils/16893
        * gas/i386/katmai.d: Expect "gs" as prefix.

        * gas/i386/long-1.s: Replace movapd with movss.
        * gas/i386/x86-64-long-1.s: Likewise.
        * gas/i386/long-1-intel.d: Updated.
        * gas/i386/long-1.d: Likewise.
        * gas/i386/x86-64-long-1-intel.d: Likewise.
        * gas/i386/x86-64-long-1.d: Likewise.

        * gas/i386/prefix.s: Add tests for multiple 0x66, 0x67, 0xf0,
        0xf2 and 0xf3 prefixes.
        * gas/i386/prefix.d: Updated.

    opcodes/

        PR binutils/16893
        * i386-dis.c (twobyte_has_mandatory_prefix): New variable.
        (end_codep): Likewise.
        (mandatory_prefix): Likewise.
        (active_seg_prefix): Likewise.
        (ckprefix): Set active_seg_prefix to the active segment register
        prefix.
        (seg_prefix): Removed.
        (get_valid_dis386): Use the last of PREFIX_REPNZ and PREFIX_REPZ
        for prefix index.  Ignore the index if it is invalid and the
        mandatory prefix isn't required.
        (print_insn): Set mandatory_prefix if the PREFIX_XXX prefix is
        mandatory.  Don't set PREFIX_REPZ/PREFIX_REPNZ/PREFIX_LOCK bits
        in used_prefixes here.  Don't print unused prefixes.  Check
        active_seg_prefix for the active segment register prefix.
        Restore the DFLAG bit in sizeflag if the data size prefix is
        unused.  Check the unused mandatory PREFIX_XXX prefixes
        (append_seg): Only print the segment register which gets used.
        (OP_E_memory): Check active_seg_prefix for the segment register
        prefix.
        (OP_OFF): Likewise.
        (OP_OFF64): Likewise.
        (OP_DSreg): Set active_seg_prefix to PREFIX_DS if it is unset.

-----------------------------------------------------------------------

Summary of changes:
 gas/testsuite/ChangeLog                      |   16 ++
 gas/testsuite/gas/i386/katmai.d              |    3 +-
 gas/testsuite/gas/i386/long-1-intel.d        |    4 +-
 gas/testsuite/gas/i386/long-1.d              |    4 +-
 gas/testsuite/gas/i386/long-1.s              |    4 +-
 gas/testsuite/gas/i386/prefix.d              |   63 ++++-
 gas/testsuite/gas/i386/prefix.s              |  352 ++++++++++++++++++++++++++
 gas/testsuite/gas/i386/x86-64-long-1-intel.d |    4 +-
 gas/testsuite/gas/i386/x86-64-long-1.d       |    4 +-
 gas/testsuite/gas/i386/x86-64-long-1.s       |    4 +-
 opcodes/ChangeLog                            |   26 ++
 opcodes/i386-dis.c                           |  249 ++++++++++---------
 12 files changed, 598 insertions(+), 135 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]