This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: symbol_ref constants
- From: "Rupert Wood" <me at rupey dot net>
- To: "'Sanjiv Kumar Gupta'" <sanjiv dot gupta at oracle dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Wed, 30 Mar 2005 18:04:48 +0100
- Subject: RE: symbol_ref constants
Sanjiv Kumar Gupta wrote:
> > What is stopping the value of 'foo' itself being > 255?
> Programmer will get an overflow error for that during linking.
For my curiosity, what's the background here? Do you really only have 256
bytes of storage on this system?
If you've got eight bit registers in a larger address space then I'd expect
you'd want to address data outside the first 256 bytes, e.g. you'd actually
want
add r1, lowpart_offset(foo)
add r2, highpart_offset(foo)
in which case
add r1, lowpart_offset(foo + 10)
add r2, highpart_offset(foo + 10)
would make sense.
On the other hand, if you actually do only have 256 bytes storage then you'd
want to the link to fail anyway because the hardware won't cope - so the
overflow error is as good as anything else, isn't it?
Rup.