| 4 | #include <fmt/core.h> |
| 5 | |
| 6 | static std::string |
| 7 | decodeOpcodeAlias(const std::string &op) |
| 8 | { |
| 9 | if (op == "SQRT_e") { |
| 10 | return "SQRT_IEEE"; |
| 11 | } else if (op == "EXP_e") { |
| 12 | return "EXP_IEEE"; |
| 13 | } else if (op == "LOG_e") { |
| 14 | return "LOG_IEEE"; |
| 15 | } else if (op == "RSQ_e") { |
| 16 | return "RECIPSQRT_IEEE"; |
| 17 | } else if (op == "RCP_e") { |
| 18 | return "RECIP_IEEE"; |
| 19 | } else if (op == "LOG_sat") { |
| 20 | return "LOG_CLAMPED"; |
| 21 | } else if (op == "MUL_e") { |
| 22 | return "MUL_IEEE"; |
| 23 | } else if (op == "DOT4_e") { |
| 24 | return "DOT4_IEEE"; |
| 25 | } else if (op == "MULADD_e") { |
| 26 | return "MULADD_IEEE"; |
| 27 | } else { |
| 28 | return op; |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | static void |
| 33 | assembleAluInst(Shader &shader, AluGroup &group, peg::Ast &node, unsigned numSrcs) |