From: utzoo!utcsrgv!mendell
Newsgroups: net.bugs.4bsd,net.unix-wizards
Title: bug in VAX 4bsd assembler
Article-I.D.: utcsrgv.1209
Posted: Tue Mar 22 16:16:29 1983
Received: Tue Mar 22 16:25:56 1983

    as produces wrong code for instructions with an immeadiate 
float literal of 0d0.0. For example:
	movd	$0d0.0,r0
is assembled as:
	movd	$0d0.5,r0

    The problem is that as thinks that $0d0.0 is a short literal double, but it
isn't (See your nearest vax manual)

    The fix is one line in as.h:
	*** /usr/src/cmd/as/as.h	Wed Nov  5 23:13:32 1980
	--- as.h	Tue Mar 22 13:05:55 1983
	***************
	*** 327,332
	   */
	  #define 	slitflt(xp) \
				(    (xp->doub_LSW == 0) \
				 &&  ( (xp->doub_MSW & LITFLTMASK) \
				      == xp->doub_MSW) )
	  /*

	--- 327,333 -----
	   */
	  #define 	slitflt(xp) \
				(    (xp->doub_LSW == 0) \
	+ 			 &&  (xp->doub_MSW != 0) \
				 &&  ( (xp->doub_MSW & LITFLTMASK) \
				      == xp->doub_MSW) )
	  /*


    Mark Mendell
    ..!decvax!utzoo!utcsrgv!mendell