aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2024-08-19 20:59:13 +0200
committerAndreas Schwab <schwab@linux-m68k.org>2024-08-19 21:38:47 +0200
commitc4971bae71cf4d6bb0b458dd9d457ec57d14a4f4 (patch)
tree589c6da5aa97bdd7d9fdec065cf315937ae294c7
parent53283c3231a7b94e728619cccbf21170fb36b2a8 (diff)
downloadgcc-c4971bae71cf4d6bb0b458dd9d457ec57d14a4f4.zip
gcc-c4971bae71cf4d6bb0b458dd9d457ec57d14a4f4.tar.gz
gcc-c4971bae71cf4d6bb0b458dd9d457ec57d14a4f4.tar.bz2
m68k: Add -mlra
PR target/113939 * config/m68k/m68k.opt (mlra): New target option. * config/m68k/m68k.cc (m68k_use_lra_p): New function. (TARGET_LRA_P): Use it. * config/m68k/m68k.opt.urls: Regenerate.
-rw-r--r--gcc/config/m68k/m68k.cc11
-rw-r--r--gcc/config/m68k/m68k.opt5
-rw-r--r--gcc/config/m68k/m68k.opt.urls2
3 files changed, 17 insertions, 1 deletions
diff --git a/gcc/config/m68k/m68k.cc b/gcc/config/m68k/m68k.cc
index 79ba4d5..21c9498 100644
--- a/gcc/config/m68k/m68k.cc
+++ b/gcc/config/m68k/m68k.cc
@@ -199,6 +199,7 @@ static machine_mode m68k_promote_function_mode (const_tree, machine_mode,
static void m68k_asm_final_postscan_insn (FILE *, rtx_insn *insn, rtx [], int);
static HARD_REG_SET m68k_zero_call_used_regs (HARD_REG_SET);
static machine_mode m68k_c_mode_for_floating_type (enum tree_index);
+static bool m68k_use_lra_p (void);
/* Initialize the GCC target structure. */
@@ -307,7 +308,7 @@ static machine_mode m68k_c_mode_for_floating_type (enum tree_index);
#endif
#undef TARGET_LRA_P
-#define TARGET_LRA_P hook_bool_void_false
+#define TARGET_LRA_P m68k_use_lra_p
#undef TARGET_LEGITIMATE_ADDRESS_P
#define TARGET_LEGITIMATE_ADDRESS_P m68k_legitimate_address_p
@@ -7228,4 +7229,12 @@ m68k_c_mode_for_floating_type (enum tree_index ti)
return default_mode_for_floating_type (ti);
}
+/* Implement TARGET_LRA_P. */
+
+static bool
+m68k_use_lra_p ()
+{
+ return m68k_lra_p;
+}
+
#include "gt-m68k.h"
diff --git a/gcc/config/m68k/m68k.opt b/gcc/config/m68k/m68k.opt
index b2ab41a..1b393f5 100644
--- a/gcc/config/m68k/m68k.opt
+++ b/gcc/config/m68k/m68k.opt
@@ -146,6 +146,11 @@ mlong-jump-table-offsets
Target RejectNegative Mask(LONG_JUMP_TABLE_OFFSETS)
Use 32-bit offsets in jump tables rather than 16-bit offsets.
+mlra
+Target Var(m68k_lra_p) Undocumented
+Usa LRA for reload instead of the old reload framework. This option is
+experimental, and it may be removed in future versions of the compiler.
+
mnobitfield
Target RejectNegative InverseMask(BITFIELD)
Do not use the bit-field instructions.
diff --git a/gcc/config/m68k/m68k.opt.urls b/gcc/config/m68k/m68k.opt.urls
index 079fbf4..1f1ac88 100644
--- a/gcc/config/m68k/m68k.opt.urls
+++ b/gcc/config/m68k/m68k.opt.urls
@@ -77,6 +77,8 @@ UrlSuffix(gcc/M680x0-Options.html#index-mhard-float-2)
mlong-jump-table-offsets
UrlSuffix(gcc/M680x0-Options.html#index-mlong-jump-table-offsets)
+; skipping UrlSuffix for 'mlra' due to finding no URLs
+
mnobitfield
UrlSuffix(gcc/M680x0-Options.html#index-mnobitfield)