diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-04-25 08:03:55 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-04-25 08:03:55 +0000 |
commit | a9cfe83b116aa13174027bb6ed1f5c42c378138d (patch) | |
tree | 3218b549c5120e1652fb8409aa7b2f31cf5b69e3 /gcc/config/sh/sh.md | |
parent | d341b0994869af47b8ddc8b0b287a91be3f2d1f1 (diff) | |
download | gcc-a9cfe83b116aa13174027bb6ed1f5c42c378138d.tar.gz |
gcc/
* config.gcc (sh-wrs-vxworks): Don't include dbxelf.h. Include
sh/elf.h, vx-common.h and vxworks.h.
* config/sh/sh.h: Include config/vxworks-dummy.h.
(SUBTARGET_OVERRIDE_OPTIONS): Define.
(OVERRIDE_OPTIONS): Use it.
* config/sh/sh.md (GOTaddr2picreg): Add suport for VxWorks RTPs.
(vxworks_picreg): New pattern.
* config/sh/vxworks.h (TARGET_OS_CPP_BUILTINS): Use
VXWORKS_OS_CPP_BUILTINS.
(LIB_SPEC, LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Redefine
to their VXWORKS_* equivalents.
(SUBTARGET_OVERRIDE_OPTIONS, SUBTARGET_CPP_SPEC): Define.
(SUBTARGET_LINK_EMUL_SUFFIX, FUNCTION_PROFILER): Define.
* config/sh/lib1funcs.asm (NO_FPSCR_VALUES): Define for VxWorks PIC.
(set_fpscr, ic_invalidate): Add VxWorks PIC sequences.
* config/sh/t-vxworks (MULTILIB_OPTIONS): Add m4a, -mrtp and
-mrtp/-fPIC multilibs.
(MULTILIB_EXCEPTIONS): Generalize globs accordingly.
(MULTILIB_MATCHES, EXTRA_MULTILIB_PARTS): Define.
(MULTILIB_OSDIRNAMES): Delete.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124145 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/sh/sh.md')
-rw-r--r-- | gcc/config/sh/sh.md | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 8d645052d89..455a23805df 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -8288,6 +8288,14 @@ label: (set (match_dup 0) (plus:SI (match_dup 0) (reg:SI R0_REG)))] "" " { + if (TARGET_VXWORKS_RTP) + { + rtx gott_base = gen_rtx_SYMBOL_REF (Pmode, VXWORKS_GOTT_BASE); + rtx gott_index = gen_rtx_SYMBOL_REF (Pmode, VXWORKS_GOTT_INDEX); + emit_insn (gen_vxworks_picreg (gott_base, gott_index)); + DONE; + } + operands[0] = gen_rtx_REG (Pmode, PIC_REG); operands[1] = gen_rtx_SYMBOL_REF (VOIDmode, GOT_SYMBOL_NAME); @@ -8330,6 +8338,21 @@ label: } ") +;; A helper for GOTaddr2picreg to finish up the initialization of the +;; PIC register. + +(define_expand "vxworks_picreg" + [(set (reg:SI PIC_REG) + (const:SI (unspec:SI [(match_operand:SI 0 "" "")] UNSPEC_PIC))) + (set (reg:SI R0_REG) + (const:SI (unspec:SI [(match_operand:SI 1 "" "")] UNSPEC_PIC))) + (set (reg:SI PIC_REG) + (mem:SI (reg:SI PIC_REG))) + (set (reg:SI PIC_REG) + (mem:SI (plus:SI (reg:SI PIC_REG) + (reg:SI R0_REG))))] + "TARGET_VXWORKS_RTP") + (define_insn "*ptb" [(set (match_operand 0 "target_reg_operand" "=b") (const (unspec [(match_operand 1 "" "Csy")] |