efficient memory access from assembly
Jeger, Tobias
tobias.jeger@intersil.com
Tue Feb 20 01:43:00 GMT 2001
Hi.
I am currently porting code (both C and assembler) from the ARM toolkit to the
GNU GCC environment. Reading through the documentstion of GCC, I can't figure
out how to port register relative memory access instructions without duplicating
information. So what I have is a (relocatable) area of data storage, where space
is allocated for a number of variables.
Having the base-address of this area in a register (say r5), I would like to be
able to perform accesses of the kind
ldr r1, [r5, #<variablename>]
so <variablename> must be the offset from the base-address. The location of the
code accessing the variables must be completely independent from the area where
the variables are stored at assembly-time, and the variables need to be
accessible to code in different files. Must this be done using {absolute}
addresses, which overlap at link-time, or does anybody have a better idea?
Tobi
Tobias S Jeger Rembrandtlaan 1a
Engineer for Embedded Software 3723BG Bilthoven NL
Intersil Netherlands BV +31 (0)30 225 9756
More information about the Gcc
mailing list