arm-asm: Raise error if user tries to use a shift instruction with an immediate source operand

This commit is contained in:
Danny Milosavljevic 2021-01-25 00:29:02 +01:00
parent 1ed4b6ba1a
commit 104037a4c5
No known key found for this signature in database
GPG key ID: E71A35542C30BAA5

View file

@ -865,7 +865,8 @@ static void asm_shift_opcode(TCCState *s1, int token)
case OP_IM8:
operands |= ENCODE_IMMEDIATE_FLAG;
operands |= ops[1].e.v;
break;
tcc_error("Using an immediate value as the source operand is not possible with '%s' instruction on ARM", get_tok_str(token, NULL));
return;
}
switch (ops[2].type) {