Displaying 1 result from an estimated 1 matches for "sse_jbuf".
2006 Mar 16
0
[PATCH 3a/3] Add shadow VRAM
...izeof(*vp));
+ return 1;
+ }
+ return 0;
+}
+
+static inline unsigned int cpuid_edx(unsigned int op)
+{
+ unsigned int eax, edx;
+
+ __asm__("cpuid"
+ : "=a" (eax), "=d" (edx)
+ : "0" (op)
+ : "bx", "cx");
+ return edx;
+}
+
+jmp_buf sse_jbuf;
+
+void intr(int sig)
+{
+
+ sse2_ok = 0;
+ longjmp(sse_jbuf, 1);
+ return;
+}
+
+void check_sse2(void)
+{
+
+ if ((cpuid_edx(1) & 0x4000000) == 0) {
+ sse2_ok = 0;
+ return;
+ }
+ signal(SIGILL, intr);
+ if (setjmp(sse_jbuf) == 0)
+ __asm__("xorps %xmm0,%xmm0\n");
+ return;
+}
+...