Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IcooF-0006QB-3b for qemu-devel@nongnu.org; Tue, 02 Oct 2007 16:57:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IcooA-0006Pz-5M for qemu-devel@nongnu.org; Tue, 02 Oct 2007 16:57:38 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Icoo9-0006Pw-Uf for qemu-devel@nongnu.org; Tue, 02 Oct 2007 16:57:33 -0400 Received: from miranda.se.axis.com ([193.13.178.8]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Icony-0006J7-Em for qemu-devel@nongnu.org; Tue, 02 Oct 2007 16:57:33 -0400 Received: from axis.com (edgar.se.axis.com [10.92.151.1]) by miranda.se.axis.com (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id l92KuAHX031679 for ; Tue, 2 Oct 2007 22:56:10 +0200 Date: Tue, 2 Oct 2007 22:56:10 +0200 From: "Edgar E. Iglesias" Message-ID: <20071002205610.GC14386@edgar.underground.se.axis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] CRIS disassembly (qemu) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This adds CRIS disas support to existing files in qemu. -- Edgar E. Iglesias Axis Communications AB dis-asm.h | 5 +++++ disas.c | 3 +++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dis-asm.h b/dis-asm.h index bacd9c4..a805a48 100644 --- a/dis-asm.h +++ b/dis-asm.h @@ -200,6 +200,10 @@ enum bfd_architecture #define bfd_mach_m32r 0 /* backwards compatibility */ bfd_arch_mn10200, /* Matsushita MN10200 */ bfd_arch_mn10300, /* Matsushita MN10300 */ + bfd_arch_cris, /* Axis CRIS */ +#define bfd_mach_cris_v0_v10 255 +#define bfd_mach_cris_v32 32 +#define bfd_mach_cris_v10_v32 1032 bfd_arch_last }; #define bfd_mach_s390_31 31 @@ -382,6 +386,7 @@ extern int print_insn_tic30 PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_ppc PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_alpha PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_s390 PARAMS ((bfd_vma, disassemble_info*)); +extern int print_insn_crisv32 PARAMS ((bfd_vma, disassemble_info*)); #if 0 /* Fetch the disassembler for a given BFD, if that support is available. */ diff --git a/disas.c b/disas.c index ae20d37..fe1fa9d 100644 --- a/disas.c +++ b/disas.c @@ -205,6 +205,9 @@ void target_disas(FILE *out, target_ulong code, target_ulong size, int flags) #elif defined(TARGET_ALPHA) disasm_info.mach = bfd_mach_alpha; print_insn = print_insn_alpha; +#elif defined(TARGET_CRIS) + disasm_info.mach = bfd_mach_cris_v32; + print_insn = print_insn_crisv32; #else fprintf(out, "0x" TARGET_FMT_lx ": Asm output not supported on this arch\n", code);