From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31653 invoked by alias); 23 Apr 2009 22:24:20 -0000 Received: (qmail 31557 invoked by alias); 23 Apr 2009 22:23:57 -0000 Date: Thu, 23 Apr 2009 22:24:00 -0000 Message-ID: <20090423222357.31556.qmail@sourceware.org> From: "joseph at codesourcery dot com" To: glibc-bugs@sources.redhat.com In-Reply-To: <20090423214459.10094.aurelien@aurel32.net> References: <20090423214459.10094.aurelien@aurel32.net> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug ports/10094] use of FPU_SETCW or FPU_GETCW causes illegal instruction on armel X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00131.txt.bz2 ------- Additional Comments From joseph at codesourcery dot com 2009-04-23 22:23 ------- Subject: Re: New: use of FPU_SETCW or FPU_GETCW causes illegal instruction on armel On Thu, 23 Apr 2009, aurelien at aurel32 dot net wrote: > /usr/include/fpu_control.h on ARM EABI defines FPU_[SG]ETCW as VFP > coprocessor instructions, whereas armel is soft-float. > > #define _FPU_GETCW(cw) \ > __asm__ __volatile__ ("mrc p10, 7, %0, cr1, cr0, 0" : "=r" (cw)) > /* This is fmxr fpscr, %0. */ > #define _FPU_SETCW(cw) \ > __asm__ __volatile__ ("mcr p10, 7, %0, cr1, cr0, 0" : : "r" (cw)) > > This causes an illegal instruction trap on hardware that does not have a VFP > unit. I'm not convinced this is a bug; these macros are inherently nonportable and should only be used by code that knows it is being built for a particular FPU and knows about how to use it. Normal code should use instead. That said, making the contents compile-time conditional like the MIPS version would be reasonable; I don't think it can sensibly be made run-time conditional. -- http://sourceware.org/bugzilla/show_bug.cgi?id=10094 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.