From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Lipe To: Ian Lance Taylor Cc: gas2@cygnus.com, law@cygnus.com Subject: Re: pushl computed immediate address on 2.8.1 Date: Fri, 02 Jan 1998 13:26:00 -0000 Message-id: <19980102152547.25804@dgii.com> References: <19980102144041.15293@dgii.com> <199801022106.QAA01775@subrogation.cygnus.com> <199801022106.QAA01775@subrogation.cygnus.com> X-SW-Source: 1998/msg00002.html > pushl $.LC0@GOTOFF(%ebx) > seems to assemble just like > pushl $LC0 > > This happens because when gas sees the '$', it passes the rest of the > line to the expression parsing code. The expression parser doesn't > recognize the '@', so it just returns .LC0. gas then fails to notice > that part of the line wasn't parsed. That sounds like a perfectly reasonable explanation. > Does this sound right at all? Should GAS error on this? > It sounds wrong, and I'll change gas to emit an error. This exercise wasn't entirely academic. EGCS (and presumably GCC) actually will emit this construct. So, although I agree it is the right thing to do for the assembler to complain about this, be prepared that doing so will "break" those tools. Of course, they never _really_ worked right, but the output would actually give the desired results in some cases. We'll probably hear that GAS "broke" the compiler for a while, but in reality, I think this is a healthy thing and will help expose the real problem in the x86 part of the compilers. Thank you, Ian. RJL