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

« back to all changes in this revision

Viewing changes to opcodes/lm32-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 "lm32-desc.h"
35
35
#include "lm32-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)
568
569
    case LM32_OPERAND_BRANCH :
569
570
      {
570
571
        long value = fields->f_branch;
571
 
        value = ((int) (((value) - (pc))) >> (2));
 
572
        value = ((SI) (((value) - (pc))) >> (2));
572
573
        errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 15, 16, 32, total_length, buffer);
573
574
      }
574
575
      break;
575
576
    case LM32_OPERAND_CALL :
576
577
      {
577
578
        long value = fields->f_call;
578
 
        value = ((int) (((value) - (pc))) >> (2));
 
579
        value = ((SI) (((value) - (pc))) >> (2));
579
580
        errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 25, 26, 32, total_length, buffer);
580
581
      }
581
582
      break;
671
672
      {
672
673
        long value;
673
674
        length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 15, 16, 32, total_length, pc, & value);
674
 
        value = ((pc) + (((int) (((value) << (16))) >> (14))));
 
675
        value = ((pc) + (((SI) (((value) << (16))) >> (14))));
675
676
        fields->f_branch = value;
676
677
      }
677
678
      break;
679
680
      {
680
681
        long value;
681
682
        length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 25, 26, 32, total_length, pc, & value);
682
 
        value = ((pc) + (((int) (((value) << (6))) >> (4))));
 
683
        value = ((pc) + (((SI) (((value) << (6))) >> (4))));
683
684
        fields->f_call = value;
684
685
      }
685
686
      break;