GAS i386 jmp generator .arch compliance

Alan Modra alan@linuxcare.com.au
Mon Feb 12 17:44:00 GMT 2001


On Tue, 13 Feb 2001, Jan Kratochvil wrote:

> But I'm writing this mail as I think that your patch has small mistake:
> When I compile attached "test16.S", it will warn me that "long jump required"
> but is is a normal regular jump available from 8086 days. The warning message
> is just moved to the 'right place' - do you agree? I was unable to prevent the
> warning when long (16-bit) call just had to be used to cope with the range.

Thanks for testing it.  I did intend that "nojumps" would warn about all
short to long jump promotion.  I was trying to make a hack for .arch i8086
useful in other modes too.  Maybe that's not such a good idea.

As it stands, "nojumps" does two things:
a) warns about jump promotion within a single file.
b) leaves branches to external symbols as short branches.

Your patch will change a) to just warn about a particular type of jump
promotion.  In looking at the larger picture, is that reasonable?
Hmm, how about changing a) and b) to just effect all _conditional_
braches.  Does that sound OK to you?

I'm cc'ing this back to the binutils list in case anyone else wants to
comment.

> The only weird case is:
> 	ENCODE_RELAX_STATE (COND_JUMP86, BIG)
> but it is a nonsense anyway (32-bit addressing on pre-386 machine), it is also
> correctly announced by:
> 	Warning: use .code16 to ensure correct addressing mode
> In this case the warning "long jump required" would be probably also
> appropriate but the resulting code cannot run anyway so decide it yourself.

Ah ha!  You really did look at my patch in detail!  I left it that way on
purpose, to make the table consistent.  As you say, this entry will never
be used anyway.

Regards, Alan Modra
-- 
Linuxcare.  Support for the Revolution.




More information about the Binutils mailing list