add SystemZ arch
diff --git a/cs.c b/cs.c
index 6eac933..7f72597 100644
--- a/cs.c
+++ b/cs.c
@@ -27,6 +27,7 @@
 extern void X86_enable(void);
 extern void PPC_enable(void);
 extern void Sparc_enable(void);
+extern void SystemZ_enable(void);
 
 static void archs_enable(void)
 {
@@ -50,6 +51,9 @@
 #ifdef CAPSTONE_HAS_SPARC
 	Sparc_enable();
 #endif
+#ifdef CAPSTONE_HAS_SYSZ
+	SystemZ_enable();
+#endif
 #ifdef CAPSTONE_HAS_X86
 	X86_enable();
 #endif
@@ -92,7 +96,8 @@
 	if (query == CS_ARCH_ALL)
 		return all_arch == ((1 << CS_ARCH_ARM) | (1 << CS_ARCH_ARM64) |
 				(1 << CS_ARCH_MIPS) | (1 << CS_ARCH_X86) |
-				(1 << CS_ARCH_PPC) | (1 << CS_ARCH_SPARC));
+				(1 << CS_ARCH_PPC) | (1 << CS_ARCH_SPARC) |
+				(1 << CS_ARCH_SYSZ));
 
 	if ((unsigned int)query < CS_ARCH_MAX)
 		return all_arch & (1 << query);
@@ -585,6 +590,11 @@
 				if (insn->detail->sparc.operands[i].type == (sparc_op_type)op_type)
 					count++;
 			break;
+		case CS_ARCH_SYSZ:
+			for (i = 0; i < insn->detail->sysz.op_count; i++)
+				if (insn->detail->sysz.operands[i].type == (sysz_op_type)op_type)
+					count++;
+			break;
 	}
 
 	return count;
@@ -658,6 +668,14 @@
 					return i;
 			}
 			break;
+		case CS_ARCH_SYSZ:
+			for (i = 0; i < insn->detail->sysz.op_count; i++) {
+				if (insn->detail->sysz.operands[i].type == (sysz_op_type)op_type)
+					count++;
+				if (count == post)
+					return i;
+			}
+			break;
 	}
 
 	return -1;