This is the mail archive of the gcc-patches@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]

Re: [PATCH] PIC support for SH


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

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