This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: initializing wider-than-pointers


> Trying to fake two kinds of pointers when we only have one doesn't seem 
> wise to me.
> 
> A possible solution is to use function descriptors.

Both m32c (my local copy at least) and xstormy use 16 bit thunks to
reference the address of a function outside the first 64k of address
space.

In this case, it isn't good enough.

The particular case that *needs* a wider pointer is setting up
the reset vectors in ROM:

long rvec = (long)&start __attribute__((section(".resetvect")));

At the point where you need this address, you haven't had a chance to
copy the RAM into the lower 64k, so a thunk won't help.  (yes,
assembler is one solution, but that doesn't stop the users from
complaining ;).

Note that my complaint about the lack of endian support in that code
still stands ;-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]