- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- fortran calling macro
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
Discussions
Discussions
Forums
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
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
тАО07-18-2007 03:35 AM
тАО07-18-2007 03:35 AM
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2007 03:55 AM
тАО07-18-2007 03:55 AM
Re: fortran calling macro
I received:
%IMAC-I-APTEMPUSE, AP used as a temporary register is converted to R12 in routine DOIT
There is no AP register on Itanium. Your code's use of the auto-increment addressing mode forced us to reassign AP from its semantic meaning of the "arglist" to some scratch register.
Change the:
movl (ap)+,r0
into
movb (ap), r0
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2007 05:25 AM
тАО07-18-2007 05:25 AM
Re: fortran calling macro
I got the -i- message but since it was info I didnt think it would be a problem. I read that AP was reassigned to r12. the code you sent did work. how do i increment to get to the next passed argument.
incl r12?
incl ap?
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2007 06:24 AM
тАО07-18-2007 06:24 AM
Re: fortran calling macro
Best not increment AP
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2007 06:27 AM
тАО07-18-2007 06:27 AM
Re: fortran calling macro
[http://h71000.www7.hp.com/doc/82final/5601/aa-pv64e-te.pdf]
"If a VAX MACRO source is
referencing AP as a scratch register, the compiler converts this reference to a
reference to R12. If this is not desirable, you should change the code to use a
different scratch register."
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2007 06:30 AM
тАО07-18-2007 06:30 AM
Re: fortran calling macro
2.4.1 Homed Argument Lists
http://h71000.www7.hp.com/doc/82final/5601/aa-pv64e-te.pdf
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2007 07:26 AM
тАО07-18-2007 07:26 AM
Re: fortran calling macro
movab (ap),r6
we'll notice you take the address of the argument list. You can also put the HOME_ARGS=TRUE on the .CALL_ENTRY directive (you should read the Macro Compiler user manual from the docset).
Once the compiler sees the MOVAB or HOME_ARGS, we'll home the argument list to memory to make it look like a VAX. On Itanium, the first 8 arguments are inside of 64-bit wide registers and the remainder of the arguments are in 64-bit wide argument slots. The compiler will copy them all into a 32-bit array to make the arguments look like they do on the VAX. That is the address you'll get with the MOVAB instruction above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2007 03:15 AM
тАО07-19-2007 03:15 AM
SolutionI was sent a larger example via email.
MOVL (AP)+,R0 ; POP THE ARGUMENT COUNT INTO R0
MOVL (AP)+,R0 ;ADDRESS OF THE INPUT BUFFER
ADDL2 #24,R0 ;POINT DIRECTLY TO THE DATA BUFFER
MOVL (AP)+,A ;LOAD UNIT NUMBER ADDRESS
MOVL (AP)+,C ;LOAD PAYROLL NUMBER ADDRESS
MOVL (AP)+,D ;LOAD PERSONNAL PASSWORD ADDRESS
MOVL (AP)+,E ;LOAD SYSTEM PASSWORD ADDRESS
MOVL (AP)+,F ;LOAD SHOP NUMBER ADDRESS
The code is reading arguments by incrementing the AP register and walking down the list.
While the AP is a real register on VAX, it is an abstract concept created by the compiler on Alpha and Itanium. Section 2.4.3 in the HP MACRO Compiler Porting and User's Guide talks about this non-portable practice.
A revised sequence would be something like:
MOVL 4(AP),R0 ;ADDRESS OF THE INPUT BUFFER
ADDL2 #24,R0 ;POINT DIRECTLY TO THE DATA BUFFER
MOVL 8(AP),A ;LOAD UNIT NUMBER ADDRESS
MOVL 12(AP),C ;LOAD PAYROLL NUMBER ADDRESS
MOVL 16(AP),D ;LOAD PERSONNAL PASSWORD ADDRESS
MOVL 20(AP),E ;LOAD SYSTEM PASSWORD ADDRESS
MOVL 24(AP),F ;LOAD SHOP NUMBER ADDRESS
There is no actual need to increment/modify the AP register just to fetch the fixed number of arguments. The compiler will do the right thing and location each argument regardless of whether is came in via a register or on the memory stack. No argument homing is needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2007 05:53 AM
тАО07-19-2007 05:53 AM
Re: fortran calling macro
the ap has been changed to not inc
.call_entry used
found that one routine was using rsb
instead of ret
code is working now
thanks
John