This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: i386 ld --gc-sections and few minor problems with objdump --disassemble-all -m i8086
- To: Etienne Lorrain <etienne_lorrain at yahoo dot fr>
- Subject: Re: i386 ld --gc-sections and few minor problems with objdump --disassemble-all -m i8086
- From: Alan Modra <amodra at bigpond dot net dot au>
- Date: Wed, 18 Jul 2001 23:01:58 +0930
- Cc: binutils at sources dot redhat dot com
- References: <20010718094858.60029.qmail@web11808.mail.yahoo.com>
Replying to the "minor bug" part..
On Wed, Jul 18, 2001 at 11:48:58AM +0200, Etienne Lorrain wrote:
>
> - In "objdump --disassemble-all -m i8086", the opcodes
> "F3 AA" is translated "repz stos" instead of "rep stos"
Well, yes. "rep" is an alias for "repz" and the assembler does accept
"repz stosb", so I don't see this as a big problem. If someone wants to
provide a patch, that would be OK too.
> - the opcode "67 66 0F 01 54 24 14" is displayed
> addr32
> data32
> lgdt 36(%si)
> ... last byte mixed with next instruction ...
This one I'm fixing.
> - there is no need to display addr32 when it is easy to
> see from the addressing mode:
> addr32 pushl 0x30(%ebx)
> can be just displayed:
> pushl 0x30(%ebx)
True, but it's more than a few minutes work to fix.
opcodes/ChangeLog
* i386-dis.c (grps): Print l or w suffix, and require mem modrm
for lgdt, lidt, sgdt, sidt.
--
Alan Modra
Index: opcodes/i386-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/i386-dis.c,v
retrieving revision 1.27
diff -u -p -r1.27 i386-dis.c
--- i386-dis.c 2001/07/09 14:22:11 1.27
+++ i386-dis.c 2001/07/18 12:43:57
@@ -197,7 +197,7 @@ fetch_data (info, addr)
#define indirEv OP_indirE, v_mode
#define Ew OP_E, w_mode
#define Ma OP_E, v_mode
-#define M OP_E, 0 /* lea */
+#define M OP_E, 0 /* lea, lgdt, etc. */
#define Mp OP_E, 0 /* 32 or 48 bit memory operand for LDS, LES etc */
#define Gb OP_G, b_mode
#define Gv OP_G, v_mode
@@ -1315,14 +1315,14 @@ static const struct dis386 grps[][8] = {
},
/* GRP7 */
{
- { "sgdt", Ew, XX, XX },
- { "sidt", Ew, XX, XX },
- { "lgdt", Ew, XX, XX },
- { "lidt", Ew, XX, XX },
- { "smsw", Ew, XX, XX },
- { "(bad)", XX, XX, XX },
- { "lmsw", Ew, XX, XX },
- { "invlpg", Ew, XX, XX },
+ { "sgdtQ", M, XX, XX },
+ { "sidtQ", M, XX, XX },
+ { "lgdtQ", M, XX, XX },
+ { "lidtQ", M, XX, XX },
+ { "smsw", Ew, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "lmsw", Ew, XX, XX },
+ { "invlpg", Ew, XX, XX },
},
/* GRP8 */
{