🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #51818

Global Registers Question

#51818
From: John Garnett
Date: Sat, 03 Apr 1993 07:31
22 lines
1470 bytes
I'm using a global register in one of my programs because this global
variable is used quite frequently.  Of course, this isn't too portable
since different machines use differently named registers.

The declaration looks like this:

register char *pc asm(REG);

where REG is

#define REG "a5" /* a5 ok for m68k */

Actually, I have two variables declared in this way.  What I'd like
to know are appropriate values for REG on different architectures.
That is, which registers can I safely use on the various SPARCs,
hp's, decstations, etc (just need to know two or three regs for
each architecture).  If anyone has any good info on this, I'd much
appreciate receiving a copy of it.

Thanks,

John Garnett
Technical Details
Message-ID: <1pjeghINNfg1@geraldo.cc.utexas.edu>
Path: arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!geraldo.cc.utexas.edu!ccwf.cc.utexas.edu!garnett

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,1fcd76eac4049c43,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-04-02 23:36:33 PST
Path: arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!geraldo.cc.utexas.edu!ccwf.cc.utexas.edu!garnett
From: garnett@ccwf.cc.utexas.edu (John Garnett)
Newsgroups: gnu.gcc.help
Subject: Global Registers Question
Date: 3 Apr 1993 07:31:29 GMT
Organization: The University of Texas at Austin, Austin TX
Lines: 22
Message-ID: <1pjeghINNfg1@geraldo.cc.utexas.edu>
Reply-To: garnett@ccwf.cc.utexas.edu (John Garnett)
NNTP-Posting-Host: sneezy.cc.utexas.edu
Keywords: gcc register asm a5 global
Originator: garnett@sneezy.cc.utexas.edu