From 3472f91129a7a594b356f9a22af2a8176f6e4b1c Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sat, 9 Aug 2014 22:47:46 +0200 Subject: 5a: reject MOVM instruction with .S and .W bits both set (aijus idea) --- sys/src/cmd/5a/lex.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/src/cmd/5a/lex.c b/sys/src/cmd/5a/lex.c index e052ce284..89ff6661c 100644 --- a/sys/src/cmd/5a/lex.c +++ b/sys/src/cmd/5a/lex.c @@ -563,6 +563,13 @@ outcode(int a, int scond, Gen *g1, int reg, Gen *g2) scond = (scond & ~0xf) | Always; } + if(a == AMOVM){ + if((scond & (C_SBIT|C_WBIT)) == (C_SBIT|C_WBIT)){ + yyerror("MOVM .S and .W are exclusive"); + errorexit(); + } + } + if(pass == 1) goto out; jackpot: -- cgit v1.2.3