Patchwork [sparc] define_c_enum for UNSPEC/UNSPECV

login
register
mail settings
Submitter Steven Bosscher
Date April 5, 2013, 10:10 p.m.
Message ID <CABu31nPzcBExBMSDkJEP2Sy_Fa4cW_YHje+Vn2dr8hmJgSf9rA@mail.gmail.com>
Download mbox | patch
Permalink /patch/234289/
State New
Headers show

Comments

Steven Bosscher - April 5, 2013, 10:10 p.m.
Hello,

Almost trivial, but it makes the dumps look so much better if UNSPEC
names are printed instead of just numbers.

OK for trunk?

Ciao!
Steven


        * config/sparc/sparc.md: Use define_c_enum for "unspec" and "unspecv".
* config/sparc/sparc.md: Use define_c_enum for "unspec" and "unspecv".
Eric Botcazou - April 9, 2013, 8:58 a.m.
>         * config/sparc/sparc.md: Use define_c_enum for "unspec" and
> "unspecv".

OK, thanks.

Patch

Index: config/sparc/sparc.md
===================================================================
--- config/sparc/sparc.md	(revision 197536)
+++ config/sparc/sparc.md	(working copy)
@@ -22,88 +22,88 @@ 
 
 ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al.
 
-(define_constants
-  [(UNSPEC_MOVE_PIC		0)
-   (UNSPEC_UPDATE_RETURN	1)
-   (UNSPEC_LOAD_PCREL_SYM	2)
-   (UNSPEC_FRAME_BLOCKAGE      3)
-   (UNSPEC_MOVE_PIC_LABEL	5)
-   (UNSPEC_SETH44		6)
-   (UNSPEC_SETM44		7)
-   (UNSPEC_SETHH		9)
-   (UNSPEC_SETLM		10)
-   (UNSPEC_EMB_HISUM		11)
-   (UNSPEC_EMB_TEXTUHI		13)
-   (UNSPEC_EMB_TEXTHI		14)
-   (UNSPEC_EMB_TEXTULO		15)
-   (UNSPEC_EMB_SETHM		18)
-   (UNSPEC_MOVE_GOTDATA		19)
-
-   (UNSPEC_MEMBAR		20)
-   (UNSPEC_ATOMIC		21)
-
-   (UNSPEC_TLSGD		30)
-   (UNSPEC_TLSLDM		31)
-   (UNSPEC_TLSLDO		32)
-   (UNSPEC_TLSIE		33)
-   (UNSPEC_TLSLE		34)
-   (UNSPEC_TLSLD_BASE		35)
-
-   (UNSPEC_FPACK16	 	40)
-   (UNSPEC_FPACK32		41)
-   (UNSPEC_FPACKFIX		42)
-   (UNSPEC_FEXPAND		43)
-   (UNSPEC_MUL16AU		44)
-   (UNSPEC_MUL16AL		45)
-   (UNSPEC_MUL8UL		46)
-   (UNSPEC_MULDUL		47)
-   (UNSPEC_ALIGNDATA		48)
-   (UNSPEC_FCMP			49)
-   (UNSPEC_PDIST		50)
-   (UNSPEC_EDGE8		51)
-   (UNSPEC_EDGE8L		52)
-   (UNSPEC_EDGE16		53)
-   (UNSPEC_EDGE16L		54)
-   (UNSPEC_EDGE32		55)
-   (UNSPEC_EDGE32L		56)
-   (UNSPEC_ARRAY8		57)
-   (UNSPEC_ARRAY16		58)
-   (UNSPEC_ARRAY32		59)
-
-   (UNSPEC_SP_SET		60)
-   (UNSPEC_SP_TEST		61)
-
-   (UNSPEC_EDGE8N		70)
-   (UNSPEC_EDGE8LN		71)
-   (UNSPEC_EDGE16N		72)
-   (UNSPEC_EDGE16LN		73)
-   (UNSPEC_EDGE32N		74)
-   (UNSPEC_EDGE32LN		75)
-   (UNSPEC_BSHUFFLE		76)
-   (UNSPEC_CMASK8		77)
-   (UNSPEC_CMASK16		78)
-   (UNSPEC_CMASK32		79)
-   (UNSPEC_FCHKSM16		80)
-   (UNSPEC_PDISTN		81)
-   (UNSPEC_FUCMP		82)
-   (UNSPEC_FHADD		83)
-   (UNSPEC_FHSUB		84)
-   (UNSPEC_XMUL			85)
-   (UNSPEC_MUL8			86)
-   (UNSPEC_MUL8SU		87)
-   (UNSPEC_MULDSU		88)
-  ])
-
-(define_constants
-  [(UNSPECV_BLOCKAGE		0)
-   (UNSPECV_FLUSHW		1)
-   (UNSPECV_FLUSH		4)
-   (UNSPECV_SAVEW		6)
-   (UNSPECV_CAS			8)
-   (UNSPECV_SWAP		9)
-   (UNSPECV_LDSTUB		10)
-   (UNSPECV_PROBE_STACK_RANGE	11)
-  ])
+(define_c_enum "unspec" [
+  UNSPEC_MOVE_PIC
+  UNSPEC_UPDATE_RETURN
+  UNSPEC_LOAD_PCREL_SYM
+  UNSPEC_FRAME_BLOCKAGE
+  UNSPEC_MOVE_PIC_LABEL
+  UNSPEC_SETH44
+  UNSPEC_SETM44
+  UNSPEC_SETHH
+  UNSPEC_SETLM
+  UNSPEC_EMB_HISUM
+  UNSPEC_EMB_TEXTUHI
+  UNSPEC_EMB_TEXTHI
+  UNSPEC_EMB_TEXTULO
+  UNSPEC_EMB_SETHM
+  UNSPEC_MOVE_GOTDATA
+
+  UNSPEC_MEMBAR
+  UNSPEC_ATOMIC
+
+  UNSPEC_TLSGD
+  UNSPEC_TLSLDM
+  UNSPEC_TLSLDO
+  UNSPEC_TLSIE
+  UNSPEC_TLSLE
+  UNSPEC_TLSLD_BASE
+
+  UNSPEC_FPACK16
+  UNSPEC_FPACK32
+  UNSPEC_FPACKFIX
+  UNSPEC_FEXPAND
+  UNSPEC_MUL16AU
+  UNSPEC_MUL16AL
+  UNSPEC_MUL8UL
+  UNSPEC_MULDUL
+  UNSPEC_ALIGNDATA
+  UNSPEC_FCMP
+  UNSPEC_PDIST
+  UNSPEC_EDGE8
+  UNSPEC_EDGE8L
+  UNSPEC_EDGE16
+  UNSPEC_EDGE16L
+  UNSPEC_EDGE32
+  UNSPEC_EDGE32L
+  UNSPEC_ARRAY8
+  UNSPEC_ARRAY16
+  UNSPEC_ARRAY32
+
+  UNSPEC_SP_SET
+  UNSPEC_SP_TEST
+
+  UNSPEC_EDGE8N
+  UNSPEC_EDGE8LN
+  UNSPEC_EDGE16N
+  UNSPEC_EDGE16LN
+  UNSPEC_EDGE32N
+  UNSPEC_EDGE32LN
+  UNSPEC_BSHUFFLE
+  UNSPEC_CMASK8
+  UNSPEC_CMASK16
+  UNSPEC_CMASK32
+  UNSPEC_FCHKSM16
+  UNSPEC_PDISTN
+  UNSPEC_FUCMP
+  UNSPEC_FHADD
+  UNSPEC_FHSUB
+  UNSPEC_XMUL
+  UNSPEC_MUL8
+  UNSPEC_MUL8SU
+  UNSPEC_MULDSU
+])
+
+(define_c_enum "unspecv" [
+  UNSPECV_BLOCKAGE
+  UNSPECV_FLUSHW
+  UNSPECV_FLUSH
+  UNSPECV_SAVEW
+  UNSPECV_CAS
+  UNSPECV_SWAP
+  UNSPECV_LDSTUB
+  UNSPECV_PROBE_STACK_RANGE
+])
 
 (define_constants
  [(G0_REG			0)