GCC GAS Bug for generating x86 Code
Alan Modra
alan@SPRI.Levels.UniSA.Edu.Au
Mon Dec 27 05:36:00 GMT 1999
> > 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 },
More information about the Binutils
mailing list