git: 9front

Download patch

ref: 1211f12e03cb1af1ea3ec5f3ae0159d393a3d9e8
parent: 7ffea05803b37f8123f698573af85fcc41f22e49
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Aug 9 14:23:14 EDT 2014

5a: MOVM.IA.W.S ..., [R15] is exception return and needs to be allowed (thanks aiju)

--- a/sys/src/cmd/5a/lex.c
+++ b/sys/src/cmd/5a/lex.c
@@ -564,7 +564,8 @@
 	}
 
 	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();
 		}
--