diff options
author | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-09 02:59:05 +0000 |
---|---|---|
committer | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-09 02:59:05 +0000 |
commit | 8b95d2d220bd184e9394597143bb939d62735fde (patch) | |
tree | 2746026609721700402925e8fdc8815c905a67a4 /gcc/config | |
parent | 4e42d239beb769d3e95a356a8fb7b76b155afda8 (diff) | |
download | gcc-8b95d2d220bd184e9394597143bb939d62735fde.tar.gz |
* config/rx/rx.opt (-mjsr): Add.
* config/rx/predicates.md (rx_call_operand): Avoid overflowing
calls when -mjsr.
* config/rx/rx.c (rx_function_ok_for_sibcall): Likewise for
overflowing jumps.
* doc/invoke.texi (-mjsr): Document it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231439 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/rx/predicates.md | 4 | ||||
-rw-r--r-- | gcc/config/rx/rx.c | 3 | ||||
-rw-r--r-- | gcc/config/rx/rx.opt | 6 |
3 files changed, 12 insertions, 1 deletions
diff --git a/gcc/config/rx/predicates.md b/gcc/config/rx/predicates.md index 967a3abbec6..26667cfda05 100644 --- a/gcc/config/rx/predicates.md +++ b/gcc/config/rx/predicates.md @@ -24,7 +24,9 @@ ;; Only registers and symbol refs are allowed. (define_predicate "rx_call_operand" - (match_code "symbol_ref,reg") + (ior (match_code "reg") + (and (match_test "!TARGET_JSR") + (match_code "symbol_ref"))) ) ;; For sibcall operations we can only use a symbolic address. diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c index c2c95917907..781b6b1b2b1 100644 --- a/gcc/config/rx/rx.c +++ b/gcc/config/rx/rx.c @@ -2857,6 +2857,9 @@ rx_warn_func_return (tree decl) static bool rx_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED) { + if (TARGET_JSR) + return false; + /* Do not allow indirect tailcalls. The sibcall patterns do not support them. */ if (decl == NULL) diff --git a/gcc/config/rx/rx.opt b/gcc/config/rx/rx.opt index 11113e2e305..56e8adf3f5c 100644 --- a/gcc/config/rx/rx.opt +++ b/gcc/config/rx/rx.opt @@ -149,3 +149,9 @@ Enable the use of the LRA register allocator. mallow-string-insns Target Report Var(rx_allow_string_insns) Init(1) Enables or disables the use of the SMOVF, SMOVB, SMOVU, SUNTIL, SWHILE and RMPA instructions. Enabled by default. + +;--------------------------------------------------- + +mjsr +Target Report Mask(JSR) +Always use JSR, never BSR, for calls. |