3 * Test program: Detecting SSE extensions, and switching them off
4 * (C) 2011-2012 Jonathan Campbell.
5 * Hackipedia DOS library.
7 * This code is licensed under the LGPL.
8 * <insert LGPL legal text here>
13 #include <conio.h> /* this is where Open Watcom hides the outp() etc. functions */
20 #include <hw/dos/dos.h>
21 #include <hw/cpu/cpu.h>
22 #include <hw/cpu/cpusse.h>
25 # define WINFCON_STOCK_WIN_MAIN
26 # include <hw/dos/winfcon.h>
32 printf("Your CPU is basically a %s or higher\n",cpu_basic_level_to_string(cpu_basic_level));
34 printf(" - Your CPU is currently running me in virtual 8086 mode\n");
37 if (!cpu_check_sse_is_usable()) {
38 printf("SSE not available to turn off.\n");
39 printf("Reason: %s\n",cpu_sse_unusable_reason);
40 printf("Detection method: %s\n",cpu_sse_usable_detection_method);
41 printf("can turn off: %d\n",cpu_sse_usable_can_turn_off);
42 printf("can turn on: %d\n",cpu_sse_usable_can_turn_on);
46 printf("SSE available, detection method: %s\n",cpu_sse_usable_detection_method);
47 printf("can turn off: %d\n",cpu_sse_usable_can_turn_off);
48 printf("can turn on: %d\n",cpu_sse_usable_can_turn_on);
50 if (!cpu_sse_usable_can_turn_off) {
51 printf("I can't turn SSE off, giving up\n");
55 if (!cpu_sse_disable()) {
56 printf("Failed to turn off SSE\n");
60 printf("SSE is now disabled.\n");