This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

GAS for ARM: allow "bx pc"


Hi Guys,

  I am applying the patch below to allow the instruction "bx pc" to be
  assembled in ARM mode.  Such an instruction is legal, although of
  dubious value.

Cheers
	Nick


2000-08-14  Nick Clifton  <nickc@redhat.com>

	(do_bx): Allow "bx pc".

Index: config/tc-arm.c
===================================================================
RCS file: /cvs/src//src/gas/config/tc-arm.c,v
retrieving revision 1.52
diff -p -r1.52 tc-arm.c
*** tc-arm.c	2000/08/02 01:00:15	1.52
--- tc-arm.c	2000/08/14 21:15:43
*************** do_bx (str, flags)
*** 3589,3596 ****
        return;
      }
  
!   if (reg == REG_PC)
!     inst.error = BAD_PC;
  
    end_of_line (str);
  }
--- 3589,3595 ----
        return;
      }
  
!   /* Note - it is not illegal to do a "bx pc".  Useless, but not illegal.  */
  
    end_of_line (str);
  }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]