public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Dave Brolley <brolley@redhat.com>
To: cgen@sources.redhat.com
Subject: CGEN: RFA: Fast vs Full with scache-pbb
Date: Fri, 01 Sep 2000 11:53:00 -0000	[thread overview]
Message-ID: <39AFFB1F.99F2A190@redhat.com> (raw)

Hi,

The simulator port I'm working on was crashing when the sim was
run without -t. It is configured with-scache-pbb. 

It turns out that the call to <cpu>_pbb_begin in the generated
<cpu>_sem_x_begin was passing STATE_RUN_FAST_P (CPU_STATE
(current_cpu)) as the 'fast_p' argument. Now this flag will be 0
if -t is specified and 1 otherwise. However the rest of the
generated code (mloop.c, sem.c) is not set up for dynamic
fast/full switching (although it looks like some work was done
toward this goal in the past). As a result, only the 'sem_full'
function in the idesc_table is initialized for my build. Passing
fast_p==1 causes the semantic engine to attempt to use 'sem_fast'
function which is not initialized.

The attached patch changes <cpu>_sem_x_begin to honour any FAST_P
macro which may be defined and to otherwise assume that
FAST_P==0. I #if'd out the orignal code since it will apply
someday when dynamic fast/full switching is enabled in the rest
of the cgen-generated code.

OK to commit? Once again I tested on fr30, m32r and 2 internal
ports which cover a range of sem-switch/non sem-switch/scache/pbb
configurations.

Dave
Index: sim.scm
===================================================================
RCS file: /cvs/src/src/cgen/sim.scm,v
retrieving revision 1.3
diff -c -p -r1.3 sim.scm
*** sim.scm	2000/08/24 15:35:47	1.3
--- sim.scm	2000/09/01 18:38:15
*************** struct scache {
*** 1884,1895 ****
        "--begin--" () () '(c-code VOID "\
    {
  #if WITH_SCACHE_PBB_@CPU@
! #ifdef DEFINE_SWITCH
      /* In the switch case FAST_P is a constant, allowing several optimizations
         in any called inline functions.  */
      vpc = @cpu@_pbb_begin (current_cpu, FAST_P);
  #else
      vpc = @cpu@_pbb_begin (current_cpu, STATE_RUN_FAST_P (CPU_STATE (current_cpu)));
  #endif
  #endif
    }
--- 1884,1899 ----
        "--begin--" () () '(c-code VOID "\
    {
  #if WITH_SCACHE_PBB_@CPU@
! #if defined DEFINE_SWITCH || defined FAST_P
      /* In the switch case FAST_P is a constant, allowing several optimizations
         in any called inline functions.  */
      vpc = @cpu@_pbb_begin (current_cpu, FAST_P);
  #else
+ #if 0 /* cgen engine can't handle dynamic fast/full switching yet.  */
      vpc = @cpu@_pbb_begin (current_cpu, STATE_RUN_FAST_P (CPU_STATE (current_cpu)));
+ #else
+     vpc = @cpu@_pbb_begin (current_cpu, 0);
+ #endif
  #endif
  #endif
    }

             reply	other threads:[~2000-09-01 11:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-01 11:53 Dave Brolley [this message]
2000-09-03 19:23 ` Ben Elliston
2000-09-05  9:17 ` Dave Brolley
2000-09-06 13:37   ` Doug Evans
2000-09-06 14:17     ` Dave Brolley
2000-09-06 14:45       ` Doug Evans
2000-09-08 11:19         ` 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=39AFFB1F.99F2A190@redhat.com \
    --to=brolley@redhat.com \
    --cc=cgen@sources.redhat.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).