shithub: riscv

Download patch

ref: ef1b1e159b71e36a3e2870a28f905f5715795dcf
parent: 3613f5061be5fa0459cd7282ad99ede9c3cc67ea
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Dec 12 14:30:31 EST 2023

libmach: add TBZ and TBNZ instructions for arm64

--- a/sys/src/libmach/7db.c
+++ b/sys/src/libmach/7db.c
@@ -222,6 +222,8 @@
 	"10011011101mmmmm111111nnnnnddddd",	"UMNEGL",	"R%m,R%n,R%d",
 	"10011011101mmmmm0aaaaannnnnddddd",	"UMADDL",	"R%m,R%n,R%a,R%d",
 	"10011011101mmmmm1aaaaannnnnddddd",	"UMSUBL",	"R%m,R%n,R%a,R%d",
+	"b0110110bbbbbTTTTTTTTTTTTTTddddd",	"TBZ",		"$%b,R%d,%T",
+	"b0110111bbbbbTTTTTTTTTTTTTTddddd",	"TBNZ",		"$%b,R%d,%T",
 	"W0110100TTTTTTTTTTTTTTTTTTTddddd",	"CBZ%W",	"R%d,%T",
 	"W0110101TTTTTTTTTTTTTTTTTTTddddd",	"CBNZ%W",	"R%d,%T",
 	"01010100TTTTTTTTTTTTTTTTTTT0CCCC",	"B%C",		"%T",
@@ -498,6 +500,9 @@
 			*i->curr++ = "BHSD"[u];
 			break;
 
+		case 'b':	// Bit position
+			u = (u & 1)<<5 | (u >> 1);
+			/* wet floor */
 		case 'd':	// Register Numbers
 		case 'n':
 		case 'a':