[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] [PATCH] arm-asm: Raise error if user tries to use a shift
From: |
Danny Milosavljevic |
Subject: |
[Tinycc-devel] [PATCH] arm-asm: Raise error if user tries to use a shift instruction with an immediate source operand |
Date: |
Mon, 25 Jan 2021 12:02:58 +0100 |
---
arm-asm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arm-asm.c b/arm-asm.c
index b268d67..c8adc3e 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) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Tinycc-devel] [PATCH] arm-asm: Raise error if user tries to use a shift instruction with an immediate source operand,
Danny Milosavljevic <=