!*** MODULE $OSSDDEF *** !DEC$ OPTIONS/ALIGN=(RECORDS=PACKED,COMMONS=PACKED)/NOWARN ! ! Operating System Specific Data area offset definitions for the IA64 ! VMS calling standard. ! ! ! Spill Data triple ! PARAMETER OSSD$M_REG = '0000001F'X PARAMETER OSSD$M_MBZ_5_7 = '000000E0'X PARAMETER OSSD$M_TREG = '00007F00'X PARAMETER OSSD$M_MBZ_15 = '00008000'X STRUCTURE /OSSD_SPILL_DATA/ UNION MAP PARAMETER OSSD$S_REG = 5 PARAMETER OSSD$V_REG = 0 ! Static general register being saved PARAMETER OSSD$S_MBZ_5_7 = 3 PARAMETER OSSD$V_MBZ_5_7 = 5 ! MBZ PARAMETER OSSD$S_TREG = 7 PARAMETER OSSD$V_TREG = 8 ! Target register for save or zero for restore PARAMETER OSSD$S_MBZ_15 = 1 PARAMETER OSSD$V_MBZ_15 = 15 BYTE %FILL (2) ! MBZ END MAP MAP BYTE OSSD$B_REG_BYTE ! Byte containing 5-bit REG field BYTE OSSD$B_TREG_BYTE ! Byte containing 7-bit TREG field END MAP END UNION BYTE OSSD$T_T(1:1) ! ULEB128 slot offset to save/restore instruction END STRUCTURE ! OSSD_SPILL_DATA ! ! OSSD layout for general and caller spill register information segments ! PARAMETER OSSD$M_TYPE = '00007FFF'X PARAMETER OSSD$K_GENERAL_INFO = '00000001'X ! General info (always one quadword) PARAMETER OSSD$K_CALL_SPILL_INFO = '00000002'X ! Caller spill info (variable length) PARAMETER OSSD$K_CONTEXT_INFO = '00000003'X ! Context info (always one quadword) PARAMETER OSSD$M_S = '00008000'X PARAMETER OSSD$M_EXCEPTION_MODE = '00070000'X PARAMETER OSSD$K_EXC_MODE_SIGNAL = '00000000'X ! Signal PARAMETER OSSD$K_EXC_MODE_SIGNAL_ALL = '00000001'X ! Signal all PARAMETER OSSD$K_EXC_MODE_SIGNAL_SILENT = '00000002'X ! Signal silent PARAMETER OSSD$K_EXC_MODE_FULL_IEEE = '00000003'X ! Signal full IEEE PARAMETER OSSD$K_EXC_MODE_CALLER = '00000004'X ! Use caller's mode PARAMETER OSSD$M_TARGET_INVO = '00080000'X PARAMETER OSSD$M_BASE_FRAME = '00100000'X PARAMETER OSSD$M_HANDLER_REINVOKABLE = '00200000'X PARAMETER OSSD$M_AST_FRAME = '00400000'X PARAMETER OSSD$M_EXCEPTION_FRAME = '00800000'X PARAMETER OSSD$M_TIE_FRAME = '01000000'X PARAMETER OSSD$M_BOTTOM_OF_STACK = '02000000'X PARAMETER OSSD$M_HANDLER_DATA_VALID = '04000000'X PARAMETER OSSD$M_SS_DISPATCH_FRAME = '08000000'X PARAMETER OSSD$M_KP_START_FRAME = '10000000'X PARAMETER OSSD$M_FRAMELESS_HELPER = '20000000'X PARAMETER OSSD$M_MBZ_30_63 = '00000000'X PARAMETER OSSD$K_GENERAL_INFO_LENGTH = '00000008'X ! Size of general data segment PARAMETER OSSD$M_CONTEXT_TYPE = '00FF0000'X PARAMETER OSSD$K_CTX_TYPED = '00000000'X ! A VMS typed data structure PARAMETER OSSD$K_CTX_CHFCTX = '00000001'X ! A CHFCTX block PARAMETER OSSD$M_CONTEXT_GR = 'FF000000'X PARAMETER OSSD$M_CONTEXT_OFFSET = '00000000'X PARAMETER OSSD$M_CONTEXT_HINT = '00000000'X PARAMETER OSSD$K_HINT_EXCEPTION = '00000001'X ! Exception dispatcher PARAMETER OSSD$K_HINT_SS = '00000002'X ! System Service dispatcher PARAMETER OSSD$K_HINT_AST = '00000003'X ! AST dispatcher PARAMETER OSSD$K_HINT_KP_START = '00000004'X ! KP_START frame PARAMETER OSSD$K_CONTEXT_INFO_LENGTH = '00000008'X ! Size of context info segment STRUCTURE /OSSDDEF/ UNION MAP INTEGER*4 OSSD$Q_GENERAL_INFO_SEGMENT(2) ! Entire general info segment END MAP MAP PARAMETER OSSD$S_TYPE = 15 PARAMETER OSSD$V_TYPE = 0 ! OSSD segment type PARAMETER OSSD$S_S = 1 PARAMETER OSSD$V_S = 15 ! Continuation marker PARAMETER OSSD$S_EXCEPTION_MODE = 3 PARAMETER OSSD$V_EXCEPTION_MODE = 16 ! Desired exception-reporting behavior PARAMETER OSSD$S_TARGET_INVO = 1 PARAMETER OSSD$V_TARGET_INVO = 19 ! Invoke handler when unwind target PARAMETER OSSD$S_BASE_FRAME = 1 PARAMETER OSSD$V_BASE_FRAME = 20 ! Logical base frame of stack PARAMETER OSSD$S_HANDLER_REINVOKABLE = 1 PARAMETER OSSD$V_HANDLER_REINVOKABLE = 21 ! Handler may be invoked when already active PARAMETER OSSD$S_AST_FRAME = 1 PARAMETER OSSD$V_AST_FRAME = 22 ! AST dispatch frame PARAMETER OSSD$S_EXCEPTION_FRAME = 1 PARAMETER OSSD$V_EXCEPTION_FRAME = 23 ! Exception dispatch frame PARAMETER OSSD$S_TIE_FRAME = 1 PARAMETER OSSD$V_TIE_FRAME = 24 ! Frame created by Translated Image Executive PARAMETER OSSD$S_BOTTOM_OF_STACK = 1 PARAMETER OSSD$V_BOTTOM_OF_STACK = 25 ! End of call stack (no predecessors) PARAMETER OSSD$S_HANDLER_DATA_VALID = 1 PARAMETER OSSD$V_HANDLER_DATA_VALID = 26 ! Exception handler data field exists in unw PARAMETER OSSD$S_SS_DISPATCH_FRAME = 1 PARAMETER OSSD$V_SS_DISPATCH_FRAME = 27 ! System Service dispatch frame PARAMETER OSSD$S_KP_START_FRAME = 1 PARAMETER OSSD$V_KP_START_FRAME = 28 ! Used to tag EXE$KP_START PARAMETER OSSD$S_FRAMELESS_HELPER = 1 PARAMETER OSSD$V_FRAMELESS_HELPER = 29 ! Tags code executing in context of another ro ! Tags code executing in context of another routine whose IP PARAMETER OSSD$S_MBZ_30_63 = 34 PARAMETER OSSD$V_MBZ_30_63 = 30 BYTE %FILL (8) ! MBZ END MAP MAP INTEGER*2 %FILL ! Overlays segment type and continuation marker INTEGER*2 OSSD$W_LENGTH ! # quadwords in this segment RECORD /OSSD_SPILL_DATA/ OSSD$T_SPILL_DATA ! Start of first spill data triple END MAP MAP INTEGER*4 OSSD$Q_CONTEXT_INFO_SEGMENT(2) ! Entire context info segment END MAP MAP INTEGER*2 %FILL ! Overlays segment type and continuation marker PARAMETER OSSD$S_CONTEXT_TYPE = 8 PARAMETER OSSD$V_CONTEXT_TYPE = 16 ! Type of context block described PARAMETER OSSD$S_CONTEXT_GR = 8 PARAMETER OSSD$V_CONTEXT_GR = 24 ! GR containing pointer to context block PARAMETER OSSD$S_CONTEXT_OFFSET = 24 PARAMETER OSSD$V_CONTEXT_OFFSET = 32 ! Offset (in octawords) from SP, or GR PARAMETER OSSD$S_CONTEXT_HINT = 8 PARAMETER OSSD$V_CONTEXT_HINT = 56 ! Hint as to purpose of context block ! Hints: (0 = no hint) BYTE %FILL (6) END MAP END UNION END STRUCTURE ! OSSDDEF ! The following macro can be used in IAS code to create a context info OSSD ! segment. Cut and paste to your IAS module ! ! #define __CONTEXT_OSSD(type,gr,offset,hint) \ ! .vms_ossd ((hint) << OSSD$V_CONTEXT_HINT) | \ ! (((offset) & 0xFFFFFF) << OSSD$V_CONTEXT_OFFSET) | \ ! ((gr) << OSSD$V_CONTEXT_GR) | \ ! ((type) << OSSD$V_CONTEXT_TYPE) | OSSD$K_CONTEXT_INFO ! !DEC$ END OPTIONS