[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/25445] New: movsx with 0x66 prefix incorrectly disassemble
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug binutils/25445] New: movsx with 0x66 prefix incorrectly disassembled |
Date: |
Wed, 22 Jan 2020 19:35:04 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=25445
Bug ID: 25445
Summary: movsx with 0x66 prefix incorrectly disassembled
Product: binutils
Version: 2.35 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
Target: i386, x86-64
[hjl@gnu-cfl-1 testsuite]$ cat movsx.s
.text
.byte 0x66, 0x63, 0x08
[hjl@gnu-cfl-1 testsuite]$ gcc -c movsx.s
[hjl@gnu-cfl-1 testsuite]$ objdump -dw movsx.o
movsx.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <.text>:
0: 66 63 08 movslq (%rax),%cx
[hjl@gnu-cfl-1 testsuite]$
AMD64 spec has
This instruction requires the REX prefix 64-bit operand size bit (REX.W) to be
set to 1 to sign-extend
a 32-bit source operand to a 64-bit result. Without the REX operand-size
prefix, the operand size will
be 32 bits, the default for 64-bit mode, and the source is zero-extended into a
64-bit register. With a 16-
bit operand size, only 16 bits are copied, without modifying the upper 48 bits
in the destination.
Intel64 spec has
63 /r* MOVSXD r16, r/m16 RM Move word to word with sign-extension.
63 /r* MOVSXD r32, r/m32 RM Move doubleword to doubleword with sign-
extension.
REX.W + 63 /r MOVSXD r64, r/m32 RM Move doubleword to quadword with
sign-extension.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/25445] New: movsx with 0x66 prefix incorrectly disassembled,
hjl.tools at gmail dot com <=
- [Bug binutils/25445] movsx without REX_W prefix incorrectly disassembled, hjl.tools at gmail dot com, 2020/01/22
- [Bug binutils/25445] movsx without REX_W prefix incorrectly disassembled, hjl.tools at gmail dot com, 2020/01/22
- [Bug binutils/25445] movsxd without REX_W prefix incorrectly disassembled, hjl.tools at gmail dot com, 2020/01/22
- [Bug binutils/25445] movsxd without REX_W prefix incorrectly disassembled, jbeulich at suse dot com, 2020/01/23
- [Bug binutils/25445] movsxd without REX_W prefix incorrectly disassembled, hjl.tools at gmail dot com, 2020/01/23
- [Bug binutils/25445] movsxd without REX_W prefix incorrectly disassembled, jbeulich at suse dot com, 2020/01/23
- [Bug binutils/25445] movsxd without REX_W prefix incorrectly disassembled, hjl.tools at gmail dot com, 2020/01/23
- [Bug binutils/25445] movsxd without REX_W prefix incorrectly disassembled, hjl.tools at gmail dot com, 2020/01/23
- [Bug binutils/25445] movsxd without REX_W prefix incorrectly disassembled, cvs-commit at gcc dot gnu.org, 2020/01/27
- [Bug binutils/25445] movsxd without REX_W prefix incorrectly disassembled, hjl.tools at gmail dot com, 2020/01/27