This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
About GCC-ARM assembler
- From: =?utf-8?B?6rmA7IiY7KeE?= <sujin at compiler dot kaist dot ac dot kr>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Tue, 22 Oct 2002 01:07:38 +0900
- Subject: About GCC-ARM assembler
Hello! I have a question.
I don't understand this.
I want to use this instruction , ldr __a1, |dummy.0|
, instead of these instructions
ldr __a4, |L..7|
ldr __a1, [__a4, #0]
This code, ldr __a1, |dummy.0| work well in SDT simulator.
Why GCC access this variable indirectly?
-------------------------------------------------------------
IMPORT |__main|
AREA |C$$data1|, DATA
ALIGN
|dummy.0|
KEEP |dummy.0|
DCD 0
AREA |C$$code2|, CODE, READONLY
ALIGN
EXPORT |main|
|main|
....
ldr __a4, |L..7|
ldr __a1, [__a4, #0] (why?)
....
ldmea __fp, {__fp, __sp, __pc}^
|L..8|
ALIGN
|L..7|
DCD |dummy.0|
IMPORT __main
DCD __main
END
--------------------------------------------------------------------------