From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18334 invoked by alias); 13 Mar 2004 01:31:34 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 18325 invoked from network); 13 Mar 2004 01:31:32 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 13 Mar 2004 01:31:32 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i2D1VW07004253 for ; Fri, 12 Mar 2004 20:31:32 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i2D1VW810100 for ; Fri, 12 Mar 2004 20:31:32 -0500 Received: from localhost.localdomain (vpn50-70.rdu.redhat.com [172.16.50.70]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id i2D1VWE3008576 for ; Fri, 12 Mar 2004 20:31:32 -0500 Received: from saguaro (saguaro.lan [192.168.64.2]) by localhost.localdomain (8.12.10/8.12.10) with SMTP id i2D1VQcG030548 for ; Fri, 12 Mar 2004 18:31:26 -0700 Date: Fri, 19 Mar 2004 00:09:00 -0000 From: Kevin Buettner To: gdb-patches@sources.redhat.com Subject: [PATCH/FR-V] Add FR450 support Message-ID: <20040312183126.42344c34@saguaro> Organization: Red Hat Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg00296.txt.bz2 Message-ID: <20040319000900.XppedFhcBtkj-FnxaJTp8JwoHEZE4pAshInDBBd4s4Y@z> I've just committed the patch below. * frv-tdep.c (set_variant_scratch_registers): New function. * frv-tdep.h (scr0_regnum, scr1_regnum, scr2_regnum, scr3_regnum): New constants. From Richard Sandiford : * frv-tdep.c (frv_gdbarch_init): Add FR450 support. Index: frv-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/frv-tdep.c,v retrieving revision 1.75 diff -u -p -r1.75 frv-tdep.c --- frv-tdep.c 13 Mar 2004 01:13:04 -0000 1.75 +++ frv-tdep.c 13 Mar 2004 01:21:09 -0000 @@ -239,6 +239,15 @@ set_variant_abi_fdpic (struct gdbarch_td var->register_names[fdpic_loadmap_interp_regnum] = xstrdup ("loadmap_interp"); } +static void +set_variant_scratch_registers (struct gdbarch_tdep *var) +{ + var->register_names[scr0_regnum] = xstrdup ("scr0"); + var->register_names[scr1_regnum] = xstrdup ("scr1"); + var->register_names[scr2_regnum] = xstrdup ("scr2"); + var->register_names[scr3_regnum] = xstrdup ("scr3"); +} + static const char * frv_register_name (int reg) { @@ -1362,6 +1371,7 @@ frv_gdbarch_init (struct gdbarch_info in break; case bfd_mach_fr400: + case bfd_mach_fr450: set_variant_num_gprs (var, 32); set_variant_num_fprs (var, 32); break; @@ -1378,6 +1388,9 @@ frv_gdbarch_init (struct gdbarch_info in if (elf_flags & EF_FRV_FDPIC) set_variant_abi_fdpic (var); + if (elf_flags & EF_FRV_CPU_FR450) + set_variant_scratch_registers (var); + gdbarch = gdbarch_alloc (&info, var); set_gdbarch_short_bit (gdbarch, 16); @@ -1448,6 +1461,7 @@ frv_gdbarch_init (struct gdbarch_info in break; case bfd_mach_fr400: + case bfd_mach_fr450: /* fr400-style hardware debugging support. */ var->num_hw_watchpoints = 2; var->num_hw_breakpoints = 4; Index: frv-tdep.h =================================================================== RCS file: /cvs/src/src/gdb/frv-tdep.h,v retrieving revision 1.3 diff -u -p -r1.3 frv-tdep.h --- frv-tdep.h 13 Mar 2004 01:13:04 -0000 1.3 +++ frv-tdep.h 13 Mar 2004 01:21:09 -0000 @@ -58,6 +58,10 @@ enum { dbar1_regnum = 138, dbar2_regnum = 139, dbar3_regnum = 140, + scr0_regnum = 141, + scr1_regnum = 142, + scr2_regnum = 143, + scr3_regnum = 144, lr_regnum = 145, lcr_regnum = 146, iacc0h_regnum = 147,