aboutsummaryrefslogtreecommitdiff
path: root/gcc/target.def
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2023-11-11 17:28:57 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2023-11-11 17:28:57 +0000
commit4b803fbf839439b1deca660e32d5ced211111dfa (patch)
tree94f0afe9e4cadef16f7e6d4c4e6f5a9ddea25f14 /gcc/target.def
parente59ec35276599805cdc6c3979d8a167b027d286e (diff)
downloadgcc-4b803fbf839439b1deca660e32d5ced211111dfa.zip
gcc-4b803fbf839439b1deca660e32d5ced211111dfa.tar.gz
gcc-4b803fbf839439b1deca660e32d5ced211111dfa.tar.bz2
mode-switching: Allow targets to set the mode for EH handlers
The mode-switching pass already had hooks to say what mode an entity is in on entry to a function and what mode it must be in on return. For SME, we also want to say what mode an entity is guaranteed to be in on entry to an exception handler. gcc/ * target.def (mode_switching.eh_handler): New hook. * doc/tm.texi.in (TARGET_MODE_EH_HANDLER): New @hook. * doc/tm.texi: Regenerate. * mode-switching.cc (optimize_mode_switching): Use eh_handler to get the mode on entry to an exception handler.
Diffstat (limited to 'gcc/target.def')
-rw-r--r--gcc/target.def7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/target.def b/gcc/target.def
index 3dae335..a70275b 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -7071,6 +7071,13 @@ must be defined.",
int, (int entity), NULL)
DEFHOOK
+(eh_handler,
+ "If this hook is defined, it should return the mode that @var{entity} is\n\
+guaranteed to be in on entry to an exception handler, or the number of modes\n\
+if there is no such guarantee.",
+ int, (int entity), NULL)
+
+DEFHOOK
(priority,
"This hook specifies the order in which modes for @var{entity}\n\
are processed. 0 is the highest priority,\n\