Related articles |
---|
Portable Fast Direct Threaded Code eliot@.cs.qmw.ac.uk (Eliot Miranda) (1991-03-28) |
Re: Portable Fast Direct Threaded Code Tom.Lane@G.GP.CS.CMU.EDU (1991-04-01) |
Re: Portable Fast Direct Threaded Code metzger@watson.ibm.com (1991-04-02) |
Re: Portable Fast Direct Threaded Code pardo@cs.washington.edu (1991-04-02) |
Re: Portable Fast Direct Threaded Code vestal@SRC.Honeywell.COM (1991-04-03) |
Re: Portable Fast Direct Threaded Code firth@sei.cmu.edu (1991-04-04) |
Re: Portable Fast Direct Threaded Code pardo@cs.washington.edu (1991-04-04) |
Re: Portable Fast Direct Threaded Code bpendlet@bambam.es.com (1991-04-08) |
Newsgroups: | comp.compilers |
From: | Tom.Lane@G.GP.CS.CMU.EDU |
Keywords: | interpreter, design |
Organization: | Compilers Central |
References: | <3035@redstar.cs.qmw.ac.uk> <1991Mar31.180635.5944@cs.rochester.edu> |
Date: | Mon, 01 Apr 91 10:21:14 EST |
Lawrence Crowl points out one important problem with Eliot Miranda's
scheme for global register use in C. There's an even more fundamental
problem, though: there is *no guarantee whatever* that the compiler will
assign the same registers to the global variables in every routine.
Compilers that do intelligent allocation of variables to registers may
refuse to honor the "register" declarations at all if the global variables
are not heavily used in a given routine, and in any case the globals need
not be assigned to the same registers every time. Miranda's scheme thus
relies heavily on the assumption of a dumb register allocator (or else a
compiler that supports global register variable declarations).
This scheme may be "fast" direct threaded code, but it's hardly "portable".
--
tom lane
Internet: tgl@cs.cmu.edu BITNET: tgl%cs.cmu.edu@cmuccvma
[GCC lets you specify what register to use for global register variables, but
that is of course both machine and compiler specific. -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.