aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/config/sh
diff options
context:
space:
mode:
authorRong Xu <xur@google.com>2014-09-02 15:29:57 -0700
committerRong Xu <xur@google.com>2014-09-02 15:29:57 -0700
commite97c99f15937e5762a973b25192aab824126a6d3 (patch)
tree7f0be3ff7c7d976af06887dc50accd68f7630a7f /gcc-4.9/gcc/config/sh
parentf1c18afafc2b321465ae6b07ede127095942d7dc (diff)
downloadtoolchain_gcc-e97c99f15937e5762a973b25192aab824126a6d3.tar.gz
toolchain_gcc-e97c99f15937e5762a973b25192aab824126a6d3.tar.bz2
toolchain_gcc-e97c99f15937e5762a973b25192aab824126a6d3.zip
[gcc-4.9] Merge svn r214745 from google/gcc-4_9 branch.
Merge gcc-4_9 source r214745 from google/gcc-4_9 branch. Change-Id: Ie6fa0fd72f4b4eec3adc4db4bb922e652d1c2605
Diffstat (limited to 'gcc-4.9/gcc/config/sh')
-rw-r--r--gcc-4.9/gcc/config/sh/sh.c6
-rw-r--r--gcc-4.9/gcc/config/sh/sh.opt2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc-4.9/gcc/config/sh/sh.c b/gcc-4.9/gcc/config/sh/sh.c
index 62dcf0cb3..3d4553a6e 100644
--- a/gcc-4.9/gcc/config/sh/sh.c
+++ b/gcc-4.9/gcc/config/sh/sh.c
@@ -861,6 +861,12 @@ sh_option_override (void)
targetm.asm_out.aligned_op.di = NULL;
targetm.asm_out.unaligned_op.di = NULL;
}
+
+ /* User/priviledged mode is supported only on SH3*, SH4* and SH5*.
+ Disable it for everything else. */
+ if (! (TARGET_SH3 || TARGET_SH5) && TARGET_USERMODE)
+ TARGET_USERMODE = false;
+
if (TARGET_SH1)
{
if (! strcmp (sh_div_str, "call-div1"))
diff --git a/gcc-4.9/gcc/config/sh/sh.opt b/gcc-4.9/gcc/config/sh/sh.opt
index 1834c6bde..bb6d39581 100644
--- a/gcc-4.9/gcc/config/sh/sh.opt
+++ b/gcc-4.9/gcc/config/sh/sh.opt
@@ -343,7 +343,7 @@ Target RejectNegative Joined UInteger Var(sh_multcost) Init(-1)
Cost to assume for a multiply insn
musermode
-Target Report RejectNegative Var(TARGET_USERMODE)
+Target Var(TARGET_USERMODE)
Don't generate privileged-mode only code; implies -mno-inline-ic_invalidate if the inline code would not work in user mode.
;; We might want to enable this by default for TARGET_HARD_SH4, because