Update mn10300 dwarf register map
[deliverable/binutils-gdb.git] / gdb / mips-tdep.c
index 523d11b3b7bbde0215dddd8dbee5c13fdf7745f0..99fc3132ada5543d7d53b47b198d0a61995b7ffc 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for the MIPS architecture, for GDB, the GNU Debugger.
 
-   Copyright (C) 1988-2013 Free Software Foundation, Inc.
+   Copyright (C) 1988-2014 Free Software Foundation, Inc.
 
    Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU
    and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin.
@@ -21,7 +21,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "frame.h"
 #include "inferior.h"
@@ -2042,7 +2042,8 @@ fetch_mips_16 (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   gdb_byte buf[8];
-  pc &= 0xfffffffe;            /* Clear the low order bit.  */
+
+  pc = unmake_compact_addr (pc);       /* Clear the low order bit.  */
   target_read_memory (pc, buf, 2);
   return extract_unsigned_integer (buf, 2, byte_order);
 }
@@ -2242,7 +2243,7 @@ mips16_next_pc (struct frame_info *frame, CORE_ADDR pc)
 /* The mips_next_pc function supports single_step when the remote
    target monitor or stub is not developed enough to do a single_step.
    It works by decoding the current instruction and predicting where a
-   branch will go.  This isnt hard because all the data is available.
+   branch will go.  This isn't hard because all the data is available.
    The MIPS32, MIPS16 and microMIPS variants are quite different.  */
 static CORE_ADDR
 mips_next_pc (struct frame_info *frame, CORE_ADDR pc)
@@ -2911,7 +2912,7 @@ micromips_scan_prologue (struct gdbarch *gdbarch,
              break;
 
            /* LUI $v1 is used for larger $sp adjustments.  */
-           /* Discard LUI $gp is used for PIC code.  */
+           /* Discard LUI $gp used for PIC code.  */
            case 0x10: /* POOL32I: bits 010000 */
              if (b5s5_op (insn >> 16) == 0xd
                                /* LUI: bits 010000 001101 */
@@ -3942,7 +3943,7 @@ micromips_deal_with_atomic_sequence (struct gdbarch *gdbarch,
 
   /* Effectively inserts the breakpoints.  */
   for (index = 0; index <= last_breakpoint; index++)
-      insert_single_step_breakpoint (gdbarch, aspace, breaks[index]);
+    insert_single_step_breakpoint (gdbarch, aspace, breaks[index]);
 
   return 1;
 }
@@ -7909,7 +7910,7 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   int i, num_regs;
   enum mips_fpu_type fpu_type;
   struct tdesc_arch_data *tdesc_data = NULL;
-  int elf_fpu_type = 0;
+  int elf_fpu_type = Val_GNU_MIPS_ABI_FP_ANY;
   const char **reg_names;
   struct mips_regnum mips_regnum, *regnum;
   enum mips_isa mips_isa;
@@ -8234,17 +8235,17 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   if (!mips_fpu_type_auto)
     fpu_type = mips_fpu_type;
-  else if (elf_fpu_type != 0)
+  else if (elf_fpu_type != Val_GNU_MIPS_ABI_FP_ANY)
     {
       switch (elf_fpu_type)
        {
-       case 1:
+       case Val_GNU_MIPS_ABI_FP_DOUBLE:
          fpu_type = MIPS_FPU_DOUBLE;
          break;
-       case 2:
+       case Val_GNU_MIPS_ABI_FP_SINGLE:
          fpu_type = MIPS_FPU_SINGLE;
          break;
-       case 3:
+       case Val_GNU_MIPS_ABI_FP_SOFT:
        default:
          /* Soft float or unknown.  */
          fpu_type = MIPS_FPU_NONE;
This page took 0.049427 seconds and 4 git commands to generate.