public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* Machine setting on disassembly
@ 2001-03-15  8:42 Patrick Macdonald
  2001-03-15  9:48 ` Frank Ch. Eigler
  2001-03-19 13:36 ` Patrick Macdonald
  0 siblings, 2 replies; 6+ messages in thread
From: Patrick Macdonald @ 2001-03-15  8:42 UTC (permalink / raw)
  To: cgen

Hi,

We currently use CGEN_COMPUTE_ISA (cgen-dis.in) for target
isa selection on disassembly and I'd like to add
CGEN_COMPUTE_MACH for target machine selection (I have 
multiple machines under one architecture that can switch on
the fly).  

Anyone have moral/technical objections to allowing target
specific machine selection?  If not, I'll submit the patch
after testing.

Patrick

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

* Re: Machine setting on disassembly
  2001-03-15  8:42 Machine setting on disassembly Patrick Macdonald
@ 2001-03-15  9:48 ` Frank Ch. Eigler
  2001-03-15 10:25   ` Patrick Macdonald
  2001-03-19 13:36 ` Patrick Macdonald
  1 sibling, 1 reply; 6+ messages in thread
From: Frank Ch. Eigler @ 2001-03-15  9:48 UTC (permalink / raw)
  To: Patrick Macdonald; +Cc: cgen

Hi -

On Thu, Mar 15, 2001 at 11:42:36AM -0500, Patrick Macdonald wrote:
: We currently use CGEN_COMPUTE_ISA (cgen-dis.in) for target
: isa selection on disassembly and I'd like to add
: CGEN_COMPUTE_MACH for target machine selection [...]

What would CGEN_COMPUTE_MACH take as input?  If it's just
the disassemble_info structure, then why is its "mach"
field not sufficient?

- FChE
-- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6sQB2VZbdDOm/ZT0RAunmAJ9KU8aRWB9UqTwJOk9dAqaBCTYhwwCeKb/p
gN9sQvvYZYW/J4xzvHDhO98=
=+lVR
-----END PGP SIGNATURE-----

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

* Re: Machine setting on disassembly
  2001-03-15  9:48 ` Frank Ch. Eigler
@ 2001-03-15 10:25   ` Patrick Macdonald
  2001-03-15 10:34     ` Frank Ch. Eigler
  0 siblings, 1 reply; 6+ messages in thread
From: Patrick Macdonald @ 2001-03-15 10:25 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: cgen

"Frank Ch. Eigler" wrote:
> 
> Hi -
> 
> On Thu, Mar 15, 2001 at 11:42:36AM -0500, Patrick Macdonald wrote:
> : We currently use CGEN_COMPUTE_ISA (cgen-dis.in) for target
> : isa selection on disassembly and I'd like to add
> : CGEN_COMPUTE_MACH for target machine selection [...]
> 
> What would CGEN_COMPUTE_MACH take as input?  If it's just
> the disassemble_info structure, then why is its "mach"
> field not sufficient?
> 
> - FChE

Yeah, it'd take the disassemble_info structure.  The problem is
that the machine on the disassemble_info structure may not be
the machine I want. 

Patrick

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

* Re: Machine setting on disassembly
  2001-03-15 10:25   ` Patrick Macdonald
@ 2001-03-15 10:34     ` Frank Ch. Eigler
  0 siblings, 0 replies; 6+ messages in thread
From: Frank Ch. Eigler @ 2001-03-15 10:34 UTC (permalink / raw)
  To: Patrick Macdonald; +Cc: cgen

Hi -

: > What would CGEN_COMPUTE_MACH take as input?  If it's just
: > the disassemble_info structure, then why is its "mach"
: > field not sufficient?
: 
: Yeah, it'd take the disassemble_info structure.  The problem is
: that the machine on the disassemble_info structure may not be
: the machine I want. 

... so the caller that prepares the disassemble_info structure
cannot compute the correct mach up front, but your opcodes 
routine can?  Okay.


- FChE
-- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6sQtIVZbdDOm/ZT0RAj8kAJ9c6C+qgYhyfJwJ+ds2KlsMTB+xtgCePmKn
gKsUVe9rSgGNSFtpsfPjxQs=
=XfI2
-----END PGP SIGNATURE-----

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

* Re: Machine setting on disassembly
  2001-03-15  8:42 Machine setting on disassembly Patrick Macdonald
  2001-03-15  9:48 ` Frank Ch. Eigler
@ 2001-03-19 13:36 ` Patrick Macdonald
  2001-03-20  2:35   ` Ben Elliston
  1 sibling, 1 reply; 6+ messages in thread
From: Patrick Macdonald @ 2001-03-19 13:36 UTC (permalink / raw)
  To: cgen

Patrick Macdonald wrote:
> 
> Hi,
> 
> We currently use CGEN_COMPUTE_ISA (cgen-dis.in) for target
> isa selection on disassembly and I'd like to add
> CGEN_COMPUTE_MACH for target machine selection (I have
> multiple machines under one architecture that can switch on
> the fly).
> 
> Anyone have moral/technical objections to allowing target
> specific machine selection?  If not, I'll submit the patch
> after testing.

Good... no objections, here's the patch.  Ok to commit?

Patrick

-----------------------

  2001-03-19  Patrick Macdonald  <patrickm@redhat.com>

      * cgen-dis.in (print_insn_@arch@): Add support for target machine
      determination via CGEN_COMPUTE_MACH.

Index: cgen-dis.in
===================================================================
RCS file: /cvs/src/src/opcodes/cgen-dis.in,v
retrieving revision 1.6
diff -c -p -r1.6 cgen-dis.in
*** cgen-dis.in 2001/03/13 22:58:34     1.6
--- cgen-dis.in 2001/03/19 21:28:44
*************** print_insn_@arch@ (pc, info)
*** 358,373 ****
    arch = info->arch;
    if (arch == bfd_arch_unknown)
      arch = CGEN_BFD_ARCH;
!       
!   /* There's no standard way to compute the isa number (e.g. for arm thumb)
       so we leave it to the target.  */
  #ifdef CGEN_COMPUTE_ISA
    isa = CGEN_COMPUTE_ISA (info);
  #else
    isa = 0;
  #endif
- 
-   mach = info->mach;
  
    /* If we've switched cpu's, close the current table and open a new one.  */
    if (cd
--- 358,377 ----
    arch = info->arch;
    if (arch == bfd_arch_unknown)
      arch = CGEN_BFD_ARCH;
!    
!   /* There's no standard way to compute the machine or isa number
       (e.g. for arm thumb) so we leave it to the target.  */
+ #ifdef CGEN_COMPUTE_MACH
+   mach = CGEN_COMPUTE_MACH (info);
+ #else
+   mach = info->mach;
+ #endif
+ 
  #ifdef CGEN_COMPUTE_ISA
    isa = CGEN_COMPUTE_ISA (info);
  #else
    isa = 0;
  #endif
  
    /* If we've switched cpu's, close the current table and open a new one.  */
    if (cd

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

* Re: Machine setting on disassembly
  2001-03-19 13:36 ` Patrick Macdonald
@ 2001-03-20  2:35   ` Ben Elliston
  0 siblings, 0 replies; 6+ messages in thread
From: Ben Elliston @ 2001-03-20  2:35 UTC (permalink / raw)
  To: Patrick Macdonald; +Cc: cgen

>>>>> "Patrick" == Patrick Macdonald <patrickm@redhat.com> writes:

  Patrick>       * cgen-dis.in (print_insn_@arch@): Add support for target machine
  Patrick>       determination via CGEN_COMPUTE_MACH.

  Patrick> Good... no objections, here's the patch.  Ok to commit?

This seems innocuous enough -- go ahead.

Ben

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

end of thread, other threads:[~2001-03-20  2:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-15  8:42 Machine setting on disassembly Patrick Macdonald
2001-03-15  9:48 ` Frank Ch. Eigler
2001-03-15 10:25   ` Patrick Macdonald
2001-03-15 10:34     ` Frank Ch. Eigler
2001-03-19 13:36 ` Patrick Macdonald
2001-03-20  2:35   ` Ben Elliston

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