From: <kieft_brian@si.com>
To: linux-assembly@vger.kernel.org
Subject: non-constant in current section subtraction???
Date: Fri, 26 Apr 2002 11:13:56 -0400 [thread overview]
Message-ID: <004920AF.C21188@si.com> (raw)
I'm having some trouble with the GNU assembler and the special '.' symbol. The
following code is an example:
LABEL1:
some stuff
more stuff
VAR1 = . - LABEL1
.IF (VAR1)
do something
.ENDIF
The dot symbol should give me the current location in memory, which is a
non-constant. However, the difference between the . and label1 (assuming they're
in the same section) is a constant. Why do I get a "non-constant expression in
if statement" error when I try to do this. I've tried working the assembler
source code a bit and making X_op = O_constant when you do the subtraction, but
that seems to screw things up and give everything a value of 0. Without the
hack, I get the right values, but they're just not constant. Has anyone ran into
this before? I'd appreciate any help I can get. Thanks,
Brian
**********************************************************************
This e-mail and any files transmitted with it are confidential and may
be legally privileged or otherwise exempt from disclosure under
applicable law. This e-mail and its files are intended solely for
the individual or entity to whom they are addressed and their content
is the property of Smiths Aerospace. If you are not the intended
recipient, please do not read, copy, use or disclose this communication.
If you have received this e-mail in error please notify the e-mail
administrator at postmaster@si.com and then delete this e-mail, its
files and any copies.
This footnote also confirms that this e-mail message has been scanned
for the presence of known computer viruses.
***********************************************************************
reply other threads:[~2002-04-26 15:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=004920AF.C21188@si.com \
--to=kieft_brian@si.com \
--cc=linux-assembly@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).