public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [COMMITTED] gcc: xtensa: use define_c_enums instead of define_constants
@ 2022-12-27 15:44 Max Filippov
  0 siblings, 0 replies; only message in thread
From: Max Filippov @ 2022-12-27 15:44 UTC (permalink / raw)
  To: gcc-patches; +Cc: Max Filippov

This improves RTL dumps readability. No functional changes.

gcc/
	* config/xtensa/xtensa.md (unspec): Extract UNSPEC_* constants
	into this enum.
	(unspecv): Extract UNSPECV_* constants into this enum.
---
 gcc/config/xtensa/xtensa.md | 46 ++++++++++++++++++++-----------------
 1 file changed, 25 insertions(+), 21 deletions(-)

diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
index e72fd9ac3f61..0a26d3dccf44 100644
--- a/gcc/config/xtensa/xtensa.md
+++ b/gcc/config/xtensa/xtensa.md
@@ -25,28 +25,32 @@
   (A7_REG		7)
   (A8_REG		8)
   (A9_REG		9)
+])
+
+(define_c_enum "unspec" [
+  UNSPEC_NOP
+  UNSPEC_PLT
+  UNSPEC_RET_ADDR
+  UNSPEC_TPOFF
+  UNSPEC_DTPOFF
+  UNSPEC_TLS_FUNC
+  UNSPEC_TLS_ARG
+  UNSPEC_TLS_CALL
+  UNSPEC_TP
+  UNSPEC_MEMW
+  UNSPEC_LSETUP_START
+  UNSPEC_LSETUP_END
+  UNSPEC_FRAME_BLOCKAGE
+])
 
-  (UNSPEC_NOP		2)
-  (UNSPEC_PLT		3)
-  (UNSPEC_RET_ADDR	4)
-  (UNSPEC_TPOFF		5)
-  (UNSPEC_DTPOFF	6)
-  (UNSPEC_TLS_FUNC	7)
-  (UNSPEC_TLS_ARG	8)
-  (UNSPEC_TLS_CALL	9)
-  (UNSPEC_TP		10)
-  (UNSPEC_MEMW		11)
-  (UNSPEC_LSETUP_START  12)
-  (UNSPEC_LSETUP_END    13)
-  (UNSPEC_FRAME_BLOCKAGE 14)
-
-  (UNSPECV_SET_FP	1)
-  (UNSPECV_ENTRY	2)
-  (UNSPECV_S32RI	4)
-  (UNSPECV_S32C1I	5)
-  (UNSPECV_EH_RETURN	6)
-  (UNSPECV_SET_TP	7)
-  (UNSPECV_BLOCKAGE	8)
+(define_c_enum "unspecv" [
+  UNSPECV_SET_FP
+  UNSPECV_ENTRY
+  UNSPECV_S32RI
+  UNSPECV_S32C1I
+  UNSPECV_EH_RETURN
+  UNSPECV_SET_TP
+  UNSPECV_BLOCKAGE
 ])
 
 ;; This code iterator allows signed and unsigned widening multiplications
-- 
2.30.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-27 15:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-27 15:44 [COMMITTED] gcc: xtensa: use define_c_enums instead of define_constants Max Filippov

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).