aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/v850/v850.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-08-26 13:45:42 +0000
committerNick Clifton <nickc@gcc.gnu.org>2005-08-26 13:45:42 +0000
commit2ec6cd51b63c9d73ca831391d00ff5aca2c76512 (patch)
tree78458bbeb8d35a4e24339b126b0e1a3edebbf7c6 /gcc/config/v850/v850.c
parente296c00c3209450305f5cf270d9cba03cba38a1c (diff)
downloadgcc-2ec6cd51b63c9d73ca831391d00ff5aca2c76512.zip
gcc-2ec6cd51b63c9d73ca831391d00ff5aca2c76512.tar.gz
gcc-2ec6cd51b63c9d73ca831391d00ff5aca2c76512.tar.bz2
v850.c (ep_memory_operand): Return FALSE if TARGET_EP is not defined.
* config/v850/v850.c (ep_memory_operand): Return FALSE if TARGET_EP is not defined. * config/v850/c850.h (TARGET_CPU_CPP_BUILTINS): Define __EP__ if TARGET_EP is enabled. (OPTIMIZATION_OPTIONS): Do not define MASK_EP when optimizing. * config/v850/v850.md (save_all_interrupt): Only use the EP register if TARGET_EP is defined. (restore_all_interrupt): Likewise. * config/v850/lib1funcs.asm: Update functions so that the EP register is only used if __EP__ is defined. From-SVN: r103520
Diffstat (limited to 'gcc/config/v850/v850.c')
-rw-r--r--gcc/config/v850/v850.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c
index 79c56af..e77d56a 100644
--- a/gcc/config/v850/v850.c
+++ b/gcc/config/v850/v850.c
@@ -616,7 +616,7 @@ print_operand (FILE * file, rtx x, int code)
break;
case 'S':
{
- /* if it's a reference to a TDA variable, use sst/sld vs. st/ld */
+ /* If it's a reference to a TDA variable, use sst/sld vs. st/ld. */
if (GET_CODE (x) == MEM && ep_memory_operand (x, GET_MODE (x), FALSE))
fputs ("s", file);
@@ -1057,6 +1057,13 @@ ep_memory_operand (rtx op, enum machine_mode mode, int unsigned_load)
int max_offset;
int mask;
+ /* If we are not using the EP register on a per-function basis
+ then do not allow this optimisation at all. This is to
+ prevent the use of the SLD/SST instructions which cannot be
+ guaranteed to work properly due to a hardware bug. */
+ if (!TARGET_EP)
+ return FALSE;
+
if (GET_CODE (op) != MEM)
return FALSE;