From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9693 invoked by alias); 16 Mar 2005 18:24:59 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 9513 invoked from network); 16 Mar 2005 18:24:46 -0000 Received: from unknown (HELO krynn.se.axis.com) (212.209.10.221) by sourceware.org with SMTP; 16 Mar 2005 18:24:46 -0000 Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.83.5.18]) by krynn.se.axis.com (8.12.9/8.12.9/Debian-5local0.1) with ESMTP id j2GIOMoi017750; Wed, 16 Mar 2005 19:24:22 +0100 Received: from ignucius.se.axis.com (localhost [127.0.0.1]) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id j2GIOMdD029093; Wed, 16 Mar 2005 19:24:22 +0100 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id j2GIOLaw029089; Wed, 16 Mar 2005 19:24:21 +0100 Date: Wed, 16 Mar 2005 18:24:00 -0000 Message-Id: <200503161824.j2GIOLaw029089@ignucius.se.axis.com> From: Hans-Peter Nilsson To: jimb@redhat.com CC: hans-peter.nilsson@axis.com, cgen@sourceware.org, orjan.friberg@axis.com, gdb@sources.redhat.com In-reply-to: (message from Jim Blandy on 16 Mar 2005 12:53:10 -0500) Subject: Re: Troubles building cris target X-SW-Source: 2005-03/txt/msg00160.txt.bz2 > From: Jim Blandy > Date: 16 Mar 2005 12:53:10 -0500 > Hans-Peter Nilsson writes: > > JFTR, I built sim successfully on i686-pc-linux-gnu (FC2) with > > CVS as of "Tue Mar 15 15:09:24 UTC 2005". > > Hm. Our systems look identical except for the processor. Do you know > why it builds for you, but not for me? I can only assume that inlining limits are different. (Either we're using different GCC versions or inlining parameters for x86_64 trig differently.) The comment in the patch mentioned outlining of operator functions. Without the patch, they are never outlined, so if there's a call to the outlined function (as happened for you), it will not be found. > It dies differently now: > > gcc -DHAVE_CONFIG_H -DWITH_DEFAULT_MODEL='"crisv32"' -DPROFILE=1 -DWITH_PROFILE=-1 -DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT -DWITH_ENVIRONMENT=ALL_ENVIRONMENT -DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN -DWITH_SCACHE=16384 -I. -I/home/jimb/gdb/src/sim/cris -I../common -I/home/jimb/gdb/src/sim/cris/../common -I../../include -I/home/jimb/gdb/src/sim/cris/../../include -I../../bfd -I/home/jimb/gdb/src/sim/cris/../../bfd -I../../opcodes -I/home/jimb/gdb/src/sim/cris/../../opcodes -I../../intl -I/home/jimb/gdb/src/sim/cris/../../intl -g3 -o run \ > nrun.o libsim.a ../../bfd/libbfd.a ../../opcodes/libopcodes.a ../../libiberty/libiberty.a -lnsl > libsim.a(decodev10.o)(.text+0x771a): In function `crisv10f_decode': > /home/jimb/gdb/src/sim/cris/decodev10.c:5059: undefined reference to `EXTHISI' Ugh. Looks like I'd need to #define EXTHISI too, perhaps others. But the obvious just dawned on me: the generated decode*.c should have an '#include "cgen-ops.h"'. Completely untested. CGENers, please comment. Decoding of instruction fields should be able to use the usual operators. Dunno if that's supposed to be handled elsewhere. Maybe this is related to the problem generating SID CPU files since about a year (reported before, no clue received). Ok to commit if it works? 2005-03-16 Hans-Peter Nilsson * sim-decode.scm (cgen-decode.c): Include cgen-ops.h. Index: sim-decode.scm =================================================================== RCS file: /cvs/src/src/cgen/sim-decode.scm,v retrieving revision 1.9 diff -c -p -r1.9 sim-decode.scm *** sim-decode.scm 8 Jul 2003 16:19:35 -0000 1.9 --- sim-decode.scm 16 Mar 2005 18:17:07 -0000 *************** const IDESC * *** 582,587 **** --- 582,588 ---- #define WANT_CPU_@CPU@ #include \"sim-main.h\" + #include \"cgen-ops.h\" #include \"sim-assert.h\"\n\n" (lambda () (-gen-decode-insn-globals (non-multi-insns (non-alias-insns (current-insn-list))))) brgds, H-P