- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: PA RISC calling convention
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2008 08:52 AM
11-26-2008 08:52 AM
for PA RISC I am not able to find out the arguments being passed to the function.
In the PA RISC 2.0 runtime arch. doc it is mentioned that GR19- GR26 will hold the parameters, but in my case it is not happening so.
Can anybody please help/give me a doc/link where it is explained.
For IA r32,r33.... will contain the params and It is working as expected.
Solved! Go to Solution.
- Tags:
- PA-RISC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2008 08:59 AM
11-26-2008 08:59 AM
Re: PA RISC calling convention
###################
void funcA(int *a,char *b,int c,int d, int e,int f, int g)
{
*a = 13;
}
int main()
{
funcA((int *)10,(char *) "string",1,2,3,4);
return 0;
}
####################
This program with dump at "*a = 13"
When I print the registers, r19-r26 do not have all the parameters, some are missing and some are accessible by these regs.
I will provide the actual values when the machine is accessible again(not before tomorrow morning :-( ).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2008 09:12 AM
11-26-2008 09:12 AM
Re: PA RISC calling convention
"This program with dump at "*a = 13""
as
"This program will dump at "*a = 13""
and I am not using(and dun want to use) the -g flag during compilation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2008 01:17 PM
11-26-2008 01:17 PM
SolutionThe arguments are in r26, r25, r24, r23 for PA32. As soon as you enter the function, these registers could be moved from the caller save registers to callee save registers, or saved in the dedicated arg slots.
>Can anybody please help/give me a doc/link where it is explained.
You seem to have some documentation. At one time there was a PA-RISC Procedure Calling Conventions manual. But it appears this was never put into electronic form. You could look at the Assembler manual:
http://docs.hp.com/en/92432-90012/ch03s05.html
>When I print the registers, r19-r26 do not have all the parameters
That's correct. You need to compile with -S and look at the assembly. Or use the disass gdb command.
>I am not using (and don't want to use) the -g flag during compilation.
You should use it so you know what tricks the compiler plays.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2009 09:37 PM
01-04-2009 09:37 PM
Re: PA RISC calling convention
Closing.