This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Help!
- To: <gcc at gcc dot gnu dot org>, <gcc-help at gcc dot gnu dot org>
- Subject: Help!
- From: =?big5?B?s6/EUKTJ?= <pschen at puma dot cs dot nthu dot edu dot tw>
- Date: Thu, 24 Feb 2000 16:59:29 +0800
Hello:
Under M68000,
I want to generate position-independent-data using the base of register A5.
I modify legitimate_pic_address function and produce the RTL that I want.
I want use PID(base-register A5) and option -mpcrel .
------------------------------------------------------------
for example :
(insn 10 5 11 (set (reg:SI 30)
(mem/u:SI (plus:SI (reg:SI 13 %a5)
(symbol_ref:SI ("C"))) 0)) -1 (nil)
(nil))
(insn 11 10 13 (set (reg:SI 29)
(reg:SI 30)) -1 (nil)
(expr_list:REG_EQUAL (symbol_ref:SI ("C"))
(nil)))
-------------------------------------------------------------
If I don't use -O2 optimal option, the output assemble code is right.
If I use -O2 optimal option, the output assemble code is wrong.
The option -fpic also generate the same RTL code, but it don't be affect by -O2.
What files and where should I modify for correct it?
Thanks very much.
Ps. Chen