From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IkfTE-00074g-4h for qemu-devel@nongnu.org; Wed, 24 Oct 2007 08:36:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IkfTC-00073l-FX for qemu-devel@nongnu.org; Wed, 24 Oct 2007 08:36:23 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IkfTC-00073Z-5v for qemu-devel@nongnu.org; Wed, 24 Oct 2007 08:36:22 -0400 Received: from miranda.se.axis.com ([193.13.178.8]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IkfTB-0002uI-Nc for qemu-devel@nongnu.org; Wed, 24 Oct 2007 08:36:22 -0400 Received: from axis.com (edgar.se.axis.com [10.92.151.1]) by miranda.se.axis.com (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id l9OCaJ53027048 for ; Wed, 24 Oct 2007 14:36:19 +0200 Date: Wed, 24 Oct 2007 14:36:19 +0200 From: "Edgar E. Iglesias" Subject: Re: [Qemu-devel] qemu-2007-10-24 build error Message-ID: <20071024123619.GG13076@edgar.underground.se.axis.com> References: <20071024003602.0000F11F01F20261@mail6.dreamwiz.com> <1193222005.16781.225.camel@rapid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1193222005.16781.225.camel@rapid> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "J. Mayer" Cc: qemu-devel@nongnu.org, hys545@dreamwiz.com On Wed, Oct 24, 2007 at 12:33:24PM +0200, J. Mayer wrote: > On Wed, 2007-10-24 at 09:36 +0900, Hwang YunSong(?????????) wrote: > > > > gcc32 -g -o qemu-system-cris vl.o osdep.o readline.o monitor.o pci.o > > console.o loader.o isa_mmio.o cutils.o block.o block-raw.o block-cow.o > > block-qcow.o aes.o block-vmdk.o block-cloop.o block-dmg.o > > block-bochs.o block-vpc.o block-vvfat.o block-qcow2.o > > block-parallels.o irq.o i2c.o smbus.o scsi-disk.o cdrom.o lsi53c895a.o > > usb.o usb-hub.o usb-linux.o usb-hid.o usb-ohci.o usb-msd.o usb-wacom.o > > eeprom93xx.o eepro100.o ne2000.o pcnet.o rtl8139.o etraxfs.o ptimer.o > > etraxfs_timer.o etraxfs_ser.o gdbstub.o sdl.o x_keymap.o vnc.o d3des.o > > slirp/cksum.o slirp/if.o slirp/ip_icmp.o slirp/ip_input.o > > slirp/ip_output.o slirp/slirp.o slirp/mbuf.o slirp/misc.o slirp/sbuf.o > > slirp/socket.o slirp/tcp_input.o slirp/tcp_output.o slirp/tcp_subr.o > > slirp/tcp_timer.o slirp/udp.o slirp/bootp.o slirp/debug.o slirp/tftp.o > > libqemu.a -lm -lz -lgnutls -L/usr/lib -lSDL -lpthread -lrt -lutil > > libqemu.a(helper.o): In function `do_interrupt': > > /usr/src/Haansoft/BUILD/qemu/target-cris/helper.c:137: undefined > > reference to `__builtin_clz' > > libqemu.a(translate-op.o): In function `dyngen_code': > > /home/hys545/qemu/cris-softmmu/op.h:1566: undefined reference to > > `__builtin_clz' > > libqemu.a(op.o): In function `op_lz_T0_T1': > > /usr/src/Haansoft/BUILD/qemu/target-cris/op.c:1009: undefined > > reference to `__builtin_clz' > > collect2: ld returned 1 exit status > > It does not seem to be a good idea, imho, to use gcc builtins directly > from micro-ops. But your compiler should implement __builtin_clz. As far Hi, I submitted a patch that at compile-time fallbacks to clz code without builtins. Do you see any additional issues with using the builtins? I think the speed-up with GCC ports implementing fast builtin variants of operations like clz would be significant enough to justify their use but if there is disagreement I'll send in a new patch removing the builtin_clz alltogether. Best regards > as I can see, the 4.1.1 version I got (Gentoo distribution) has this > builtin implemented, then there might be a problem in your gcc package. > I used this little program to check the builtin presence and found no > version from gcc 3.4.4 to gcc 4.2.2 without __builtin_clz implemented: > > int a = 123456; > > int main (void) > { > int b; > > b = __builtin_clz(a); > > return b; > } > > Compiled with gcc- -O2 -Wall -W -o /tmp/clz /tmp/ckz.c > > [...] > > -- > J. Mayer > Never organized > > > -- Edgar E. Iglesias Axis Communications AB