Bad generation of jmp r/m32 with offset

Alan Modra alan@SPRI.Levels.UniSA.Edu.Au
Mon Jan 17 14:58:00 GMT 2000

> GNU as version 2.9.5 (BFD issues no warning but instead
> assembles the jump incorectly as:
> 	FF6804	(JMP FAR mem)
> Although it is the behavior of the assembler that has changed I
> believe this is a bug in gcc as it is emiting the wrong assembly.  If
> the jump instruction is changed from
> 		jmp 4(%eax)
> to
> 		jmp *4(%eax)
> Then no warning is issued from as 2.9.1 and both assemblers generate
> the correct binary code.

This isn't a gcc bug, as I believe gcc has no way of knowing that a "*" is
needed for correct asm syntax.  You should provide the "*" in your asm

However, it *is* a bug in the assembler, introduced when
.intel_mode syntax support was added.  It was fixed 1999-12-27,
and I see H.J. Lu has made a release of the linux binutils at

The new assembler will accept "jmp 4(%eax)" with a warning, and generate
the correct code.  Please test it out, and send assembler bug reports to

More information about the Gcc-bugs mailing list