* 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.
From-SVN: r231439
+2015-12-08 DJ Delorie <dj@redhat.com>
+
+ * 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.
+
2015-12-08 Jan Hubicka <hubicka@ucw.cz>
PR ipa/61886
;; 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.
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)
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.
-mint-register=@gol
-mpid@gol
-mallow-string-insns -mno-allow-string-insns@gol
+-mjsr@gol
-mno-warn-multiple-fast-interrupts@gol
-msave-acc-in-interrupts}
When the instructions are enabled GCC defines the C preprocessor
symbol @code{__RX_ALLOW_STRING_INSNS__}, otherwise it defines the
symbol @code{__RX_DISALLOW_STRING_INSNS__}.
+
+@item -mjsr
+@itemx -mno-jsr
+@opindex mjsr
+@opindex mno-jsr
+Use only (or not only) @code{JSR} instructions to access functions.
+This option can be used when code size exceeds the range of @code{BSR}
+instructions. Note that @option{-mno-jsr} does not mean to not use
+@code{JSR} but instead means that any type of branch may be used.
@end table
@emph{Note:} The generic GCC command-line option @option{-ffixed-@var{reg}}