This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: RFA: FRV: Have GAS detect odd register numbers
- From: Dave Brolley <brolley at redhat dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 04 Jun 2003 15:49:14 -0400
- Subject: Re: RFA: FRV: Have GAS detect odd register numbers
- References: <m3ptltga8v.fsf@redhat.com>
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)