shithub: riscv

Download patch

ref: 30d4d8984bfc64e971bfbb3b913c37ed8a8da17b
parent: 760063ab57aa42ea82f1bf5c9177c0cde206aeee
author: cinap_lenrek <[email protected]>
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();
 		}