Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Jun 23rd, 2005, 12:16 PM   #1
earl
Newbie
 
Join Date: Jun 2005
Posts: 18
Rep Power: 0 earl is on a distinguished road
Access variable within inline asm

Is there a way to access a local variable via inline assembly? I'm working on a Solaris machine with g++. What I'd like to do is this:

long myWrapper(long *value1, long value2)
{
  int tmp;

  asm(" ... "
        "st %l7 tmp"
        " ... ");

  return tmp;
}

So basically I'm going through this assembly algorithm, and the value I want to return from the function is in a particular register in the middle of the algorithm. Any thoughts? Thanks in advance.
earl is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:54 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC