www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/16/23:46:09

From: Paul Shirley <Paul AT foobar DOT co DOT uk DOT chocolat>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Register Variable Question?
Date: Tue, 17 Dec 1996 01:16:57 +0000
Organization: DrinkSoft
Lines: 19
Distribution: world
Message-ID: <RRPKWCAJSftyEwr5@chocolat.foobar.co.uk>
References: <19961215 DOT 150724 DOT 3694 DOT 0 DOT MSnakes AT juno DOT com>
<7lld+CAWnbtyEwMN AT talula DOT demon DOT co DOT uk>
NNTP-Posting-Host: chocolat.foobar.co.uk
MIME-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <7lld+CAWnbtyEwMN AT talula DOT demon DOT co DOT uk>, Shawn Hargreaves
<Shawn AT talula DOT demon DOT co DOT uk> writes
>I very much doubt that global variables can be allocated to registers.
>Think what this would mean: no code, anywhere in your program, could use
>these registers! Because of the way C compiles each source files as an
>individual unit, there is no way that this could be enforced.

AFAIK it *is* possible to do this with gcc. It is probably possible with
djgpp but I can think of very few programs it would benefit overall.

I think one of the gnu Forth interpreters (Tile or GForth) has a compile
option to use global register variables. I can't give more details
because a Forth system under the LGPL has a few problems for me (so I
deleted it).

(Forth of course is an ideal use for global registers ;)

---
Paul Shirley: shuffle chocolat before foobar for my real email address

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019