This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: GCC GAS Bug for generating x86 Code
- To: mikex dot polehn at intel dot com
- Subject: Re: GCC GAS Bug for generating x86 Code
- From: Alan Modra <alan at SPRI dot Levels dot UniSA dot Edu dot Au>
- Date: Mon, 27 Dec 1999 22:56:42 +1030 (CST)
- cc: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>, gcc-bugs at gcc dot gnu dot org, binutils at sourceware dot cygnus dot com
> > GCC GAS inline assembler does not generate code for Indirect Far Calls
> > correctly for the x86 lcall instruction. ( I suspect (have reason to
> > beleave) the same problems exist for the ljmp instruction but have not
> > verified );
>
> Thanks for your bug report. I had a hard time following your
> explanation, and I was not capable of reproducing your results.
It's actually a bug in the disassembler, easily fixed with the following
patch. The assembler generates the correct lcall opcode, although there
is currently some inconsistency with syntax: eg. "call *-8(%ebp)" vs.
"lcall -8(%ebp)". I'll fix this inconsistency soon.
--- binutils-current/opcodes/i386-dis.c~ Mon Sep 6 20:24:10 1999
+++ binutils-current/opcodes/i386-dis.c Mon Dec 27 22:33:35 1999
@@ -1749,7 +1749,7 @@ static const struct dis386 grps[][8] = {
{ "incQ", Ev, XX, XX },
{ "decQ", Ev, XX, XX },
{ "callP", indirEv, XX, XX },
- { "callP", indirEv, XX, XX },
+ { "lcallP", indirEv, XX, XX },
{ "jmpP", indirEv, XX, XX },
{ "ljmpP", indirEv, XX, XX },
{ "pushQ", Ev, XX, XX },