OpenCores
URL https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [gas/] [config/] [tc-arm.c] - Diff between revs 16 and 148

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 16 Rev 148
Line 7796... Line 7796...
 
 
static void
static void
do_ldrd (void)
do_ldrd (void)
{
{
  constraint (inst.operands[0].reg % 2 != 0,
  constraint (inst.operands[0].reg % 2 != 0,
              _("first destination register must be even"));
              _("first transfer register must be even"));
  constraint (inst.operands[1].present
  constraint (inst.operands[1].present
              && inst.operands[1].reg != inst.operands[0].reg + 1,
              && inst.operands[1].reg != inst.operands[0].reg + 1,
              _("can only load two consecutive registers"));
              _("can only transfer two consecutive registers"));
  constraint (inst.operands[0].reg == REG_LR, _("r14 not allowed here"));
  constraint (inst.operands[0].reg == REG_LR, _("r14 not allowed here"));
  constraint (!inst.operands[2].isreg, _("'[' expected"));
  constraint (!inst.operands[2].isreg, _("'[' expected"));
 
 
  if (!inst.operands[1].present)
  if (!inst.operands[1].present)
    inst.operands[1].reg = inst.operands[0].reg + 1;
    inst.operands[1].reg = inst.operands[0].reg + 1;
 
 
  if (inst.instruction & LOAD_BIT)
 
    {
 
      /* encode_arm_addr_mode_3 will diagnose overlap between the base
      /* encode_arm_addr_mode_3 will diagnose overlap between the base
         register and the first register written; we have to diagnose
         register and the first register written; we have to diagnose
         overlap between the base and the second register written here.  */
         overlap between the base and the second register written here.  */
 
 
      if (inst.operands[2].reg == inst.operands[1].reg
      if (inst.operands[2].reg == inst.operands[1].reg
          && (inst.operands[2].writeback || inst.operands[2].postind))
          && (inst.operands[2].writeback || inst.operands[2].postind))
        as_warn (_("base register written back, and overlaps "
        as_warn (_("base register written back, and overlaps "
                   "second destination register"));
               "second transfer register"));
 
 
 
  if (!(inst.instruction & V4_STR_BIT))
 
    {
      /* For an index-register load, the index register must not overlap the
      /* For an index-register load, the index register must not overlap the
         destination (even if not write-back).  */
         destination (even if not write-back).  */
      else if (inst.operands[2].immisreg
      if (inst.operands[2].immisreg
               && ((unsigned) inst.operands[2].imm == inst.operands[0].reg
               && ((unsigned) inst.operands[2].imm == inst.operands[0].reg
                   || (unsigned) inst.operands[2].imm == inst.operands[1].reg))
                   || (unsigned) inst.operands[2].imm == inst.operands[1].reg))
        as_warn (_("index register overlaps destination register"));
        as_warn (_("index register overlaps transfer register"));
    }
    }
 
 
  inst.instruction |= inst.operands[0].reg << 12;
  inst.instruction |= inst.operands[0].reg << 12;
  encode_arm_addr_mode_3 (2, /*is_t=*/FALSE);
  encode_arm_addr_mode_3 (2, /*is_t=*/FALSE);
}
}
 
 
static void
static void
Line 8342... Line 8341...
  inst.instruction |= Rm;
  inst.instruction |= Rm;
  if (inst.operands[2].isreg)  /* Rd, {Rm,} Rs */
  if (inst.operands[2].isreg)  /* Rd, {Rm,} Rs */
    {
    {
      inst.instruction |= inst.operands[2].reg << 8;
      inst.instruction |= inst.operands[2].reg << 8;
      inst.instruction |= SHIFT_BY_REG;
      inst.instruction |= SHIFT_BY_REG;
 
      /* PR 12854: Error on extraneous shifts.  */
 
      constraint (inst.operands[2].shifted,
 
                  _("extraneous shift as part of operand to shift insn"));
    }
    }
  else
  else
    inst.reloc.type = BFD_RELOC_ARM_SHIFT_IMM;
    inst.reloc.type = BFD_RELOC_ARM_SHIFT_IMM;
}
}
 
 
Line 11534... Line 11536...
              reject_bad_reg (inst.operands[2].reg);
              reject_bad_reg (inst.operands[2].reg);
              inst.instruction = THUMB_OP32 (inst.instruction);
              inst.instruction = THUMB_OP32 (inst.instruction);
              inst.instruction |= inst.operands[0].reg << 8;
              inst.instruction |= inst.operands[0].reg << 8;
              inst.instruction |= inst.operands[1].reg << 16;
              inst.instruction |= inst.operands[1].reg << 16;
              inst.instruction |= inst.operands[2].reg;
              inst.instruction |= inst.operands[2].reg;
 
 
 
              /* PR 12854: Error on extraneous shifts.  */
 
              constraint (inst.operands[2].shifted,
 
                          _("extraneous shift as part of operand to shift insn"));
            }
            }
          else
          else
            {
            {
              inst.operands[1].shifted = 1;
              inst.operands[1].shifted = 1;
              inst.operands[1].shift_kind = shift_kind;
              inst.operands[1].shift_kind = shift_kind;
Line 11562... Line 11568...
                default: abort ();
                default: abort ();
                }
                }
 
 
              inst.instruction |= inst.operands[0].reg;
              inst.instruction |= inst.operands[0].reg;
              inst.instruction |= inst.operands[2].reg << 3;
              inst.instruction |= inst.operands[2].reg << 3;
 
 
 
              /* PR 12854: Error on extraneous shifts.  */
 
              constraint (inst.operands[2].shifted,
 
                          _("extraneous shift as part of operand to shift insn"));
            }
            }
          else
          else
            {
            {
              switch (shift_kind)
              switch (shift_kind)
                {
                {
Line 11601... Line 11611...
            default: abort ();
            default: abort ();
            }
            }
 
 
          inst.instruction |= inst.operands[0].reg;
          inst.instruction |= inst.operands[0].reg;
          inst.instruction |= inst.operands[2].reg << 3;
          inst.instruction |= inst.operands[2].reg << 3;
 
 
 
          /* PR 12854: Error on extraneous shifts.  */
 
          constraint (inst.operands[2].shifted,
 
                      _("extraneous shift as part of operand to shift insn"));
        }
        }
      else
      else
        {
        {
          switch (inst.instruction)
          switch (inst.instruction)
            {
            {

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.