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]

Re: Machine Description '.md'


Alan Lehotsky <lehotsky@tiac.net> writes:

|> At 12:31 PM -0700 6/7/00, Mike Stump wrote:
|> >..
|> 
|> ..
|> 
|> >Yes or no, depending upon the design.  There are companies now that
|> >have reconfigurable CPU architectures, that use gcc for
|> >compilations.  One way to do it, would be to just add predicates to
|> >instructions (for example the entire floating point unit):
|> >
|> >/* Nonzero if we should generate code to use the fpu.  */
|> >#define MASK_FPU 1
|> >#define TARGET_FPU (target_flags & MASK_FPU)
|> >
|> >(define_expand "cmpsf"
|> >   ;; The 96 here isn't ever used by anyone.
|> >   [(set (reg:CCFP 96)
|> >   (compare:CCFP (match_operand:SF 0 "register_operand" "")
|> >		      (match_operand:SF 1 "register_operand" "")))]
|> >   "TARGET_FPU"
|> >   "
|> 
|> 	Good concept, but in general a predefined NAMED pattern has
|> 	to have a compile-time constant predicate, because they
|> 	tend to appear in
|> 
|> 
|> 	#if HAVE_XXXXXX
|> 	...
|> 	#endif
|> 
|> 	preprocessor blocks.

This is not true any more.  Most of these occurences are now runtime
tests, like this:

#ifdef HAVE_XXXXXX
        if (HAVE_XXXXX) use_xxxxx();
#endif

Andreas.

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg

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