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: Changing IFCVT_MODIFY_* macros


On Thu, Aug 31, 2000 at 08:49:57PM +0100, Joern Rennecke wrote:
> I have been wondering about conditional execution - can this be used for
> a processor that has only a limited set of conditionally executable
> things.
> On the Calmrisc16, there are conditional jump indirect and return insn
> (where the latter is really a special case of the former at the hardware
>  and assembler level).
> OTOH we can't use a return pattern till reload has compled, so that we
> know what registers need saving / restoring.

For just conditional return, you don't need to use conditional execution.  You
just encode it like:

	(set (pc)
	     (if_then_else (...)
			   (return)
			   (pc)))

and

	(set (pc)
	     (if_then_else (...)
			   (pc)
			   (return)))

If you don't recognize either the unconditional and contiional return insns
until after reload, and then only for functions with no stacks, it should just
happen in the last jump optimization pass.

-- 
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org	fax:   +1 978-692-4482

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