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]

Re: RFA: FRV: Have GAS detect odd register numbers


Hi Nick,

The modelling units also need to be given the correct operand values. Since it's possible that some insns which were not changed share units with insns which have, probably the best way to do this is to override the modelling unit arguments for the insns which have changed.

I've attached a patch showing an example of how this would be done for the mqsaths insn. You would have to make similar modifications to the other insns which you changed. Note the distinction between input and out arguments.

Let me know if you have any questions about this.

Thanks,
Dave

Nick Clifton wrote:

Hi Dave,

 Another FRV patch based on a bug report from Fujitsu (#23201).  This
 time they noticed that GAS does not detect a malformed mdrotli
 instruction where either of the register operands is odd.

 The patch below fixes this, in a rather extensive fashion, by
 creating three new operands in the frv.cpu file. These operands
 check for odd numbered registers and the patch uses them in the
 appropriate places in the patterns that follow.  It also adds code
 to frv.opc to perform the even-number checking.  It also defines
 CGEN_VERBOSE_ASSEMBLER_ERRORS so that GAS will report an appropriate
 error message if a bad mdrotli is encountered.

Any objections to my applying it ? (To cpu/ and cgen/cpu/).
Cheers
Nick



Index: frv.cpu
===================================================================
RCS file: /cvs/src/src/cgen/cpu/frv.cpu,v
retrieving revision 1.1
diff -c -p -r1.1 frv.cpu
*** frv.cpu	18 Jun 2002 21:12:33 -0000	1.1
--- frv.cpu	4 Jun 2003 19:26:38 -0000
***************
*** 6736,6742 ****
  		   (extract-hilo FRinti 1 FRintj 1 argihi argilo argjhi argjlo)
  		   (saturate argihi argjhi (inv argjhi) (halfword hi FRintk 1))
  		   (saturate argilo argjlo (inv argjlo) (halfword lo FRintk 1))))
!      ((fr400 (unit u-media-1-quad)))
  )
  
  (define-pmacro (saturate-unsigned arg max result)
--- 6736,6746 ----
  		   (extract-hilo FRinti 1 FRintj 1 argihi argilo argjhi argjlo)
  		   (saturate argihi argjhi (inv argjhi) (halfword hi FRintk 1))
  		   (saturate argilo argjlo (inv argjlo) (halfword lo FRintk 1))))
!      ((fr400 (unit u-media-1-quad
! 		   (in FRinti FRintieven)
! 		   (in FRintj FRintjeven)
! 		   (out FRintk FRintkeven))))
! 		   
  )
  
  (define-pmacro (saturate-unsigned arg max result)

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