swh:1:snp:c7c108084bc0bf3d81436bf980b46e98bd338453
Raw File
Tip revision: c2ab9a11b44d596be72bae020602210625f47744 authored by Tobias Ellinghaus on 07 February 2014, 14:11:51 UTC
[l10n] Revert one string in es.po due to broken string freeze
Tip revision: c2ab9a1
sse_test.c
/*
    This file is part of darktable,
    copyright (c) 2009--2010 henrik andersson.

    darktable is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    darktable is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with darktable.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <stdio.h>
#define cpuid(func,ax,bx,cx,dx) __asm__ __volatile__ ("cpuid":"=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (func));
int main (int argc, char **argv)
{
	int eax,ebx,ecx,edx;
	cpuid(0x1,eax,ebx,ecx,edx);
	fprintf(stdout,"%s", (edx>>25)&1?"SSE ":"");
	fprintf(stdout,"%s", (edx>>26)&1?"SSE2 ":"");
	fprintf(stdout,"%s", (ecx)&1?"SSE3 ":"");
	fprintf(stdout,"%s", (ecx>>19)&1?"SSE4.1 ":"");
	fprintf(stdout,"%s", (ecx>>20)&1?"SSE4.2 ":"");
	fprintf(stdout,"\n");
} 
back to top