shithub: riscv

Download patch

ref: 3fe9730645df15f18689be26b842c06f60e40fae
parent: 0c964838a1a51430015156d9e2a9d29f94f98661
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Apr 25 15:44:16 EDT 2019

7c: don't emit SXTW for non-register source operand

--- a/sys/src/cmd/7c/txt.c
+++ b/sys/src/cmd/7c/txt.c
@@ -764,7 +764,7 @@
 			if(typeu[ft])
 				a = AMOVWU;
 			else
-				a = ASXTW;
+				a = (f->op == OREGISTER) ? ASXTW : AMOVW;
 			break;
 		}
 		break;