summaryrefslogtreecommitdiff
path: root/sys/src/cmd/5a
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-08-09 22:47:46 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2014-08-09 22:47:46 +0200
commit3472f91129a7a594b356f9a22af2a8176f6e4b1c (patch)
tree9336e47fd8ac9a5f6a2127233e4ecc5b38dc8db9 /sys/src/cmd/5a
parentdaa15d1edbcab0aeae1f5c2a00a6e042e678cfb3 (diff)
5a: reject MOVM instruction with .S and .W bits both set (aijus idea)
Diffstat (limited to 'sys/src/cmd/5a')
-rw-r--r--sys/src/cmd/5a/lex.c7
1 files changed, 7 insertions, 0 deletions
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: