Date: Wed, 17 Jan 1996 22:50:43 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: jdp@polstra.com (John Polstra) Cc: freebsd-current@FreeBSD.org Subject: Re: src/lib/libc/sys/Makefile.inc: proposed change Message-ID: <199601180550.WAA04806@phaeton.artisoft.com> In-Reply-To: <199601180127.RAA19205@austin.polstra.com> from "John Polstra" at Jan 17, 96 05:27:17 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> I want to see if anybody envisions any problems with a change I want to > make to it. > > I was making a modified local version of the libc tree for generating > an ELF library. That involved creating a couple of new preprocessor > macros, and using them in some of the assembly language files. I > don't have the precise details handy, but an assembly died on a > statement something like this: > > movl $FOO,%eax > > where "FOO" was one of the new macros I defined. > > The problem was that, by default, "cpp" considers `$' to be a valid > character in an identifier. So it was interpreting `$FOO' as an > identifier, rather than as two separate tokens. This is never correct > in i386 assembly language, since `$' is an operator that means > "interpret as a literal". > > So I want to modify "Makefile.inc" in that directory so that cpp is > invoked with the "-$" option, which makes `$' _not_ a valid identifier > character. (Yes, I know I have to double the dollar sign in the > makefile.) I tried it locally, and it seemed to work fine. > > Do any of you see any problem with making that change? Why not: movl $ ## FOO,%eax Instead? If it hits the preprocessor first, it should be no problem. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601180550.WAA04806>