X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fcpuinfo.c;h=0755d6b21ebaf58ffdda54907b22bed71f4357e8;hb=faaca237341abc0f784edfb16df50104110365b8;hp=79fcbc71c299bd05e7d626c9082a4a66ef20d598;hpb=21d0c70b4b1c18dc1c3ac7d0fbd8a903d60f8be7;p=mesa.git diff --git a/src/mesa/main/cpuinfo.c b/src/mesa/main/cpuinfo.c index 79fcbc71c29..0755d6b21eb 100644 --- a/src/mesa/main/cpuinfo.c +++ b/src/mesa/main/cpuinfo.c @@ -1,6 +1,5 @@ /* * Mesa 3-D graphics library - * Version: 7.5 * * Copyright (C) 2009 VMware, Inc. All Rights Reserved. * @@ -17,13 +16,14 @@ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. */ -#include "main/imports.h" +#include "main/compiler.h" #include "main/cpuinfo.h" @@ -34,7 +34,7 @@ void _mesa_get_cpu_features(void) { -#ifdef USE_X86_ASM +#if defined USE_X86_ASM || defined USE_X86_64_ASM _mesa_get_x86_features(); #endif } @@ -43,7 +43,7 @@ _mesa_get_cpu_features(void) /** * Return a string describing the CPU architexture and extensions that * Mesa is using (such as SSE or Altivec). - * \return information string, free it with _mesa_free() + * \return information string, free it with free() */ char * _mesa_get_cpu_string(void) @@ -51,7 +51,7 @@ _mesa_get_cpu_string(void) #define MAX_STRING 50 char *buffer; - buffer = (char *) _mesa_malloc(MAX_STRING); + buffer = malloc(MAX_STRING); if (!buffer) return NULL; @@ -83,24 +83,6 @@ _mesa_get_cpu_string(void) strcat(buffer, "SPARC"); -#elif defined(USE_PPC_ASM) - - if (_mesa_ppc_cpu_features) { - strcat(buffer, (cpu_has_64) ? "PowerPC 64" : "PowerPC"); - } - -# ifdef USE_VMX_ASM - - if (cpu_has_vmx) { - strcat(buffer, "/Altivec"); - } - -# endif - - if (! cpu_has_fpu) { - strcat(buffer, "/No FPU"); - } - #endif assert(strlen(buffer) < MAX_STRING);