public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/ARM/heads/morello)] Use machine_mode enum values in switch cases
@ 2022-05-05 12:05 Matthew Malcomson
0 siblings, 0 replies; only message in thread
From: Matthew Malcomson @ 2022-05-05 12:05 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:4ffbe07f182bb39d35a578b5b42675f8c90f4c27
commit 4ffbe07f182bb39d35a578b5b42675f8c90f4c27
Author: Matthew Malcomson <matthew.malcomson@arm.com>
Date: Fri Apr 8 16:25:42 2022 +0100
Use machine_mode enum values in switch cases
In `aarch64_split_atomic_op` we have a switch statement on a
`machine_mode` value. This switch statement has `case`s defined as
`DImode` and `CADImode`. These are macros defining a `scalar_int_mode`
and `scalar_addr_mode` respectively.
GCC 4.8 does not accept those classes as constant values that can be
used in a case statement. GCC prerequisites claim to build with GCC
4.8. Hence we can not use these classes in a case statement.
Other switch statements on machine_mode's use the machine_mode enum
values E_DImode and E_CADImode directly. We update
`aarch64_split_atomic_op` to follow that behaviour. This allows
building Morello GCC with GCC 4.8.
Diff:
---
gcc/config/aarch64/aarch64.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index a328e30db61..7fbc1970417 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -20899,11 +20899,11 @@ aarch64_split_atomic_op (enum rtx_code code, rtx old_out, rtx new_out, rtx mem,
machine_mode arith_mode, subreg_mode;
switch (mode)
{
- case DImode:
+ case E_DImode:
arith_mode = DImode;
subreg_mode = DImode;
break;
- case CADImode:
+ case E_CADImode:
arith_mode = DImode;
subreg_mode = CADImode;
break;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-05 12:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05 12:05 [gcc(refs/vendors/ARM/heads/morello)] Use machine_mode enum values in switch cases Matthew Malcomson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).