• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//===--- BuiltinsARM.def - ARM Builtin function database ----*- C++ -*-===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file defines the ARM-specific builtin function database.  Users of
11// this file must define the BUILTIN macro to make use of this information.
12//
13//===----------------------------------------------------------------------===//
14
15// The format of this database matches clang/Basic/Builtins.def.
16
17#if defined(BUILTIN) && !defined(LANGBUILTIN)
18#   define LANGBUILTIN(ID, TYPE, ATTRS, BUILTIN_LANG) BUILTIN(ID, TYPE, ATTRS)
19#endif
20
21// In libgcc
22BUILTIN(__clear_cache, "vv*v*", "i")
23
24// Saturating arithmetic
25BUILTIN(__builtin_arm_qadd, "iii", "nc")
26BUILTIN(__builtin_arm_qsub, "iii", "nc")
27BUILTIN(__builtin_arm_ssat, "iiUi", "nc")
28BUILTIN(__builtin_arm_usat, "UiUiUi", "nc")
29
30// Bit manipulation
31BUILTIN(__builtin_arm_rbit, "UiUi", "nc")
32
33// Store and load exclusive
34BUILTIN(__builtin_arm_ldrexd, "LLUiv*", "")
35BUILTIN(__builtin_arm_strexd, "iLLUiv*", "")
36
37BUILTIN(__builtin_arm_ldrex, "v.", "t")
38BUILTIN(__builtin_arm_ldaex, "v.", "t")
39BUILTIN(__builtin_arm_strex, "i.", "t")
40BUILTIN(__builtin_arm_stlex, "i.", "t")
41BUILTIN(__builtin_arm_clrex, "v", "")
42
43// VFP
44BUILTIN(__builtin_arm_get_fpscr, "Ui", "nc")
45BUILTIN(__builtin_arm_set_fpscr, "vUi", "nc")
46BUILTIN(__builtin_arm_vcvtr_f, "ffi", "nc")
47BUILTIN(__builtin_arm_vcvtr_d, "fdi", "nc")
48
49// Coprocessor
50BUILTIN(__builtin_arm_ldc, "vUIiUIivC*", "")
51BUILTIN(__builtin_arm_ldcl, "vUIiUIivC*", "")
52BUILTIN(__builtin_arm_ldc2, "vUIiUIivC*", "")
53BUILTIN(__builtin_arm_ldc2l, "vUIiUIivC*", "")
54
55BUILTIN(__builtin_arm_stc, "vUIiUIiv*", "")
56BUILTIN(__builtin_arm_stcl, "vUIiUIiv*", "")
57BUILTIN(__builtin_arm_stc2, "vUIiUIiv*", "")
58BUILTIN(__builtin_arm_stc2l, "vUIiUIiv*", "")
59
60BUILTIN(__builtin_arm_cdp, "vUIiUIiUIiUIiUIiUIi", "")
61BUILTIN(__builtin_arm_cdp2, "vUIiUIiUIiUIiUIiUIi", "")
62BUILTIN(__builtin_arm_mcr, "vUIiUIiUiUIiUIiUIi", "")
63BUILTIN(__builtin_arm_mcr2, "vUIiUIiUiUIiUIiUIi", "")
64BUILTIN(__builtin_arm_mrc, "UiUIiUIiUIiUIiUIi", "")
65BUILTIN(__builtin_arm_mrc2, "UiUIiUIiUIiUIiUIi", "")
66BUILTIN(__builtin_arm_mcrr, "vUIiUIiLLUiUIi", "")
67BUILTIN(__builtin_arm_mcrr2, "vUIiUIiLLUiUIi", "")
68BUILTIN(__builtin_arm_mrrc, "LLUiUIiUIiUIi", "")
69BUILTIN(__builtin_arm_mrrc2, "LLUiUIiUIiUIi", "")
70
71// CRC32
72BUILTIN(__builtin_arm_crc32b, "UiUiUc", "nc")
73BUILTIN(__builtin_arm_crc32cb, "UiUiUc", "nc")
74BUILTIN(__builtin_arm_crc32h, "UiUiUs", "nc")
75BUILTIN(__builtin_arm_crc32ch, "UiUiUs", "nc")
76BUILTIN(__builtin_arm_crc32w, "UiUiUi", "nc")
77BUILTIN(__builtin_arm_crc32cw, "UiUiUi", "nc")
78BUILTIN(__builtin_arm_crc32d, "UiUiLLUi", "nc")
79BUILTIN(__builtin_arm_crc32cd, "UiUiLLUi", "nc")
80
81// HINT
82BUILTIN(__builtin_arm_nop, "v", "")
83BUILTIN(__builtin_arm_yield, "v", "")
84BUILTIN(__builtin_arm_wfe, "v", "")
85BUILTIN(__builtin_arm_wfi, "v", "")
86BUILTIN(__builtin_arm_sev, "v", "")
87BUILTIN(__builtin_arm_sevl, "v", "")
88BUILTIN(__builtin_arm_dbg, "vUi", "")
89
90// Data barrier
91BUILTIN(__builtin_arm_dmb, "vUi", "nc")
92BUILTIN(__builtin_arm_dsb, "vUi", "nc")
93BUILTIN(__builtin_arm_isb, "vUi", "nc")
94
95// Prefetch
96BUILTIN(__builtin_arm_prefetch, "vvC*UiUi", "nc")
97
98// System registers (ACLE)
99BUILTIN(__builtin_arm_rsr, "UicC*", "nc")
100BUILTIN(__builtin_arm_rsr64, "LLUicC*", "nc")
101BUILTIN(__builtin_arm_rsrp, "v*cC*", "nc")
102BUILTIN(__builtin_arm_wsr, "vcC*Ui", "nc")
103BUILTIN(__builtin_arm_wsr64, "vcC*LLUi", "nc")
104BUILTIN(__builtin_arm_wsrp, "vcC*vC*", "nc")
105
106// MSVC
107LANGBUILTIN(__emit, "vIUiC", "", ALL_MS_LANGUAGES)
108
109LANGBUILTIN(__yield, "v", "", ALL_MS_LANGUAGES)
110LANGBUILTIN(__wfe, "v", "", ALL_MS_LANGUAGES)
111LANGBUILTIN(__wfi, "v", "", ALL_MS_LANGUAGES)
112LANGBUILTIN(__sev, "v", "", ALL_MS_LANGUAGES)
113LANGBUILTIN(__sevl, "v", "", ALL_MS_LANGUAGES)
114
115LANGBUILTIN(__dmb, "vUi", "nc", ALL_MS_LANGUAGES)
116LANGBUILTIN(__dsb, "vUi", "nc", ALL_MS_LANGUAGES)
117LANGBUILTIN(__isb, "vUi", "nc", ALL_MS_LANGUAGES)
118LANGBUILTIN(__ldrexd, "WiWiCD*", "", ALL_MS_LANGUAGES)
119LANGBUILTIN(_MoveFromCoprocessor, "UiIUiIUiIUiIUiIUi", "", ALL_MS_LANGUAGES)
120LANGBUILTIN(_MoveFromCoprocessor2, "UiIUiIUiIUiIUiIUi", "", ALL_MS_LANGUAGES)
121LANGBUILTIN(_MoveToCoprocessor, "vUiIUiIUiIUiIUiIUi", "", ALL_MS_LANGUAGES)
122LANGBUILTIN(_MoveToCoprocessor2, "vUiIUiIUiIUiIUiIUi", "", ALL_MS_LANGUAGES)
123
124#undef BUILTIN
125#undef LANGBUILTIN
126