From b92f1c2dcc7b79467662321615f6eafb0c441c7d Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Fri, 23 Dec 2022 12:17:09 -0800 Subject: [PATCH] gcc: xtensa: use define_c_enums instead of define_constants 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 e72fd9a..0a26d3d 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.7.4