This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: gcc port to StarCore



----- Original Message -----
From: Alan Lehotsky <apl@alum.mit.edu>
To: David Livshin <dlivshin@zahav.net.il>
Cc: <gcc@gcc.gnu.org>
Sent: Wednesday, May 01, 2002 3:00 PM
Subject: Re: gcc port to StarCore


> At 3:23 PM +0200 5/1/02, David Livshin wrote:
> >Hi,
> >
> >I am working on the port of the gcc version 3.0.1 to the StarCore
> >architecture ( DSP from Motorola/Agere ). The compiler works fine and
> >produces correct StarCore code that passes all the validations ( I
have ).
> >However there are cases where it can do better job:
> >
> >1. no constant propagation:
>
>
> My "guess" would be that you don't allow CONST_INT's as operands
> to the "cmpsi" patterns.
>
> Can you post the define_expand and/or define_insn for these?
>

You are right - the pattern is:


( define_expand "cmpsi"
  [ ( set ( cc0 )
      ( compare ( match_operand:SI 0 "drREG_operand" "d,z" )
                ( match_operand:SI 1 "drREG_operand" "d,z" )
      )
    )
  ]
  ""
  "
  {
   StarCore_DefineExpand_cmp( operands, FALSE, FALSE );
   DONE;
  }"
)

where "drREG_operand" is a predicate that excepts d ( constraint letter
'd' ) and r ( constraint letter 'z' ) registers.

However this doesn't seem to be the reason for the problem I have because
the pattern:


( define_expand "cmpsi"
  [ ( set ( cc0 )
      ( compare ( match_operand:SI 0 "general_operand" "" )
                ( match_operand:SI 1 "general_operand" "" )
      )
    )
  ]
  ""
  "
  {
   StarCore_DefineExpand_cmp( operands, FALSE, FALSE );
   DONE;
  }"
)

produces the same code for the program I mentioned.





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