On Wed, Oct 07, 2009 at 09:05:48PM -0700, Ian Lance Taylor wrote:
> Edd Barrett <vex...@gmail.com> writes:
> 
> > I would be really interested to know how GCC:
> >  * Decides whether or not to embed tables in the data segment of the binary.
> >  * Selects the comparisons in the above tree.
> 
> The relevant code is expand_case and friends in gcc/stmt.c.  Where a
> jump table should go is decided on a target by target basis by the
> backend macro JUMP_TABLES_IN_TEXT_SECTION.

Many thanks for the pointer
> 
> > Perhaps someone knows of a good paper/book on this topic which could
> > be of use, or a relevant section of code in the GCC sources (at the
> > moment I am overwhelmed by the source tree).
> 
> You may be interested in reading Roger Sayle's paper in the 2008 gcc
> summit, linked from http://ols.fedoraproject.org/GCC/Reprints-2008/ .

Excellent paper. Again many thanks!

-- 
Best Regards
Edd Barrett

http://students.dec.bmth.ac.uk/ebarrett

Reply via email to