Subject: Re: cross-compiler to VAX outputs bogus float literals.
To: Anders Magnusson <ragge@ludd.luth.se>
From: Andrew Cagney <ac131313@cygnus.com>
List: port-vax
Date: 02/06/2000 11:49:46
Anders Magnusson wrote:
> 
>  Todd (I guess) wrote:
> > I'm utilizing a cross-compiler from various netbsd arch's (i386/arm32 mostly)
> > to vax. However, I'm finding that the assembly files have bogus float literals
> > in them, presumably because there is code somewhere which assumes the host
> > format is VAX_FLOAT_FORMAT. It is also possible that I misconfigured the
> > compiler; the vax bits of gnu/dist/gcc/configure in 1.4.2_ALPHA caused some
> > sort of error and I changed them to look like all the other arch's.

What should happen is:

	o	vax-gcc outputs an assembler file
		(including floats) that the vax
		native assembler can read

	o	vax-gas is configured to parse
		vax assembler and output vax
		native object files.

Two things could be going wrong - the cross GCC isn't outputing values
in a form that the vax assembler expects.  The vax cross assembler isn't
correctly parsing valid input.  All of the above...

I'd suggest comming up with a two line C program and compare its GCC
output with that from a native VAX gcc.  Know anyone still familar with
the vax?

> There is an option somewhere in gcc called "SOFT_FLOAT" or something; that
> makes gcc avoid storing floating point numbers as floats and instead
> stores them in some other way (strings?). It is neccessary to set this
> when a cross-compiler environment for vax is used.

Did you mean the software implementation (approximation?) of IEEE 754
32/64 or how GCC either write raw HEX or natural floating point values
into the assembler file.

	enjoy,
		Andrew