~ubuntu-branches/debian/jessie/gdb/jessie

« back to all changes in this revision

Viewing changes to opcodes/m32r-ibld.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Jacobowitz
  • Date: 2010-03-20 01:21:29 UTC
  • mfrom: (1.3.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100320012129-t7h25y8zgr8c2369
Tags: 7.1-1
* New upstream release, including:
  - PIE support (Closes: #346409).
  - C++ improvements, including static_cast<> et al, namespace imports,
    and bug fixes in printing virtual base classes.
  - Multi-program debugging.  One GDB can now debug multiple programs
    at the same time.
  - Python scripting improvements, including gdb.parse_and_eval.
  - Updated MIPS Linux signal frame layout (Closes: #570875).
  - No internal error stepping over _dl_debug_state (Closes: #569551).
* Update to Standards-Version: 3.8.4 (no changes required).
* Include more relevant (and smaller) docs in the gdbserver package
  (Closes: #571132).
* Do not duplicate documentation in gdb64, gdb-source, and libgdb-dev.
* Fix crash when switching into TUI mode (Closes: #568489).

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
   - the resultant file is machine generated, cgen-ibld.in isn't
5
5
 
6
6
   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005, 2006, 2007,
7
 
   2008  Free Software Foundation, Inc.
 
7
   2008, 2010  Free Software Foundation, Inc.
8
8
 
9
9
   This file is part of libopcodes.
10
10
 
33
33
#include "symcat.h"
34
34
#include "m32r-desc.h"
35
35
#include "m32r-opc.h"
 
36
#include "cgen/basic-modes.h"
36
37
#include "opintl.h"
37
38
#include "safe-ctype.h"
38
39
 
137
138
  if (length == 0)
138
139
    return NULL;
139
140
 
140
 
  if (word_length > 32)
 
141
  if (word_length > 8 * sizeof (CGEN_INSN_INT))
141
142
    abort ();
142
143
 
143
144
  /* For architectures with insns smaller than the base-insn-bitsize,
441
442
      return 1;
442
443
    }
443
444
 
444
 
  if (word_length > 32)
 
445
  if (word_length > 8 * sizeof (CGEN_INSN_INT))
445
446
    abort ();
446
447
 
447
448
  /* For architectures with insns smaller than the insn-base-bitsize,
468
469
    {
469
470
      unsigned char *bufp = ex_info->insn_bytes + word_offset / 8;
470
471
 
471
 
      if (word_length > 32)
 
472
      if (word_length > 8 * sizeof (CGEN_INSN_INT))
472
473
        abort ();
473
474
 
474
475
      if (fill_cache (cd, ex_info, word_offset / 8, word_length / 8, pc) == 0)
580
581
    case M32R_OPERAND_DISP16 :
581
582
      {
582
583
        long value = fields->f_disp16;
583
 
        value = ((int) (((value) - (pc))) >> (2));
 
584
        value = ((SI) (((value) - (pc))) >> (2));
584
585
        errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_RELOC)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 16, 16, 32, total_length, buffer);
585
586
      }
586
587
      break;
587
588
    case M32R_OPERAND_DISP24 :
588
589
      {
589
590
        long value = fields->f_disp24;
590
 
        value = ((int) (((value) - (pc))) >> (2));
 
591
        value = ((SI) (((value) - (pc))) >> (2));
591
592
        errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_RELOC)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 8, 24, 32, total_length, buffer);
592
593
      }
593
594
      break;
594
595
    case M32R_OPERAND_DISP8 :
595
596
      {
596
597
        long value = fields->f_disp8;
597
 
        value = ((int) (((value) - (((pc) & (-4))))) >> (2));
 
598
        value = ((SI) (((value) - (((pc) & (-4))))) >> (2));
598
599
        errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_RELOC)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 8, 8, 32, total_length, buffer);
599
600
      }
600
601
      break;