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") 23BUILTIN(__builtin_thread_pointer, "v*", "") 24 25// Saturating arithmetic 26BUILTIN(__builtin_arm_qadd, "iii", "nc") 27BUILTIN(__builtin_arm_qsub, "iii", "nc") 28BUILTIN(__builtin_arm_ssat, "iiUi", "nc") 29BUILTIN(__builtin_arm_usat, "UiUiUi", "nc") 30 31// Bit manipulation 32BUILTIN(__builtin_arm_rbit, "UiUi", "nc") 33 34// Store and load exclusive 35BUILTIN(__builtin_arm_ldrexd, "LLUiv*", "") 36BUILTIN(__builtin_arm_strexd, "iLLUiv*", "") 37 38BUILTIN(__builtin_arm_ldrex, "v.", "t") 39BUILTIN(__builtin_arm_ldaex, "v.", "t") 40BUILTIN(__builtin_arm_strex, "i.", "t") 41BUILTIN(__builtin_arm_stlex, "i.", "t") 42BUILTIN(__builtin_arm_clrex, "v", "") 43 44// VFP 45BUILTIN(__builtin_arm_get_fpscr, "Ui", "nc") 46BUILTIN(__builtin_arm_set_fpscr, "vUi", "nc") 47BUILTIN(__builtin_arm_vcvtr_f, "ffi", "nc") 48BUILTIN(__builtin_arm_vcvtr_d, "fdi", "nc") 49 50// Coprocessor 51BUILTIN(__builtin_arm_mcr, "vUiUiUiUiUiUi", "") 52BUILTIN(__builtin_arm_mcr2, "vUiUiUiUiUiUi", "") 53BUILTIN(__builtin_arm_mrc, "UiUiUiUiUiUi", "") 54BUILTIN(__builtin_arm_mrc2, "UiUiUiUiUiUi", "") 55BUILTIN(__builtin_arm_cdp, "vUiUiUiUiUiUi", "") 56BUILTIN(__builtin_arm_cdp2, "vUiUiUiUiUiUi", "") 57BUILTIN(__builtin_arm_mcrr, "vUiUiUiUiUi", "") 58BUILTIN(__builtin_arm_mcrr2, "vUiUiUiUiUi", "") 59 60// CRC32 61BUILTIN(__builtin_arm_crc32b, "UiUiUc", "nc") 62BUILTIN(__builtin_arm_crc32cb, "UiUiUc", "nc") 63BUILTIN(__builtin_arm_crc32h, "UiUiUs", "nc") 64BUILTIN(__builtin_arm_crc32ch, "UiUiUs", "nc") 65BUILTIN(__builtin_arm_crc32w, "UiUiUi", "nc") 66BUILTIN(__builtin_arm_crc32cw, "UiUiUi", "nc") 67BUILTIN(__builtin_arm_crc32d, "UiUiLLUi", "nc") 68BUILTIN(__builtin_arm_crc32cd, "UiUiLLUi", "nc") 69 70// HINT 71BUILTIN(__builtin_arm_nop, "v", "") 72BUILTIN(__builtin_arm_yield, "v", "") 73BUILTIN(__builtin_arm_wfe, "v", "") 74BUILTIN(__builtin_arm_wfi, "v", "") 75BUILTIN(__builtin_arm_sev, "v", "") 76BUILTIN(__builtin_arm_sevl, "v", "") 77BUILTIN(__builtin_arm_dbg, "vUi", "") 78 79// Data barrier 80BUILTIN(__builtin_arm_dmb, "vUi", "nc") 81BUILTIN(__builtin_arm_dsb, "vUi", "nc") 82BUILTIN(__builtin_arm_isb, "vUi", "nc") 83 84// Prefetch 85BUILTIN(__builtin_arm_prefetch, "vvC*UiUi", "nc") 86 87// MSVC 88LANGBUILTIN(__emit, "vIUiC", "", ALL_MS_LANGUAGES) 89 90LANGBUILTIN(__yield, "v", "", ALL_MS_LANGUAGES) 91LANGBUILTIN(__wfe, "v", "", ALL_MS_LANGUAGES) 92LANGBUILTIN(__wfi, "v", "", ALL_MS_LANGUAGES) 93LANGBUILTIN(__sev, "v", "", ALL_MS_LANGUAGES) 94LANGBUILTIN(__sevl, "v", "", ALL_MS_LANGUAGES) 95 96LANGBUILTIN(__dmb, "vUi", "nc", ALL_MS_LANGUAGES) 97LANGBUILTIN(__dsb, "vUi", "nc", ALL_MS_LANGUAGES) 98LANGBUILTIN(__isb, "vUi", "nc", ALL_MS_LANGUAGES) 99LANGBUILTIN(__ldrexd, "WiWiCD*", "", ALL_MS_LANGUAGES) 100LANGBUILTIN(_MoveFromCoprocessor, "UiUiUiUiUiUi", "", ALL_MS_LANGUAGES) 101LANGBUILTIN(_MoveFromCoprocessor2, "UiUiUiUiUiUi", "", ALL_MS_LANGUAGES) 102LANGBUILTIN(_MoveToCoprocessor, "vUiUiUiUiUiUi", "", ALL_MS_LANGUAGES) 103LANGBUILTIN(_MoveToCoprocessor2, "vUiUiUiUiUiUi", "", ALL_MS_LANGUAGES) 104 105#undef BUILTIN 106#undef LANGBUILTIN 107