🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #478

Force loading of register

#478
From: Quentin Barnes
Date: Mon, 12 Oct 1992 16:14
19 lines
1177 bytes
I would like to be able to force gcc to load a specific register
for me.  I thought that the code to do this would be:

        register volatile unsigned long base asm("#r14");

        base = (unsigned long)0x1000000;

(This is for a Motorola m88k processor.  Change the asm("...") to
a register appropriate for you system.)

gcc generates:
volasm.c:nn: warning: volatile register variables don't work as you might wish

Why is this message displayed?  Am I "doing the right thing" just that
gcc doesn't handle it yet?  Or is there another way to do what I want?

-- 
Quentin Barnes
qbarnes@urbana.mcd.mot.com | ..!uiucuxc!udc!qbarnes
Technical Details
Message-ID: <1992Oct12.161458.3340@urbana.mcd.mot.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!haven.umd.edu!darwin.sura.net!ukma!cs.widener.edu!iggy.GW.Vitalink.COM!pacbell.com!decwrl!ditka!starnet!motcsd!udc!qbarnes

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!haven.umd.edu!darwin.sura.net!ukma!cs.widener.edu!iggy.GW.Vitalink.COM!pacbell.com!decwrl!ditka!starnet!motcsd!udc!qbarnes
From: qbarnes@urbana.mcd.mot.com (Quentin Barnes)
Newsgroups: gnu.gcc.help
Subject: Force loading of register
Message-ID: <1992Oct12.161458.3340@urbana.mcd.mot.com>
Date: 12 Oct 92 16:14:58 GMT
Sender: news@urbana.mcd.mot.com (News)
Organization: Motorola Computer Group, Urbana Design Center
Lines: 19
Nntp-Posting-Host: neptune.urbana.mcd.mot.com