summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/cmd/5a/lex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/src/cmd/5a/lex.c b/sys/src/cmd/5a/lex.c
index 89ff6661c..7880aa780 100644
--- a/sys/src/cmd/5a/lex.c
+++ b/sys/src/cmd/5a/lex.c
@@ -564,7 +564,8 @@ outcode(int a, int scond, Gen *g1, int reg, Gen *g2)
}
if(a == AMOVM){
- if((scond & (C_SBIT|C_WBIT)) == (C_SBIT|C_WBIT)){
+ if((scond & (C_SBIT|C_WBIT)) == (C_SBIT|C_WBIT))
+ if(g2->type != D_CONST || (g2->offset & (1<<15)) == 0){
yyerror("MOVM .S and .W are exclusive");
errorexit();
}