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]
Other format: [Raw text]

[tic4x] gas bugfix


Hi,

This patch was a simple bugfix, for resolving problems with direct operands.

Svein


gas/ChangeLog:
2002-11-25  Svein E. Seldal  <Svein.Seldal@solidas.com>
OK
	* config/tc-tic4x.c (c4x_operands_match): Bugfix in direct
	mode

Index: gas/config/tc-tic4x.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-tic4x.c,v
retrieving revision 1.5
diff -c -3 -p -r1.5 tc-tic4x.c
*** gas/config/tc-tic4x.c	18 Nov 2002 09:09:30 -0000	1.5
--- gas/config/tc-tic4x.c	25 Nov 2002 08:42:40 -0000
*************** c4x_operands_match (inst, insn, check)
*** 1877,1897 ****
  	  if (operand->mode != M_DIRECT)
  	    break;
  	  if (exp->X_op == O_constant)
! 	    {
!               if(exp->X_add_number <= 65535)
!                 {
!                   /* Store only the 16 LSBs of the number.  */
!                   INSERTS (opcode, exp->X_add_number, 15, 0);
!                   continue;
!                 }
!               else
!                 {
! 		  if (!check)
!                     as_bad ("Direct value of %ld is too large",
!                             (long) exp->X_add_number);
! 		  ret = -1;
! 		  continue;
!                 }
  	    }
  	  else if (exp->X_op == O_symbol)
  	    {
--- 1877,1886 ----
  	  if (operand->mode != M_DIRECT)
  	    break;
  	  if (exp->X_op == O_constant)
!             {
!               /* Store only the 16 LSBs of the number.  */
!               INSERTS (opcode, exp->X_add_number, 15, 0);
!               continue;
  	    }
  	  else if (exp->X_op == O_symbol)
  	    {


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