public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: PATCH: minor hppa disasm cleanup
  1999-07-01  0:00 PATCH: minor hppa disasm cleanup Jerry Quinn
@ 1999-07-01  0:00 ` Jeffrey A Law
  1999-07-01  0:00   ` Jerry Quinn
  0 siblings, 1 reply; 4+ messages in thread
From: Jeffrey A Law @ 1999-07-01  0:00 UTC (permalink / raw)
  To: Jerry Quinn; +Cc: binutils

  In message < 199906011505.LAA08672@wmtl249c.us.nortel.com >you write:
  > In the pa disassembler, the 'E' code is always used for 0x0C opcodes
  > where only left register halves occur.  So the L/R selection bit at 25
  > is always 0 and the test isn't required.
  > 
  > This is patched against 990413, since I can't use cvs to update my
  > snapshot (restrictive firewall) and this is the last one I have.
  > 
  > Changelog entry:
  > 
  > Tue Jun  1 11:03:02 EDT 1999  Jerry Quinn <jquinn@nortelnetworks.com>
  > 
  >     * hppa-dis.c (print_insn_hppa): Remove unnecessary test in 'E'
  >       code.
Is this really correct?  Consider xmpyu, fmpyfadd & fmpynfadd, none of which
are 0xc opcodes, but all use 'E'

jeff

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

* Re: PATCH: minor hppa disasm cleanup
  1999-07-01  0:00 ` Jeffrey A Law
@ 1999-07-01  0:00   ` Jerry Quinn
  1999-07-28  3:42     ` Jeffrey A Law
  0 siblings, 1 reply; 4+ messages in thread
From: Jerry Quinn @ 1999-07-01  0:00 UTC (permalink / raw)
  To: law; +Cc: binutils

Jeffrey A Law wrote:
> 
>   In message < 199906011505.LAA08672@wmtl249c.us.nortel.com >you write:
>   > In the pa disassembler, the 'E' code is always used for 0x0C opcodes
>   > where only left register halves occur.  So the L/R selection bit at 25
>   > is always 0 and the test isn't required.
>   >
>   > This is patched against 990413, since I can't use cvs to update my
>   > snapshot (restrictive firewall) and this is the last one I have.
>   >
>   > Changelog entry:
>   >
>   > Tue Jun  1 11:03:02 EDT 1999  Jerry Quinn <jquinn@nortelnetworks.com>
>   >
>   >     * hppa-dis.c (print_insn_hppa): Remove unnecessary test in 'E'
>   >       code.
> Is this really correct?  Consider xmpyu, fmpyfadd & fmpynfadd, none of which
> are 0xc opcodes, but all use 'E'

I think the 'E' code in these three instructions is incorrect.  The
disassembler considers E to be 6:10,25 while J is 6:10,24.  In the
assembler, the templates with 'J' are never used at all.  Instead, the
template with 'E' detects if there is an R float reg and then flips the
opcode from 0xc to 0xe.  It just happens that that opcode flip is safe
and does nothing for these three instructions.

My feeling for how it should work is that E is a left half float reg
code only.  When that fails, the compiler would try to use the J
template and succeed.  Also, the change from pa10 to pa11 could be
handled by the J templates being pa11 while E templates are pa10.

If that sounds OK, I'll see if I can find some time to reorganize the
code.

Jerry


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

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

* PATCH: minor hppa disasm cleanup
@ 1999-07-01  0:00 Jerry Quinn
  1999-07-01  0:00 ` Jeffrey A Law
  0 siblings, 1 reply; 4+ messages in thread
From: Jerry Quinn @ 1999-07-01  0:00 UTC (permalink / raw)
  To: binutils

In the pa disassembler, the 'E' code is always used for 0x0C opcodes
where only left register halves occur.  So the L/R selection bit at 25
is always 0 and the test isn't required.

This is patched against 990413, since I can't use cvs to update my
snapshot (restrictive firewall) and this is the last one I have.

Changelog entry:

Tue Jun  1 11:03:02 EDT 1999  Jerry Quinn <jquinn@nortelnetworks.com>

    * hppa-dis.c (print_insn_hppa): Remove unnecessary test in 'E'
      code.


*** orig/opcodes/hppa-dis.c	Tue Jun  1 10:35:45 1999
--- gas-src/opcodes/hppa-dis.c	Tue Jun  1 10:35:57 1999
***************
*** 327,336 ****
  		  fput_creg (GET_FIELD (insn, 6, 10), info);
  		  break;
  		case 'E':
!                   if (GET_FIELD (insn, 25, 25))
! 		      fput_fp_reg_r (GET_FIELD (insn, 6, 10), info);
! 		  else
! 		      fput_fp_reg (GET_FIELD (insn, 6, 10), info);
  		  break;
  		case 't':
  		  fput_reg (GET_FIELD (insn, 27, 31), info);
--- 327,333 ----
  		  fput_creg (GET_FIELD (insn, 6, 10), info);
  		  break;
  		case 'E':
! 		  fput_fp_reg (GET_FIELD (insn, 6, 10), info);
  		  break;
  		case 't':
  		  fput_reg (GET_FIELD (insn, 27, 31), info);

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

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

* Re: PATCH: minor hppa disasm cleanup
  1999-07-01  0:00   ` Jerry Quinn
@ 1999-07-28  3:42     ` Jeffrey A Law
  0 siblings, 0 replies; 4+ messages in thread
From: Jeffrey A Law @ 1999-07-28  3:42 UTC (permalink / raw)
  To: Jerry Quinn; +Cc: binutils

  In message <376802F6.B6FBAE0F@americasm01.nt.com>you write:
  > Jeffrey A Law wrote:
  > > 
  > >   In message <199906011505.LAA08672@wmtl249c.us.nortel.com>you write:
  > >   > In the pa disassembler, the 'E' code is always used for 0x0C opcodes
  > >   > where only left register halves occur.  So the L/R selection bit at 2
  > 5
  > >   > is always 0 and the test isn't required.
  > >   >
  > >   > This is patched against 990413, since I can't use cvs to update my
  > >   > snapshot (restrictive firewall) and this is the last one I have.
  > >   >
  > >   > Changelog entry:
  > >   >
  > >   > Tue Jun  1 11:03:02 EDT 1999  Jerry Quinn <jquinn@nortelnetworks.com>
  > >   >
  > >   >     * hppa-dis.c (print_insn_hppa): Remove unnecessary test in 'E'
  > >   >       code.
  > > Is this really correct?  Consider xmpyu, fmpyfadd & fmpynfadd, none of wh
  > ich
  > > are 0xc opcodes, but all use 'E'
  > 
  > I think the 'E' code in these three instructions is incorrect.  The
  > disassembler considers E to be 6:10,25 while J is 6:10,24.  In the
  > assembler, the templates with 'J' are never used at all.  Instead, the
  > template with 'E' detects if there is an R float reg and then flips the
  > opcode from 0xc to 0xe.  It just happens that that opcode flip is safe
  > and does nothing for these three instructions.
  > 
  > My feeling for how it should work is that E is a left half float reg
  > code only.  When that fails, the compiler would try to use the J
  > template and succeed.  Also, the change from pa10 to pa11 could be
  > handled by the J templates being pa11 while E templates are pa10.
  > 
  > If that sounds OK, I'll see if I can find some time to reorganize the
  > code.
Now that we've fixed up xmpyu, fmpyfadd, & fmpynfadd I installed the
patch mentioned above.

Thanks,
jeff

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

end of thread, other threads:[~1999-07-28  3:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-01  0:00 PATCH: minor hppa disasm cleanup Jerry Quinn
1999-07-01  0:00 ` Jeffrey A Law
1999-07-01  0:00   ` Jerry Quinn
1999-07-28  3:42     ` Jeffrey A Law

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