CALLG

VAX11

 

CALLG CALL PROCEDURE WITH GENERAL ARGUMENT LIST

 

Purpose

invoke a procedure with actual arguments from anywhere in memory

Format

opcode arglist.ab, dst.ab

Operation

{align stack};

{create stack frame);

{set arithmetic trap enables};

{set new values of AP, EP, PC};

Condition codes

N ß 0;

Z ß 0;

V ß 0;

C ß 0;

Exceptions

reserved operand

Opcodes

FA       CALLG           Call Procedure with General Argument List

Description

SP is saved in a temporary and then bits 1:0 are replaced by 0 so that the stack is longword aligned. The procedure entry mask is scanned from bit 11 to 0 and the contents of registers whose number corresponds to set bits in the mask are pushed on the stack as longwords. PC, FP, and AP are pushed on the stack as longwords. The condition codes are cleared. A long- word containing the saved two low bits of SP in bits 31:30, a 0 in bit 29 and bit 28. The low 12 bits of the procedure entry mask in bits 27:16, and the PSW in bits 15:0 with T cleared is pushed on the stack. A longword 0 is pushed on the stack. FP is r placed by SP. AP is replaced by the arglist operand which specifies the address of the actual argument list. The trap enables in the PSW are set to a known state. Integer overflow, and decimal overflow are affected according to bits 14 and 15 of the entry mask respectively; floating underflow is cleared. 7- bit is unaffected. PC is replaced by the sum of destination operand plus 2 which transfers control to the called procedure at the byte beyond the entry mask.

Notes

1. If bits 13:12 of the entry mask are not 0, a reserved operand fault occurs.

2. On a reserved operand fault, condition codes are unpredictable.

The procedure calling standard and the condition handling facility require the following register saving conventions. R0 and R1 are always available for function return values and are never saved in the entry mask. All registers R2 through R11 which are modified in the called procedure must be preserved in the mask.