summaryrefslogtreecommitdiff
path: root/gcc/config/nds32/nds32_intrinsic.h
diff options
context:
space:
mode:
authorMonk Chiang <sh.chiang04@gmail.com>2018-04-08 03:21:08 +0000
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>2018-04-08 03:21:08 +0000
commit57aaf0cc9e8bd98c3aac58f21d2ff4f610bc637a (patch)
tree1995d1fa57e5f75b3936a599e1ec7c80c82fdb3e /gcc/config/nds32/nds32_intrinsic.h
parent82d800ce372be9ac4e716aaaa431e7d9d4496683 (diff)
downloadgcc-57aaf0cc9e8bd98c3aac58f21d2ff4f610bc637a.tar.gz
[NDS32] Add intrinsic functions for TLB operation and data prefech.
gcc/ * config/nds32/constants.md (unspec_volatile_element): Add values for TLB operation and data prefetch. * config/nds32/nds32-intrinsic.c: Implementation of intrinsic functions for TLB operation and data prefetch. * config/nds32/nds32-intrinsic.md: Likewise. * config/nds32/nds32_intrinsic.h: Likewise. * config/nds32/nds32.c (nds32_dpref_names): Likewise. (nds32_print_operand): Likewise. * config/nds32/nds32.h (nds32_builtins): Likewise. From-SVN: r259216
Diffstat (limited to 'gcc/config/nds32/nds32_intrinsic.h')
-rw-r--r--gcc/config/nds32/nds32_intrinsic.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/gcc/config/nds32/nds32_intrinsic.h b/gcc/config/nds32/nds32_intrinsic.h
index 01e1a8e3e60..3feb587a8e2 100644
--- a/gcc/config/nds32/nds32_intrinsic.h
+++ b/gcc/config/nds32/nds32_intrinsic.h
@@ -226,6 +226,16 @@ enum nds32_cctl_idxwrite
__NDS32_CCTL_L1I_IX_WWD__
};
+enum nds32_dpref
+{
+ __NDS32_DPREF_SRD__,
+ __NDS32_DPREF_MRD__,
+ __NDS32_DPREF_SWR__,
+ __NDS32_DPREF_MWR__,
+ __NDS32_DPREF_PTE__,
+ __NDS32_DPREF_CLWR__
+};
+
/* ------------------------------------------------------------------------ */
/* Define intrinsic register name macro for compatibility. */
@@ -409,6 +419,14 @@ enum nds32_cctl_idxwrite
#define NDS32_CCTL_L1D_IX_WWD __NDS32_CCTL_L1D_IX_WWD__
#define NDS32_CCTL_L1I_IX_WTAG __NDS32_CCTL_L1I_IX_WTAG__
#define NDS32_CCTL_L1I_IX_WWD __NDS32_CCTL_L1I_IX_WWD__
+
+#define NDS32_DPREF_SRD __NDS32_DPREF_SRD__
+#define NDS32_DPREF_MRD __NDS32_DPREF_MRD__
+#define NDS32_DPREF_SWR __NDS32_DPREF_SWR__
+#define NDS32_DPREF_MWR __NDS32_DPREF_MWR__
+#define NDS32_DPREF_PTE __NDS32_DPREF_PTE__
+#define NDS32_DPREF_CLWR __NDS32_DPREF_CLWR__
+
/* ------------------------------------------------------------------------ */
@@ -501,6 +519,14 @@ enum nds32_cctl_idxwrite
(__builtin_nds32_svs ((a), (b)))
#define __nds32__sva(a, b) \
(__builtin_nds32_sva ((a), (b)))
+#define __nds32__dpref_qw(a, b, subtype) \
+ (__builtin_nds32_dpref_qw ((a), (b), (subtype)))
+#define __nds32__dpref_hw(a, b, subtype) \
+ (__builtin_nds32_dpref_hw ((a), (b), (subtype)))
+#define __nds32__dpref_w(a, b, subtype) \
+ (__builtin_nds32_dpref_w ((a), (b), (subtype)))
+#define __nds32__dpref_dw(a, b, subtype) \
+ (__builtin_nds32_dpref_dw ((a), (b), (subtype)))
#define __nds32__teqz(a, swid) \
(__builtin_nds32_teqz ((a), (swid)))
@@ -573,4 +599,21 @@ enum nds32_cctl_idxwrite
#define __nds32__fmfcfg() \
(__builtin_nds32_fmfcfg())
+#define __nds32__tlbop_trd(a) \
+ (__builtin_nds32_tlbop_trd ((a)))
+#define __nds32__tlbop_twr(a) \
+ (__builtin_nds32_tlbop_twr ((a)))
+#define __nds32__tlbop_rwr(a) \
+ (__builtin_nds32_tlbop_rwr ((a)))
+#define __nds32__tlbop_rwlk(a) \
+ (__builtin_nds32_tlbop_rwlk ((a)))
+#define __nds32__tlbop_unlk(a) \
+ (__builtin_nds32_tlbop_unlk ((a)))
+#define __nds32__tlbop_pb(a) \
+ (__builtin_nds32_tlbop_pb ((a)))
+#define __nds32__tlbop_inv(a) \
+ (__builtin_nds32_tlbop_inv ((a)))
+#define __nds32__tlbop_flua() \
+(__builtin_nds32_tlbop_flua())
+
#endif /* nds32_intrinsic.h */