* Alpha porting problems. Stack Frame.
@ 1993-02-18 19:01 Teodor A. Lungu
1993-02-18 21:18 ` Richard Sayde
0 siblings, 1 reply; 2+ messages in thread
From: Teodor A. Lungu @ 1993-02-18 19:01 UTC (permalink / raw)
Trying to port my FORTRAN and MACRO code to Alpha/OPENVMS I ran
into some problems. The FORTRAN code wasn't at all difficult to port (minor
adjustments), but I could't come up with a solution for porting the following
(very short) MACRO code:
.TITLE UTL_GET_ARG_ADDR
.IDENT /01/
;++
;** NAME: UTL_GET_ARG_ADDR
;**
;** PURPOSE: to obtain the address of the argument list of the caller
;**
;** METHOD: The call frame is accessed to obtain the argument address
;** stored within.
;**
;** INVOCATION METHOD: CALL utl_get_arg_addr ( argument_address )
;**
;**
;** ARGUMENT LIST:
;** NAME TYPE USE PURPOSE
;** ---------------------- ---- --- ----------------------------
;** argument_address I*4 O the address of the argument list
;** input to the caller
;**
;...
;**
;** PDL:
;*- USE FRAME POINTER TO ACCESS ADDRESS OF ARGUMENT LIST OF CALLER,
;*- AND RETURN IT TO THE CALLER
;--
$SFDEF
argument_address = 4
;
.PSECT CODE1
;
.ENTRY utl_get_arg_addr, ^M<>
;
MOVL SF$L_SAVE_AP(FP) , @argument_address(AP)
RET
.END
Although there are options to translate Vax macros into Alpha macro,
this would not work for the get_arg_addr macro, since the Alpha has a
different implementation of the stack frame. I don't know enough about
Alpha macro to re-write this function (from scratch, as it were).
How is in fact the Alpha stack frame implemented ? Any hints about how to
solve the problem?
Thanks in advance,
--------------------------------------------------------------------------------
Ted Lungu (lungu@grog.jpl.nasa.gov) | Beat the 55mph limit:
Jet Propulsion Laboratory | Learn to fly!
California Institute of Technology |------------------------------------------
Microwave Atmospheric Science Group |The above opinions are mine, not JPL's
4800 Oak Grove Dr, Pasadena, CA 91109|
M/S 183-701 (818)354-4331 | although they should be.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Alpha porting problems. Stack Frame.
1993-02-18 19:01 Alpha porting problems. Stack Frame Teodor A. Lungu
@ 1993-02-18 21:18 ` Richard Sayde
0 siblings, 0 replies; 2+ messages in thread
From: Richard Sayde @ 1993-02-18 21:18 UTC (permalink / raw)
All the arguments are no longer passed on the stack on Alpha. The first
six arguments are passed in R16 - R21. The rest are on the stack.
There are ways to do what you are asking, but it depends on the
callers language and what your purpose is. What are you trying to
accomplish with this routine?
Richard
sayde@star.enet.dec.com I only speak for myself.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1993-02-18 21:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-02-18 19:01 Alpha porting problems. Stack Frame Teodor A. Lungu
1993-02-18 21:18 ` Richard Sayde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox