From 104037a4c5c438fe7d426114c62ef070065e71cb Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Mon, 25 Jan 2021 00:29:02 +0100 Subject: [PATCH] arm-asm: Raise error if user tries to use a shift instruction with an immediate source operand --- arm-asm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arm-asm.c b/arm-asm.c index b268d678..c8adc3e3 100644 --- a/arm-asm.c +++ b/arm-asm.c @@ -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) {