From e0ff69ab1195bfc3fcc0c5f91cf5fea89acf54ff Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Fri, 6 Jul 2007 17:00:15 +0000 Subject: [PATCH] sh.md (*prefetch_i4): Disable for TARGET_VXWORKS_RTP. gcc/ * config/sh/sh.md (*prefetch_i4): Disable for TARGET_VXWORKS_RTP. (prefetch): Likewise if "pref" would be used. From-SVN: r126423 --- gcc/ChangeLog | 5 +++++ gcc/config/sh/sh.md | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 36b080b04eb..7a9b7c971c5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-07-06 Richard Sandiford + + * config/sh/sh.md (*prefetch_i4): Disable for TARGET_VXWORKS_RTP. + (prefetch): Likewise if "pref" would be used. + 2007-07-06 Josh Conner PR middle-end/32602 diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index f7b179d44ad..e2d144e970a 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -13565,18 +13565,21 @@ mov.l\\t1f,r0\\n\\ [(prefetch (match_operand:SI 0 "register_operand" "r") (match_operand:SI 1 "const_int_operand" "n") (match_operand:SI 2 "const_int_operand" "n"))] - "TARGET_HARD_SH4 || TARGET_SHCOMPACT" + "(TARGET_HARD_SH4 || TARGET_SHCOMPACT) && !TARGET_VXWORKS_RTP" "* { return \"pref @%0\"; }" [(set_attr "type" "other")]) +;; In user mode, the "pref" instruction will raise a RADDERR exception +;; for accesses to [0x80000000,0xffffffff]. This makes it an unsuitable +;; implementation of __builtin_prefetch for VxWorks RTPs. (define_expand "prefetch" [(prefetch (match_operand 0 "address_operand" "p") (match_operand:SI 1 "const_int_operand" "n") (match_operand:SI 2 "const_int_operand" "n"))] - "TARGET_HARD_SH4 || TARGET_SH5" + "(TARGET_HARD_SH4 || TARGET_SH5) && (TARGET_SHMEDIA || !TARGET_VXWORKS_RTP)" " { if (GET_MODE (operands[0]) != Pmode -- 2.30.2