This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PIC support for SH
- To: gcc-patches at gcc dot gnu dot org
- Subject: Re: [PATCH] PIC support for SH
- From: kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Date: Wed, 06 Sep 2000 09:59:32 +0900
- References: <or66ohil7i.fsf@guarana.lsd.ic.unicamp.br>
Hi,
I've made gcc bootstrapped and just run testsuite for sh-*-linux-gnu
target with/without -fpic.
Almost everything are fine. The only one problem is that some library
calls like udivsi3_i4 are called via PLT in PIC case and the PLT stub
clobbers r0, r1 and r2, though the original call doesn't clobber them.
So I need work arounds like as
(define_insn "udivsi3_i4"
[(set (match_operand:SI 0 "register_operand" "=y")
(udiv:SI (reg:SI 4) (reg:SI 5)))
(clobber (reg:SI 17))
(clobber (reg:DF 24))
(clobber (reg:DF 26))
(clobber (reg:DF 28))
(clobber (reg:SI 0))
(clobber (reg:SI 1))
+ (clobber (reg:SI 2))
(clobber (reg:SI 4))
in sh/sh.md. Once I've defined udivsi3_i4_pic for this purpose.
Are there any ideas?
kaz