| 1020 | } |
| 1021 | |
| 1022 | static ICmp::Cond parse_icmp_cond() { |
| 1023 | switch (auto t = *tokenizer) { |
| 1024 | case EQ: return ICmp::EQ; |
| 1025 | case NE: return ICmp::NE; |
| 1026 | case SLE: return ICmp::SLE; |
| 1027 | case SLT: return ICmp::SLT; |
| 1028 | case SGE: return ICmp::SGE; |
| 1029 | case SGT: return ICmp::SGT; |
| 1030 | case ULE: return ICmp::ULE; |
| 1031 | case ULT: return ICmp::ULT; |
| 1032 | case UGE: return ICmp::UGE; |
| 1033 | case UGT: return ICmp::UGT; |
| 1034 | default: |
| 1035 | tokenizer.unget(t); |
| 1036 | return ICmp::Any; |
| 1037 | } |
| 1038 | } |
| 1039 | |
| 1040 | static unique_ptr<Instr> parse_icmp(string_view name) { |
| 1041 | // icmp cond ty %a, &b |