🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #42151

Urgent help needed.....(3rd try)

#42151
From: Varadarajan
Date: Sun, 07 Jan 1996 00:00
34 lines
1920 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. 

Best regards,
Varadarajan .T.S.


-- 
------------------------------------------------------------------------
| Varadarajan.T.S.            |  It's not an optical illusion, it just |
| M.S. Comp Science           |              looks like one.           |
| tsv@cs.umanitoba.ca         |         #include "std_disclaimer.h"    |
------------------------------------------------------------------------
Technical Details
Message-ID: <9601071706.AA14862@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,3085543a5a7ccbc7,start
X-Google-Attributes: gid11318c,public
From: tsv@cs.umanitoba.CA (Varadarajan)
Subject: Urgent help needed.....(3rd try)
Date: 1996/01/07
Message-ID: <9601071706.AA14862@nickel.cs.umanitoba.ca>
X-Deja-AN: 134453588
distribution: gnu
sender: daemon@cis.ohio-state.edu
organization: GNUs Not Usenet
reply-to: tsv@cs.umanitoba.ca
newsgroups: gnu.gcc.help