public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
To: jimb@redhat.com
Cc: hans-peter.nilsson@axis.com, cgen@sourceware.org,
	orjan.friberg@axis.com, gdb@sources.redhat.com
Subject: Re: Troubles building cris target
Date: Wed, 16 Mar 2005 18:25:00 -0000	[thread overview]
Message-ID: <200503161824.j2GIOLaw029089@ignucius.se.axis.com> (raw)
In-Reply-To: <vt2d5tzpjeh.fsf@zenia.home> (message from Jim Blandy on 16 Mar 2005 12:53:10 -0500)

> From: Jim Blandy <jimb@redhat.com>
> Date: 16 Mar 2005 12:53:10 -0500

> Hans-Peter Nilsson <hans-peter.nilsson@axis.com> 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  <hp@axis.com>

	* 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

  reply	other threads:[~2005-03-16 18:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <vt27jk8r372.fsf@zenia.home>
2005-03-15 23:09 ` Hans-Peter Nilsson
2005-03-16 17:57   ` Jim Blandy
2005-03-16 18:25     ` Hans-Peter Nilsson [this message]
2005-03-24  6:20       ` Hans-Peter Nilsson
2005-03-24 12:29       ` Frank Ch. Eigler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200503161824.j2GIOLaw029089@ignucius.se.axis.com \
    --to=hans-peter.nilsson@axis.com \
    --cc=cgen@sourceware.org \
    --cc=gdb@sources.redhat.com \
    --cc=jimb@redhat.com \
    --cc=orjan.friberg@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).