public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: patch e500: unspec spe_evmra
  2002-07-29 13:18 patch e500: unspec spe_evmra Aldy Hernandez
@ 2002-07-29 13:18 ` David Edelsohn
  2002-07-29 13:21 ` Graham Stott
  1 sibling, 0 replies; 5+ messages in thread
From: David Edelsohn @ 2002-07-29 13:18 UTC (permalink / raw)
  To: Aldy Hernandez; +Cc: gcc-patches

	* config/rs6000/spe.md ("spe_evmra"): Change to unspec.

Sure.

David

^ permalink raw reply	[flat|nested] 5+ messages in thread

* patch e500: unspec spe_evmra
@ 2002-07-29 13:18 Aldy Hernandez
  2002-07-29 13:18 ` David Edelsohn
  2002-07-29 13:21 ` Graham Stott
  0 siblings, 2 replies; 5+ messages in thread
From: Aldy Hernandez @ 2002-07-29 13:18 UTC (permalink / raw)
  To: dje, gcc-patches

The spe_evmra instruction is causing grief because gcc will insist in
using the accumulator as a source operand.  Since we have no direct way
of coping from the accumulator, it's just easier to declare this
unspec and keep the scheduler from messing us up.

Ok?

2002-07-29  Aldy Hernandez  <aldyh@redhat.com>

	* config/rs6000/spe.md ("spe_evmra"): Change to unspec.


Index: config/rs6000/spe.md
===================================================================
RCS file: /cvs/uberbaum/gcc/config/rs6000/spe.md,v
retrieving revision 1.1
diff -c -p -r1.1 spe.md
*** config/rs6000/spe.md	25 Jul 2002 02:22:47 -0000	1.1
--- config/rs6000/spe.md	29 Jul 2002 20:00:57 -0000
***************
*** 2028,2034 ****
  (define_insn "spe_evmra"
    [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r")
          (match_operand:V2SI 1 "gpc_reg_operand" "r"))
!    (set (reg:V2SI SPE_ACC_REGNO) (match_dup 1))]
    "TARGET_SPE"
    "evmra %0,%1"
    [(set_attr "type" "veccomplex")
--- 2028,2035 ----
  (define_insn "spe_evmra"
    [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r")
          (match_operand:V2SI 1 "gpc_reg_operand" "r"))
!    (set (reg:V2SI SPE_ACC_REGNO)
! 	(unspec:V2SI [(match_dup 1)] 726))]
    "TARGET_SPE"
    "evmra %0,%1"
    [(set_attr "type" "veccomplex")

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: patch e500: unspec spe_evmra
  2002-07-29 13:18 patch e500: unspec spe_evmra Aldy Hernandez
  2002-07-29 13:18 ` David Edelsohn
@ 2002-07-29 13:21 ` Graham Stott
  2002-07-29 14:00   ` David Edelsohn
  1 sibling, 1 reply; 5+ messages in thread
From: Graham Stott @ 2002-07-29 13:21 UTC (permalink / raw)
  To: Aldy Hernandez; +Cc: dje, gcc-patches

Aldy,

Aldy Hernandez wrote:
>
> --- 2028,2035 ----
>   (define_insn "spe_evmra"
>     [(set (match_operand:V2SI 0 "gpc_reg_operand" "=r")
>           (match_operand:V2SI 1 "gpc_reg_operand" "r"))
> !    (set (reg:V2SI SPE_ACC_REGNO)
> ! 	(unspec:V2SI [(match_dup 1)] 726))]
>     "TARGET_SPE"
>     "evmra %0,%1"
>     [(set_attr "type" "veccomplex")
> (define_constants


Don't much like the magic 726 unspec number might I suggest now
would be a good time for the rs6000 backend to start using the
define_contants md construct and banish the magic numbers.

Cheers
Graham

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: patch e500: unspec spe_evmra
  2002-07-29 13:21 ` Graham Stott
@ 2002-07-29 14:00   ` David Edelsohn
  2002-07-29 14:02     ` Aldy Hernandez
  0 siblings, 1 reply; 5+ messages in thread
From: David Edelsohn @ 2002-07-29 14:00 UTC (permalink / raw)
  To: Graham Stott; +Cc: Aldy Hernandez, gcc-patches

>>>>> Graham Stott writes:

Graham> Don't much like the magic 726 unspec number might I suggest now
Graham> would be a good time for the rs6000 backend to start using the
Graham> define_contants md construct and banish the magic numbers.

	Aldy already is using that in spe.md.  He is suppose to convert
the entire backend (mainly spe.md and altivec.md) to that method one of
these days.

David

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: patch e500: unspec spe_evmra
  2002-07-29 14:00   ` David Edelsohn
@ 2002-07-29 14:02     ` Aldy Hernandez
  0 siblings, 0 replies; 5+ messages in thread
From: Aldy Hernandez @ 2002-07-29 14:02 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Graham Stott, gcc-patches

On Mon, Jul 29, 2002 at 04:20:52PM -0400, David Edelsohn wrote:
> >>>>> Graham Stott writes:
> 
> Graham> Don't much like the magic 726 unspec number might I suggest now
> Graham> would be a good time for the rs6000 backend to start using the
> Graham> define_contants md construct and banish the magic numbers.
> 
> 	Aldy already is using that in spe.md.  He is suppose to convert
> the entire backend (mainly spe.md and altivec.md) to that method one of
> these days.

Doh!  Yes, that would be me, Mr. Procrastinator.  I'm avoiding it
because they're soooo many.  Will do though.

I'll start with moving the altivec builtins into altivec.md.

Aldy

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-07-29 20:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-29 13:18 patch e500: unspec spe_evmra Aldy Hernandez
2002-07-29 13:18 ` David Edelsohn
2002-07-29 13:21 ` Graham Stott
2002-07-29 14:00   ` David Edelsohn
2002-07-29 14:02     ` Aldy Hernandez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).