aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/csky/csky_isa.def
blob: b2b9ee717b9235bcadb571b951b5bcca6301b9e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/* ISA feature descriptions for the C-SKY back end.
   Copyright (C) 2018-2024 Free Software Foundation, Inc.
   Contributed by C-SKY Microsystems and Mentor Graphics.

   This file is part of GCC.

   GCC is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published
   by the Free Software Foundation; either version 3, or (at your
   option) any later version.

   GCC is distributed in the hope that it will be useful, but WITHOUT
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
   License for more details.

   You should have received a copy of the GNU General Public License
   along with GCC; see the file COPYING3.  If not see
   <http://www.gnu.org/licenses/>.  */

/* Before using #include to read this file, define a macro:
      CSKY_ISA(CNAME, DESCRIPTION)
   */

/* Common insns */
CSKY_ISA (E1,	 "Extended insns for arch ck801	 from base")
CSKY_ISA (E2,	 "Extended insns for arch ck802	 from base")
CSKY_ISA (2E3,	 "Extended insns for arch ck803	 from ck802")
CSKY_ISA (3E3r1, "Extended insns for cpu ck803n from ck803")
CSKY_ISA (3E7,	 "Extended insns for arch ck807	 from ck803")
CSKY_ISA (7E10,	 "Extended insns for arch ck810	 from ck807")

/* Special insns */
CSKY_ISA (div,	  "divide insns")
CSKY_ISA (fcr,	  "Control the fcr register")

/* Extended insns */
CSKY_ISA (dsp,	 "Extended insns for DSP")
CSKY_ISA (java,	 "Extended insns for Java")

CSKY_ISA (fpv2_sf,    "Single precision operations supported")
CSKY_ISA (fpv2_df,    "Double precision operations supported")
CSKY_ISA (fpv2_divd,  "Double precision div operations supported")

CSKY_ISA (fpv3_hi,    "half word for fpu convert supported")
CSKY_ISA (fpv3_hf,    "half precision operations supported")
CSKY_ISA (fpv3_sf,    "Single precision operations supported")
CSKY_ISA (fpv3_df,    "Double precision operations supported")

/* Specific insns mode */
#ifdef	CSKY_ISA_MACRO
#define CSKY_ISA_CK801	    CSKY_ISA_FEATURE_GET (E1)
#define CSKY_ISA_CK802	    CSKY_ISA_FEATURE_GET (E2)
#define CSKY_ISA_CK803	    CSKY_ISA_CK802, CSKY_ISA_FEATURE_GET (2E3), \
			    CSKY_ISA_FEATURE_GET (div)
#define CSKY_ISA_CK803R1    CSKY_ISA_CK803, CSKY_ISA_FEATURE_GET (3E3r1)
#define CSKY_ISA_CK807	    CSKY_ISA_CK803, CSKY_ISA_FEATURE_GET (3E7)
#define CSKY_ISA_CK810	    CSKY_ISA_CK807, CSKY_ISA_FEATURE_GET (7E10)
#define CSKY_ISA_CK860      CSKY_ISA_CK810, CSKY_ISA_FEATURE_GET(3E3r1)

#define CSKY_ISA_DSP	    CSKY_ISA_FEATURE_GET (dsp)

#define CSKY_ISA_FPv2_SF    CSKY_ISA_FEATURE_GET (fpv2_sf)
#define CSKY_ISA_FPv2	    CSKY_ISA_FPv2_SF, CSKY_ISA_FEATURE_GET (fpv2_df)
#define CSKY_ISA_FPv2_DIVD  CSKY_ISA_FPv2, CSKY_ISA_FEATURE_GET (fpv2_divd)

#define CSKY_ISA_FPv3_HF    CSKY_ISA_FEATURE_GET (fpv3_hf), \
                            CSKY_ISA_FEATURE_GET (fpv3_hi)
#define CSKY_ISA_FPv3_HSF   CSKY_ISA_FPv3_HF, \
                            CSKY_ISA_FEATURE_GET (fpv3_sf)
#define CSKY_ISA_FPv3_SDF   CSKY_ISA_FEATURE_GET (fpv3_sf), \
                            CSKY_ISA_FEATURE_GET (fpv3_df)
#define CSKY_ISA_FPv3       CSKY_ISA_FPv3_HF, CSKY_ISA_FPv3_SDF
#endif