| 71 | } |
| 72 | |
| 73 | void Instruction::parse(istream& s, int pos) |
| 74 | { |
| 75 | BaseInstruction::parse(s, pos); |
| 76 | |
| 77 | switch(opcode) |
| 78 | { |
| 79 | #define X(NAME, CODE) case NAME: \ |
| 80 | break; |
| 81 | INSTRUCTIONS |
| 82 | #undef X |
| 83 | default: |
| 84 | ostringstream os; |
| 85 | os << "Code not defined for instruction "; |
| 86 | bool known = true; |
| 87 | switch (opcode) |
| 88 | { |
| 89 | #define X(NAME, PRE, CODE) case NAME: os << #NAME; break; |
| 90 | ALL_INSTRUCTIONS |
| 91 | #undef X |
| 92 | default: |
| 93 | known = false; |
| 94 | os << showbase << hex << opcode << dec; |
| 95 | } |
| 96 | os << endl; |
| 97 | if (known) |
| 98 | { |
| 99 | os << "This virtual machine executes binary circuits only. "; |
| 100 | os << "Use 'compile.py -B'."; |
| 101 | } |
| 102 | exit_error(os.str()); |
| 103 | break; |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | } /* namespace GC */ |
| 108 |
nothing calls this directly
no test coverage detected