🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #1734

bug with gas 1.34 for vax.

#1734
From: Bill Bailey
Date: Sat, 10 Feb 1990 00:06
42 lines
1730 bytes
	.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
Technical Details
Message-ID: <9002100006.AA00397@flame.oracle.com>
Path: arc1-ca.pugleaf.net!utzoo!telly!philmtl!uunet!bu.edu!bu-cs!snorkelwacker!tut.cis.ohio-state.edu!flame.oracle.com!wbailey

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!philmtl!uunet!bu.edu!bu-cs!snorkelwacker!tut.cis.ohio-state.edu!flame.oracle.com!wbailey
From: wbailey@flame.oracle.com (Bill Bailey)
Newsgroups: gnu.utils.bug
Subject: bug with gas 1.34 for vax.
Message-ID: <9002100006.AA00397@flame.oracle.com>
Date: 10 Feb 90 00:06:04 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 42