Re: Register allocation in special circumstancies

"Andy Johnson" <andyjnsn@ma.ultranet.com>
4 Feb 2001 22:12:18 -0500

          From comp.compilers

Related articles
Register allocation in special circumstancies ruff@mcst.ru (Andrey S. Bokhanko) (2001-02-01)
Re: Register allocation in special circumstancies andyjnsn@ma.ultranet.com (Andy Johnson) (2001-02-04)
Re: Register allocation in special circumstancies thp@hill.cs.ucr.edu (Tom Payne) (2001-02-04)
Re: Register allocation in special circumstancies christian.bau@isltd.insignia.com (2001-02-04)
Re: Register allocation in special circumstancies torbenm@diku.dk (2001-02-12)
Re: Register allocation in special circumstancies fjh@cs.mu.OZ.AU (2001-02-15)
Re: Register allocation in special circumstancies christian.bau@isltd.insignia.com (2001-02-15)
Re: Register allocation in special circumstancies vince.delvecchio@spd.analog.com (Vince Del Vecchio) (2001-02-15)
[1 later articles]
| List of all articles for this month |

From: "Andy Johnson" <andyjnsn@ma.ultranet.com>
Newsgroups: comp.compilers
Date: 4 Feb 2001 22:12:18 -0500
Organization: Compilers Central
References: 01-02-014
Keywords: C, registers
Posted-Date: 04 Feb 2001 22:12:18 EST

This is precisely the reason that ANSI/ISO C states that values of automatic
storage duration that do not have volatile-qualified type may have
indeterminate values following a longjmp. It is never safe to "cache"
volatile-qualified object in registers. However, this doesn't solve the
problem of managing values of static storage duration, which may also have
values (or copies of values) in registers. For this, you still need to have
a Register Interference Graph, unless you simply recognize a call to setjmp
as a special case, and treat it as a label which is the target of an
arbitrary unstructured "goto" and trash the appropriate registers.


Of course, the ANSI/ISO C rule is simply a cop out on solving a very
difficult problem, as you have already discovered.


-AndyJ


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.