public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: Patch: add prefix to condition args in opcodes
       [not found] <199907092055.NAA11875@cygnus.com>
@ 1999-07-28  3:19 ` Jeffrey A Law
  1999-07-28  7:11   ` Jerry Quinn
  1999-07-28 10:12   ` Jerry Quinn
  0 siblings, 2 replies; 9+ messages in thread
From: Jeffrey A Law @ 1999-07-28  3:19 UTC (permalink / raw)
  To: Jerry Quinn; +Cc: binutils

  In message <199907092055.NAA11875@cygnus.com>you write:
  > OK, here's a patch to prefix all the condition arg characters with '?'.  It
  > may look a bit large, but all I've done is regroup all the cases for
  > conditions inside the '?' case and do a bit of renaming.  It passes the
  > test suite and appears to work fine.
  > 
  > Because all the conditions are in a prefix, I just added extra codes to
  > deal with various 64 bit conditions.  You'll see that there are some stubs
  > for different new conditions that aren't filled in yet.
This should have been a completely separate patch.  There is *no* reason
to include this stuff as part of the basic reorganization.  And by doing so
all you end up doing is making more work for me as I try to sort out if any
of the PA2.0 stuff is actually correct.

*PLEASE* submit independent changes as independent patches.  Anything else
just makes more work for me because large patches are simply harder to
properly review and problems in one area can easily cause the whole patch
to be held up.  It is better for everyone if you submit independent changes
as separate patches.


  > Let me know what you think.  If this is OK, I suggest we prefix the float
  > args next.
I'm happy with the general concept, but the code itself needs some work.

First, you reversed the patch.  ie, you did diff new old.  Not a major problem,
but it did take a few seconds to realize what had happened (I kept looking for
something nested inside the '?' case in the "new" code and couldn't find it).


Anyway the code itself.

                    /* Handle an add condition.  */
                  case 'A':     /* 64 bit add */
                    if (*s == ',' && *(s + 1) == '*')
                      {
                        cond_64 = 1;
                        s += 2; /* Eat up the ,* */
                      }
                    else break;

First, we do not generally put comments after code; comments belong on separate
lines before the code to which they apply.

Second, we do not write "else break;".  We write

   else
     break;

You made that goof in a variety of places.

Similarly in other places you do stuff like the following:

    if (!cond_64) s++;

We generally try to avoid that kind of style.

  
I'm not particular happy with the way 'A' falls into 'a'.  It may be cleaner
to do

	case 'A':
	case 'a':
	  if (*args == 'A')
	    {
	       Do the few "A" specific things
	    }
	  Do generic code for 'A' and 'a'.

The flow control (at least to me) is easier to follow with that kind of style
(it's still not ideal, but I'm not sure what else we can do to clean this up
without starting over with a complete redesign).

This happens in other places too.

These lines in the 'a' handling are indented improperly:

                  opcode |= cmpltr << 13;
                  INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);

They need to be moved two columns to the right.  Similar problems occur with
the '@' handling.

In the 'b' case the INSERT_FIELD_AND_CONTINUE needs to be moved to the left
two columns.

Do not write "abort()", instead write "abort ()".  Seems like a nit, but
we need to try and be consistent with the coding standards.

You have some comments that wrap when viewed on an 80 column screen.  They need
to be cleaned up.

This code in 'b' does not work if we had previously come in from the 'B' case
and had found a 64bit completer completer.  *s will have already been
advanced past the ,*:


                    cmpltr = 0;
                    if (*s == ',')
                      {
                        s++;



I believe you made a similar mistake in the 'X' case where it falls into
'x'.

I'm not sure the disassembler changes are right, particularly in how they
handle the 64bit stuff.  But then again,  I would claim we shouldn't be
trying to add the 64bit stuff as part of this patch anyway.

Please break out the basic reorganization from the 64bit stuff.  Let's get
the reorgs done and installed, then we can add the 64bit stuff separately.


jeff



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Patch: add prefix to condition args in opcodes
  1999-07-28  3:19 ` Patch: add prefix to condition args in opcodes Jeffrey A Law
@ 1999-07-28  7:11   ` Jerry Quinn
  1999-08-05 14:41     ` Jeffrey A Law
  1999-07-28 10:12   ` Jerry Quinn
  1 sibling, 1 reply; 9+ messages in thread
From: Jerry Quinn @ 1999-07-28  7:11 UTC (permalink / raw)
  To: law; +Cc: Jerry Quinn, binutils

 >   In message <199907092055.NAA11875@cygnus.com>you write:
 >   > Because all the conditions are in a prefix, I just added extra codes to
 >   > deal with various 64 bit conditions.  You'll see that there are some
 >   > stubs for different new conditions that aren't filled in yet.

 > This should have been a completely separate patch.  There is *no* reason
 > to include this stuff as part of the basic reorganization.  And by doing so
 > all you end up doing is making more work for me as I try to sort out if any
 > of the PA2.0 stuff is actually correct.
 > 

Sorry.  I was thinking they were close enough, but you're right.  They are
independent.

 >   > Let me know what you think.  If this is OK, I suggest we prefix the float
 >   > args next.
 > I'm happy with the general concept, but the code itself needs some work.

I think we should also do the completers and float regs once you're happy with 
this change.

 > First, you reversed the patch.  ie, you did diff new old.  Not a major
 > problem, but it did take a few seconds to realize what had happened (I kept
 > looking for something nested inside the '?' case in the "new" code and
 > couldn't find it).

 > Anyway the code itself.
 > 
 > 		       /* Handle an add condition.  */
 > 		     case 'A':     /* 64 bit add */
 > 		       if (*s == ',' && *(s + 1) == '*')
 > 			 {
 > 			   cond_64 = 1;
 > 			   s += 2; /* Eat up the ,* */
 > 			 }
 > 		       else break;
 > 

[style comments snipped]

I'll change those around.  It's just the habits I'm used to.

  
 > I'm not particular happy with the way 'A' falls into 'a'.  It may be cleaner
 > to do
 > 
 > 	   case 'A':
 > 	   case 'a':
 > 	     if (*args == 'A')
 > 	       {
 > 		  Do the few "A" specific things
 > 	       }
 > 	     Do generic code for 'A' and 'a'.
 > 
 > The flow control (at least to me) is easier to follow with that kind of style
 > (it's still not ideal, but I'm not sure what else we can do to clean this up
 > without starting over with a complete redesign).

I saw that construction and I had thought what I did was preferable because it 
avoided a redundant test.  If you think it's better to write it that way, I'll 
change it.


 > These lines in the 'a' handling are indented improperly:

 > 		     opcode |= cmpltr << 13;
 > 		     INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);

 > They need to be moved two columns to the right.  Similar problems occur with
 > the '@' handling.

 > In the 'b' case the INSERT_FIELD_AND_CONTINUE needs to be moved to the left
 > two columns.

OK, I missed these when going back and reformatting.

 > Do not write "abort()", instead write "abort ()".  Seems like a nit, but we
 > need to try and be consistent with the coding standards.

 > You have some comments that wrap when viewed on an 80 column screen.  They
 > need to be cleaned up.

Done.

 > This code in 'b' does not work if we had previously come in from the 'B'
 > case and had found a 64bit completer completer.  *s will have already been
 > advanced past the ,*:

 >                     cmpltr = 0;
 >                     if (*s == ',')
 >                       {
 >                         s++;

Looking at my code, I realized I fixed this but forgot to put it into the
patch.  It'll go into the revamped patches.

 > I'm not sure the disassembler changes are right, particularly in how they
 > handle the 64bit stuff.  But then again,  I would claim we shouldn't be
 > trying to add the 64bit stuff as part of this patch anyway.

I'll take another look at it and see if I'm missing anything there.

 > Please break out the basic reorganization from the 64bit stuff.  Let's get
 > the reorgs done and installed, then we can add the 64bit stuff separately.

OK.  I'll go back and redo this into two patches.  I'll make sure the
completer prefix patch is cleaned up as well.

Welcome back.  Glad to see you now have a chance to breathe :-)

Jerry

-- 
Jerry Quinn                             Tel: (514) 761-8737
jquinn@nortelnetworks.com               Fax: (514) 761-8505
Speech Recognition Research

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Patch: add prefix to condition args in opcodes
  1999-07-28  3:19 ` Patch: add prefix to condition args in opcodes Jeffrey A Law
  1999-07-28  7:11   ` Jerry Quinn
@ 1999-07-28 10:12   ` Jerry Quinn
  1999-08-05 16:02     ` Jeffrey A Law
  1 sibling, 1 reply; 9+ messages in thread
From: Jerry Quinn @ 1999-07-28 10:12 UTC (permalink / raw)
  To: law; +Cc: binutils

Here's the revised condition arg prefix patch.  The 64 bit conditionals are
stripped out and I cleaned up the indentation and other style errors.

Jerry


Wed Jul 28 13:08:13 EDT 1999  Jerry Quinn <jquinn@nortelnetworks.com>

    * gas/config/tc-hppa.c (pa_ip): Change condition args to have '?' prefix.
    * include/opcode/hppa.h (pa_opcodes): Change condition args to use '?'
    prefix.
    * opcodes/hppa-dis.c (print_insn_hppa): Change condition args to use '?'
    prefix.


*** orig/gas/config/tc-hppa.c	Wed Jul  7 17:31:52 1999
--- gas-src/gas/config/tc-hppa.c	Wed Jul 28 11:29:20 1999
***************
*** 1714,2120 ****
  		INSERT_FIELD_AND_CONTINUE (opcode, a, 13);
  	      }
  
! 	    /* Handle a non-negated compare/stubtract condition.  */
! 	    case '<':
! 	      cmpltr = pa_parse_nonneg_cmpsub_cmpltr (&s, 1);
! 	      if (cmpltr < 0)
! 		{
! 		  as_bad (_("Invalid Compare/Subtract Condition: %c"), *s);
! 		  cmpltr = 0;
! 		}
! 	      INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
! 
! 	    /* Handle a negated or non-negated compare/subtract condition.  */
  	    case '?':
! 	      save_s = s;
! 	      cmpltr = pa_parse_nonneg_cmpsub_cmpltr (&s, 1);
! 	      if (cmpltr < 0)
! 		{
! 		  s = save_s;
! 		  cmpltr = pa_parse_neg_cmpsub_cmpltr (&s, 1);
! 		  if (cmpltr < 0)
! 		    {
! 		      as_bad (_("Invalid Compare/Subtract Condition."));
! 		      cmpltr = 0;
! 		    }
! 		  else
! 		    {
! 		      /* Negated condition requires an opcode change.  */
! 		      opcode |= 1 << 27;
! 		    }
! 		}
! 	
! 	      INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
! 
! 	    /* Handle non-negated add condition.  */
! 	    case '!':
! 	      cmpltr = pa_parse_nonneg_add_cmpltr (&s, 1);
! 	      if (cmpltr < 0)
! 		{
! 		  as_bad (_("Invalid Compare/Subtract Condition: %c"), *s);
! 		  cmpltr = 0;
! 		}
! 	      INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
! 
! 	    /* Handle a negated or non-negated add condition.  */
! 	    case '@':
! 	      save_s = s;
! 	      cmpltr = pa_parse_nonneg_add_cmpltr (&s, 1);
! 	      if (cmpltr < 0)
! 		{
! 		  s = save_s;
! 		  cmpltr = pa_parse_neg_add_cmpltr (&s, 1);
! 		  if (cmpltr < 0)
! 		    {
! 		      as_bad (_("Invalid Compare/Subtract Condition"));
! 		      cmpltr = 0;
! 		    }
! 		  else
! 		    {
! 		      /* Negated condition requires an opcode change.  */
! 		      opcode |= 1 << 27;
! 		    }
! 		}
! 	      INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
! 
! 	    /* Handle a compare/subtract condition.  */
! 	    case 'a':
! 	      cmpltr = 0;
! 	      flag = 0;
! 	      if (*s == ',')
! 		{
! 		  s++;
! 		  name = s;
! 		  while (*s != ',' && *s != ' ' && *s != '\t')
! 		    s += 1;
! 		  c = *s;
! 		  *s = 0x00;
! 		  if (strcmp (name, "=") == 0)
! 		    cmpltr = 1;
! 		  else if (strcmp (name, "<") == 0)
! 		    cmpltr = 2;
! 		  else if (strcmp (name, "<=") == 0)
! 		    cmpltr = 3;
! 		  else if (strcasecmp (name, "<<") == 0)
! 		    cmpltr = 4;
! 		  else if (strcasecmp (name, "<<=") == 0)
! 		    cmpltr = 5;
! 		  else if (strcasecmp (name, "sv") == 0)
! 		    cmpltr = 6;
! 		  else if (strcasecmp (name, "od") == 0)
! 		    cmpltr = 7;
! 		  else if (strcasecmp (name, "tr") == 0)
! 		    {
! 		      cmpltr = 0;
! 		      flag = 1;
! 		    }
! 		  else if (strcmp (name, "<>") == 0)
! 		    {
! 		      cmpltr = 1;
! 		      flag = 1;
! 		    }
! 		  else if (strcmp (name, ">=") == 0)
! 		    {
! 		      cmpltr = 2;
! 		      flag = 1;
! 		    }
! 		  else if (strcmp (name, ">") == 0)
! 		    {
! 		      cmpltr = 3;
! 		      flag = 1;
! 		    }
! 		  else if (strcasecmp (name, ">>=") == 0)
! 		    {
! 		      cmpltr = 4;
! 		      flag = 1;
! 		    }
! 		  else if (strcasecmp (name, ">>") == 0)
! 		    {
! 		      cmpltr = 5;
! 		      flag = 1;
! 		    }
! 		  else if (strcasecmp (name, "nsv") == 0)
! 		    {
! 		      cmpltr = 6;
! 		      flag = 1;
! 		    }
! 		  else if (strcasecmp (name, "ev") == 0)
! 		    {
! 		      cmpltr = 7;
! 		      flag = 1;
! 		    }
! 		  else
! 		    as_bad (_("Invalid Add Condition: %s"), name);
! 		  *s = c;
! 		}
! 	      opcode |= cmpltr << 13;
! 	      INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);
! 
! 	    /* Handle a non-negated add condition.  */
! 	    case 'd':
! 	      cmpltr = 0;
! 	      flag = 0;
! 	      if (*s == ',')
! 		{
! 		  s++;
! 		  name = s;
! 		  while (*s != ',' && *s != ' ' && *s != '\t')
! 		    s += 1;
! 		  c = *s;
! 		  *s = 0x00;
! 		  if (strcmp (name, "=") == 0)
! 		    cmpltr = 1;
! 		  else if (strcmp (name, "<") == 0)
! 		    cmpltr = 2;
! 		  else if (strcmp (name, "<=") == 0)
! 		    cmpltr = 3;
! 		  else if (strcasecmp (name, "nuv") == 0)
! 		    cmpltr = 4;
! 		  else if (strcasecmp (name, "znv") == 0)
! 		    cmpltr = 5;
! 		  else if (strcasecmp (name, "sv") == 0)
! 		    cmpltr = 6;
! 		  else if (strcasecmp (name, "od") == 0)
! 		    cmpltr = 7;
! 		  else if (strcasecmp (name, "tr") == 0)
! 		    {
! 		      cmpltr = 0;
! 		      flag = 1;
! 		    }
! 		  else if (strcmp (name, "<>") == 0)
! 		    {
! 		      cmpltr = 1;
! 		      flag = 1;
! 		    }
! 		  else if (strcmp (name, ">=") == 0)
! 		    {
! 		      cmpltr = 2;
! 		      flag = 1;
! 		    }
! 		  else if (strcmp (name, ">") == 0)
! 		    {
! 		      cmpltr = 3;
! 		      flag = 1;
! 		    }
! 		  else if (strcasecmp (name, "uv") == 0)
! 		    {
! 		      cmpltr = 4;
! 		      flag = 1;
! 		    }
! 		  else if (strcasecmp (name, "vnz") == 0)
! 		    {
! 		      cmpltr = 5;
! 		      flag = 1;
! 		    }
! 		  else if (strcasecmp (name, "nsv") == 0)
! 		    {
! 		      cmpltr = 6;
! 		      flag = 1;
! 		    }
! 		  else if (strcasecmp (name, "ev") == 0)
! 		    {
! 		      cmpltr = 7;
! 		      flag = 1;
! 		    }
! 		  else
! 		    as_bad (_("Invalid Add Condition: %s"), name);
! 		  *s = c;
! 		}
! 	      opcode |= cmpltr << 13;
! 	      INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);
! 
! 	    /* HANDLE a logical instruction condition.  */
! 	    case '&':
! 	      cmpltr = 0;
! 	      flag = 0;
! 	      if (*s == ',')
! 		{
! 		  s++;
! 		  name = s;
! 		  while (*s != ',' && *s != ' ' && *s != '\t')
! 		    s += 1;
! 		  c = *s;
! 		  *s = 0x00;
! 
! 
! 		  if (strcmp (name, "=") == 0)
! 		    cmpltr = 1;
! 		  else if (strcmp (name, "<") == 0)
! 		    cmpltr = 2;
! 		  else if (strcmp (name, "<=") == 0)
! 		    cmpltr = 3;
! 		  else if (strcasecmp (name, "od") == 0)
! 		    cmpltr = 7;
! 		  else if (strcasecmp (name, "tr") == 0)
! 		    {
! 		      cmpltr = 0;
! 		      flag = 1;
! 		    }
! 		  else if (strcmp (name, "<>") == 0)
! 		    {
! 		      cmpltr = 1;
! 		      flag = 1;
! 		    }
! 		  else if (strcmp (name, ">=") == 0)
! 		    {
! 		      cmpltr = 2;
! 		      flag = 1;
! 		    }
! 		  else if (strcmp (name, ">") == 0)
! 		    {
! 		      cmpltr = 3;
! 		      flag = 1;
! 		    }
! 		  else if (strcasecmp (name, "ev") == 0)
! 		    {
! 		      cmpltr = 7;
! 		      flag = 1;
! 		    }
! 		  else
! 		    as_bad (_("Invalid Logical Instruction Condition."));
! 		  *s = c;
! 		}
! 	      opcode |= cmpltr << 13;
! 	      INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);
! 
! 	    /* Handle a unit instruction condition.  */
! 	    case 'U':
! 	      cmpltr = 0;
! 	      flag = 0;
! 	      if (*s == ',')
! 		{
! 		  s++;
! 
! 
! 		  if (strncasecmp (s, "sbz", 3) == 0)
! 		    {
! 		      cmpltr = 2;
! 		      s += 3;
! 		    }
! 		  else if (strncasecmp (s, "shz", 3) == 0)
! 		    {
! 		      cmpltr = 3;
! 		      s += 3;
! 		    }
! 		  else if (strncasecmp (s, "sdc", 3) == 0)
! 		    {
! 		      cmpltr = 4;
! 		      s += 3;
! 		    }
! 		  else if (strncasecmp (s, "sbc", 3) == 0)
! 		    {
! 		      cmpltr = 6;
! 		      s += 3;
! 		    }
! 		  else if (strncasecmp (s, "shc", 3) == 0)
! 		    {
! 		      cmpltr = 7;
! 		      s += 3;
! 		    }
! 		  else if (strncasecmp (s, "tr", 2) == 0)
! 		    {
! 		      cmpltr = 0;
! 		      flag = 1;
! 		      s += 2;
! 		    }
! 		  else if (strncasecmp (s, "nbz", 3) == 0)
! 		    {
! 		      cmpltr = 2;
! 		      flag = 1;
! 		      s += 3;
! 		    }
! 		  else if (strncasecmp (s, "nhz", 3) == 0)
! 		    {
! 		      cmpltr = 3;
! 		      flag = 1;
! 		      s += 3;
! 		    }
! 		  else if (strncasecmp (s, "ndc", 3) == 0)
! 		    {
! 		      cmpltr = 4;
! 		      flag = 1;
! 		      s += 3;
! 		    }
! 		  else if (strncasecmp (s, "nbc", 3) == 0)
! 		    {
! 		      cmpltr = 6;
! 		      flag = 1;
! 		      s += 3;
! 		    }
! 		  else if (strncasecmp (s, "nhc", 3) == 0)
! 		    {
! 		      cmpltr = 7;
! 		      flag = 1;
! 		      s += 3;
! 		    }
! 		  else
! 		    as_bad (_("Invalid Logical Instruction Condition."));
! 		}
! 	      opcode |= cmpltr << 13;
! 	      INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);
! 
! 	    /* Handle a shift/extract/deposit condition.  */
! 	    case '|':
! 	    case '>':
! 	      cmpltr = 0;
! 	      if (*s == ',')
! 		{
! 		  save_s = s++;
! 
! 
! 		  name = s;
! 		  while (*s != ',' && *s != ' ' && *s != '\t')
! 		    s += 1;
! 		  c = *s;
! 		  *s = 0x00;
! 		  if (strcmp (name, "=") == 0)
! 		    cmpltr = 1;
! 		  else if (strcmp (name, "<") == 0)
! 		    cmpltr = 2;
! 		  else if (strcasecmp (name, "od") == 0)
! 		    cmpltr = 3;
! 		  else if (strcasecmp (name, "tr") == 0)
! 		    cmpltr = 4;
! 		  else if (strcmp (name, "<>") == 0)
! 		    cmpltr = 5;
! 		  else if (strcmp (name, ">=") == 0)
! 		    cmpltr = 6;
! 		  else if (strcasecmp (name, "ev") == 0)
! 		    cmpltr = 7;
! 		  /* Handle movb,n.  Put things back the way they were.
! 		     This includes moving s back to where it started.  */
! 		  else if (strcasecmp (name, "n") == 0 && *args == '|')
! 		    {
! 		      *s = c;
! 		      s = save_s;
! 		      continue;
! 		    }
! 		  else
! 		    as_bad (_("Invalid Shift/Extract/Deposit Condition."));
! 		  *s = c;
! 		}
! 	      INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
! 
! 	    /* Handle bvb and bb conditions.  */
! 	    case '~':
! 	      cmpltr = 0;
! 	      if (*s == ',')
! 		{
! 		  s++;
! 		  if (strncmp (s, "<", 1) == 0)
! 		    {
! 		      cmpltr = 0;
! 		      s++;
! 		    }
! 		  else if (strncmp (s, ">=", 2) == 0)
! 		    {
! 		      cmpltr = 1;
! 		      s += 2;
! 		    }
! 		  else
! 		    as_bad (_("Invalid Bit Branch Condition: %c"), *s);
! 		}
! 	      INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 15);
  
  	    /* Handle a system control completer.  */
  	    case 'Z':
--- 1714,2137 ----
  		INSERT_FIELD_AND_CONTINUE (opcode, a, 13);
  	      }
  
! 	    /* Handle all conditions.  */
  	    case '?':
! 	      {
! 		args++;
! 		switch (*args)
! 		  {
!  		  /* Handle FP compare conditions.  */
!  		  case 'f':
!  		    cond = pa_parse_fp_cmp_cond (&s);
!  		    INSERT_FIELD_AND_CONTINUE (opcode, cond, 0);
! 
! 		  /* Handle an add condition.  */
! 		  case 'a':
!  		    cmpltr = 0;
!  		    flag = 0;
! 		    if (*s == ',')
! 		      {
! 			s++;
! 			name = s;
! 			while (*s != ',' && *s != ' ' && *s != '\t')
! 			  s += 1;
! 			c = *s;
! 			*s = 0x00;
! 			if (strcmp (name, "=") == 0)
! 			  cmpltr = 1;
! 			else if (strcmp (name, "<") == 0)
! 			  cmpltr = 2;
! 			else if (strcmp (name, "<=") == 0)
! 			  cmpltr = 3;
! 			else if (strcasecmp (name, "nuv") == 0)
! 			  cmpltr = 4;
! 			else if (strcasecmp (name, "znv") == 0)
! 			  cmpltr = 5;
! 			else if (strcasecmp (name, "sv") == 0)
! 			  cmpltr = 6;
! 			else if (strcasecmp (name, "od") == 0)
! 			  cmpltr = 7;
! 			else if (strcasecmp (name, "tr") == 0)
! 			  {
! 			    cmpltr = 0;
! 			    flag = 1;
! 			  }
! 			else if (strcmp (name, "<>") == 0)
! 			  {
! 			    cmpltr = 1;
! 			    flag = 1;
! 			  }
! 			else if (strcmp (name, ">=") == 0)
! 			  {
! 			    cmpltr = 2;
! 			    flag = 1;
! 			  }
! 			else if (strcmp (name, ">") == 0)
! 			  {
! 			    cmpltr = 3;
! 			    flag = 1;
! 			  }
! 			else if (strcasecmp (name, "uv") == 0)
! 			  {
! 			    cmpltr = 4;
! 			    flag = 1;
! 			  }
! 			else if (strcasecmp (name, "vnz") == 0)
! 			  {
! 			    cmpltr = 5;
! 			    flag = 1;
! 			  }
! 			else if (strcasecmp (name, "nsv") == 0)
! 			  {
! 			    cmpltr = 6;
! 			    flag = 1;
! 			  }
! 			else if (strcasecmp (name, "ev") == 0)
! 			  {
! 			    cmpltr = 7;
! 			    flag = 1;
! 			  }
! 			else
! 			  as_bad (_("Invalid Add Condition: %s"), name);
! 			*s = c;
! 		      }
! 		    opcode |= cmpltr << 13;
! 		    INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);
! 
! 		  /* Handle non-negated add and branch condition.  */
! 		  case 'd':
! 		    cmpltr = pa_parse_nonneg_add_cmpltr (&s, 1);
! 		    if (cmpltr < 0)
! 		      {
! 			as_bad (_("Invalid Compare/Subtract Condition: %c"), *s);
! 			cmpltr = 0;
! 		      }
! 		    INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
! 
! 		  /* Handle a negated or non-negated add and branch 
! 		     condition.  */
! 		  case '@':
! 		    save_s = s;
! 		    cmpltr = pa_parse_nonneg_add_cmpltr (&s, 1);
! 		    if (cmpltr < 0)
! 		      {
! 			s = save_s;
! 			cmpltr = pa_parse_neg_add_cmpltr (&s, 1);
! 			if (cmpltr < 0)
! 			  {
! 			    as_bad (_("Invalid Compare/Subtract Condition"));
! 			    cmpltr = 0;
! 			  }
! 			else
! 			  {
! 			    /* Negated condition requires an opcode change. */
! 			    opcode |= 1 << 27;
! 			  }
! 		      }
! 		    INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
! 
! 		  /* Handle branch on bit conditions.  */
! 		  case 'b':
! 		    cmpltr = 0;
! 		    if (*s == ',')
! 		      {
! 			s++;
! 			if (strncmp (s, "<", 1) == 0)
! 			  {
! 			    cmpltr = 0;
! 			    s++;
! 			  }
! 			else if (strncmp (s, ">=", 2) == 0)
! 			  {
! 			    cmpltr = 1;
! 			    s += 2;
! 			  }
! 			else
! 			  as_bad (_("Invalid Bit Branch Condition: %c"), *s);
! 		      }
! 		    INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 15);
! 
! 		  /* Handle a compare/subtract condition.  */
! 		  case 's':
! 		    cmpltr = 0;
! 		    flag = 0;
! 		    if (*s == ',')
! 		      {
! 			s++;
! 			name = s;
! 			while (*s != ',' && *s != ' ' && *s != '\t')
! 			  s += 1;
! 			c = *s;
! 			*s = 0x00;
! 			if (strcmp (name, "=") == 0)
! 			  cmpltr = 1;
! 			else if (strcmp (name, "<") == 0)
! 			  cmpltr = 2;
! 			else if (strcmp (name, "<=") == 0)
! 			  cmpltr = 3;
! 			else if (strcasecmp (name, "<<") == 0)
! 			  cmpltr = 4;
! 			else if (strcasecmp (name, "<<=") == 0)
! 			  cmpltr = 5;
! 			else if (strcasecmp (name, "sv") == 0)
! 			  cmpltr = 6;
! 			else if (strcasecmp (name, "od") == 0)
! 			  cmpltr = 7;
! 			else if (strcasecmp (name, "tr") == 0)
! 			  {
! 			    cmpltr = 0;
! 			    flag = 1;
! 			  }
! 			else if (strcmp (name, "<>") == 0)
! 			  {
! 			    cmpltr = 1;
! 			    flag = 1;
! 			  }
! 			else if (strcmp (name, ">=") == 0)
! 			  {
! 			    cmpltr = 2;
! 			    flag = 1;
! 			  }
! 			else if (strcmp (name, ">") == 0)
! 			  {
! 			    cmpltr = 3;
! 			    flag = 1;
! 			  }
! 			else if (strcasecmp (name, ">>=") == 0)
! 			  {
! 			    cmpltr = 4;
! 			    flag = 1;
! 			  }
! 			else if (strcasecmp (name, ">>") == 0)
! 			  {
! 			    cmpltr = 5;
! 			    flag = 1;
! 			  }
! 			else if (strcasecmp (name, "nsv") == 0)
! 			  {
! 			    cmpltr = 6;
! 			    flag = 1;
! 			  }
! 			else if (strcasecmp (name, "ev") == 0)
! 			  {
! 			    cmpltr = 7;
! 			    flag = 1;
! 			  }
! 			else
! 			  as_bad (_("Invalid Compare/Subtract Condition: %s"),
! 				  name);
! 			*s = c;
! 		      }
! 		    opcode |= cmpltr << 13;
! 		    INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);
! 
! 		  /* Handle a non-negated compare condition.  */
! 		  case 't':
! 		    cmpltr = pa_parse_nonneg_cmpsub_cmpltr (&s, 1);
! 		    if (cmpltr < 0)
! 		      {
! 			as_bad (_("Invalid Compare/Subtract Condition: %c"), *s);
! 			cmpltr = 0;
! 		      }
! 		    INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
!   
! 		  /* Handle a negated or non-negated compare/subtract
! 		     condition.  */
! 		  case 'n':
! 		    save_s = s;
! 		    cmpltr = pa_parse_nonneg_cmpsub_cmpltr (&s, 1);
! 		    if (cmpltr < 0)
! 		      {
! 			s = save_s;
! 			cmpltr = pa_parse_neg_cmpsub_cmpltr (&s, 1);
! 			if (cmpltr < 0)
! 			  {
! 			    as_bad (_("Invalid Compare/Subtract Condition."));
! 			    cmpltr = 0;
! 			  }
! 			else
! 			  {
! 			    /* Negated condition requires an opcode change. */
! 			    opcode |= 1 << 27;
! 			  }
! 		      }
! 	    
! 		    INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
! 
! 		    /* Handle a logical instruction condition.  */
! 		  case 'l':
! 		    cmpltr = 0;
! 		    flag = 0;
! 		    if (*s == ',')
! 		      {
! 			s++;
! 			name = s;
! 			while (*s != ',' && *s != ' ' && *s != '\t')
! 			  s += 1;
! 			c = *s;
! 			*s = 0x00;
! 	    
! 	    
! 			if (strcmp (name, "=") == 0)
! 			  cmpltr = 1;
! 			else if (strcmp (name, "<") == 0)
! 			  cmpltr = 2;
! 			else if (strcmp (name, "<=") == 0)
! 			  cmpltr = 3;
! 			else if (strcasecmp (name, "od") == 0)
! 			  cmpltr = 7;
! 			else if (strcasecmp (name, "tr") == 0)
! 			  {
! 			    cmpltr = 0;
! 			    flag = 1;
! 			  }
! 			else if (strcmp (name, "<>") == 0)
! 			  {
! 			    cmpltr = 1;
! 			    flag = 1;
! 			  }
! 			else if (strcmp (name, ">=") == 0)
! 			  {
! 			    cmpltr = 2;
! 			    flag = 1;
! 			  }
! 			else if (strcmp (name, ">") == 0)
! 			  {
! 			    cmpltr = 3;
! 			    flag = 1;
! 			  }
! 			else if (strcasecmp (name, "ev") == 0)
! 			  {
! 			    cmpltr = 7;
! 			    flag = 1;
! 			  }
! 			else
! 			  as_bad (_("Invalid Logical Instruction Condition."));
! 			*s = c;
! 		      }
! 		    opcode |= cmpltr << 13;
! 		    INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);
! 
! 		  /* Handle a shift/extract/deposit condition.  */
! 		  case 'x':
! 		  case 'y':
! 		    cmpltr = 0;
! 		    if (*s == ',')
! 		      {
! 			save_s = s++;
! 
! 			name = s;
! 			while (*s != ',' && *s != ' ' && *s != '\t')
! 			  s += 1;
! 			c = *s;
! 			*s = 0x00;
! 			if (strcmp (name, "=") == 0)
! 			  cmpltr = 1;
! 			else if (strcmp (name, "<") == 0)
! 			  cmpltr = 2;
! 			else if (strcasecmp (name, "od") == 0)
! 			  cmpltr = 3;
! 			else if (strcasecmp (name, "tr") == 0)
! 			  cmpltr = 4;
! 			else if (strcmp (name, "<>") == 0)
! 			  cmpltr = 5;
! 			else if (strcmp (name, ">=") == 0)
! 			  cmpltr = 6;
! 			else if (strcasecmp (name, "ev") == 0)
! 			  cmpltr = 7;
! 			/* Handle movb,n.  Put things back the way they were.
! 			   This includes moving s back to where it started.  */
! 			else if (strcasecmp (name, "n") == 0 && *args == 'y')
! 			  {
! 			    *s = c;
! 			    s = save_s;
! 			    continue;
! 			  }
! 			else
! 			  as_bad (_("Invalid Shift/Extract/Deposit Condition."));
! 			*s = c;
! 		      }
! 		    INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
! 
! 		  /* Handle a unit instruction condition.  */
! 		  case 'u':	/* unit */
! 		    cmpltr = 0;
! 		    flag = 0;
! 		    if (*s == ',')
! 		      {
! 			s++;
! 	    
! 			if (strncasecmp (s, "sbz", 3) == 0)
! 			  {
! 			    cmpltr = 2;
! 			    s += 3;
! 			  }
! 			else if (strncasecmp (s, "shz", 3) == 0)
! 			  {
! 			    cmpltr = 3;
! 			    s += 3;
! 			  }
! 			else if (strncasecmp (s, "sdc", 3) == 0)
! 			  {
! 			    cmpltr = 4;
! 			    s += 3;
! 			  }
! 			else if (strncasecmp (s, "sbc", 3) == 0)
! 			  {
! 			    cmpltr = 6;
! 			    s += 3;
! 			  }
! 			else if (strncasecmp (s, "shc", 3) == 0)
! 			  {
! 			    cmpltr = 7;
! 			    s += 3;
! 			  }
! 			else if (strncasecmp (s, "tr", 2) == 0)
! 			  {
! 			    cmpltr = 0;
! 			    flag = 1;
! 			    s += 2;
! 			  }
! 			else if (strncasecmp (s, "nbz", 3) == 0)
! 			  {
! 			    cmpltr = 2;
! 			    flag = 1;
! 			    s += 3;
! 			  }
! 			else if (strncasecmp (s, "nhz", 3) == 0)
! 			  {
! 			    cmpltr = 3;
! 			    flag = 1;
! 			    s += 3;
! 			  }
! 			else if (strncasecmp (s, "ndc", 3) == 0)
! 			  {
! 			    cmpltr = 4;
! 			    flag = 1;
! 			    s += 3;
! 			  }
! 			else if (strncasecmp (s, "nbc", 3) == 0)
! 			  {
! 			    cmpltr = 6;
! 			    flag = 1;
! 			    s += 3;
! 			  }
! 			else if (strncasecmp (s, "nhc", 3) == 0)
! 			  {
! 			    cmpltr = 7;
! 			    flag = 1;
! 			    s += 3;
! 			  }
! 			else
! 			  as_bad (_("Invalid Unit Instruction Condition."));
! 		      }
! 		    opcode |= cmpltr << 13;
! 		    INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);
! 
! 		  default:
! 		    abort ();
! 		  }
! 	      }
  
  	    /* Handle a system control completer.  */
  	    case 'Z':
***************
*** 2426,2436 ****
  	      flag = pa_parse_fp_format (&s);
  	      the_insn.fpof2 = flag;
  	      INSERT_FIELD_AND_CONTINUE (opcode, flag, 13);
- 
- 	    /* Handle FP compare conditions.  */
- 	    case 'M':
- 	      cond = pa_parse_fp_cmp_cond (&s);
- 	      INSERT_FIELD_AND_CONTINUE (opcode, cond, 0);
  
  	    /* Handle L/R register halves like 't'.  */
  	    case 'v':
--- 2443,2448 ----
*** orig/include/opcode/hppa.h	Wed Jul  7 17:32:08 1999
--- gas-src/include/opcode/hppa.h	Wed Jul 28 11:39:34 1999
***************
*** 57,64 ****
     particular opcode in order for an instruction to be an instance
     of that opcode.
  
!    The args component is a string containing one character
!    for each operand of the instruction.
  
     Bit positions in this description follow HP usage of lsb = 31,
     "at" is lsb of field.
--- 57,65 ----
     particular opcode in order for an instruction to be an instance
     of that opcode.
  
!    The args component is a string containing one character for each operand of
!    the instruction.  Characters used as a prefix allow any second character to
!    be used without conflicting with the main operand characters.
  
     Bit positions in this description follow HP usage of lsb = 31,
     "at" is lsb of field.
***************
*** 69,77 ****
  
     In the args field, the following characters are unused:
  
! 	'  "#$%    *+- ./          :;    '
! 	'                          [\]  '
! 	'                          { } '
  
     Here are all the characters:
  
--- 70,78 ----
  
     In the args field, the following characters are unused:
  
! 	' !"#$%&   *+- ./          :;< > @'
! 	'            M       U     [\]  '
! 	'a  d                      {|}~'
  
     Here are all the characters:
  
***************
*** 90,102 ****
     c    indexed load completer.
     C    short load and store completer.
     Y	Store Bytes Short completer
-    <    non-negated compare/subtract conditions.
-    a	compare/subtract conditions
-    d    non-negated add conditions
-    &    logical instruction conditions
-    U    unit instruction conditions
-    >    shift/extract/deposit conditions.
-    ~    bvb,bb conditions
     V    5 bit immediate value at 31
     i    11 bit immediate value at 31
     j    14 bit immediate value at 31
--- 91,96 ----
***************
*** 107,112 ****
--- 101,127 ----
     W    17 bit branch displacement (PC relative)
     z    17 bit branch displacement (just a number, not an address)
  
+ Condition operands all have '?' as the prefix:
+ 
+    ?f   Floating point compare conditions (encoded as 5 bits at 31)
+ 
+    ?a	add conditions
+    ?d	non-negated add branch conditions
+    ?@   add branch conditions followed by nullify
+ 
+    ?s   compare/subtract conditions
+    ?t   non-negated compare conditions
+    ?n   compare conditions followed by nullify
+ 
+    ?l   logical conditions
+    ?b   branch on bit conditions
+ 
+    ?x   shift/extract/deposit conditions
+    ?y   shift/extract/deposit conditions followed by nullify for conditional
+         branches
+ 
+    ?u   unit conditions
+ 
  Also these:
  
     p    5 bit shift count at 26 (to support the SHD instruction) encoded as
***************
*** 133,142 ****
     I    Source Floating Point Operand Format Completer encoded 1 bits at 20
  	(for 0xe format FP instructions)
     G    Destination Floating Point Operand Format Completer encoded 2 bits at 18
-    M    Floating-Point Compare Conditions (encoded as 5 bits at 31)
-    ?    non-negated/negated compare/subtract conditions.
-    @    non-negated/negated add conditions.
-    !    non-negated add conditions.
  
     s    2 bit space specifier at 17.
     b    register field at 10.
--- 148,153 ----
***************
*** 148,154 ****
     Q	5 bit immediate value at 10 (a bit position specified in
  	the bb instruction. It's the same as r above, except the
          value is in a different location)
-    |	shift/extract/deposit conditions when used in a conditional branch
  
  And these (PJH) for PA-89 F.P. registers and instructions:
  
--- 159,164 ----
***************
*** 163,170 ****
     8    5 bit register field at 20 (used in 'fmpyadd' and 'fmpysub')
     9    5 bit register field at 25 (used in 'fmpyadd' and 'fmpysub')
     H    Floating Point Operand Format at 26 for 'fmpyadd' and 'fmpysub'
!         (very similar to 'F')
! */
  
  
  /* List of characters not to put a space after.  Note that
--- 173,179 ----
     8    5 bit register field at 20 (used in 'fmpyadd' and 'fmpysub')
     9    5 bit register field at 25 (used in 'fmpyadd' and 'fmpysub')
     H    Floating Point Operand Format at 26 for 'fmpyadd' and 'fmpysub'
!         (very similar to 'F') */
  
  
  /* List of characters not to put a space after.  Note that
***************
*** 187,208 ****
  
  { "b",		0xe8000000, 0xffe0e000, "nW", pa10}, /* bl foo,r0 */
  { "ldi",	0x34000000, 0xffe0c000, "j,x", pa10},	/* ldo val(r0),r */
! { "comib", 	0x84000000, 0xfc000000, "?n5,b,w", pa10}, /* comib{tf}*/
  /* This entry is for the disassembler only.  It will never be used by
     assembler.  */
! { "comib", 	0x8c000000, 0xfc000000, "?n5,b,w", pa10}, /* comib{tf}*/
! { "comb",	0x80000000, 0xfc000000, "?nx,b,w", pa10}, /* comb{tf} */
  /* This entry is for the disassembler only.  It will never be used by
     assembler.  */
! { "comb",	0x88000000, 0xfc000000, "?nx,b,w", pa10}, /* comb{tf} */
! { "addb",	0xa0000000, 0xfc000000, "@nx,b,w", pa10}, /* addb{tf} */
  /* This entry is for the disassembler only.  It will never be used by
     assembler.  */
! { "addb",	0xa8000000, 0xfc000000, "@nx,b,w", pa10},
! { "addib",	0xa4000000, 0xfc000000, "@n5,b,w", pa10}, /* addib{tf}*/
  /* This entry is for the disassembler only.  It will never be used by
     assembler.  */
! { "addib",	0xac000000, 0xfc000000, "@n5,b,w", pa10}, /* addib{tf}*/
  { "nop",        0x08000240, 0xffffffff, "", pa10},      /* or 0,0,0 */
  { "copy",       0x08000240, 0xffe0ffe0, "x,t", pa10},   /* or r,0,t */
  { "mtsar",      0x01601840, 0xffe0ffff, "x", pa10}, /* mtctl r,cr11 */
--- 196,217 ----
  
  { "b",		0xe8000000, 0xffe0e000, "nW", pa10}, /* bl foo,r0 */
  { "ldi",	0x34000000, 0xffe0c000, "j,x", pa10},	/* ldo val(r0),r */
! { "comib", 	0x84000000, 0xfc000000, "?nn5,b,w", pa10}, /* comib{tf}*/
  /* This entry is for the disassembler only.  It will never be used by
     assembler.  */
! { "comib", 	0x8c000000, 0xfc000000, "?nn5,b,w", pa10}, /* comib{tf}*/
! { "comb",	0x80000000, 0xfc000000, "?nnx,b,w", pa10}, /* comb{tf} */
  /* This entry is for the disassembler only.  It will never be used by
     assembler.  */
! { "comb",	0x88000000, 0xfc000000, "?nnx,b,w", pa10}, /* comb{tf} */
! { "addb",	0xa0000000, 0xfc000000, "?@nx,b,w", pa10}, /* addb{tf} */
  /* This entry is for the disassembler only.  It will never be used by
     assembler.  */
! { "addb",	0xa8000000, 0xfc000000, "?@nx,b,w", pa10},
! { "addib",	0xa4000000, 0xfc000000, "?@n5,b,w", pa10}, /* addib{tf}*/
  /* This entry is for the disassembler only.  It will never be used by
     assembler.  */
! { "addib",	0xac000000, 0xfc000000, "?@n5,b,w", pa10}, /* addib{tf}*/
  { "nop",        0x08000240, 0xffffffff, "", pa10},      /* or 0,0,0 */
  { "copy",       0x08000240, 0xffe0ffe0, "x,t", pa10},   /* or r,0,t */
  { "mtsar",      0x01601840, 0xffe0ffff, "x", pa10}, /* mtctl r,cr11 */
***************
*** 265,341 ****
  { "bv",		0xe800c000, 0xfc00fffd, "n(b)", pa10},
  { "be",		0xe0000000, 0xfc000000, "nz(S,b)", pa10},
  { "ble",	0xe4000000, 0xfc000000, "nz(S,b)", pa10},
! { "movb",	0xc8000000, 0xfc000000, "|nx,b,w", pa10},
! { "movib",	0xcc000000, 0xfc000000, "|n5,b,w", pa10},
! { "combt",	0x80000000, 0xfc000000, "<nx,b,w", pa10},
! { "combf",	0x88000000, 0xfc000000, "<nx,b,w", pa10},
! { "comibt",	0x84000000, 0xfc000000, "<n5,b,w", pa10},
! { "comibf",	0x8c000000, 0xfc000000, "<n5,b,w", pa10},
! { "addbt",	0xa0000000, 0xfc000000, "!nx,b,w", pa10},
! { "addbf",	0xa8000000, 0xfc000000, "!nx,b,w", pa10},
! { "addibt",	0xa4000000, 0xfc000000, "!n5,b,w", pa10},
! { "addibf",	0xac000000, 0xfc000000, "!n5,b,w", pa10},
! { "bb",		0xc4004000, 0xfc004000, "~nx,Q,w", pa10}, 
! { "bvb",	0xc0004000, 0xffe04000, "~nx,w", pa10},
  { "clrbts",	0xe8004005, 0xffffffff, "", pa20},
  
  /* Computation Instructions */
  
! { "comclr",     0x08000880, 0xfc000fe0, "ax,b,t", pa10},
! { "or",         0x08000240, 0xfc000fe0, "&x,b,t", pa10},
! { "xor",        0x08000280, 0xfc000fe0, "&x,b,t", pa10},
! { "and",        0x08000200, 0xfc000fe0, "&x,b,t", pa10},
! { "andcm",      0x08000000, 0xfc000fe0, "&x,b,t", pa10},
! { "uxor",       0x08000380, 0xfc000fe0, "Ux,b,t", pa10},
! { "uaddcm",     0x08000980, 0xfc000fe0, "Ux,b,t", pa10},
! { "uaddcmt",    0x080009c0, 0xfc000fe0, "Ux,b,t", pa10},
! { "dcor",       0x08000b80, 0xfc1f0fe0, "Ub,t",   pa10},
! { "idcor",      0x08000bc0, 0xfc1f0fe0, "Ub,t",   pa10},
! { "addi",       0xb4000000, 0xfc000800, "di,b,x", pa10},
! { "addio",      0xb4000800, 0xfc000800, "di,b,x", pa10},
! { "addit",      0xb0000000, 0xfc000800, "di,b,x", pa10},
! { "addito",     0xb0000800, 0xfc000800, "di,b,x", pa10},
! { "add",        0x08000600, 0xfc000fe0, "dx,b,t", pa10},
! { "addl",       0x08000a00, 0xfc000fe0, "dx,b,t", pa10},
! { "addo",       0x08000e00, 0xfc000fe0, "dx,b,t", pa10},
! { "addc",       0x08000700, 0xfc000fe0, "dx,b,t", pa10},
! { "addco",      0x08000f00, 0xfc000fe0, "dx,b,t", pa10},
! { "sub",        0x08000400, 0xfc000fe0, "ax,b,t", pa10},
! { "subo",       0x08000c00, 0xfc000fe0, "ax,b,t", pa10},
! { "subb",       0x08000500, 0xfc000fe0, "ax,b,t", pa10},
! { "subbo",      0x08000d00, 0xfc000fe0, "ax,b,t", pa10},
! { "subt",       0x080004c0, 0xfc000fe0, "ax,b,t", pa10},
! { "subto",      0x08000cc0, 0xfc000fe0, "ax,b,t", pa10},
! { "ds",         0x08000440, 0xfc000fe0, "ax,b,t", pa10},
! { "subi",       0x94000000, 0xfc000800, "ai,b,x", pa10},
! { "subio",      0x94000800, 0xfc000800, "ai,b,x", pa10},
! { "comiclr",    0x90000000, 0xfc000800, "ai,b,x", pa10},
! { "sh1add",     0x08000640, 0xfc000fe0, "dx,b,t", pa10},
! { "sh1addl",    0x08000a40, 0xfc000fe0, "dx,b,t", pa10},
! { "sh1addo",    0x08000e40, 0xfc000fe0, "dx,b,t", pa10},
! { "sh2add",     0x08000680, 0xfc000fe0, "dx,b,t", pa10},
! { "sh2addl",    0x08000a80, 0xfc000fe0, "dx,b,t", pa10},
! { "sh2addo",    0x08000e80, 0xfc000fe0, "dx,b,t", pa10},
! { "sh3add",     0x080006c0, 0xfc000fe0, "dx,b,t", pa10},
! { "sh3addl",    0x08000ac0, 0xfc000fe0, "dx,b,t", pa10},
! { "sh3addo",    0x08000ec0, 0xfc000fe0, "dx,b,t", pa10},
  
  /* Extract and Deposit Instructions */
  
! { "vshd",       0xd0000000, 0xfc001fe0, ">x,b,t", pa10},
! { "shd",        0xd0000800, 0xfc001c00, ">x,b,p,t", pa10},
! { "vextru",     0xd0001000, 0xfc001fe0, ">b,T,x", pa10},
! { "vextrs",     0xd0001400, 0xfc001fe0, ">b,T,x", pa10},
! { "extru",      0xd0001800, 0xfc001c00, ">b,P,T,x", pa10},
! { "extrs",      0xd0001c00, 0xfc001c00, ">b,P,T,x", pa10},
! { "zvdep",      0xd4000000, 0xfc001fe0, ">x,T,b", pa10},
! { "vdep",       0xd4000400, 0xfc001fe0, ">x,T,b", pa10},
! { "zdep",       0xd4000800, 0xfc001c00, ">x,p,T,b", pa10},
! { "dep",        0xd4000c00, 0xfc001c00, ">x,p,T,b", pa10},
! { "zvdepi",     0xd4001000, 0xfc001fe0, ">5,T,b", pa10},
! { "vdepi",      0xd4001400, 0xfc001fe0, ">5,T,b", pa10},
! { "zdepi",      0xd4001800, 0xfc001c00, ">5,p,T,b", pa10},
! { "depi",       0xd4001c00, 0xfc001c00, ">5,p,T,b", pa10},
  
  /* System Control Instructions */
  
--- 274,350 ----
  { "bv",		0xe800c000, 0xfc00fffd, "n(b)", pa10},
  { "be",		0xe0000000, 0xfc000000, "nz(S,b)", pa10},
  { "ble",	0xe4000000, 0xfc000000, "nz(S,b)", pa10},
! { "movb",	0xc8000000, 0xfc000000, "?ynx,b,w", pa10},
! { "movib",	0xcc000000, 0xfc000000, "?yn5,b,w", pa10},
! { "combt",	0x80000000, 0xfc000000, "?tnx,b,w", pa10},
! { "combf",	0x88000000, 0xfc000000, "?tnx,b,w", pa10},
! { "comibt",	0x84000000, 0xfc000000, "?tn5,b,w", pa10},
! { "comibf",	0x8c000000, 0xfc000000, "?tn5,b,w", pa10},
! { "addbt",	0xa0000000, 0xfc000000, "?dnx,b,w", pa10},
! { "addbf",	0xa8000000, 0xfc000000, "?dnx,b,w", pa10},
! { "addibt",	0xa4000000, 0xfc000000, "?dn5,b,w", pa10},
! { "addibf",	0xac000000, 0xfc000000, "?dn5,b,w", pa10},
! { "bb",		0xc4004000, 0xfc004000, "?bnx,Q,w", pa10}, 
! { "bvb",	0xc0004000, 0xffe04000, "?bnx,w", pa10},
  { "clrbts",	0xe8004005, 0xffffffff, "", pa20},
  
  /* Computation Instructions */
  
! { "comclr",     0x08000880, 0xfc000fe0, "?sx,b,t", pa10},
! { "or",         0x08000240, 0xfc000fe0, "?lx,b,t", pa10},
! { "xor",        0x08000280, 0xfc000fe0, "?lx,b,t", pa10},
! { "and",        0x08000200, 0xfc000fe0, "?lx,b,t", pa10},
! { "andcm",      0x08000000, 0xfc000fe0, "?lx,b,t", pa10},
! { "uxor",       0x08000380, 0xfc000fe0, "?ux,b,t", pa10},
! { "uaddcm",     0x08000980, 0xfc000fe0, "?ux,b,t", pa10},
! { "uaddcmt",    0x080009c0, 0xfc000fe0, "?ux,b,t", pa10},
! { "dcor",       0x08000b80, 0xfc1f0fe0, "?ub,t",   pa10},
! { "idcor",      0x08000bc0, 0xfc1f0fe0, "?ub,t",   pa10},
! { "addi",       0xb4000000, 0xfc000800, "?ai,b,x", pa10},
! { "addio",      0xb4000800, 0xfc000800, "?ai,b,x", pa10},
! { "addit",      0xb0000000, 0xfc000800, "?ai,b,x", pa10},
! { "addito",     0xb0000800, 0xfc000800, "?ai,b,x", pa10},
! { "add",        0x08000600, 0xfc000fe0, "?ax,b,t", pa10},
! { "addl",       0x08000a00, 0xfc000fe0, "?ax,b,t", pa10},
! { "addo",       0x08000e00, 0xfc000fe0, "?ax,b,t", pa10},
! { "addc",       0x08000700, 0xfc000fe0, "?ax,b,t", pa10},
! { "addco",      0x08000f00, 0xfc000fe0, "?ax,b,t", pa10},
! { "sub",        0x08000400, 0xfc000fe0, "?sx,b,t", pa10},
! { "subo",       0x08000c00, 0xfc000fe0, "?sx,b,t", pa10},
! { "subb",       0x08000500, 0xfc000fe0, "?sx,b,t", pa10},
! { "subbo",      0x08000d00, 0xfc000fe0, "?sx,b,t", pa10},
! { "subt",       0x080004c0, 0xfc000fe0, "?sx,b,t", pa10},
! { "subto",      0x08000cc0, 0xfc000fe0, "?sx,b,t", pa10},
! { "ds",         0x08000440, 0xfc000fe0, "?sx,b,t", pa10},
! { "subi",       0x94000000, 0xfc000800, "?si,b,x", pa10},
! { "subio",      0x94000800, 0xfc000800, "?si,b,x", pa10},
! { "comiclr",    0x90000000, 0xfc000800, "?si,b,x", pa10},
! { "sh1add",     0x08000640, 0xfc000fe0, "?ax,b,t", pa10},
! { "sh1addl",    0x08000a40, 0xfc000fe0, "?ax,b,t", pa10},
! { "sh1addo",    0x08000e40, 0xfc000fe0, "?ax,b,t", pa10},
! { "sh2add",     0x08000680, 0xfc000fe0, "?ax,b,t", pa10},
! { "sh2addl",    0x08000a80, 0xfc000fe0, "?ax,b,t", pa10},
! { "sh2addo",    0x08000e80, 0xfc000fe0, "?ax,b,t", pa10},
! { "sh3add",     0x080006c0, 0xfc000fe0, "?ax,b,t", pa10},
! { "sh3addl",    0x08000ac0, 0xfc000fe0, "?ax,b,t", pa10},
! { "sh3addo",    0x08000ec0, 0xfc000fe0, "?ax,b,t", pa10},
  
  /* Extract and Deposit Instructions */
  
! { "vshd",       0xd0000000, 0xfc001fe0, "?xx,b,t", pa10},
! { "shd",        0xd0000800, 0xfc001c00, "?xx,b,p,t", pa10},
! { "vextru",     0xd0001000, 0xfc001fe0, "?xb,T,x", pa10},
! { "vextrs",     0xd0001400, 0xfc001fe0, "?xb,T,x", pa10},
! { "extru",      0xd0001800, 0xfc001c00, "?xb,P,T,x", pa10},
! { "extrs",      0xd0001c00, 0xfc001c00, "?xb,P,T,x", pa10},
! { "zvdep",      0xd4000000, 0xfc001fe0, "?xx,T,b", pa10},
! { "vdep",       0xd4000400, 0xfc001fe0, "?xx,T,b", pa10},
! { "zdep",       0xd4000800, 0xfc001c00, "?xx,p,T,b", pa10},
! { "dep",        0xd4000c00, 0xfc001c00, "?xx,p,T,b", pa10},
! { "zvdepi",     0xd4001000, 0xfc001fe0, "?x5,T,b", pa10},
! { "vdepi",      0xd4001400, 0xfc001fe0, "?x5,T,b", pa10},
! { "zdepi",      0xd4001800, 0xfc001c00, "?x5,p,T,b", pa10},
! { "depi",       0xd4001c00, 0xfc001c00, "?x5,p,T,b", pa10},
  
  /* System Control Instructions */
  
***************
*** 468,475 ****
  { "fneg",       0x3800c000, 0xfc1fe720, "FJ,v", pa20},
  { "fnegabs",    0x3000e000, 0xfc1fe7e0, "FE,v", pa20},
  { "fnegabs",    0x3800e000, 0xfc1fe720, "FJ,v", pa20},
! { "fcmp",       0x30000400, 0xfc00e7e0, "FME,X", pa10},
! { "fcmp",       0x38000400, 0xfc00e720, "IMJ,K", pa10},
  { "xmpyu",	0x38004700, 0xfc00e720, "E,X,v", pa11},
  { "fmpyadd",	0x18000000, 0xfc000000, "H4,6,7,9,8", pa11},
  { "fmpysub",	0x98000000, 0xfc000000, "H4,6,7,9,8", pa11},
--- 477,484 ----
  { "fneg",       0x3800c000, 0xfc1fe720, "FJ,v", pa20},
  { "fnegabs",    0x3000e000, 0xfc1fe7e0, "FE,v", pa20},
  { "fnegabs",    0x3800e000, 0xfc1fe720, "FJ,v", pa20},
! { "fcmp",       0x30000400, 0xfc00e7e0, "F?fE,X", pa10},
! { "fcmp",       0x38000400, 0xfc00e720, "I?fJ,K", pa10},
  { "xmpyu",	0x38004700, 0xfc00e720, "E,X,v", pa11},
  { "fmpyadd",	0x18000000, 0xfc000000, "H4,6,7,9,8", pa11},
  { "fmpysub",	0x98000000, 0xfc000000, "H4,6,7,9,8", pa11},
*** orig/opcodes/hppa-dis.c	Wed Jul  7 17:32:17 1999
--- gas-src/opcodes/hppa-dis.c	Wed Jul 28 12:10:28 1999
***************
*** 305,311 ****
  	  
  	  (*info->fprintf_func) (info->stream, "%s", opcode->name);
  
! 	  if (!strchr ("cfCY<?!@-+&U>~nHNZFIMadu|", opcode->args[0]))
  	    (*info->fprintf_func) (info->stream, " ");
  	  for (s = opcode->args; *s != '\0'; ++s)
  	    {
--- 305,311 ----
  	  
  	  (*info->fprintf_func) (info->stream, "%s", opcode->name);
  
! 	  if (!strchr ("cfCY?-+nHNZFIu", opcode->args[0]))
  	    (*info->fprintf_func) (info->stream, " ");
  	  for (s = opcode->args; *s != '\0'; ++s)
  	    {
***************
*** 406,459 ****
  		  (*info->fprintf_func) (info->stream, "%s ",
  				    short_bytes_compl_names[GET_COMPL (insn)]);
  		  break;
! 		/* these four conditions are for the set of instructions
! 		   which distinguish true/false conditions by opcode rather
! 		   than by the 'f' bit (sigh): comb, comib, addb, addib */
! 		case '<':
! 		  fputs_filtered (compare_cond_names[GET_FIELD (insn, 16, 18)],
! 				  info);
! 		  break;
  		case '?':
! 		  fputs_filtered (compare_cond_names[GET_FIELD (insn, 16, 18)
! 				  + GET_FIELD (insn, 4, 4) * 8], info);
! 		  break;
! 		case '@':
! 		  fputs_filtered (add_cond_names[GET_FIELD (insn, 16, 18)
! 				  + GET_FIELD (insn, 4, 4) * 8], info);
! 		  break;
! 		case 'a':
! 		  (*info->fprintf_func) (info->stream, "%s ",
! 					 compare_cond_names[GET_COND (insn)]);
! 		  break;
! 		case 'd':
! 		  (*info->fprintf_func) (info->stream, "%s ",
! 					 add_cond_names[GET_COND (insn)]);
! 		  break;
! 		case '!':
! 		  (*info->fprintf_func) (info->stream, "%s",
! 				    add_cond_names[GET_FIELD (insn, 16, 18)]);
! 		  break;
  
- 		case '&':
- 		  (*info->fprintf_func) (info->stream, "%s ",
- 				    logical_cond_names[GET_COND (insn)]);
- 		  break;
- 		case 'U':
- 		  (*info->fprintf_func) (info->stream, "%s ",
- 				    unit_cond_names[GET_COND (insn)]);
- 		  break;
- 		case '|':
- 		case '>':
- 		case '~':
- 		  (*info->fprintf_func)
- 		    (info->stream, "%s",
- 		     shift_cond_names[GET_FIELD (insn, 16, 18)]);
- 
- 		  /* If the next character in args is 'n', it will handle
- 		     putting out the space.  */
- 		  if (s[1] != 'n')
- 		    (*info->fprintf_func) (info->stream, " ");
- 		  break;
  		case 'V':
  		  fput_const (extract_5_store (insn), info);
  		  break;
--- 406,478 ----
  		  (*info->fprintf_func) (info->stream, "%s ",
  				    short_bytes_compl_names[GET_COMPL (insn)]);
  		  break;
! 
! 		/* Handle conditions.  */
  		case '?':
! 		  {
! 		    s++;
! 		    switch (*s)
! 		      {
! 		      case 'f':
! 			(*info->fprintf_func) (info->stream, "%s ",
! 					       float_comp_names[GET_FIELD
! 							       (insn, 27, 31)]);
! 			break;
! 
! 		      /* these four conditions are for the set of instructions
! 			   which distinguish true/false conditions by opcode
! 			   rather than by the 'f' bit (sigh): comb, comib,
! 			   addb, addib */
! 		      case 't':
! 			fputs_filtered (compare_cond_names[GET_FIELD (insn, 16, 18)],
! 					info);
! 			break;
! 		      case 'n':
! 			fputs_filtered (compare_cond_names[GET_FIELD (insn, 16, 18)
! 					+ GET_FIELD (insn, 4, 4) * 8], info);
! 			break;
! 		      case '@':
! 			fputs_filtered (add_cond_names[GET_FIELD (insn, 16, 18)
! 					+ GET_FIELD (insn, 4, 4) * 8], info);
! 			break;
! 		      case 's':
! 			(*info->fprintf_func) (info->stream, "%s ",
! 					       compare_cond_names[GET_COND (insn)]);
! 			break;
! 		      case 'a':
! 			(*info->fprintf_func) (info->stream, "%s ",
! 					       add_cond_names[GET_COND (insn)]);
! 			break;
! 		      case 'd':
! 			(*info->fprintf_func) (info->stream, "%s",
! 					       add_cond_names[GET_FIELD (insn, 16, 18)]);
! 			break;
! 
! 		      case 'l':
! 			(*info->fprintf_func) (info->stream, "%s ",
! 					       logical_cond_names[GET_COND (insn)]);
! 			break;
! 		      case 'u':
! 			(*info->fprintf_func) (info->stream, "%s ",
! 					       unit_cond_names[GET_COND (insn)]);
! 			break;
! 		      case 'y':
! 		      case 'x':
! 		      case 'b':
! 			(*info->fprintf_func)
! 			  (info->stream, "%s",
! 			   shift_cond_names[GET_FIELD (insn, 16, 18)]);
! 
! 			/* If the next character in args is 'n', it will handle
! 			   putting out the space.  */
! 			if (s[1] != 'n')
! 			  (*info->fprintf_func) (info->stream, " ");
! 			break;
! 
! 		      }
! 		    break;
! 		  }
  
  		case 'V':
  		  fput_const (extract_5_store (insn), info);
  		  break;
***************
*** 568,574 ****
  		case 'F':
  		  /* if no destination completer and not before a completer
  		     for fcmp, need a space here */
! 		  if (GET_FIELD (insn, 21, 22) == 1 || s[1] == 'M')
  		    fputs_filtered (float_format_names[GET_FIELD (insn, 19, 20)],
  				    info);
  		  else
--- 587,593 ----
  		case 'F':
  		  /* if no destination completer and not before a completer
  		     for fcmp, need a space here */
! 		  if (GET_FIELD (insn, 21, 22) == 1 || s[1] == '?')
  		    fputs_filtered (float_format_names[GET_FIELD (insn, 19, 20)],
  				    info);
  		  else
***************
*** 592,598 ****
  		case 'I':
  		  /* if no destination completer and not before a completer
  		     for fcmp, need a space here */
! 		  if (GET_FIELD (insn, 21, 22) == 1 || s[1] == 'M')
  		    fputs_filtered (float_format_names[GET_FIELD (insn, 20, 20)],
  				    info);
  		  else
--- 611,617 ----
  		case 'I':
  		  /* if no destination completer and not before a completer
  		     for fcmp, need a space here */
! 		  if (GET_FIELD (insn, 21, 22) == 1 || s[1] == '?')
  		    fputs_filtered (float_format_names[GET_FIELD (insn, 20, 20)],
  				    info);
  		  else
***************
*** 612,622 ****
  		      fput_fp_reg_r (GET_FIELD (insn, 11, 15), info);
  		  else
  		      fput_fp_reg (GET_FIELD (insn, 11, 15), info);
- 		  break;
- 		case 'M':
- 		    (*info->fprintf_func) (info->stream, "%s ",
- 					   float_comp_names[GET_FIELD
- 							      (insn, 27, 31)]);
  		  break;
  		default:
  		  (*info->fprintf_func) (info->stream, "%c", *s);
--- 631,636 ----

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Patch: add prefix to condition args in opcodes
  1999-07-28  7:11   ` Jerry Quinn
@ 1999-08-05 14:41     ` Jeffrey A Law
  1999-08-05 14:41       ` Jeffrey A Law
  0 siblings, 1 reply; 9+ messages in thread
From: Jeffrey A Law @ 1999-08-05 14:41 UTC (permalink / raw)
  To: Jerry Quinn; +Cc: binutils

  In message <14239.3863.98454.352088@gargle.gargle.HOWL>you write:
  > Sorry.  I was thinking they were close enough, but you're right.  They are
  > independent.
It happens.  Often I can extract the pieces, but my time is very limited right
now, so I have to ask others to extract the independent pieces.


  > I think we should also do the completers and float regs once you're happy
  > with this change.
I think so too.  Hopefully that'll give us enough letters to finish the PA2.0
work and maybe, just maybe clean up the code a little in the process.

One of the big issues at hand was whether or not to completely revamp the
entire PA assembler when we added PA2.0 support.  I wanted to do that, but
simply didn't have the time.  So, we're stuck trying to make the current
mess of spaghetti code work and trying to clean up pieces as we go along.

  >  > The flow control (at least to me) is easier to follow with that kind of 
  > style
  >  > (it's still not ideal, but I'm not sure what else we can do to clean thi
  > s up
  >  > without starting over with a complete redesign).
  > 
  > I saw that construction and I had thought what I did was preferable
  > because it avoided a redundant test.  If you think it's better to write
  > it that way, I'll change it.
I prefer code that's easier to read/follow over code that avoids a comparison.
Particularly in this case since assembly time is usually dwarfed by the compile
time.

  > Welcome back.  Glad to see you now have a chance to breathe :-)
Breathe?  No way, I barely get time to blink :-)

jeff

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Patch: add prefix to condition args in opcodes
  1999-08-05 14:41     ` Jeffrey A Law
@ 1999-08-05 14:41       ` Jeffrey A Law
  0 siblings, 0 replies; 9+ messages in thread
From: Jeffrey A Law @ 1999-08-05 14:41 UTC (permalink / raw)
  To: Jerry Quinn; +Cc: binutils

  In message < 14239.3863.98454.352088@gargle.gargle.HOWL >you write:
  > Sorry.  I was thinking they were close enough, but you're right.  They are
  > independent.
It happens.  Often I can extract the pieces, but my time is very limited right
now, so I have to ask others to extract the independent pieces.


  > I think we should also do the completers and float regs once you're happy
  > with this change.
I think so too.  Hopefully that'll give us enough letters to finish the PA2.0
work and maybe, just maybe clean up the code a little in the process.

One of the big issues at hand was whether or not to completely revamp the
entire PA assembler when we added PA2.0 support.  I wanted to do that, but
simply didn't have the time.  So, we're stuck trying to make the current
mess of spaghetti code work and trying to clean up pieces as we go along.

  >  > The flow control (at least to me) is easier to follow with that kind of 
  > style
  >  > (it's still not ideal, but I'm not sure what else we can do to clean thi
  > s up
  >  > without starting over with a complete redesign).
  > 
  > I saw that construction and I had thought what I did was preferable
  > because it avoided a redundant test.  If you think it's better to write
  > it that way, I'll change it.
I prefer code that's easier to read/follow over code that avoids a comparison.
Particularly in this case since assembly time is usually dwarfed by the compile
time.

  > Welcome back.  Glad to see you now have a chance to breathe :-)
Breathe?  No way, I barely get time to blink :-)

jeff

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Patch: add prefix to condition args in opcodes
  1999-07-28 10:12   ` Jerry Quinn
@ 1999-08-05 16:02     ` Jeffrey A Law
  1999-08-05 16:02       ` Jeffrey A Law
  0 siblings, 1 reply; 9+ messages in thread
From: Jeffrey A Law @ 1999-08-05 16:02 UTC (permalink / raw)
  To: Jerry Quinn; +Cc: binutils

  In message <14239.14790.987616.958993@gargle.gargle.HOWL>you write:
  > 
  > Here's the revised condition arg prefix patch.  The 64 bit conditionals are
  > stripped out and I cleaned up the indentation and other style errors.
  > 
  > Jerry
  > 
  > 
  > Wed Jul 28 13:08:13 EDT 1999  Jerry Quinn <jquinn@nortelnetworks.com>
  > 
  >     * gas/config/tc-hppa.c (pa_ip): Change condition args to have '?' prefi
  > x.
  >     * include/opcode/hppa.h (pa_opcodes): Change condition args to use '?'
  >     prefix.
  >     * opcodes/hppa-dis.c (print_insn_hppa): Change condition args to use '?
  > '
  >     prefix.
Thanks.  Installed.  Sorry about the wait.

Jeff

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Patch: add prefix to condition args in opcodes
  1999-08-05 16:02     ` Jeffrey A Law
@ 1999-08-05 16:02       ` Jeffrey A Law
  0 siblings, 0 replies; 9+ messages in thread
From: Jeffrey A Law @ 1999-08-05 16:02 UTC (permalink / raw)
  To: Jerry Quinn; +Cc: binutils

  In message < 14239.14790.987616.958993@gargle.gargle.HOWL >you write:
  > 
  > Here's the revised condition arg prefix patch.  The 64 bit conditionals are
  > stripped out and I cleaned up the indentation and other style errors.
  > 
  > Jerry
  > 
  > 
  > Wed Jul 28 13:08:13 EDT 1999  Jerry Quinn <jquinn@nortelnetworks.com>
  > 
  >     * gas/config/tc-hppa.c (pa_ip): Change condition args to have '?' prefi
  > x.
  >     * include/opcode/hppa.h (pa_opcodes): Change condition args to use '?'
  >     prefix.
  >     * opcodes/hppa-dis.c (print_insn_hppa): Change condition args to use '?
  > '
  >     prefix.
Thanks.  Installed.  Sorry about the wait.

Jeff

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Patch: add prefix to condition args in opcodes
       [not found] <65154398@toto.iv>
@ 1999-07-12 13:17 ` Jerry Quinn
  0 siblings, 0 replies; 9+ messages in thread
From: Jerry Quinn @ 1999-07-12 13:17 UTC (permalink / raw)
  To: binutils

A couple of new syntax instructions in the patch I sent were flagged as pa2.0
when they really aren't.  This fixes it.

*** pa-prev/include/opcode/hppa.h	Mon Jul 12 16:11:48 1999
--- gas-src/include/opcode/hppa.h	Mon Jul 12 16:13:10 1999
***************
*** 298,304 ****
  /* Computation Instructions */
  
  { "cmpclr",     0x080008a0, 0xfc000fe0, "?Sx,b,t", pa20},
! { "cmpclr",     0x08000880, 0xfc000fe0, "?sx,b,t", pa20},
  { "comclr",     0x08000880, 0xfc000fe0, "?sx,b,t", pa10},
  { "or",         0x08000260, 0xfc000fe0, "?Lx,b,t", pa20},
  { "or",         0x08000240, 0xfc000fe0, "?lx,b,t", pa10},
--- 298,304 ----
  /* Computation Instructions */
  
  { "cmpclr",     0x080008a0, 0xfc000fe0, "?Sx,b,t", pa20},
! { "cmpclr",     0x08000880, 0xfc000fe0, "?sx,b,t", pa10},
  { "comclr",     0x08000880, 0xfc000fe0, "?sx,b,t", pa10},
  { "or",         0x08000260, 0xfc000fe0, "?Lx,b,t", pa20},
  { "or",         0x08000240, 0xfc000fe0, "?lx,b,t", pa10},
***************
*** 333,339 ****
  { "subi",       0x94000000, 0xfc000800, "?si,b,x", pa10},
  { "subio",      0x94000800, 0xfc000800, "?si,b,x", pa10},
  { "cmpiclr",    0x90000800, 0xfc000800, "?Si,b,x", pa20},
! { "cmpiclr",    0x90000000, 0xfc000800, "?si,b,x", pa20},
  { "comiclr",    0x90000000, 0xfc000800, "?si,b,x", pa10},
  { "sh1add",     0x08000640, 0xfc000fe0, "?ax,b,t", pa10},
  { "sh1addl",    0x08000a40, 0xfc000fe0, "?ax,b,t", pa10},
--- 333,339 ----
  { "subi",       0x94000000, 0xfc000800, "?si,b,x", pa10},
  { "subio",      0x94000800, 0xfc000800, "?si,b,x", pa10},
  { "cmpiclr",    0x90000800, 0xfc000800, "?Si,b,x", pa20},
! { "cmpiclr",    0x90000000, 0xfc000800, "?si,b,x", pa10},
  { "comiclr",    0x90000000, 0xfc000800, "?si,b,x", pa10},
  { "sh1add",     0x08000640, 0xfc000fe0, "?ax,b,t", pa10},
  { "sh1addl",    0x08000a40, 0xfc000fe0, "?ax,b,t", pa10},

-- 
Jerry Quinn                             Tel: (514) 761-8737
jquinn@nortelnetworks.com               Fax: (514) 761-8505
Speech Recognition Research

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Patch: add prefix to condition args in opcodes
@ 1999-07-09 13:53 Jerry Quinn
  0 siblings, 0 replies; 9+ messages in thread
From: Jerry Quinn @ 1999-07-09 13:53 UTC (permalink / raw)
  To: binutils

OK, here's a patch to prefix all the condition arg characters with '?'.  It
may look a bit large, but all I've done is regroup all the cases for
conditions inside the '?' case and do a bit of renaming.  It passes the test
suite and appears to work fine.

Because all the conditions are in a prefix, I just added extra codes to deal
with various 64 bit conditions.  You'll see that there are some stubs for
different new conditions that aren't filled in yet.

The end effect of this is to free up 11 characters and keep 13 more codes by
my count out of the main list.

Let me know what you think.  If this is OK, I suggest we prefix the float args 
next.

Jerry

-- 
Jerry Quinn                             Tel: (514) 761-8737
jquinn@nortelnetworks.com               Fax: (514) 761-8505
Speech Recognition Research


Changelog entry:

Fri Jul  9 15:48:47 EDT 1999  Jerry Quinn <jquinn@nortelnetworks.com>

    * config/tc-hppa.c (fp_operand_format): Change order of xW formats to
    match bit ordering in instructions.
    (pa_parse_fp_format): Handle xW formats.
    (pa_ip): Change condition args to have '?' prefix.
    * include/opcode/hppa.h (pa_opcodes): Change condition args to use '?'
    prefix.
    * opcodes/hppa-dis.c (print_insn_hppa): Change condition args to use '?'
    prefix.
    (compare_cond_64_names, add_cond_64_names, logical_cond_64_names,
    unit_cond_64_names, shift_cond_64_names): New.


*** gas-src/gas/config/tc-hppa.c	Fri Jul  9 15:16:01 1999
--- orig/gas/config/tc-hppa.c	Wed Jul  7 17:31:52 1999
***************
*** 162,170 ****
     SGL and DBL).  */
  typedef enum
    {
!     SGL, DBL, ILLEGAL_FMT,  QUAD, 
!     W,   DW,  ILLEGAL_FIX,  QW, 
!     UW,  UDW, ILLEGAL_UFIX, UQW
    }
  fp_operand_format;
  
--- 162,168 ----
     SGL and DBL).  */
  typedef enum
    {
!     SGL, DBL, ILLEGAL_FMT, QUAD, W, UW, DW, UDW, QW, UQW
    }
  fp_operand_format;
  
***************
*** 1448,1454 ****
    const char *args;
    int match = FALSE;
    int comma = 0;
-   int cond_64 = 0;		/* 1 if processing a 64 bit condition */
    int cmpltr, nullif, flag, cond, num;
    unsigned long opcode;
    struct pa_opcode *insn;
--- 1446,1451 ----
***************
*** 1717,2201 ****
  		INSERT_FIELD_AND_CONTINUE (opcode, a, 13);
  	      }
  
  
! 	    /* Handle all conditions.  */
  	    case '?':
! 	      {
! 		args++;
! 		switch (*args)
! 		  {
! 		
! 		    /* Handle FP compare conditions.  */
! 		  case 'f':	/* float */
! 		    cond = pa_parse_fp_cmp_cond (&s);
! 		    INSERT_FIELD_AND_CONTINUE (opcode, cond, 0);
! 
! 		    /* Handle an add condition.  */
! 		  case 'A':	/* 64 bit add */
! 		    if (*s == ',' && *(s + 1) == '*')
! 		      {
! 			cond_64 = 1;
! 			s += 2;	/* Eat up the ,* */
! 		      }
! 		    else break;
! 		  case 'a':	/* add */
! 		    cmpltr = 0;
! 		    flag = 0;
! 		    if (*s == ',' || cond_64)
! 		      {
! 			if (!cond_64) s++;
! 			name = s;
! 			while (*s != ',' && *s != ' ' && *s != '\t')
! 			  s += 1;
! 			c = *s;
! 			*s = 0x00;
! 			if (strcmp (name, "=") == 0)
! 			  cmpltr = 1;
! 			else if (strcmp (name, "<") == 0)
! 			  cmpltr = 2;
! 			else if (strcmp (name, "<=") == 0)
! 			  cmpltr = 3;
! 			else if (strcasecmp (name, "nuv") == 0)
! 			  cmpltr = 4;
! 			else if (strcasecmp (name, "znv") == 0)
! 			  cmpltr = 5;
! 			else if (strcasecmp (name, "sv") == 0)
! 			  cmpltr = 6;
! 			else if (strcasecmp (name, "od") == 0)
! 			  cmpltr = 7;
! 			else if (strcasecmp (name, "tr") == 0)
! 			  {
! 			    cmpltr = 0;
! 			    flag = 1;
! 			  }
! 			else if (strcmp (name, "<>") == 0)
! 			  {
! 			    cmpltr = 1;
! 			    flag = 1;
! 			  }
! 			else if (strcmp (name, ">=") == 0)
! 			  {
! 			    cmpltr = 2;
! 			    flag = 1;
! 			  }
! 			else if (strcmp (name, ">") == 0)
! 			  {
! 			    cmpltr = 3;
! 			    flag = 1;
! 			  }
! 			else if (strcasecmp (name, "uv") == 0)
! 			  {
! 			    cmpltr = 4;
! 			    flag = 1;
! 			  }
! 			else if (strcasecmp (name, "vnz") == 0)
! 			  {
! 			    cmpltr = 5;
! 			    flag = 1;
! 			  }
! 			else if (strcasecmp (name, "nsv") == 0)
! 			  {
! 			    cmpltr = 6;
! 			    flag = 1;
! 			  }
! 			else if (strcasecmp (name, "ev") == 0)
! 			  {
! 			    cmpltr = 7;
! 			    flag = 1;
! 			  }
! 			else
! 			  as_bad (_("Invalid Add Condition: %s"), name);
! 			*s = c;
! 		      }
! 	    	  opcode |= cmpltr << 13;
! 	    	  INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);
! 
! 
! 		  /* Handle non-negated add condition.  */
! 		  case 'd':	/* nonneg add w/ nullify */
! 		    cmpltr = pa_parse_nonneg_add_cmpltr (&s, 1);
! 		    if (cmpltr < 0)
! 		      {
! 			as_bad (_("Invalid Compare/Subtract Condition: %c"), *s);
! 			cmpltr = 0;
! 		      }
! 		    INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
! 
! 		  case 'D':	/* neg add w/ nullify */
! 		  case 'w':	/* wide nonneg add */
! 		  case 'W':	/* wide neg add */
! 		    abort();
! 
! 		    /* Handle a negated or non-negated add condition.  */
! 		  case '@':	/* add w/ nullify */
! 		    save_s = s;
! 		    cmpltr = pa_parse_nonneg_add_cmpltr (&s, 1);
! 		    if (cmpltr < 0)
! 		      {
! 			s = save_s;
! 			cmpltr = pa_parse_neg_add_cmpltr (&s, 1);
! 			if (cmpltr < 0)
! 			  {
! 			    as_bad (_("Invalid Compare/Subtract Condition"));
! 			    cmpltr = 0;
! 			  }
! 			else
! 			  {
! 			    /* Negated condition requires an opcode change.  */
! 			    opcode |= 1 << 27;
! 			  }
! 		      }
! 	    	  INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
! 
! 
! 		    /* Handle bvb and bb conditions.  */
! 		  case 'B':	/* 64 bit bb */
! 		    if (*s == ',' && *(s + 1) == '*')
! 		      {
! 			cond_64 = 1;
! 			s += 2;	/* Eat up the ,* */
! 		      }
! 		    else break;
! 		  case 'b':	/* bb, bvb */
! 		    cmpltr = 0;
! 		    if (*s == ',')
! 		      {
! 			s++;
! 			if (strncmp (s, "<", 1) == 0)
! 			  {
! 			    cmpltr = 0;
! 			    s++;
! 			  }
! 			else if (strncmp (s, ">=", 2) == 0)
! 			  {
! 			    cmpltr = 1;
! 			    s += 2;
! 			  }
! 			else
! 			  as_bad (_("Invalid Bit Branch Condition: %c"), *s);
! 		      }
! 		      INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 15);
! 
! 
! 		    /* Handle a compare/subtract condition.  */
! 		  case 'S':	/* 64 bit cmp/sub */
! 		    if (*s == ',' && *(s + 1) == '*')
! 		      {
! 			cond_64 = 1;
! 			s += 2;	/* Eat up the ,* */
! 		      }
! 		    else break;
! 		  case 's':	/* cmp/sub */
! 		    cmpltr = 0;
! 		    flag = 0;
! 		    if (*s == ',' || cond_64)
! 		      {
! 			if (!cond_64) s++;
! 			name = s;
! 			while (*s != ',' && *s != ' ' && *s != '\t')
! 			  s += 1;
! 			c = *s;
! 			*s = 0x00;
! 			if (strcmp (name, "=") == 0)
! 			  cmpltr = 1;
! 			else if (strcmp (name, "<") == 0)
! 			  cmpltr = 2;
! 			else if (strcmp (name, "<=") == 0)
! 			  cmpltr = 3;
! 			else if (strcasecmp (name, "<<") == 0)
! 			  cmpltr = 4;
! 			else if (strcasecmp (name, "<<=") == 0)
! 			  cmpltr = 5;
! 			else if (strcasecmp (name, "sv") == 0)
! 			  cmpltr = 6;
! 			else if (strcasecmp (name, "od") == 0)
! 			  cmpltr = 7;
! 			else if (strcasecmp (name, "tr") == 0)
! 			  {
! 			    cmpltr = 0;
! 			    flag = 1;
! 			  }
! 			else if (strcmp (name, "<>") == 0)
! 			  {
! 			    cmpltr = 1;
! 			    flag = 1;
! 			  }
! 			else if (strcmp (name, ">=") == 0)
! 			  {
! 			    cmpltr = 2;
! 			    flag = 1;
! 			  }
! 			else if (strcmp (name, ">") == 0)
! 			  {
! 			    cmpltr = 3;
! 			    flag = 1;
! 			  }
! 			else if (strcasecmp (name, ">>=") == 0)
! 			  {
! 			    cmpltr = 4;
! 			    flag = 1;
! 			  }
! 			else if (strcasecmp (name, ">>") == 0)
! 			  {
! 			    cmpltr = 5;
! 			    flag = 1;
! 			  }
! 			else if (strcasecmp (name, "nsv") == 0)
! 			  {
! 			    cmpltr = 6;
! 			    flag = 1;
! 			  }
! 			else if (strcasecmp (name, "ev") == 0)
! 			  {
! 			    cmpltr = 7;
! 			    flag = 1;
! 			  }
! 			else
! 			  as_bad (_("Invalid Add Condition: %s"), name);
! 			*s = c;
! 		      }
! 		  opcode |= cmpltr << 13;
! 		  INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);
  
! 		  /* Handle a non-negated compare/stubtract condition.  */
! 		  case 't':	/* nonneg cmp */
! 		    cmpltr = pa_parse_nonneg_cmpsub_cmpltr (&s, 1);
! 		    if (cmpltr < 0)
! 		      {
! 			as_bad (_("Invalid Compare/Subtract Condition: %c"), *s);
! 			cmpltr = 0;
! 		      }
! 		    INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
  
! 		  case 'T':	/* neg cmp */
! 		  case 'r':	/* 64 bit nonneg cmpb */
! 		  case 'R':	/* 64 bit neg cmpb */
! 		  case 'Q':	/* 64 bit cmpib */
! 		    abort();
! 
! 		  /* Handle a negated or non-negated compare/subtract condition.  */
! 		  case 'n':	/* cmp w/ nullify */
! 		    save_s = s;
! 		    cmpltr = pa_parse_nonneg_cmpsub_cmpltr (&s, 1);
! 		    if (cmpltr < 0)
! 		      {
! 			s = save_s;
! 			cmpltr = pa_parse_neg_cmpsub_cmpltr (&s, 1);
! 			if (cmpltr < 0)
! 			  {
! 			    as_bad (_("Invalid Compare/Subtract Condition."));
! 			    cmpltr = 0;
! 			  }
! 			else
! 			  {
! 			    /* Negated condition requires an opcode change.  */
! 			    opcode |= 1 << 27;
! 			  }
! 		      }
! 	    
! 		    INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
  
  
! 		    /* Handle a logical instruction condition.  */
! 		  case 'L':	/* 64 bit logical */
! 		    if (*s == ',' && *(s + 1) == '*')
! 		      {
! 			cond_64 = 1;
! 			s += 2;	/* Eat up the ,* */
! 		      }
! 		    else break;
! 		  case 'l':	/* 32 bit logical */
! 		    cmpltr = 0;
! 		    flag = 0;
! 		    if (*s == ',' || cond_64)
! 		      {
! 			if (!cond_64) s++;
! 			name = s;
! 			while (*s != ',' && *s != ' ' && *s != '\t')
! 			  s += 1;
! 			c = *s;
! 			*s = 0x00;
! 	    
! 	    
! 			if (strcmp (name, "=") == 0)
! 			  cmpltr = 1;
! 			else if (strcmp (name, "<") == 0)
! 			  cmpltr = 2;
! 			else if (strcmp (name, "<=") == 0)
! 			  cmpltr = 3;
! 			else if (strcasecmp (name, "od") == 0)
! 			  cmpltr = 7;
! 			else if (strcasecmp (name, "tr") == 0)
! 			  {
! 			    cmpltr = 0;
! 			    flag = 1;
! 			  }
! 			else if (strcmp (name, "<>") == 0)
! 			  {
! 			    cmpltr = 1;
! 			    flag = 1;
! 			  }
! 			else if (strcmp (name, ">=") == 0)
! 			  {
! 			    cmpltr = 2;
! 			    flag = 1;
! 			  }
! 			else if (strcmp (name, ">") == 0)
! 			  {
! 			    cmpltr = 3;
! 			    flag = 1;
! 			  }
! 			else if (strcasecmp (name, "ev") == 0)
! 			  {
! 			    cmpltr = 7;
! 			    flag = 1;
! 			  }
! 			else
! 			  as_bad (_("Invalid Logical Instruction Condition."));
! 			*s = c;
! 		      }
! 		    opcode |= cmpltr << 13;
! 		    INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);
  
  
! 		    /* Handle a shift/extract/deposit condition.  */
! 		  case 'X':	/* 64 bit shift/extract/deposit */
! 		    if (*s == ',' && *(s + 1) == '*')
! 		      {
! 			cond_64 = 1;
! 			s += 2;	/* Eat up the ,* */
! 		      }
! 		    else break;
! 		  case 'x':	/* shift/extract/deposit */
! 		  case 'y':	/* shift/extract/deposit w/ nullify */
! 		    cmpltr = 0;
! 		    if (*s == ',')
! 		      {
! 			save_s = s++;
  
  
! 			name = s;
! 			while (*s != ',' && *s != ' ' && *s != '\t')
! 			  s += 1;
! 			c = *s;
! 			*s = 0x00;
! 			if (strcmp (name, "=") == 0)
! 			  cmpltr = 1;
! 			else if (strcmp (name, "<") == 0)
! 			  cmpltr = 2;
! 			else if (strcasecmp (name, "od") == 0)
! 			  cmpltr = 3;
! 			else if (strcasecmp (name, "tr") == 0)
! 			  cmpltr = 4;
! 			else if (strcmp (name, "<>") == 0)
! 			  cmpltr = 5;
! 			else if (strcmp (name, ">=") == 0)
! 			  cmpltr = 6;
! 			else if (strcasecmp (name, "ev") == 0)
! 			  cmpltr = 7;
! 			/* Handle movb,n.  Put things back the way they were.
! 			   This includes moving s back to where it started.  */
! 			else if (strcasecmp (name, "n") == 0 && *args == 'y')
! 			  {
! 			    *s = c;
! 			    s = save_s;
! 			    continue;
! 			  }
! 			else
! 			  as_bad (_("Invalid Shift/Extract/Deposit Condition."));
! 			*s = c;
! 		      }
! 		    INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
  
  
- 		    /* Handle a unit instruction condition.  */
- 		  case 'U':	/* 64 bit unit */
- 		    if (*s == ',' && *(s + 1) == '*')
- 		      {
- 			cond_64 = 1;
- 			s += 2;	/* Eat up the ,* */
- 		      }
- 		    else break;
- 		  case 'u':	/* unit */
- 		    cmpltr = 0;
- 		    flag = 0;
- 		    if (*s == ',' || cond_64)
- 		      {
- 			if (!cond_64) s++;
- 	    
- 	    
- 			if (strncasecmp (s, "sbz", 3) == 0)
- 			  {
- 			    cmpltr = 2;
- 			    s += 3;
- 			  }
- 			else if (strncasecmp (s, "shz", 3) == 0)
- 			  {
- 			    cmpltr = 3;
- 			    s += 3;
- 			  }
- 			else if (strncasecmp (s, "sdc", 3) == 0)
- 			  {
- 			    cmpltr = 4;
- 			    s += 3;
- 			  }
- 			else if (strncasecmp (s, "sbc", 3) == 0)
- 			  {
- 			    cmpltr = 6;
- 			    s += 3;
- 			  }
- 			else if (strncasecmp (s, "shc", 3) == 0)
- 			  {
- 			    cmpltr = 7;
- 			    s += 3;
- 			  }
- 			else if (strncasecmp (s, "tr", 2) == 0)
- 			  {
- 			    cmpltr = 0;
- 			    flag = 1;
- 			    s += 2;
- 			  }
- 			else if (strncasecmp (s, "nbz", 3) == 0)
- 			  {
- 			    cmpltr = 2;
- 			    flag = 1;
- 			    s += 3;
- 			  }
- 			else if (strncasecmp (s, "nhz", 3) == 0)
- 			  {
- 			    cmpltr = 3;
- 			    flag = 1;
- 			    s += 3;
- 			  }
- 			else if (strncasecmp (s, "ndc", 3) == 0)
- 			  {
- 			    cmpltr = 4;
- 			    flag = 1;
- 			    s += 3;
- 			  }
- 			else if (strncasecmp (s, "nbc", 3) == 0)
- 			  {
- 			    cmpltr = 6;
- 			    flag = 1;
- 			    s += 3;
- 			  }
- 			else if (strncasecmp (s, "nhc", 3) == 0)
- 			  {
- 			    cmpltr = 7;
- 			    flag = 1;
- 			    s += 3;
- 			  }
- 			else
- 			  as_bad (_("Invalid Unit Instruction Condition."));
- 		      }
- 		    opcode |= cmpltr << 13;
- 		    INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);
  
! 		  default:
! 		    abort();
! 		  }
! 	      }
  
  
  	    /* Handle a system control completer.  */
  	    case 'Z':
--- 1714,2120 ----
  		INSERT_FIELD_AND_CONTINUE (opcode, a, 13);
  	      }
  
+ 	    /* Handle a non-negated compare/stubtract condition.  */
+ 	    case '<':
+ 	      cmpltr = pa_parse_nonneg_cmpsub_cmpltr (&s, 1);
+ 	      if (cmpltr < 0)
+ 		{
+ 		  as_bad (_("Invalid Compare/Subtract Condition: %c"), *s);
+ 		  cmpltr = 0;
+ 		}
+ 	      INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
  
! 	    /* Handle a negated or non-negated compare/subtract condition.  */
  	    case '?':
! 	      save_s = s;
! 	      cmpltr = pa_parse_nonneg_cmpsub_cmpltr (&s, 1);
! 	      if (cmpltr < 0)
! 		{
! 		  s = save_s;
! 		  cmpltr = pa_parse_neg_cmpsub_cmpltr (&s, 1);
! 		  if (cmpltr < 0)
! 		    {
! 		      as_bad (_("Invalid Compare/Subtract Condition."));
! 		      cmpltr = 0;
! 		    }
! 		  else
! 		    {
! 		      /* Negated condition requires an opcode change.  */
! 		      opcode |= 1 << 27;
! 		    }
! 		}
! 	
! 	      INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
  
! 	    /* Handle non-negated add condition.  */
! 	    case '!':
! 	      cmpltr = pa_parse_nonneg_add_cmpltr (&s, 1);
! 	      if (cmpltr < 0)
! 		{
! 		  as_bad (_("Invalid Compare/Subtract Condition: %c"), *s);
! 		  cmpltr = 0;
! 		}
! 	      INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
  
! 	    /* Handle a negated or non-negated add condition.  */
! 	    case '@':
! 	      save_s = s;
! 	      cmpltr = pa_parse_nonneg_add_cmpltr (&s, 1);
! 	      if (cmpltr < 0)
! 		{
! 		  s = save_s;
! 		  cmpltr = pa_parse_neg_add_cmpltr (&s, 1);
! 		  if (cmpltr < 0)
! 		    {
! 		      as_bad (_("Invalid Compare/Subtract Condition"));
! 		      cmpltr = 0;
! 		    }
! 		  else
! 		    {
! 		      /* Negated condition requires an opcode change.  */
! 		      opcode |= 1 << 27;
! 		    }
! 		}
! 	      INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
  
+ 	    /* Handle a compare/subtract condition.  */
+ 	    case 'a':
+ 	      cmpltr = 0;
+ 	      flag = 0;
+ 	      if (*s == ',')
+ 		{
+ 		  s++;
+ 		  name = s;
+ 		  while (*s != ',' && *s != ' ' && *s != '\t')
+ 		    s += 1;
+ 		  c = *s;
+ 		  *s = 0x00;
+ 		  if (strcmp (name, "=") == 0)
+ 		    cmpltr = 1;
+ 		  else if (strcmp (name, "<") == 0)
+ 		    cmpltr = 2;
+ 		  else if (strcmp (name, "<=") == 0)
+ 		    cmpltr = 3;
+ 		  else if (strcasecmp (name, "<<") == 0)
+ 		    cmpltr = 4;
+ 		  else if (strcasecmp (name, "<<=") == 0)
+ 		    cmpltr = 5;
+ 		  else if (strcasecmp (name, "sv") == 0)
+ 		    cmpltr = 6;
+ 		  else if (strcasecmp (name, "od") == 0)
+ 		    cmpltr = 7;
+ 		  else if (strcasecmp (name, "tr") == 0)
+ 		    {
+ 		      cmpltr = 0;
+ 		      flag = 1;
+ 		    }
+ 		  else if (strcmp (name, "<>") == 0)
+ 		    {
+ 		      cmpltr = 1;
+ 		      flag = 1;
+ 		    }
+ 		  else if (strcmp (name, ">=") == 0)
+ 		    {
+ 		      cmpltr = 2;
+ 		      flag = 1;
+ 		    }
+ 		  else if (strcmp (name, ">") == 0)
+ 		    {
+ 		      cmpltr = 3;
+ 		      flag = 1;
+ 		    }
+ 		  else if (strcasecmp (name, ">>=") == 0)
+ 		    {
+ 		      cmpltr = 4;
+ 		      flag = 1;
+ 		    }
+ 		  else if (strcasecmp (name, ">>") == 0)
+ 		    {
+ 		      cmpltr = 5;
+ 		      flag = 1;
+ 		    }
+ 		  else if (strcasecmp (name, "nsv") == 0)
+ 		    {
+ 		      cmpltr = 6;
+ 		      flag = 1;
+ 		    }
+ 		  else if (strcasecmp (name, "ev") == 0)
+ 		    {
+ 		      cmpltr = 7;
+ 		      flag = 1;
+ 		    }
+ 		  else
+ 		    as_bad (_("Invalid Add Condition: %s"), name);
+ 		  *s = c;
+ 		}
+ 	      opcode |= cmpltr << 13;
+ 	      INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);
  
! 	    /* Handle a non-negated add condition.  */
! 	    case 'd':
! 	      cmpltr = 0;
! 	      flag = 0;
! 	      if (*s == ',')
! 		{
! 		  s++;
! 		  name = s;
! 		  while (*s != ',' && *s != ' ' && *s != '\t')
! 		    s += 1;
! 		  c = *s;
! 		  *s = 0x00;
! 		  if (strcmp (name, "=") == 0)
! 		    cmpltr = 1;
! 		  else if (strcmp (name, "<") == 0)
! 		    cmpltr = 2;
! 		  else if (strcmp (name, "<=") == 0)
! 		    cmpltr = 3;
! 		  else if (strcasecmp (name, "nuv") == 0)
! 		    cmpltr = 4;
! 		  else if (strcasecmp (name, "znv") == 0)
! 		    cmpltr = 5;
! 		  else if (strcasecmp (name, "sv") == 0)
! 		    cmpltr = 6;
! 		  else if (strcasecmp (name, "od") == 0)
! 		    cmpltr = 7;
! 		  else if (strcasecmp (name, "tr") == 0)
! 		    {
! 		      cmpltr = 0;
! 		      flag = 1;
! 		    }
! 		  else if (strcmp (name, "<>") == 0)
! 		    {
! 		      cmpltr = 1;
! 		      flag = 1;
! 		    }
! 		  else if (strcmp (name, ">=") == 0)
! 		    {
! 		      cmpltr = 2;
! 		      flag = 1;
! 		    }
! 		  else if (strcmp (name, ">") == 0)
! 		    {
! 		      cmpltr = 3;
! 		      flag = 1;
! 		    }
! 		  else if (strcasecmp (name, "uv") == 0)
! 		    {
! 		      cmpltr = 4;
! 		      flag = 1;
! 		    }
! 		  else if (strcasecmp (name, "vnz") == 0)
! 		    {
! 		      cmpltr = 5;
! 		      flag = 1;
! 		    }
! 		  else if (strcasecmp (name, "nsv") == 0)
! 		    {
! 		      cmpltr = 6;
! 		      flag = 1;
! 		    }
! 		  else if (strcasecmp (name, "ev") == 0)
! 		    {
! 		      cmpltr = 7;
! 		      flag = 1;
! 		    }
! 		  else
! 		    as_bad (_("Invalid Add Condition: %s"), name);
! 		  *s = c;
! 		}
! 	      opcode |= cmpltr << 13;
! 	      INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);
  
+ 	    /* HANDLE a logical instruction condition.  */
+ 	    case '&':
+ 	      cmpltr = 0;
+ 	      flag = 0;
+ 	      if (*s == ',')
+ 		{
+ 		  s++;
+ 		  name = s;
+ 		  while (*s != ',' && *s != ' ' && *s != '\t')
+ 		    s += 1;
+ 		  c = *s;
+ 		  *s = 0x00;
+ 
+ 
+ 		  if (strcmp (name, "=") == 0)
+ 		    cmpltr = 1;
+ 		  else if (strcmp (name, "<") == 0)
+ 		    cmpltr = 2;
+ 		  else if (strcmp (name, "<=") == 0)
+ 		    cmpltr = 3;
+ 		  else if (strcasecmp (name, "od") == 0)
+ 		    cmpltr = 7;
+ 		  else if (strcasecmp (name, "tr") == 0)
+ 		    {
+ 		      cmpltr = 0;
+ 		      flag = 1;
+ 		    }
+ 		  else if (strcmp (name, "<>") == 0)
+ 		    {
+ 		      cmpltr = 1;
+ 		      flag = 1;
+ 		    }
+ 		  else if (strcmp (name, ">=") == 0)
+ 		    {
+ 		      cmpltr = 2;
+ 		      flag = 1;
+ 		    }
+ 		  else if (strcmp (name, ">") == 0)
+ 		    {
+ 		      cmpltr = 3;
+ 		      flag = 1;
+ 		    }
+ 		  else if (strcasecmp (name, "ev") == 0)
+ 		    {
+ 		      cmpltr = 7;
+ 		      flag = 1;
+ 		    }
+ 		  else
+ 		    as_bad (_("Invalid Logical Instruction Condition."));
+ 		  *s = c;
+ 		}
+ 	      opcode |= cmpltr << 13;
+ 	      INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);
  
! 	    /* Handle a unit instruction condition.  */
! 	    case 'U':
! 	      cmpltr = 0;
! 	      flag = 0;
! 	      if (*s == ',')
! 		{
! 		  s++;
  
  
! 		  if (strncasecmp (s, "sbz", 3) == 0)
! 		    {
! 		      cmpltr = 2;
! 		      s += 3;
! 		    }
! 		  else if (strncasecmp (s, "shz", 3) == 0)
! 		    {
! 		      cmpltr = 3;
! 		      s += 3;
! 		    }
! 		  else if (strncasecmp (s, "sdc", 3) == 0)
! 		    {
! 		      cmpltr = 4;
! 		      s += 3;
! 		    }
! 		  else if (strncasecmp (s, "sbc", 3) == 0)
! 		    {
! 		      cmpltr = 6;
! 		      s += 3;
! 		    }
! 		  else if (strncasecmp (s, "shc", 3) == 0)
! 		    {
! 		      cmpltr = 7;
! 		      s += 3;
! 		    }
! 		  else if (strncasecmp (s, "tr", 2) == 0)
! 		    {
! 		      cmpltr = 0;
! 		      flag = 1;
! 		      s += 2;
! 		    }
! 		  else if (strncasecmp (s, "nbz", 3) == 0)
! 		    {
! 		      cmpltr = 2;
! 		      flag = 1;
! 		      s += 3;
! 		    }
! 		  else if (strncasecmp (s, "nhz", 3) == 0)
! 		    {
! 		      cmpltr = 3;
! 		      flag = 1;
! 		      s += 3;
! 		    }
! 		  else if (strncasecmp (s, "ndc", 3) == 0)
! 		    {
! 		      cmpltr = 4;
! 		      flag = 1;
! 		      s += 3;
! 		    }
! 		  else if (strncasecmp (s, "nbc", 3) == 0)
! 		    {
! 		      cmpltr = 6;
! 		      flag = 1;
! 		      s += 3;
! 		    }
! 		  else if (strncasecmp (s, "nhc", 3) == 0)
! 		    {
! 		      cmpltr = 7;
! 		      flag = 1;
! 		      s += 3;
! 		    }
! 		  else
! 		    as_bad (_("Invalid Logical Instruction Condition."));
! 		}
! 	      opcode |= cmpltr << 13;
! 	      INSERT_FIELD_AND_CONTINUE (opcode, flag, 12);
  
+ 	    /* Handle a shift/extract/deposit condition.  */
+ 	    case '|':
+ 	    case '>':
+ 	      cmpltr = 0;
+ 	      if (*s == ',')
+ 		{
+ 		  save_s = s++;
  
  
! 		  name = s;
! 		  while (*s != ',' && *s != ' ' && *s != '\t')
! 		    s += 1;
! 		  c = *s;
! 		  *s = 0x00;
! 		  if (strcmp (name, "=") == 0)
! 		    cmpltr = 1;
! 		  else if (strcmp (name, "<") == 0)
! 		    cmpltr = 2;
! 		  else if (strcasecmp (name, "od") == 0)
! 		    cmpltr = 3;
! 		  else if (strcasecmp (name, "tr") == 0)
! 		    cmpltr = 4;
! 		  else if (strcmp (name, "<>") == 0)
! 		    cmpltr = 5;
! 		  else if (strcmp (name, ">=") == 0)
! 		    cmpltr = 6;
! 		  else if (strcasecmp (name, "ev") == 0)
! 		    cmpltr = 7;
! 		  /* Handle movb,n.  Put things back the way they were.
! 		     This includes moving s back to where it started.  */
! 		  else if (strcasecmp (name, "n") == 0 && *args == '|')
! 		    {
! 		      *s = c;
! 		      s = save_s;
! 		      continue;
! 		    }
! 		  else
! 		    as_bad (_("Invalid Shift/Extract/Deposit Condition."));
! 		  *s = c;
! 		}
! 	      INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 13);
  
+ 	    /* Handle bvb and bb conditions.  */
+ 	    case '~':
+ 	      cmpltr = 0;
+ 	      if (*s == ',')
+ 		{
+ 		  s++;
+ 		  if (strncmp (s, "<", 1) == 0)
+ 		    {
+ 		      cmpltr = 0;
+ 		      s++;
+ 		    }
+ 		  else if (strncmp (s, ">=", 2) == 0)
+ 		    {
+ 		      cmpltr = 1;
+ 		      s += 2;
+ 		    }
+ 		  else
+ 		    as_bad (_("Invalid Bit Branch Condition: %c"), *s);
+ 		}
+ 	      INSERT_FIELD_AND_CONTINUE (opcode, cmpltr, 15);
  
  	    /* Handle a system control completer.  */
  	    case 'Z':
***************
*** 3652,3687 ****
  	{
  	  format = QUAD;
  	  *s += 5;
- 	}
-       else if (strncasecmp (*s, "w", 1) == 0)
- 	{
- 	  format = W;
- 	  *s += 2;
- 	}
-       else if (strncasecmp (*s, "dw", 2) == 0)
- 	{
- 	  format = DW;
- 	  *s += 3;
- 	}
-       else if (strncasecmp (*s, "qw", 2) == 0)
- 	{
- 	  format = QW;
- 	  *s += 3;
- 	}
-       else if (strncasecmp (*s, "uw", 2) == 0)
- 	{
- 	  format = UW;
- 	  *s += 3;
- 	}
-       else if (strncasecmp (*s, "udw", 3) == 0)
- 	{
- 	  format = UDW;
- 	  *s += 4;
- 	}
-       else if (strncasecmp (*s, "uqw", 3) == 0)
- 	{
- 	  format = UQW;
- 	  *s += 4;
  	}
        else
  	{
--- 3571,3576 ----
*** gas-src/include/opcode/hppa.h	Fri Jul  9 15:42:12 1999
--- orig/include/opcode/hppa.h	Wed Jul  7 17:32:08 1999
***************
*** 57,65 ****
     particular opcode in order for an instruction to be an instance
     of that opcode.
  
!    The args component is a string containing one character for each operand of
!    the instruction.  Characters used as a prefix allow any second character to 
!    be used without conflicting with the main operand characters.
  
     Bit positions in this description follow HP usage of lsb = 31,
     "at" is lsb of field.
--- 57,64 ----
     particular opcode in order for an instruction to be an instance
     of that opcode.
  
!    The args component is a string containing one character
!    for each operand of the instruction.
  
     Bit positions in this description follow HP usage of lsb = 31,
     "at" is lsb of field.
***************
*** 70,78 ****
  
     In the args field, the following characters are unused:
  
! 	' !"#$%&   *+- ./          :;< > @'
! 	'            M       U     [\]  '
! 	'a  d                      {|}~'
  
     Here are all the characters:
  
--- 69,77 ----
  
     In the args field, the following characters are unused:
  
! 	'  "#$%    *+- ./          :;    '
! 	'                          [\]  '
! 	'                          { } '
  
     Here are all the characters:
  
***************
*** 91,96 ****
--- 90,102 ----
     c    indexed load completer.
     C    short load and store completer.
     Y	Store Bytes Short completer
+    <    non-negated compare/subtract conditions.
+    a	compare/subtract conditions
+    d    non-negated add conditions
+    &    logical instruction conditions
+    U    unit instruction conditions
+    >    shift/extract/deposit conditions.
+    ~    bvb,bb conditions
     V    5 bit immediate value at 31
     i    11 bit immediate value at 31
     j    14 bit immediate value at 31
***************
*** 101,134 ****
     W    17 bit branch displacement (PC relative)
     z    17 bit branch displacement (just a number, not an address)
  
- Condition operands all have '?' as the prefix:
- 
-    ?f   Floating point compare conditions (encoded as 5 bits at 31)
- 
-    ?a	add conditions
-    ?A	64 bit add conditions
-    ?d	non-negated add conditions
-    ?@   add conditions followed by nullify
- 
-    ?s   compare/subtract conditions
-    ?S   64 bit compare/subtract conditions
-    ?t   non-negated compare/subtract conditions
-    ?n   compare/subtract conditions followed by nullify
- 
-    ?l   logical conditions
-    ?L   64 bit logical conditions
- 
-    ?b   branch on bit conditions
-    ?B   64 bit branch on bit conditions
- 
-    ?x   shift/extract/deposit conditions
-    ?X   64 bit shift/extract/deposit conditions
-    ?y   shift/extract/deposit conditions followed by nullify for conditional
-         branches
- 
-    ?u   unit conditions
-    ?U   64 bit unit conditions
- 
  Also these:
  
     p    5 bit shift count at 26 (to support the SHD instruction) encoded as
--- 107,112 ----
***************
*** 155,160 ****
--- 133,142 ----
     I    Source Floating Point Operand Format Completer encoded 1 bits at 20
  	(for 0xe format FP instructions)
     G    Destination Floating Point Operand Format Completer encoded 2 bits at 18
+    M    Floating-Point Compare Conditions (encoded as 5 bits at 31)
+    ?    non-negated/negated compare/subtract conditions.
+    @    non-negated/negated add conditions.
+    !    non-negated add conditions.
  
     s    2 bit space specifier at 17.
     b    register field at 10.
***************
*** 166,171 ****
--- 148,154 ----
     Q	5 bit immediate value at 10 (a bit position specified in
  	the bb instruction. It's the same as r above, except the
          value is in a different location)
+    |	shift/extract/deposit conditions when used in a conditional branch
  
  And these (PJH) for PA-89 F.P. registers and instructions:
  
***************
*** 180,186 ****
     8    5 bit register field at 20 (used in 'fmpyadd' and 'fmpysub')
     9    5 bit register field at 25 (used in 'fmpyadd' and 'fmpysub')
     H    Floating Point Operand Format at 26 for 'fmpyadd' and 'fmpysub'
!         (very similar to 'F') */
  
  
  /* List of characters not to put a space after.  Note that
--- 163,170 ----
     8    5 bit register field at 20 (used in 'fmpyadd' and 'fmpysub')
     9    5 bit register field at 25 (used in 'fmpyadd' and 'fmpysub')
     H    Floating Point Operand Format at 26 for 'fmpyadd' and 'fmpysub'
!         (very similar to 'F')
! */
  
  
  /* List of characters not to put a space after.  Note that
***************
*** 203,224 ****
  
  { "b",		0xe8000000, 0xffe0e000, "nW", pa10}, /* bl foo,r0 */
  { "ldi",	0x34000000, 0xffe0c000, "j,x", pa10},	/* ldo val(r0),r */
! { "comib", 	0x84000000, 0xfc000000, "?nn5,b,w", pa10}, /* comib{tf}*/
  /* This entry is for the disassembler only.  It will never be used by
     assembler.  */
! { "comib", 	0x8c000000, 0xfc000000, "?nn5,b,w", pa10}, /* comib{tf}*/
! { "comb",	0x80000000, 0xfc000000, "?nnx,b,w", pa10}, /* comb{tf} */
  /* This entry is for the disassembler only.  It will never be used by
     assembler.  */
! { "comb",	0x88000000, 0xfc000000, "?nnx,b,w", pa10}, /* comb{tf} */
! { "addb",	0xa0000000, 0xfc000000, "?@nx,b,w", pa10}, /* addb{tf} */
  /* This entry is for the disassembler only.  It will never be used by
     assembler.  */
! { "addb",	0xa8000000, 0xfc000000, "?@nx,b,w", pa10},
! { "addib",	0xa4000000, 0xfc000000, "?@n5,b,w", pa10}, /* addib{tf}*/
  /* This entry is for the disassembler only.  It will never be used by
     assembler.  */
! { "addib",	0xac000000, 0xfc000000, "?@n5,b,w", pa10}, /* addib{tf}*/
  { "nop",        0x08000240, 0xffffffff, "", pa10},      /* or 0,0,0 */
  { "copy",       0x08000240, 0xffe0ffe0, "x,t", pa10},   /* or r,0,t */
  { "mtsar",      0x01601840, 0xffe0ffff, "x", pa10}, /* mtctl r,cr11 */
--- 187,208 ----
  
  { "b",		0xe8000000, 0xffe0e000, "nW", pa10}, /* bl foo,r0 */
  { "ldi",	0x34000000, 0xffe0c000, "j,x", pa10},	/* ldo val(r0),r */
! { "comib", 	0x84000000, 0xfc000000, "?n5,b,w", pa10}, /* comib{tf}*/
  /* This entry is for the disassembler only.  It will never be used by
     assembler.  */
! { "comib", 	0x8c000000, 0xfc000000, "?n5,b,w", pa10}, /* comib{tf}*/
! { "comb",	0x80000000, 0xfc000000, "?nx,b,w", pa10}, /* comb{tf} */
  /* This entry is for the disassembler only.  It will never be used by
     assembler.  */
! { "comb",	0x88000000, 0xfc000000, "?nx,b,w", pa10}, /* comb{tf} */
! { "addb",	0xa0000000, 0xfc000000, "@nx,b,w", pa10}, /* addb{tf} */
  /* This entry is for the disassembler only.  It will never be used by
     assembler.  */
! { "addb",	0xa8000000, 0xfc000000, "@nx,b,w", pa10},
! { "addib",	0xa4000000, 0xfc000000, "@n5,b,w", pa10}, /* addib{tf}*/
  /* This entry is for the disassembler only.  It will never be used by
     assembler.  */
! { "addib",	0xac000000, 0xfc000000, "@n5,b,w", pa10}, /* addib{tf}*/
  { "nop",        0x08000240, 0xffffffff, "", pa10},      /* or 0,0,0 */
  { "copy",       0x08000240, 0xffe0ffe0, "x,t", pa10},   /* or r,0,t */
  { "mtsar",      0x01601840, 0xffe0ffff, "x", pa10}, /* mtctl r,cr11 */
***************
*** 281,366 ****
  { "bv",		0xe800c000, 0xfc00fffd, "n(b)", pa10},
  { "be",		0xe0000000, 0xfc000000, "nz(S,b)", pa10},
  { "ble",	0xe4000000, 0xfc000000, "nz(S,b)", pa10},
! { "movb",	0xc8000000, 0xfc000000, "?ynx,b,w", pa10},
! { "movib",	0xcc000000, 0xfc000000, "?yn5,b,w", pa10},
! { "combt",	0x80000000, 0xfc000000, "?tnx,b,w", pa10},
! { "combf",	0x88000000, 0xfc000000, "?tnx,b,w", pa10},
! { "comibt",	0x84000000, 0xfc000000, "?tn5,b,w", pa10},
! { "comibf",	0x8c000000, 0xfc000000, "?tn5,b,w", pa10},
! { "addbt",	0xa0000000, 0xfc000000, "?dnx,b,w", pa10},
! { "addbf",	0xa8000000, 0xfc000000, "?dnx,b,w", pa10},
! { "addibt",	0xa4000000, 0xfc000000, "?dn5,b,w", pa10},
! { "addibf",	0xac000000, 0xfc000000, "?dn5,b,w", pa10},
! { "bb",		0xc4004000, 0xfc004000, "?bnx,Q,w", pa10}, 
! { "bvb",	0xc0004000, 0xffe04000, "?bnx,w", pa10},
  { "clrbts",	0xe8004005, 0xffffffff, "", pa20},
  
  /* Computation Instructions */
  
! { "cmpclr",     0x080008a0, 0xfc000fe0, "?Sx,b,t", pa20},
! { "cmpclr",     0x08000880, 0xfc000fe0, "?sx,b,t", pa20},
! { "comclr",     0x08000880, 0xfc000fe0, "?sx,b,t", pa10},
! { "or",         0x08000260, 0xfc000fe0, "?Lx,b,t", pa20},
! { "or",         0x08000240, 0xfc000fe0, "?lx,b,t", pa10},
! { "xor",        0x080002a0, 0xfc000fe0, "?Lx,b,t", pa20},
! { "xor",        0x08000280, 0xfc000fe0, "?lx,b,t", pa10},
! { "and",        0x08000220, 0xfc000fe0, "?Lx,b,t", pa20},
! { "and",        0x08000200, 0xfc000fe0, "?lx,b,t", pa10},
! { "andcm",      0x08000020, 0xfc000fe0, "?Lx,b,t", pa20},
! { "andcm",      0x08000000, 0xfc000fe0, "?lx,b,t", pa10},
! { "uxor",       0x08000380, 0xfc000fe0, "?ux,b,t", pa10},
! { "uaddcm",     0x08000980, 0xfc000fe0, "?ux,b,t", pa10},
! { "uaddcmt",    0x080009c0, 0xfc000fe0, "?ux,b,t", pa10},
! { "dcor",       0x08000b80, 0xfc1f0fe0, "?ub,t",   pa10},
! { "idcor",      0x08000bc0, 0xfc1f0fe0, "?ub,t",   pa10},
! { "addi",       0xb4000000, 0xfc000800, "?ai,b,x", pa10},
! { "addio",      0xb4000800, 0xfc000800, "?ai,b,x", pa10},
! { "addit",      0xb0000000, 0xfc000800, "?ai,b,x", pa10},
! { "addito",     0xb0000800, 0xfc000800, "?ai,b,x", pa10},
! { "add",        0x08000620, 0xfc000fe0, "?Ax,b,t", pa20},
! { "add",        0x08000600, 0xfc000fe0, "?ax,b,t", pa10},
! { "addl",       0x08000a00, 0xfc000fe0, "?ax,b,t", pa10},
! { "addo",       0x08000e00, 0xfc000fe0, "?ax,b,t", pa10},
! { "addc",       0x08000700, 0xfc000fe0, "?ax,b,t", pa10},
! { "addco",      0x08000f00, 0xfc000fe0, "?ax,b,t", pa10},
! { "sub",        0x08000400, 0xfc000fe0, "?sx,b,t", pa10},
! { "subo",       0x08000c00, 0xfc000fe0, "?sx,b,t", pa10},
! { "subb",       0x08000500, 0xfc000fe0, "?sx,b,t", pa10},
! { "subbo",      0x08000d00, 0xfc000fe0, "?sx,b,t", pa10},
! { "subt",       0x080004c0, 0xfc000fe0, "?sx,b,t", pa10},
! { "subto",      0x08000cc0, 0xfc000fe0, "?sx,b,t", pa10},
! { "ds",         0x08000440, 0xfc000fe0, "?sx,b,t", pa10},
! { "subi",       0x94000000, 0xfc000800, "?si,b,x", pa10},
! { "subio",      0x94000800, 0xfc000800, "?si,b,x", pa10},
! { "cmpiclr",    0x90000800, 0xfc000800, "?Si,b,x", pa20},
! { "cmpiclr",    0x90000000, 0xfc000800, "?si,b,x", pa20},
! { "comiclr",    0x90000000, 0xfc000800, "?si,b,x", pa10},
! { "sh1add",     0x08000640, 0xfc000fe0, "?ax,b,t", pa10},
! { "sh1addl",    0x08000a40, 0xfc000fe0, "?ax,b,t", pa10},
! { "sh1addo",    0x08000e40, 0xfc000fe0, "?ax,b,t", pa10},
! { "sh2add",     0x08000680, 0xfc000fe0, "?ax,b,t", pa10},
! { "sh2addl",    0x08000a80, 0xfc000fe0, "?ax,b,t", pa10},
! { "sh2addo",    0x08000e80, 0xfc000fe0, "?ax,b,t", pa10},
! { "sh3add",     0x080006c0, 0xfc000fe0, "?ax,b,t", pa10},
! { "sh3addl",    0x08000ac0, 0xfc000fe0, "?ax,b,t", pa10},
! { "sh3addo",    0x08000ec0, 0xfc000fe0, "?ax,b,t", pa10},
  
  /* Extract and Deposit Instructions */
  
! { "vshd",       0xd0000000, 0xfc001fe0, "?xx,b,t", pa10},
! { "shd",        0xd0000800, 0xfc001c00, "?xx,b,p,t", pa10},
! { "vextru",     0xd0001000, 0xfc001fe0, "?xb,T,x", pa10},
! { "vextrs",     0xd0001400, 0xfc001fe0, "?xb,T,x", pa10},
! { "extru",      0xd0001800, 0xfc001c00, "?xb,P,T,x", pa10},
! { "extrs",      0xd0001c00, 0xfc001c00, "?xb,P,T,x", pa10},
! { "zvdep",      0xd4000000, 0xfc001fe0, "?xx,T,b", pa10},
! { "vdep",       0xd4000400, 0xfc001fe0, "?xx,T,b", pa10},
! { "zdep",       0xd4000800, 0xfc001c00, "?xx,p,T,b", pa10},
! { "dep",        0xd4000c00, 0xfc001c00, "?xx,p,T,b", pa10},
! { "zvdepi",     0xd4001000, 0xfc001fe0, "?x5,T,b", pa10},
! { "vdepi",      0xd4001400, 0xfc001fe0, "?x5,T,b", pa10},
! { "zdepi",      0xd4001800, 0xfc001c00, "?x5,p,T,b", pa10},
! { "depi",       0xd4001c00, 0xfc001c00, "?x5,p,T,b", pa10},
  
  /* System Control Instructions */
  
--- 265,341 ----
  { "bv",		0xe800c000, 0xfc00fffd, "n(b)", pa10},
  { "be",		0xe0000000, 0xfc000000, "nz(S,b)", pa10},
  { "ble",	0xe4000000, 0xfc000000, "nz(S,b)", pa10},
! { "movb",	0xc8000000, 0xfc000000, "|nx,b,w", pa10},
! { "movib",	0xcc000000, 0xfc000000, "|n5,b,w", pa10},
! { "combt",	0x80000000, 0xfc000000, "<nx,b,w", pa10},
! { "combf",	0x88000000, 0xfc000000, "<nx,b,w", pa10},
! { "comibt",	0x84000000, 0xfc000000, "<n5,b,w", pa10},
! { "comibf",	0x8c000000, 0xfc000000, "<n5,b,w", pa10},
! { "addbt",	0xa0000000, 0xfc000000, "!nx,b,w", pa10},
! { "addbf",	0xa8000000, 0xfc000000, "!nx,b,w", pa10},
! { "addibt",	0xa4000000, 0xfc000000, "!n5,b,w", pa10},
! { "addibf",	0xac000000, 0xfc000000, "!n5,b,w", pa10},
! { "bb",		0xc4004000, 0xfc004000, "~nx,Q,w", pa10}, 
! { "bvb",	0xc0004000, 0xffe04000, "~nx,w", pa10},
  { "clrbts",	0xe8004005, 0xffffffff, "", pa20},
  
  /* Computation Instructions */
  
! { "comclr",     0x08000880, 0xfc000fe0, "ax,b,t", pa10},
! { "or",         0x08000240, 0xfc000fe0, "&x,b,t", pa10},
! { "xor",        0x08000280, 0xfc000fe0, "&x,b,t", pa10},
! { "and",        0x08000200, 0xfc000fe0, "&x,b,t", pa10},
! { "andcm",      0x08000000, 0xfc000fe0, "&x,b,t", pa10},
! { "uxor",       0x08000380, 0xfc000fe0, "Ux,b,t", pa10},
! { "uaddcm",     0x08000980, 0xfc000fe0, "Ux,b,t", pa10},
! { "uaddcmt",    0x080009c0, 0xfc000fe0, "Ux,b,t", pa10},
! { "dcor",       0x08000b80, 0xfc1f0fe0, "Ub,t",   pa10},
! { "idcor",      0x08000bc0, 0xfc1f0fe0, "Ub,t",   pa10},
! { "addi",       0xb4000000, 0xfc000800, "di,b,x", pa10},
! { "addio",      0xb4000800, 0xfc000800, "di,b,x", pa10},
! { "addit",      0xb0000000, 0xfc000800, "di,b,x", pa10},
! { "addito",     0xb0000800, 0xfc000800, "di,b,x", pa10},
! { "add",        0x08000600, 0xfc000fe0, "dx,b,t", pa10},
! { "addl",       0x08000a00, 0xfc000fe0, "dx,b,t", pa10},
! { "addo",       0x08000e00, 0xfc000fe0, "dx,b,t", pa10},
! { "addc",       0x08000700, 0xfc000fe0, "dx,b,t", pa10},
! { "addco",      0x08000f00, 0xfc000fe0, "dx,b,t", pa10},
! { "sub",        0x08000400, 0xfc000fe0, "ax,b,t", pa10},
! { "subo",       0x08000c00, 0xfc000fe0, "ax,b,t", pa10},
! { "subb",       0x08000500, 0xfc000fe0, "ax,b,t", pa10},
! { "subbo",      0x08000d00, 0xfc000fe0, "ax,b,t", pa10},
! { "subt",       0x080004c0, 0xfc000fe0, "ax,b,t", pa10},
! { "subto",      0x08000cc0, 0xfc000fe0, "ax,b,t", pa10},
! { "ds",         0x08000440, 0xfc000fe0, "ax,b,t", pa10},
! { "subi",       0x94000000, 0xfc000800, "ai,b,x", pa10},
! { "subio",      0x94000800, 0xfc000800, "ai,b,x", pa10},
! { "comiclr",    0x90000000, 0xfc000800, "ai,b,x", pa10},
! { "sh1add",     0x08000640, 0xfc000fe0, "dx,b,t", pa10},
! { "sh1addl",    0x08000a40, 0xfc000fe0, "dx,b,t", pa10},
! { "sh1addo",    0x08000e40, 0xfc000fe0, "dx,b,t", pa10},
! { "sh2add",     0x08000680, 0xfc000fe0, "dx,b,t", pa10},
! { "sh2addl",    0x08000a80, 0xfc000fe0, "dx,b,t", pa10},
! { "sh2addo",    0x08000e80, 0xfc000fe0, "dx,b,t", pa10},
! { "sh3add",     0x080006c0, 0xfc000fe0, "dx,b,t", pa10},
! { "sh3addl",    0x08000ac0, 0xfc000fe0, "dx,b,t", pa10},
! { "sh3addo",    0x08000ec0, 0xfc000fe0, "dx,b,t", pa10},
  
  /* Extract and Deposit Instructions */
  
! { "vshd",       0xd0000000, 0xfc001fe0, ">x,b,t", pa10},
! { "shd",        0xd0000800, 0xfc001c00, ">x,b,p,t", pa10},
! { "vextru",     0xd0001000, 0xfc001fe0, ">b,T,x", pa10},
! { "vextrs",     0xd0001400, 0xfc001fe0, ">b,T,x", pa10},
! { "extru",      0xd0001800, 0xfc001c00, ">b,P,T,x", pa10},
! { "extrs",      0xd0001c00, 0xfc001c00, ">b,P,T,x", pa10},
! { "zvdep",      0xd4000000, 0xfc001fe0, ">x,T,b", pa10},
! { "vdep",       0xd4000400, 0xfc001fe0, ">x,T,b", pa10},
! { "zdep",       0xd4000800, 0xfc001c00, ">x,p,T,b", pa10},
! { "dep",        0xd4000c00, 0xfc001c00, ">x,p,T,b", pa10},
! { "zvdepi",     0xd4001000, 0xfc001fe0, ">5,T,b", pa10},
! { "vdepi",      0xd4001400, 0xfc001fe0, ">5,T,b", pa10},
! { "zdepi",      0xd4001800, 0xfc001c00, ">5,p,T,b", pa10},
! { "depi",       0xd4001c00, 0xfc001c00, ">5,p,T,b", pa10},
  
  /* System Control Instructions */
  
*** gas-src/opcodes/hppa-dis.c	Fri Jul  9 15:17:37 1999
--- orig/opcodes/hppa-dis.c	Wed Jul  7 17:32:17 1999
***************
*** 67,109 ****
  };
  
  static const char compare_cond_names[][5] = {
!   "", ",=", ",<", ",<=", ",<<", ",<<=", ",sv", ",od",
!   ",tr", ",<>", ",>=", ",>", ",>>=", ",>>", ",nsv", ",ev"
! };
! static const char compare_cond_64_names[][6] = {
!   ",*", ",*=", ",*<", ",*<=", ",*<<", ",*<<=", ",*sv", ",*od", 
!   ",*tr", ",*<>", ",*>=", ",*>", ",*>>=", ",*>>", ",*nsv", ",*ev"
  };
  static const char add_cond_names[][5] = {
!   "", ",=", ",<", ",<=", ",nuv", ",znv", ",sv", ",od",
!   ",tr", ",<>", ",>=", ",>", ",uv", ",vnz", ",nsv", ",ev"
! };
! static const char add_cond_64_names[][6] = {
!   ",*", ",*=", ",*<", ",*<=", ",*nuv", ",*znv", ",*sv", ",*od",
!   ",*tr", ",*<>", ",*>=", ",*>", ",*uv", ",*vnz", ",*nsv", ",*ev"
  };
  static const char *const logical_cond_names[] = {
    "", ",=", ",<", ",<=", 0, 0, 0, ",od",
!   ",tr", ",<>", ",>=", ",>", 0, 0, 0, ",ev"
! };
! static const char *const logical_cond_64_names[] = {
!   ",*", ",*=", ",*<", ",*<=", 0, 0, 0, ",*od",
!   ",*tr", ",*<>", ",*>=", ",*>", 0, 0, 0, ",*ev"
! };
  static const char *const unit_cond_names[] = {
    "", 0, ",sbz", ",shz", ",sdc", 0, ",sbc", ",shc",
    ",tr", 0, ",nbz", ",nhz", ",ndc", 0, ",nbc", ",nhc"
  };
- static const char *const unit_cond_64_names[] = {
-   ",*", ",*swz", ",*sbz", ",*shz", ",*sdc", ",*swc", ",*sbc", ",*shc",
-   ",*tr", ",*nwz", ",*nbz", ",*nhz", ",*ndc", ",*nwc", ",*nbc", ",*nhc"
- };
  static const char shift_cond_names[][4] = {
    "", ",=", ",<", ",od", ",tr", ",<>", ",>=", ",ev"
  };
- static const char shift_cond_64_names[][5] = {
-   ",*", ",*=", ",*<", ",*od", ",*tr", ",*<>", ",*>=", ",*ev"
- };
  static const char index_compl_names[][4] = {"", ",m", ",s", ",sm"};
  static const char short_ldst_compl_names[][4] = {"", ",ma", "", ",mb"};
  static const char *const short_bytes_compl_names[] = {
--- 67,91 ----
  };
  
  static const char compare_cond_names[][5] = {
!   "", ",=", ",<", ",<=", ",<<", ",<<=", ",sv",
!   ",od", ",tr", ",<>", ",>=", ",>", ",>>=",
!   ",>>", ",nsv", ",ev"
  };
  static const char add_cond_names[][5] = {
!   "", ",=", ",<", ",<=", ",nuv", ",znv", ",sv",
!   ",od", ",tr", ",<>", ",>=", ",>", ",uv",
!   ",vnz", ",nsv", ",ev"
  };
  static const char *const logical_cond_names[] = {
    "", ",=", ",<", ",<=", 0, 0, 0, ",od",
!   ",tr", ",<>", ",>=", ",>", 0, 0, 0, ",ev"};
  static const char *const unit_cond_names[] = {
    "", 0, ",sbz", ",shz", ",sdc", 0, ",sbc", ",shc",
    ",tr", 0, ",nbz", ",nhz", ",ndc", 0, ",nbc", ",nhc"
  };
  static const char shift_cond_names[][4] = {
    "", ",=", ",<", ",od", ",tr", ",<>", ",>=", ",ev"
  };
  static const char index_compl_names[][4] = {"", ",m", ",s", ",sm"};
  static const char short_ldst_compl_names[][4] = {"", ",ma", "", ",mb"};
  static const char *const short_bytes_compl_names[] = {
***************
*** 323,329 ****
  	  
  	  (*info->fprintf_func) (info->stream, "%s", opcode->name);
  
! 	  if (!strchr ("*cfCY<?!@-+&U>~nHNZFIMadu|", opcode->args[0]))
  	    (*info->fprintf_func) (info->stream, " ");
  	  for (s = opcode->args; *s != '\0'; ++s)
  	    {
--- 305,311 ----
  	  
  	  (*info->fprintf_func) (info->stream, "%s", opcode->name);
  
! 	  if (!strchr ("cfCY<?!@-+&U>~nHNZFIMadu|", opcode->args[0]))
  	    (*info->fprintf_func) (info->stream, " ");
  	  for (s = opcode->args; *s != '\0'; ++s)
  	    {
***************
*** 424,503 ****
  		  (*info->fprintf_func) (info->stream, "%s ",
  				    short_bytes_compl_names[GET_COMPL (insn)]);
  		  break;
! 
! 		  /* Handle conditions */
  		case '?':
! 		  {
! 		    s++;
! 		    switch (*s)
! 		      {
! 			/* these four conditions are for the set of instructions
! 			   which distinguish true/false conditions by opcode rather
! 			   than by the 'f' bit (sigh): comb, comib, addb, addib */
! 		      case 't':
! 			fputs_filtered (compare_cond_names[GET_FIELD (insn, 16, 18)],
! 					info);
! 			break;
! 		      case 'n':
! 			fputs_filtered (compare_cond_names[GET_FIELD (insn, 16, 18)
! 							  + GET_FIELD (insn, 4, 4) * 8], info);
! 			break;
! 		      case '@':
! 			fputs_filtered (add_cond_names[GET_FIELD (insn, 16, 18)
! 						      + GET_FIELD (insn, 4, 4) * 8], info);
! 			break;
! 		      case 's':
! 			(*info->fprintf_func) (info->stream, "%s ",
! 					       compare_cond_names[GET_COND (insn)]);
! 			break;
! 		      case 'S':
! 			(*info->fprintf_func) (info->stream, "%s ",
! 					       compare_cond_64_names[GET_COND (insn)]);
! 			break;
! 		      case 'a':
! 			(*info->fprintf_func) (info->stream, "%s ",
! 					       add_cond_names[GET_COND (insn)]);
! 			break;
! 		      case 'A':
! 			(*info->fprintf_func) (info->stream, "%s ",
! 					       add_cond_64_names[GET_COND (insn)]);
! 			break;
! 		      case 'd':
! 			(*info->fprintf_func) (info->stream, "%s",
! 					       add_cond_names[GET_FIELD (insn, 16, 18)]);
! 			break;
! 
! 		      case 'l':
! 			(*info->fprintf_func) (info->stream, "%s ",
! 					       logical_cond_names[GET_COND (insn)]);
! 			break;
! 		      case 'L':
! 			(*info->fprintf_func) (info->stream, "%s ",
! 					       logical_cond_64_names[GET_COND (insn)]);
! 			break;
! 		      case 'u':
! 			(*info->fprintf_func) (info->stream, "%s ",
! 					       unit_cond_names[GET_COND (insn)]);
! 			break;
! 		      case 'U':
! 			(*info->fprintf_func) (info->stream, "%s ",
! 					       unit_cond_64_names[GET_COND (insn)]);
! 			break;
! 		      case 'y':
! 		      case 'x':
! 		      case 'b':
! 			(*info->fprintf_func)
! 			  (info->stream, "%s",
! 			   shift_cond_names[GET_FIELD (insn, 16, 18)]);
! 
! 			/* If the next character in args is 'n', it will handle
! 			   putting out the space.  */
! 			if (s[1] != 'n')
! 			  (*info->fprintf_func) (info->stream, " ");
! 			break;
! 		      }
! 		    break;
! 		  }
  		case 'V':
  		  fput_const (extract_5_store (insn), info);
  		  break;
--- 406,459 ----
  		  (*info->fprintf_func) (info->stream, "%s ",
  				    short_bytes_compl_names[GET_COMPL (insn)]);
  		  break;
! 		/* these four conditions are for the set of instructions
! 		   which distinguish true/false conditions by opcode rather
! 		   than by the 'f' bit (sigh): comb, comib, addb, addib */
! 		case '<':
! 		  fputs_filtered (compare_cond_names[GET_FIELD (insn, 16, 18)],
! 				  info);
! 		  break;
  		case '?':
! 		  fputs_filtered (compare_cond_names[GET_FIELD (insn, 16, 18)
! 				  + GET_FIELD (insn, 4, 4) * 8], info);
! 		  break;
! 		case '@':
! 		  fputs_filtered (add_cond_names[GET_FIELD (insn, 16, 18)
! 				  + GET_FIELD (insn, 4, 4) * 8], info);
! 		  break;
! 		case 'a':
! 		  (*info->fprintf_func) (info->stream, "%s ",
! 					 compare_cond_names[GET_COND (insn)]);
! 		  break;
! 		case 'd':
! 		  (*info->fprintf_func) (info->stream, "%s ",
! 					 add_cond_names[GET_COND (insn)]);
! 		  break;
! 		case '!':
! 		  (*info->fprintf_func) (info->stream, "%s",
! 				    add_cond_names[GET_FIELD (insn, 16, 18)]);
! 		  break;
! 
! 		case '&':
! 		  (*info->fprintf_func) (info->stream, "%s ",
! 				    logical_cond_names[GET_COND (insn)]);
! 		  break;
! 		case 'U':
! 		  (*info->fprintf_func) (info->stream, "%s ",
! 				    unit_cond_names[GET_COND (insn)]);
! 		  break;
! 		case '|':
! 		case '>':
! 		case '~':
! 		  (*info->fprintf_func)
! 		    (info->stream, "%s",
! 		     shift_cond_names[GET_FIELD (insn, 16, 18)]);
! 
! 		  /* If the next character in args is 'n', it will handle
! 		     putting out the space.  */
! 		  if (s[1] != 'n')
! 		    (*info->fprintf_func) (info->stream, " ");
! 		  break;
  		case 'V':
  		  fput_const (extract_5_store (insn), info);
  		  break;

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~1999-08-05 16:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <199907092055.NAA11875@cygnus.com>
1999-07-28  3:19 ` Patch: add prefix to condition args in opcodes Jeffrey A Law
1999-07-28  7:11   ` Jerry Quinn
1999-08-05 14:41     ` Jeffrey A Law
1999-08-05 14:41       ` Jeffrey A Law
1999-07-28 10:12   ` Jerry Quinn
1999-08-05 16:02     ` Jeffrey A Law
1999-08-05 16:02       ` Jeffrey A Law
     [not found] <65154398@toto.iv>
1999-07-12 13:17 ` Jerry Quinn
1999-07-09 13:53 Jerry Quinn

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).