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]

Help!



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
      

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