From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?big5?B?s6/EUKTJ?= To: , Subject: Help! Date: Thu, 24 Feb 2000 00:56:00 -0000 Message-id: X-SW-Source: 2000-02/msg00085.html 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?big5?B?s6/EUKTJ?= To: , Subject: Help! Date: Sat, 01 Apr 2000 00:00:00 -0000 Message-ID: X-SW-Source: 2000-q1/msg00279.html Message-ID: <20000401000000.oG6k9oQG_s-Z9K_On4j5nWmlbcujLHW5_rzRSGCasz0@z> 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