tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] [PATCH 5/9] arm-asm: Add error case in asm_multiplication


From: Danny Milosavljevic
Subject: [Tinycc-devel] [PATCH 5/9] arm-asm: Add error case in asm_multiplication_opcode
Date: Mon, 28 Dec 2020 02:44:09 +0100

---
 arm-asm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arm-asm.c b/arm-asm.c
index fd6275a..847a4f3 100644
--- a/arm-asm.c
+++ b/arm-asm.c
@@ -732,8 +732,8 @@ static void asm_multiplication_opcode(TCCState *s1, int 
token)
             memcpy(&ops[2], &ops[0], sizeof(ops[1])); // ARM is actually like 
this!
             break;
         default:
-            memcpy(&ops[2], &ops[1], sizeof(ops[1])); // move ops[2]
-            memcpy(&ops[1], &ops[0], sizeof(ops[0])); // ops[1] was implicit
+            expect("at least three operands");
+            return;
         }
         nb_ops = 3;
     }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]