From owner-freebsd-amd64@FreeBSD.ORG Sat May 21 17:37:02 2005 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 48B4916A4CE for ; Sat, 21 May 2005 17:37:02 +0000 (GMT) Received: from sophia3.e-shell.net (sophia3.e-shell.net [64.246.46.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0ED043D55 for ; Sat, 21 May 2005 17:37:01 +0000 (GMT) (envelope-from loox@e-shell.net) Received: from dsl-200-95-3-8.prod-infinitum.com.mx (dsl-200-95-3-8.prod-infinitum.com.mx [200.95.3.8]) by sophia3.e-shell.net (Postfix) with ESMTP id 14DBB656826 for ; Sat, 21 May 2005 12:37:01 -0500 (CDT) From: Axel Gonzalez To: freebsd-amd64@freebsd.org Date: Sat, 21 May 2005 12:37:00 -0500 User-Agent: KMail/1.8 References: <20050521022130.GW52914@afflictions.org> <20050521105451.V92958@fw.reifenberger.com> In-Reply-To: <20050521105451.V92958@fw.reifenberger.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200505211237.00974.loox@e-shell.net> Subject: Re: mplayer, amd64, and CPU flags [patch] X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 May 2005 17:37:02 -0000 Maybe this is a little unnecesary since its amd64 and should support all extra flags (at the end its a patch to the makefile), and the only file broken is to get the configure arguments, cpu detection inside the mplayer binary works perfectly on TOOLS/cpuinfo.c: static cpuid_regs_t cpuid(int func) { cpuid_regs_t regs; #define CPUID ".byte 0x0f, 0xa2; " asm("push %%ebx; " "movl %4,%%eax; " CPUID "movl %%eax,%0; movl %%ebx,%1; movl %%ecx,%2; movl %%edx,%3; " "pop %%ebx" : "=m" (regs.eax), "=m" (regs.ebx), "=m" (regs.ecx), "=m" (regs.edx) : "g" (func) : "%eax", "%ecx", "%edx"); printf(""); // **** NOTE this *extra* printf() return regs; } with the printf: # TOOLS/cpuinfo vendor_id : AuthenticAMD cpu family : 15 model : 12 stepping : 0 flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 cflsh mmx fxsr sse sse2 mmxext 3dnowext 3dnow k6_mtrr cpu MHz : 2000.021 model name : AMD Athlon(tm) 64 Processor 3000+ w/o the printf() # TOOLS/cpuinfo vendor_id : model name : Unknown CPU why this works, i have no idea. Maybe its something to do with the registers, etc. I won't try to debug it further since we already know the flags of the CPU (and the printf seems to fix the problem anyways) this is a commitable patch to the makefile: --- Makefile.orig Sat May 21 10:58:38 2005 +++ Makefile Sat May 21 11:01:44 2005 @@ -353,6 +353,15 @@ PLIST_SUB+= VIDIX="@comment " .endif +.if ${ARCH} == "amd64" +CONFIGURE_ARGS+= --enable-mmx \ + --enable-mmx2 \ + --enable-3dnow \ + --enable-3dnowex \ + --enable-sse \ + --enable-sse2 +.endif + #.if exists(${LOCALBASE}/modules/rtc.ko) #WITH_RTC= yes #.endif On Saturday 21 May 2005 03:56, Michael Reifenberger wrote: > Hi, > I modified CONFIGURE_ARGS in Makefile to: > ... > --enable-mmx \ > --enable-mmx2 \ > --enable-3dnow \ > --enable-3dnowex \ > --enable-sse \ > --enable-sse2 \ > ... > > Bye/2 > --- > Michael Reifenberger, Business Development Manager SAP-Basis, Plaut > Consulting Comp: Michael.Reifenberger@plaut.de | Priv: > Michael@Reifenberger.com http://www.plaut.de | > http://www.Reifenberger.com > > _______________________________________________ > freebsd-amd64@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-amd64 > To unsubscribe, send any mail to "freebsd-amd64-unsubscribe@freebsd.org"