This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: resend: [PATCH] z8k fixes


Hi Nick,

On 25 Apr 2002, Nick Clifton wrote:

> Patch applied.

Thanks.

> Note - you failed to provide a patch for simulator to add in support
> for CLASS_IGNORE and ARG_NIM4.  I am attaching a possible patch below
> for your inspection and approval.  (I am not familiar with the z8k
> architecture, so I do not know if this patch is correct).

I think it's OK, except for the first one. The first one should look like
this:

--- writecode.c 16 Apr 1999 01:35:14 -0000      1.1.1.1
+++ writecode.c 26 Apr 2002 16:22:09 -0000
@@ -139,6 +139,8 @@ lookup_inst (what)
                    nibl_matched = 0;
                  break;

+               case CLASS_IGNORE:
+                 break;
                case CLASS_BIT:
                  if (datum_value != instr_nibl)
                    nibl_matched = 0;


regards,
chris


> 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	25 Apr 2002 10:52:27 -0000
> *************** lookup_inst (what)
> *** 139,144 ****
> --- 139,145 ----
>   		    nibl_matched = 0;
>   		  break;
>
> + 		case CLASS_IGNORE:
>   		case CLASS_BIT:
>   		  if (datum_value != instr_nibl)
>   		    nibl_matched = 0;
> *************** info_args (p)
> *** 539,544 ****
> --- 540,546 ----
>   	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 ****
> --- 591,600 ----
>   		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 ****
> --- 1944,1950 ----
>       {
>         switch (*p & CLASS_MASK)
>   	{
> + 	case CLASS_IGNORE:
>   	case CLASS_BIT:
>   	case CLASS_REGN0:
>   	case CLASS_REG:
> *************** info_len_in_words (o)
> *** 1959,1964 ****
> --- 1966,1972 ----
>   	      break;
>   	    case ARG_IMM2:
>   	    case ARG_IMM4:
> + 	    case ARG_NIM4:
>   	    case ARG_IMM4M1:
>   	    case ARG_IMM_1:
>   	    case ARG_IMM_2:
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]