MCPcopy Create free account
hub / github.com/csmith-project/csmith / initialize_builtin_functions

Method initialize_builtin_functions

src/Function.cpp:705–739  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

703}
704
705void
706Function::initialize_builtin_functions()
707{
708 // format: return_type; builtin_func_name; (param1_type, param2_type, ...)
709 // supported type: Void, Char, UChar, Short, UShort, Int,
710 // UInt, Long, ULong, Longlong, ULonglong
711 string builtin_function_strings[] = {
712 "UInt; __builtin_ia32_crc32qi; (UInt, UChar); x86",
713 "Int; __builtin_clz; (UInt); x86",
714 "Int; __builtin_clzl; (ULong); x86",
715 "Int; __builtin_clzll; (ULonglong); x86",
716 "Int; __builtin_ctz; (UInt); x86",
717 "Int; __builtin_ctzl; (ULong); x86",
718 "Int; __builtin_ctzll; (ULonglong); x86",
719 "Int; __builtin_ffs; (Int); x86",
720 "Int; __builtin_ffsl; (Long); x86",
721 "Int; __builtin_ffsll; (Longlong); x86",
722 "Int; __builtin_parity; (UInt); x86",
723 "Int; __builtin_parityl; (ULong); x86",
724 "Int; __builtin_parityll; (ULonglong); x86",
725 "Int; __builtin_popcount; (UInt); x86",
726 "Int; __builtin_popcountl; (ULong); x86",
727 "Int; __builtin_popcountll; (ULonglong); x86",
728 "UInt; __builtin_bswap32; (UInt); x86",
729 "ULonglong; __builtin_bswap64; (ULonglong); x86",
730 "Int; __builtin_ctzs; (UShort); clang",
731 "Int; __builtin_clzs; (UShort); clang",
732 "UShort; __builtin_bswap16; (UShort); ppc | clang"
733 };
734
735 int cnt = sizeof(builtin_function_strings) / sizeof(builtin_function_strings[0]);
736 for (int i = 0; i < cnt; i++) {
737 make_builtin_function(builtin_function_strings[i]);
738 }
739}
740
741void
742Function::make_builtin_function(const string &function_string)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected