public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
Cc: cgen@sourceware.org, brolley@redhat.com
Subject: Re: Unbreak CRIS sim: fix -gen-decode-insn-entry.  And why the widened mem fetch?
Date: Fri, 02 Dec 2005 07:06:00 -0000	[thread overview]
Message-ID: <vt2acfkrn9b.fsf@theseus.home.> (raw)
In-Reply-To: <200512020342.jB23gZ03025776@ignucius.se.axis.com> (Hans-Peter Nilsson's message of "Fri, 2 Dec 2005 04:42:35 +0100")


Hans-Peter Nilsson <hans-peter.nilsson@axis.com> writes:
> Anyway, I think I unbroke it (clean test-results), but I'm not
> sure this is the best change.  I don't like these diffs in the
> generated sim (this one seemingly unrelated to the breakage,
> maybe it's due to Jim Blandy's change on 2005-05-16):
>
> Index: cpuv10.h
> @@ -684,9 +684,9 @@ struct scache {
>    unsigned int length;
>  #define EXTRACT_IFMT_MOVUCWR_CODE \
>    length = 4; \
> -  word_1 = GETIMEMUHI (current_cpu, pc + 2); \
> +  word_1 = GETIMEMUSI (current_cpu, pc + 2); \
>    f_operand2 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
> -  f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 16, 15, 16) << 0)); \
> +  f_indir_pc__word = (0|(EXTRACT_LSB0_UINT (word_1, 32, 15, 16) << 0)); \
>    f_mode = EXTRACT_LSB0_UINT (insn, 16, 11, 2); \
>    f_opcode = EXTRACT_LSB0_UINT (insn, 16, 9, 4); \
>    f_size = EXTRACT_LSB0_UINT (insn, 16, 5, 2); \
>
> Why fetch more than needed?  Can't that cause spurious invalid
> accesses at the end of defined memory?  Doesn't it slow down the
> simulator?  (Hm, I guess I can measure that...)  I don't have
> the full context of all cases when this can happen, but for the
> case above, it's for moving a 16-bit constant field
> zero-extended into a 32-bit register.

That could be due to my 2005-05-16 change.  I have to admit, I didn't
feel very confident in my understanding of that code at all, and I was
grateful to have found a relatively straightforward way to make it at
least produce the right field values.  If you are up to the task of
going into utils-gen.scm and making it produce minimal and correct
fetches, please do.

  reply	other threads:[~2005-12-02  7:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-02  3:42 Hans-Peter Nilsson
2005-12-02  7:06 ` Jim Blandy [this message]
2005-12-02 15:42   ` Hans-Peter Nilsson
2005-12-02 19:13 ` Dave Brolley
2005-12-05  1:31   ` Hans-Peter Nilsson
2005-12-05 17:11     ` Dave Brolley

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=vt2acfkrn9b.fsf@theseus.home. \
    --to=jimb@redhat.com \
    --cc=brolley@redhat.com \
    --cc=cgen@sourceware.org \
    --cc=hans-peter.nilsson@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).