Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@cambridge.redhat.com>
To: gdb-patches@sources.redhat.com
Subject: RFA: Add support for CLASS_IGNORE and ARG_NIM4
Date: Mon, 29 Apr 2002 05:57:00 -0000	[thread overview]
Message-ID: <m34rhuaci3.fsf@north-pole.nickc.cambridge.redhat.com> (raw)

Hi Guys,

  The binutils z8k sources were recently updated to add a new opcode
  class - CLASS_IGNORE - and a new immediate argument type -
  ARG_NIM4.  This patch adds support for these changes to the z8k
  simulator.

  OK to apply ?

Cheers
        Nick

2002-04-29  Nick Clifton  <nickc@cambridge.redhat.com>

	* writecode.c (lookup_inst): Ignore CLASS_IGNORE.
        (info_args): Treat CLASS_IGNORE like CLASS_BIT.
        Handle ARG_NIM4.
        (info_len_in_words): Handle CLASS_IGNORE and ARG_NIM4.


Index: sim/z8k/writecode.c
===================================================================
RCS file: /cvs/src/src/sim/z8k/writecode.c,v
retrieving revision 1.1.1.1
diff -c -3 -p -w -r1.1.1.1 writecode.c
*** sim/z8k/writecode.c	16 Apr 1999 01:35:14 -0000	1.1.1.1
--- sim/z8k/writecode.c	29 Apr 2002 12:53:07 -0000
*************** lookup_inst (what)
*** 139,144 ****
--- 139,146 ----
  		    nibl_matched = 0;
  		  break;
  
+ 		case CLASS_IGNORE:
+ 		  break;
  		case CLASS_BIT:
  		  if (datum_value != instr_nibl)
  		    nibl_matched = 0;
*************** info_args (p)
*** 539,544 ****
--- 541,547 ----
  	case CLASS_BIT_1OR2:
  	  emit ("register unsigned int imm_src=(<insn_4>& 2)?2:1;\n");
  	  break;
+ 	case CLASS_IGNORE:
  	case CLASS_BIT:
  	  /* Just ignore these, we've already decoded this bit */
  	  nibs++;
*************** break;	  
*** 589,594 ****
--- 592,601 ----
  		emit ("register unsigned int imm_src=<insn_4>;\n");
  		nibs++;
  		break;
+ 	      case ARG_NIM4:
+ 		emit ("register unsigned int imm_src = - <insn_4>;\n");
+ 		nibs++;
+ 		break;
  	      case ARG_IMM2:
  		emit ("register unsigned int imm_src=<insn_4> & 0x2;\n");
  		nibs++;
*************** info_len_in_words (o)
*** 1938,1943 ****
--- 1945,1951 ----
      {
        switch (*p & CLASS_MASK)
  	{
+ 	case CLASS_IGNORE:
  	case CLASS_BIT:
  	case CLASS_REGN0:
  	case CLASS_REG:
*************** info_len_in_words (o)
*** 1959,1964 ****
--- 1967,1973 ----
  	      break;
  	    case ARG_IMM2:
  	    case ARG_IMM4:
+ 	    case ARG_NIM4:
  	    case ARG_IMM4M1:
  	    case ARG_IMM_1:
  	    case ARG_IMM_2:


             reply	other threads:[~2002-04-29 12:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-29  5:57 Nick Clifton [this message]
2002-04-29  9:22 ` Andrew Cagney

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=m34rhuaci3.fsf@north-pole.nickc.cambridge.redhat.com \
    --to=nickc@cambridge.redhat.com \
    --cc=gdb-patches@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