[gnu.utils.bug] bug with gas 1.34 for vax.

wbailey@flame.oracle.com (Bill Bailey) (02/10/90)

	.text
	nop
bar:	nop
	nop
foo:	nop
	addl	#foo-bar,d0

Taking the difference between two text segment labels as an immediate
operand doesn't work with gas for the vax.  The above appears to work,
however, with gas for 68k.

This may be more of a "known feature/deficiency" than a bug.  The
comments in vax.c say that gas can't handle this case without a
second pass or a new frag type.  Neither appears to have been
implemented.  But if it works for 68k, I would expect it to work for
the vax too.
	
	case SEG_DIFFERENCE:

	/*
	* Major bug. We can't handle the case of a
	* SEG_DIFFERENCE expression in a VIT_OPCODE_SYNTHETIC
	* variable-length instruction.
	* We don't have a frag type that is smart enough to
	* relax a SEG_DIFFERENCE, and so we just force all
	* SEG_DIFFERENCEs to behave like SEG_PASS1s.
	* Clearly, if there is a demand we can invent a new or
	* modified frag type and then coding up a frag for this
	* case will be easy. SEG_DIFFERENCE was invented for the
	* .words after a CASE opcode, and was never intended for
	* instruction operands.
	*/
	need_pass_2 = TRUE;
	break;
	
Also, I have seen lots of hand-written assembler that contains the
above type of construct.  So I would consider it a gross deficiency
if gas can not cope with it.
	
thx
wbailey@oracle.com