This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: RTL obscurities
- From: Ian Lance Taylor <iant at google dot com>
- To: Nick Maclaren <nmm1 at cus dot cam dot ac dot uk>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 25 May 2007 07:47:57 -0700
- Subject: Re: RTL obscurities
- References: <E1HrZtv-0007E1-8w@virgo.cus.cam.ac.uk>
Nick Maclaren <nmm1@cus.cam.ac.uk> writes:
> What I need to do is to insert the following:
>
> extern void *__limit;
> extern void __failure (void);
> if (%SP < __limit) __failure();
This is similar to what probe_stack_range in explow.c does, so that a
look at that function.
It's obviously easier to answer more detailed questions. The general
flow of RTL is:
* Define insn FOO in .md file
* Generate it using emit_insn (gen_FOO (operands)).
* Use standard names for, e.g., addition insns so that gcc knows
which ones to use when generating code.
There are literally thousands of example of RTL generation in the gcc
code base.
Ian