git: 9front

Download patch

ref: 235006f1c677dd5da31714eb9e297f1e52495e30
parent: 5a6b8b160f42516f05b2950a35dd2cd459ce6c41
author: ftrvxmtrx <ftrvxmtrx@gmail.com>
date: Sun Mar 17 09:20:03 EDT 2013

aux/cpuid: xsaveopt

--- a/sys/src/cmd/aux/cpuid.c
+++ b/sys/src/cmd/aux/cpuid.c
@@ -90,6 +90,18 @@
 }
 
 void
+func13(ulong)
+{
+	Res r;
+	static char *bitsax[32] = {
+		[0]	"xsaveopt",
+	};
+
+	r = cpuid(13, 1);
+	printbits("features", r.ax, bitsax);
+}
+
+void
 extfunc1(ulong ax)
 {
 	Res r;
@@ -157,8 +169,9 @@
 }
 
 void (*funcs[])(ulong) = {
-	[0] func0,
-	[1] func1,
+	[0] 	func0,
+	[1] 	func1,
+	[13]	func13,
 };
 
 void (*extfuncs[])(ulong) = {
--