Machine setting on disassembly
Patrick Macdonald
patrickm@redhat.com
Mon Mar 19 13:36:00 GMT 2001
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
More information about the Cgen
mailing list