🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #42283

Urgent help needed.....

#42283
From: Varadarajan
Date: Wed, 20 Dec 1995 00:00
27 lines
1593 bytes
Hello all,
	I would like to know as to how I could access the C variables from
assembly language constructs using gcc. I did go through the info
pages, but I was never able to follow them. (Yes, I did make a honest
effort). I am running gcc 2.7.2 on a sun sparc system (4.1.3). I am
not able to get even the sethi instruction compile.

I have tried the following variants.

asm("sethi %%hi(%0), %%i7", :: "m" (foo.bar));
asm("sethi %%hi(%0), %%i7", :: "n" (foo.bar));
asm("sethi %%hi(%0), %%i7", :: "i" (foo.bar));
asm("sethi %%hi(%0), %%i7", :: "V" (foo.bar));
asm("sethi %%hi(%0), %%i7", :: "o" (foo.bar));
asm("sethi %%hi(%0), %%i7", :: "r" (foo.bar)); // I know this does not
// make any sense, but I did try it any way.
asm("sethi %%hi(%0), %%i7", :: "s" (foo.bar));
asm("sethi %%hi(%0), %%i7", :: "X" (foo.bar));

where foo is a structure and bar an element of that structure. I
request one of the gcc gurus to help me. I am in desperate situation
as I need this information for my course project. Thanks a lot in
advance. 

Wishing you all happy holidays.
Best regards,
Varadarajan .T.S.
Technical Details
Message-ID: <qaloo7rzck.fsf@nickel.cs.umanitoba.ca>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,3425fe044e4f2ce4,start
X-Google-Attributes: gid11318c,public
From: tsv@nickel.cs.umanitoba.ca (Varadarajan)
Subject: Urgent help needed.....
Date: 1995/12/20
Message-ID: <qaloo7rzck.fsf@nickel.cs.umanitoba.ca>
X-Deja-AN: 122498334
sender: tsv@nickel.cs.umanitoba.ca
organization: Computer Science, University of Manitoba, Winnipeg, Canada
reply-to: tsv@cs.umanitoba.ca
newsgroups: gnu.gcc.help