Subject: Re: expr.c: large structure problems
To: Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-toolchain
Date: 10/27/1998 15:53:37
[I think I mistyped port-mips address when i added it back
to this subthread; sorry about htat..]
Anyway, i tried the obvious placebo pattern on a few assemblers. The
mips CPU instruction set has no `la' (load address) but the assembler
synthesizes one. So I tried
la $4, 32800($4)
and
la $4, 132800($4)
on an Ultrix mipsco assembler and binutils-2.8.1 gas. the mipsco
assembler DTRT. (Actually, it handles results less than 65535
specially, by loading 32767 and then adding the residual; for
the larguer value it does a lui/addiu pair:
lui at, 2
addiu $4, at, 1728)
but gas from binutils-2.8.1 and 2.9.1 both produce bad code-- they
just emit a "li 0x8020", which sign-extends to -32736.
Damn and blast....