public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: lehotsky@earthlink.net
To: cgen@sourceware.cygnus.com
Subject: branch-delay slot semantics questions
Date: Fri, 11 May 2001 05:13:00 -0000	[thread overview]
Message-ID: <200105111205.IAA04658@iron.> (raw)

I found cgen pretty easy to get up and running for the most part.
It's a definitely a handy (and powerful) tool.

But I don't seem to be able to get the instruction in the "delay" slot
to execute.  My branch instructions are all of the form

       (dni "jmp"
         ...
         (delay 1
		(set pc (....)))
         ...  
       )

But my machine seems to suppress the execution of the instruction
in the delay slot, although I don't have any annul code that I'm
aware of...  (when I run the simulator with -ton, the instructions
in the delay slots are never traced.

Anything I should be looking for?  Is there something special my
mloop.in code needs to do?

Is there also any support for dealing with the semantics that
"a branch in the delay-slot is always annulled".  I think I can
implement this by having two bits in the ISA's (setup-semantics (..))
code.  

    (define-isa
      ...
      (setup-semantics (sequence
			 ()
			 (set h-annul-jmp-p h-jump-insn-p)
			 (set h-jump-insn-p (attr BI insn DELAY-SLOT))))
    )

    ; Branch instructions in the shadow of a branch are annulled.  Remember
    ; if last executed instruction was a branch
    (dsh h-annul-jmp-p "remember if last instruction was jump" ()
							       (register BI))
    (dsh h-jump-insn-p "current instruction is a jmp/ret" () (register BI))




And then in every branch instruction, if the h-annul-jmp-p is set,
then we just evaluate the jump as (nop).


             reply	other threads:[~2001-05-11  5:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-11  5:13 lehotsky [this message]
2001-05-11  6:17 ` Johan Rydberg
2001-05-13 15:41 ` Ben Elliston

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=200105111205.IAA04658@iron. \
    --to=lehotsky@earthlink.net \
    --cc=cgen@sourceware.cygnus.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).