shithub: riscv

Download patch

ref: da0638914f67b312aefda6676c2a75668d9740e4
parent: bf60c387201e446c7dc61df838cf5babec0e9fb5
author: cinap_lenrek <[email protected]>
date: Wed Jan 2 05:10:29 EST 2013

5c: fix -0x80000000 comparsion bug

--- a/sys/src/cmd/5c/txt.c
+++ b/sys/src/cmd/5c/txt.c
@@ -1056,7 +1056,7 @@
 		nextpc();
 		p->as = a;
 		naddr(f1, &p->from);
-		if(a == ACMP && f1->op == OCONST && p->from.offset < 0) {
+		if(a == ACMP && f1->op == OCONST && p->from.offset < 0 && p->from.offset != -p->from.offset) {
 			p->as = ACMN;
 			p->from.offset = -p->from.offset;
 		}