From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Lance Taylor To: hjl@nynexst.com Cc: gas2@cygnus.com Subject: Re: My registers spilleth over... (fwd) Date: Tue, 15 Aug 1995 14:30:00 -0000 Message-id: <199508152130.RAA09556@sanguine.cygnus.com> References: <9508152031.AA08641@nynexst.com> X-SW-Source: 1995/msg00151.html From: hjl@nynexst.com (H.J. Lu) Date: Tue, 15 Aug 95 16:30:38 EDT Forwarded message: From: Jim Paradis Date: Thu, 3 Aug 1995 21:20:07 -0500 (EDT) (linux-gcc people can tune in now): The first bug I found was when my freshly-built gas tried to build a "dummy" Alpha object file (basically, a six-line bit of assembly code that's nothing more than a single routine consiisting of a single "ret" instruction). gas fell over dead when it tried to build it: got "Assertion failed in write.c". Much tracking down finally got me to the following line of code: fragp->fr_offset += newsize - size; All of the variables above are 64-bit "long long"'s. newsize=16, size=12; therefore fragp->fr_offset should have been incremented by 12. Instead it was incremented by 24. I figure this is a bug in the handling of "long long"s by the i486 code generator; if I break the above apart into two statements: fragp->fr_offset = fragp->fr_offset + newsize; fragp->fr_offset = fragp->fr_offset - size; then everything works fine. Note that this is a compiler bug. Nothing needs to be changed in gas. Ian