| 1 |
/* ISA feature descriptions for the C-SKY back end. |
| 2 |
Copyright (C) 2018-2025 Free Software Foundation, Inc. |
| 3 |
Contributed by C-SKY Microsystems and Mentor Graphics. |
| 4 |
|
| 5 |
This file is part of GCC. |
| 6 |
|
| 7 |
GCC is free software; you can redistribute it and/or modify it |
| 8 |
under the terms of the GNU General Public License as published |
| 9 |
by the Free Software Foundation; either version 3, or (at your |
| 10 |
option) any later version. |
| 11 |
|
| 12 |
GCC is distributed in the hope that it will be useful, but WITHOUT |
| 13 |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| 14 |
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public |
| 15 |
License for more details. |
| 16 |
|
| 17 |
You should have received a copy of the GNU General Public License |
| 18 |
along with GCC; see the file COPYING3. If not see |
| 19 |
<http://www.gnu.org/licenses/>. */ |
| 20 |
|
| 21 |
/* Before using #include to read this file, define a macro: |
| 22 |
CSKY_ISA(CNAME, DESCRIPTION) |
| 23 |
*/ |
| 24 |
|
| 25 |
/* Common insns */ |
| 26 |
CSKY_ISA (E1, "Extended insns for arch ck801 from base") |
| 27 |
CSKY_ISA (E2, "Extended insns for arch ck802 from base") |
| 28 |
CSKY_ISA (2E3, "Extended insns for arch ck803 from ck802") |
| 29 |
CSKY_ISA (3E3r1, "Extended insns for cpu ck803n from ck803") |
| 30 |
CSKY_ISA (3E7, "Extended insns for arch ck807 from ck803") |
| 31 |
CSKY_ISA (7E10, "Extended insns for arch ck810 from ck807") |
| 32 |
|
| 33 |
/* Special insns */ |
| 34 |
CSKY_ISA (div, "divide insns") |
| 35 |
CSKY_ISA (fcr, "Control the fcr register") |
| 36 |
|
| 37 |
/* Extended insns */ |
| 38 |
CSKY_ISA (dsp, "Extended insns for DSP") |
| 39 |
CSKY_ISA (java, "Extended insns for Java") |
| 40 |
|
| 41 |
CSKY_ISA (fpv2_sf, "Single precision operations supported") |
| 42 |
CSKY_ISA (fpv2_df, "Double precision operations supported") |
| 43 |
CSKY_ISA (fpv2_divd, "Double precision div operations supported") |
| 44 |
|
| 45 |
CSKY_ISA (fpv3_hi, "half word for fpu convert supported") |
| 46 |
CSKY_ISA (fpv3_hf, "half precision operations supported") |
| 47 |
CSKY_ISA (fpv3_sf, "Single precision operations supported") |
| 48 |
CSKY_ISA (fpv3_df, "Double precision operations supported") |
| 49 |
|
| 50 |
/* Specific insns mode */ |
| 51 |
#ifdef CSKY_ISA_MACRO |
| 52 |
#define CSKY_ISA_CK801 CSKY_ISA_FEATURE_GET (E1) |
| 53 |
#define CSKY_ISA_CK802 CSKY_ISA_FEATURE_GET (E2) |
| 54 |
#define CSKY_ISA_CK803 CSKY_ISA_CK802, CSKY_ISA_FEATURE_GET (2E3), \ |
| 55 |
CSKY_ISA_FEATURE_GET (div) |
| 56 |
#define CSKY_ISA_CK803R1 CSKY_ISA_CK803, CSKY_ISA_FEATURE_GET (3E3r1) |
| 57 |
#define CSKY_ISA_CK807 CSKY_ISA_CK803, CSKY_ISA_FEATURE_GET (3E7) |
| 58 |
#define CSKY_ISA_CK810 CSKY_ISA_CK807, CSKY_ISA_FEATURE_GET (7E10) |
| 59 |
#define CSKY_ISA_CK860 CSKY_ISA_CK810, CSKY_ISA_FEATURE_GET(3E3r1) |
| 60 |
|
| 61 |
#define CSKY_ISA_DSP CSKY_ISA_FEATURE_GET (dsp) |
| 62 |
|
| 63 |
#define CSKY_ISA_FPv2_SF CSKY_ISA_FEATURE_GET (fpv2_sf) |
| 64 |
#define CSKY_ISA_FPv2 CSKY_ISA_FPv2_SF, CSKY_ISA_FEATURE_GET (fpv2_df) |
| 65 |
#define CSKY_ISA_FPv2_DIVD CSKY_ISA_FPv2, CSKY_ISA_FEATURE_GET (fpv2_divd) |
| 66 |
|
| 67 |
#define CSKY_ISA_FPv3_HF CSKY_ISA_FEATURE_GET (fpv3_hf), \ |
| 68 |
CSKY_ISA_FEATURE_GET (fpv3_hi) |
| 69 |
#define CSKY_ISA_FPv3_HSF CSKY_ISA_FPv3_HF, \ |
| 70 |
CSKY_ISA_FEATURE_GET (fpv3_sf) |
| 71 |
#define CSKY_ISA_FPv3_SDF CSKY_ISA_FEATURE_GET (fpv3_sf), \ |
| 72 |
CSKY_ISA_FEATURE_GET (fpv3_df) |
| 73 |
#define CSKY_ISA_FPv3 CSKY_ISA_FPv3_HF, CSKY_ISA_FPv3_SDF |
| 74 |
#endif |