//===-- BuiltinsSystemZ.def - SystemZ Builtin function database -*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines the SystemZ-specific builtin function database.  Users of
// this file must define the BUILTIN macro to make use of this information.
//
//===----------------------------------------------------------------------===//

// The format of this database matches clang/Basic/Builtins.def.

// Transactional-memory intrinsics
BUILTIN(__builtin_tbegin, "iv*", "j")
BUILTIN(__builtin_tbegin_nofloat, "iv*", "j")
BUILTIN(__builtin_tbeginc, "v", "nj")
BUILTIN(__builtin_tabort, "vi", "r")
BUILTIN(__builtin_tend, "i", "n")
BUILTIN(__builtin_tx_nesting_depth, "i", "nc")
BUILTIN(__builtin_tx_assist, "vi", "n")
BUILTIN(__builtin_non_tx_store, "vULi*ULi", "")

// Vector intrinsics.
// These all map directly to z instructions, except that some variants ending
// in "s" have a final "int *" that receives the post-instruction CC value.

// Vector support instructions (chapter 21 of the PoP)
BUILTIN(__builtin_s390_lcbb, "UivC*Ii", "nc")
BUILTIN(__builtin_s390_vlbb, "V16ScvC*Ii", "")
BUILTIN(__builtin_s390_vll, "V16ScUivC*", "")
BUILTIN(__builtin_s390_vstl, "vV16ScUiv*", "")
BUILTIN(__builtin_s390_vperm, "V16UcV16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vpdi, "V2ULLiV2ULLiV2ULLiIi", "nc")
BUILTIN(__builtin_s390_vpksh, "V16ScV8SsV8Ss", "nc")
BUILTIN(__builtin_s390_vpkshs, "V16ScV8SsV8Ssi*", "nc")
BUILTIN(__builtin_s390_vpksf, "V8SsV4SiV4Si", "nc")
BUILTIN(__builtin_s390_vpksfs, "V8SsV4SiV4Sii*", "nc")
BUILTIN(__builtin_s390_vpksg, "V4SiV2SLLiV2SLLi", "nc")
BUILTIN(__builtin_s390_vpksgs, "V4SiV2SLLiV2SLLii*", "nc")
BUILTIN(__builtin_s390_vpklsh, "V16UcV8UsV8Us", "nc")
BUILTIN(__builtin_s390_vpklshs, "V16UcV8UsV8Usi*", "nc")
BUILTIN(__builtin_s390_vpklsf, "V8UsV4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vpklsfs, "V8UsV4UiV4Uii*", "nc")
BUILTIN(__builtin_s390_vpklsg, "V4UiV2ULLiV2ULLi", "nc")
BUILTIN(__builtin_s390_vpklsgs, "V4UiV2ULLiV2ULLii*", "nc")
BUILTIN(__builtin_s390_vuphb, "V8SsV16Sc", "nc")
BUILTIN(__builtin_s390_vuphh, "V4SiV8Ss", "nc")
BUILTIN(__builtin_s390_vuphf, "V2SLLiV4Si", "nc")
BUILTIN(__builtin_s390_vuplb, "V8SsV16Sc", "nc")
BUILTIN(__builtin_s390_vuplhw, "V4SiV8Ss", "nc")
BUILTIN(__builtin_s390_vuplf, "V2SLLiV4Si", "nc")
BUILTIN(__builtin_s390_vuplhb, "V8UsV16Uc", "nc")
BUILTIN(__builtin_s390_vuplhh, "V4UiV8Us", "nc")
BUILTIN(__builtin_s390_vuplhf, "V2ULLiV4Ui", "nc")
BUILTIN(__builtin_s390_vupllb, "V8UsV16Uc", "nc")
BUILTIN(__builtin_s390_vupllh, "V4UiV8Us", "nc")
BUILTIN(__builtin_s390_vupllf, "V2ULLiV4Ui", "nc")

// Vector integer instructions (chapter 22 of the PoP)
BUILTIN(__builtin_s390_vaq, "V16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vacq, "V16UcV16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vaccb, "V16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vacch, "V8UsV8UsV8Us", "nc")
BUILTIN(__builtin_s390_vaccf, "V4UiV4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vaccg, "V2ULLiV2ULLiV2ULLi", "nc")
BUILTIN(__builtin_s390_vaccq, "V16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vacccq, "V16UcV16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vavgb, "V16ScV16ScV16Sc", "nc")
BUILTIN(__builtin_s390_vavgh, "V8SsV8SsV8Ss", "nc")
BUILTIN(__builtin_s390_vavgf, "V4SiV4SiV4Si", "nc")
BUILTIN(__builtin_s390_vavgg, "V2SLLiV2SLLiV2SLLi", "nc")
BUILTIN(__builtin_s390_vavglb, "V16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vavglh, "V8UsV8UsV8Us", "nc")
BUILTIN(__builtin_s390_vavglf, "V4UiV4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vavglg, "V2ULLiV2ULLiV2ULLi", "nc")
BUILTIN(__builtin_s390_vceqbs, "V16ScV16ScV16Sci*", "nc")
BUILTIN(__builtin_s390_vceqhs, "V8SsV8SsV8Ssi*", "nc")
BUILTIN(__builtin_s390_vceqfs, "V4SiV4SiV4Sii*", "nc")
BUILTIN(__builtin_s390_vceqgs, "V2SLLiV2SLLiV2SLLii*", "nc")
BUILTIN(__builtin_s390_vchbs, "V16ScV16ScV16Sci*", "nc")
BUILTIN(__builtin_s390_vchhs, "V8SsV8SsV8Ssi*", "nc")
BUILTIN(__builtin_s390_vchfs, "V4SiV4SiV4Sii*", "nc")
BUILTIN(__builtin_s390_vchgs, "V2SLLiV2SLLiV2SLLii*", "nc")
BUILTIN(__builtin_s390_vchlbs, "V16ScV16UcV16Uci*", "nc")
BUILTIN(__builtin_s390_vchlhs, "V8SsV8UsV8Usi*", "nc")
BUILTIN(__builtin_s390_vchlfs, "V4SiV4UiV4Uii*", "nc")
BUILTIN(__builtin_s390_vchlgs, "V2SLLiV2ULLiV2ULLii*", "nc")
BUILTIN(__builtin_s390_vcksm, "V4UiV4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vclzb, "V16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vclzh, "V8UsV8Us", "nc")
BUILTIN(__builtin_s390_vclzf, "V4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vclzg, "V2ULLiV2ULLi", "nc")
BUILTIN(__builtin_s390_vctzb, "V16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vctzh, "V8UsV8Us", "nc")
BUILTIN(__builtin_s390_vctzf, "V4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vctzg, "V2ULLiV2ULLi", "nc")
BUILTIN(__builtin_s390_verimb, "V16UcV16UcV16UcV16UcIi", "nc")
BUILTIN(__builtin_s390_verimh, "V8UsV8UsV8UsV8UsIi", "nc")
BUILTIN(__builtin_s390_verimf, "V4UiV4UiV4UiV4UiIi", "nc")
BUILTIN(__builtin_s390_verimg, "V2ULLiV2ULLiV2ULLiV2ULLiIi", "nc")
BUILTIN(__builtin_s390_verllb, "V16UcV16UcUi", "nc")
BUILTIN(__builtin_s390_verllh, "V8UsV8UsUi", "nc")
BUILTIN(__builtin_s390_verllf, "V4UiV4UiUi", "nc")
BUILTIN(__builtin_s390_verllg, "V2ULLiV2ULLiUi", "nc")
BUILTIN(__builtin_s390_verllvb, "V16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_verllvh, "V8UsV8UsV8Us", "nc")
BUILTIN(__builtin_s390_verllvf, "V4UiV4UiV4Ui", "nc")
BUILTIN(__builtin_s390_verllvg, "V2ULLiV2ULLiV2ULLi", "nc")
BUILTIN(__builtin_s390_vgfmb, "V8UsV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vgfmh, "V4UiV8UsV8Us", "nc")
BUILTIN(__builtin_s390_vgfmf, "V2ULLiV4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vgfmg, "V16UcV2ULLiV2ULLi", "nc")
BUILTIN(__builtin_s390_vgfmab, "V8UsV16UcV16UcV8Us", "nc")
BUILTIN(__builtin_s390_vgfmah, "V4UiV8UsV8UsV4Ui", "nc")
BUILTIN(__builtin_s390_vgfmaf, "V2ULLiV4UiV4UiV2ULLi", "nc")
BUILTIN(__builtin_s390_vgfmag, "V16UcV2ULLiV2ULLiV16Uc", "nc")
BUILTIN(__builtin_s390_vmahb, "V16ScV16ScV16ScV16Sc", "nc")
BUILTIN(__builtin_s390_vmahh, "V8SsV8SsV8SsV8Ss", "nc")
BUILTIN(__builtin_s390_vmahf, "V4SiV4SiV4SiV4Si", "nc")
BUILTIN(__builtin_s390_vmalhb, "V16UcV16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vmalhh, "V8UsV8UsV8UsV8Us", "nc")
BUILTIN(__builtin_s390_vmalhf, "V4UiV4UiV4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vmaeb, "V8SsV16ScV16ScV8Ss", "nc")
BUILTIN(__builtin_s390_vmaeh, "V4SiV8SsV8SsV4Si", "nc")
BUILTIN(__builtin_s390_vmaef, "V2SLLiV4SiV4SiV2SLLi", "nc")
BUILTIN(__builtin_s390_vmaleb, "V8UsV16UcV16UcV8Us", "nc")
BUILTIN(__builtin_s390_vmaleh, "V4UiV8UsV8UsV4Ui", "nc")
BUILTIN(__builtin_s390_vmalef, "V2ULLiV4UiV4UiV2ULLi", "nc")
BUILTIN(__builtin_s390_vmaob, "V8SsV16ScV16ScV8Ss", "nc")
BUILTIN(__builtin_s390_vmaoh, "V4SiV8SsV8SsV4Si", "nc")
BUILTIN(__builtin_s390_vmaof, "V2SLLiV4SiV4SiV2SLLi", "nc")
BUILTIN(__builtin_s390_vmalob, "V8UsV16UcV16UcV8Us", "nc")
BUILTIN(__builtin_s390_vmaloh, "V4UiV8UsV8UsV4Ui", "nc")
BUILTIN(__builtin_s390_vmalof, "V2ULLiV4UiV4UiV2ULLi", "nc")
BUILTIN(__builtin_s390_vmhb, "V16ScV16ScV16Sc", "nc")
BUILTIN(__builtin_s390_vmhh, "V8SsV8SsV8Ss", "nc")
BUILTIN(__builtin_s390_vmhf, "V4SiV4SiV4Si", "nc")
BUILTIN(__builtin_s390_vmlhb, "V16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vmlhh, "V8UsV8UsV8Us", "nc")
BUILTIN(__builtin_s390_vmlhf, "V4UiV4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vmeb, "V8SsV16ScV16Sc", "nc")
BUILTIN(__builtin_s390_vmeh, "V4SiV8SsV8Ss", "nc")
BUILTIN(__builtin_s390_vmef, "V2SLLiV4SiV4Si", "nc")
BUILTIN(__builtin_s390_vmleb, "V8UsV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vmleh, "V4UiV8UsV8Us", "nc")
BUILTIN(__builtin_s390_vmlef, "V2ULLiV4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vmob, "V8SsV16ScV16Sc", "nc")
BUILTIN(__builtin_s390_vmoh, "V4SiV8SsV8Ss", "nc")
BUILTIN(__builtin_s390_vmof, "V2SLLiV4SiV4Si", "nc")
BUILTIN(__builtin_s390_vmlob, "V8UsV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vmloh, "V4UiV8UsV8Us", "nc")
BUILTIN(__builtin_s390_vmlof, "V2ULLiV4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vpopctb, "V16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vpopcth, "V8UsV8Us", "nc")
BUILTIN(__builtin_s390_vpopctf, "V4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vpopctg, "V2ULLiV2ULLi", "nc")
BUILTIN(__builtin_s390_vsq, "V16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vsbcbiq, "V16UcV16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vsbiq, "V16UcV16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vscbib, "V16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vscbih, "V8UsV8UsV8Us", "nc")
BUILTIN(__builtin_s390_vscbif, "V4UiV4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vscbig, "V2ULLiV2ULLiV2ULLi", "nc")
BUILTIN(__builtin_s390_vscbiq, "V16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vsl, "V16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vslb, "V16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vsldb, "V16UcV16UcV16UcIi", "nc")
BUILTIN(__builtin_s390_vsra, "V16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vsrab, "V16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vsrl, "V16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vsrlb, "V16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vsumb, "V4UiV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vsumh, "V4UiV8UsV8Us", "nc")
BUILTIN(__builtin_s390_vsumgh, "V2ULLiV8UsV8Us", "nc")
BUILTIN(__builtin_s390_vsumgf, "V2ULLiV4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vsumqf, "V16UcV4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vsumqg, "V16UcV2ULLiV2ULLi", "nc")
BUILTIN(__builtin_s390_vtm, "iV16UcV16Uc", "nc")

// Vector string instructions (chapter 23 of the PoP)
BUILTIN(__builtin_s390_vfaeb, "V16UcV16UcV16UcIi", "nc")
BUILTIN(__builtin_s390_vfaebs, "V16UcV16UcV16UcIii*", "nc")
BUILTIN(__builtin_s390_vfaeh, "V8UsV8UsV8UsIi", "nc")
BUILTIN(__builtin_s390_vfaehs, "V8UsV8UsV8UsIii*", "nc")
BUILTIN(__builtin_s390_vfaef, "V4UiV4UiV4UiIi", "nc")
BUILTIN(__builtin_s390_vfaefs, "V4UiV4UiV4UiIii*", "nc")
BUILTIN(__builtin_s390_vfaezb, "V16UcV16UcV16UcIi", "nc")
BUILTIN(__builtin_s390_vfaezbs, "V16UcV16UcV16UcIii*", "nc")
BUILTIN(__builtin_s390_vfaezh, "V8UsV8UsV8UsIi", "nc")
BUILTIN(__builtin_s390_vfaezhs, "V8UsV8UsV8UsIii*", "nc")
BUILTIN(__builtin_s390_vfaezf, "V4UiV4UiV4UiIi", "nc")
BUILTIN(__builtin_s390_vfaezfs, "V4UiV4UiV4UiIii*", "nc")
BUILTIN(__builtin_s390_vfeeb, "V16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vfeebs, "V16UcV16UcV16Uci*", "nc")
BUILTIN(__builtin_s390_vfeeh, "V8UsV8UsV8Us", "nc")
BUILTIN(__builtin_s390_vfeehs, "V8UsV8UsV8Usi*", "nc")
BUILTIN(__builtin_s390_vfeef, "V4UiV4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vfeefs, "V4UiV4UiV4Uii*", "nc")
BUILTIN(__builtin_s390_vfeezb, "V16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vfeezbs, "V16UcV16UcV16Uci*", "nc")
BUILTIN(__builtin_s390_vfeezh, "V8UsV8UsV8Us", "nc")
BUILTIN(__builtin_s390_vfeezhs, "V8UsV8UsV8Usi*", "nc")
BUILTIN(__builtin_s390_vfeezf, "V4UiV4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vfeezfs, "V4UiV4UiV4Uii*", "nc")
BUILTIN(__builtin_s390_vfeneb, "V16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vfenebs, "V16UcV16UcV16Uci*", "nc")
BUILTIN(__builtin_s390_vfeneh, "V8UsV8UsV8Us", "nc")
BUILTIN(__builtin_s390_vfenehs, "V8UsV8UsV8Usi*", "nc")
BUILTIN(__builtin_s390_vfenef, "V4UiV4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vfenefs, "V4UiV4UiV4Uii*", "nc")
BUILTIN(__builtin_s390_vfenezb, "V16UcV16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vfenezbs, "V16UcV16UcV16Uci*", "nc")
BUILTIN(__builtin_s390_vfenezh, "V8UsV8UsV8Us", "nc")
BUILTIN(__builtin_s390_vfenezhs, "V8UsV8UsV8Usi*", "nc")
BUILTIN(__builtin_s390_vfenezf, "V4UiV4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vfenezfs, "V4UiV4UiV4Uii*", "nc")
BUILTIN(__builtin_s390_vistrb, "V16UcV16Uc", "nc")
BUILTIN(__builtin_s390_vistrbs, "V16UcV16Uci*", "nc")
BUILTIN(__builtin_s390_vistrh, "V8UsV8Us", "nc")
BUILTIN(__builtin_s390_vistrhs, "V8UsV8Usi*", "nc")
BUILTIN(__builtin_s390_vistrf, "V4UiV4Ui", "nc")
BUILTIN(__builtin_s390_vistrfs, "V4UiV4Uii*", "nc")
BUILTIN(__builtin_s390_vstrcb, "V16UcV16UcV16UcV16UcIi", "nc")
BUILTIN(__builtin_s390_vstrcbs, "V16UcV16UcV16UcV16UcIii*", "nc")
BUILTIN(__builtin_s390_vstrch, "V8UsV8UsV8UsV8UsIi", "nc")
BUILTIN(__builtin_s390_vstrchs, "V8UsV8UsV8UsV8UsIii*", "nc")
BUILTIN(__builtin_s390_vstrcf, "V4UiV4UiV4UiV4UiIi", "nc")
BUILTIN(__builtin_s390_vstrcfs, "V4UiV4UiV4UiV4UiIii*", "nc")
BUILTIN(__builtin_s390_vstrczb, "V16UcV16UcV16UcV16UcIi", "nc")
BUILTIN(__builtin_s390_vstrczbs, "V16UcV16UcV16UcV16UcIii*", "nc")
BUILTIN(__builtin_s390_vstrczh, "V8UsV8UsV8UsV8UsIi", "nc")
BUILTIN(__builtin_s390_vstrczhs, "V8UsV8UsV8UsV8UsIii*", "nc")
BUILTIN(__builtin_s390_vstrczf, "V4UiV4UiV4UiV4UiIi", "nc")
BUILTIN(__builtin_s390_vstrczfs, "V4UiV4UiV4UiV4UiIii*", "nc")

// Vector floating-point instructions (chapter 24 of the PoP)
BUILTIN(__builtin_s390_vfcedbs, "V2SLLiV2dV2di*", "nc")
BUILTIN(__builtin_s390_vfchdbs, "V2SLLiV2dV2di*", "nc")
BUILTIN(__builtin_s390_vfchedbs, "V2SLLiV2dV2di*", "nc")
BUILTIN(__builtin_s390_vfidb, "V2dV2dIiIi", "nc")
BUILTIN(__builtin_s390_vflndb, "V2dV2d", "nc")
BUILTIN(__builtin_s390_vflpdb, "V2dV2d", "nc")
BUILTIN(__builtin_s390_vfmadb, "V2dV2dV2dV2d", "nc")
BUILTIN(__builtin_s390_vfmsdb, "V2dV2dV2dV2d", "nc")
BUILTIN(__builtin_s390_vfsqdb, "V2dV2d", "nc")
BUILTIN(__builtin_s390_vftcidb, "V2SLLiV2dIii*", "nc")

#undef BUILTIN
