Unified · Split
| @@ -217,11 +217,21 @@ static void asm_binary_opcode(TCCState *s1, int token) · 216 unmodified lines | ||
| 217 | 217 | return; |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | + if (ops[0].reg == 15) { | |
| 221 | + tcc_error("'%s' does not support 'pc' as operand", get_tok_str(token, NULL)); | |
| 222 | + return; | |
| 223 | + } | |
| 224 | + | |
| 220 | 225 | if (ops[1].type != OP_REG32) { |
| 221 | 226 | expect("(source operand) register"); |
| 222 | 227 | return; |
| 223 | 228 | } |
| 224 | 229 | |
| 230 | + if (ops[1].reg == 15) { | |
| 231 | + tcc_error("'%s' does not support 'pc' as operand", get_tok_str(token, NULL)); | |
| 232 | + return; | |
| 233 | + } | |
| 234 | + | |
| 225 | 235 | if (tok == ',') { |
| 226 | 236 | next(); // skip ',' |
| 227 | 237 | if (tok == TOK_ASM_ror) { |