MCPcopy Create free account
hub / github.com/AliveToolkit/alive2 / parse_fp_ternary

Function parse_fp_ternary

tools/alive_parser.cpp:913–933  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

911}
912
913static unique_ptr<Instr> parse_fp_ternary(string_view name, token op_token) {
914 auto fmath = parse_fast_math(op_token);
915
916 FpTernaryOp::Op op;
917 switch (op_token) {
918 case FMA: op = FpTernaryOp::FMA; break;
919 default:
920 UNREACHABLE();
921 }
922
923 auto &aty = parse_type();
924 auto &a = parse_operand(aty);
925 parse_comma();
926 auto &bty = parse_type();
927 auto &b = parse_operand(bty);
928 parse_comma();
929 auto &cty = parse_type();
930 auto &c = parse_operand(cty);
931 return make_unique<FpTernaryOp>(aty, string(name), a, b, c, op, fmath,
932 FpRoundingMode(), FpExceptionMode());
933}
934
935static unique_ptr<Instr> parse_conversionop(string_view name, token op_token) {
936 // op ty %op to ty2

Callers 1

parse_instrFunction · 0.85

Calls 4

parse_fast_mathFunction · 0.85
parse_commaFunction · 0.85
FpRoundingModeClass · 0.85
FpExceptionModeClass · 0.85

Tested by

no test coverage detected