#ifndef __PAL_BUILTINS_LOADED #define __PAL_BUILTINS_LOADED 1 /* module pal_builtins.h "X-27" * ***************************************************************************** * * * HP CONFIDENTIAL. This software is confidential proprietary software * * licensed by Hewlett-Packard Development Company, L.P., and is not * * authorized to be used, duplicated OR disclosed to anyone without the * * prior written permission of HP. * * (c) 2017 Copyright Hewlett-Packard Development Company, L.P. * * * * VMS SOFTWARE, INC. CONFIDENTIAL. This software is confidential * * proprietary software licensed by VMS Software, Inc., and is not * * authorized to be used, duplicated or disclosed to anyone without * * the prior written permission of VMS Software, Inc. * * (c) 2017 Copyright VMS Software, Inc. * * * ***************************************************************************** * *++ * FACILITY: * * STARLET_H for now * * ABSTRACT: * * This module contains the C builtins for the Alpha CALL_PAL * compatibility system services on non-Alpha systems. * * AUTHOR: * * Clair Grant * * CREATION DATE: * * 04-Mar-2002 * * MODIFICATION HISTORY: * * X-27 CEG0914 Clair Grant 25-Sep-2020 * Change comment in X-26 * * X-26 CEG0901 Clair Grant 23-Sep-2020 * Replace "//" style comments to eliminate confusion * when compiling /STANDARD=VAXC. * * X-25 CV-0074 Camiel Vanderhoeven 19-Jan-2018 * Fix IA64 build. * * X-24 CV-0072 Camiel Vanderhoeven 19-Jan-2018 * Another fix to the last checkin. * * X-23 CV-0071 Camiel Vanderhoeven 17-Jan-2018 * Fix last checkin. * * X-22 CV-0069 Camiel Vanderhoeven 16-Jan-2018 * Version for X86. Updated copyright to VSI. * * X-21 CMOS Christian Moser 25-JAN-2005 * Add definition of __PAL_MFPR_KSP which fell between the * cracks. * * X-20 CMOS Christian Moser 15-NOV-2004 * Fix a typo in __PAL_MFPR_PRBR for the /STANDARD=VAXC case * as it should translate to a call to SYS$PAL_MFPR_PRBR and * not a call to the non-existing SYS$PAL_MFPR_CPUDB routine. * Fix generation number. * * X-18 CMOS Christian Moser 14-OCT-2004 * C programs compiled with /STANDARD=VAXC will not generate * correct code for 64-bit pointers and will only fetch a * sign-extended longword off SYS$GPQ_IPR_xxx. Use the old * method and call the SYS$PAL_MFPR_xxx routines instead. * * X-17 CMOS Christian Moser 27-SEP-2004 * Only define the fancy MFPR macros if __INITIAL_POINTER_SIZE * is defined, which means we are using a newer compiler. * C++ also does not like the MTPR_TBIS flavour macros. * * X-16 CMOS Christian Moser 14-SEP-2004 * Declare the SYS$GPQ_IPR_xxx cells to match the declaration * of SYS$PAL_MFPR_xxx routines. * * X-15 CMOS Christian Moser 13-SEP-2004 * Fetch MFPR data directly from cells pointed to by the * global SYS$GPQ_IPR_xxx data cells. * * X-14 WBF Burns Fisher 19-Sep-2003 * CHMU is a system service-like call * * X-13 KLN3307 Karen L. Noel 17-Jun-2003 * Oops. Put back mfpr_prbr. * * X-12 KLN3306 Karen L. Noel 17-Jun-2003 * Remove mtpr_fen, mfpr_fen, mtpr_mces, mfpr_mces, mfpr_pcbb. * * X-11 WBF Burns Fisher 06-May-2003 * CHMS should be system service rather than break to * match the .MAR version. * * X-10 WBF Burns Fisher 03-Dec-2002 * Wrong name for break codes for CHMU and CHMS * * X-9 DJM Dennis Mattoon 12-NOV-2002 * Add inclusion of sys_pal_qinst.h * * X-8 JRK396 Jim Kauffman 31-Oct-2002 * Add __PAL_MFPR_WHAMI_SLOT * * X-7 WBF Burns Fisher 24-Oct-2002 * Add __CHMU and __CHMS. Remove MFPR_PCBB since the * IPF version gets virtual address * * X-6 CEG Clair Grant 25-Jul-2002 * Add __RPCC * * X-5 CEG Clair Grant 18-Jul-2002 * Redefine __PAL_BPT to use __break, __PAL_BUGCHK to use * __break2, and add __PAL_GENTRAP. * * X-4 CEG Clair Grant 30-Apr-2002 * Move the system service prototypes to a new file * pal_services.h. Add definition for __MF. * * X-3 CEG Clair Grant 12-Apr-2002 * Remove sys$pal_mfpr_asn and sys$pal_draina * * X-2 DJM Dennis Mattoon 02-APR-2002 * Added instr argument to the prototype for sys$pal_imb. * * X-1 CEG Clair Grant 04-Mar-2002 * Original version. */ #ifndef __alpha /* Verified for x86 port - Camiel Vanderhoeven */ #include #include #ifdef __INITIAL_POINTER_SIZE /* Not defined for older compilers */ #pragma __required_pointer_size __save /* Save current pointer size */ #pragma __required_pointer_size __long /* Pointers are 64-bit */ #ifdef __ia64 /* Verified for x86 port - Camiel Vanderhoeven */ extern int *sys$gpq_ipr_ipl; extern unsigned int *sys$gpq_ipr_sisr; extern __int64 *sys$gpq_ipr_cpuid; extern __int64 *sys$gpq_ipr_cpudb; extern void * *sys$gpq_ipr_ksp; extern void * *sys$gpq_ipr_esp; extern void * *sys$gpq_ipr_ssp; extern void * *sys$gpq_ipr_usp; #else int sys$pal_mfpr_ipl(); unsigned int sys$pal_mfpr_sisr(); __int64 sys$pal_mfpr_whami(); __int64 sys$pal_mfpr_prbr(); void * sys$pal_mfpr_esp(); void * sys$pal_mfpr_ssp(); void * sys$pal_mfpr_usp(); #endif #pragma __required_pointer_size __restore /* Return to previous pointer size */ #endif #define __PAL_MFPR_ASTEN sys$pal_mfpr_asten #define __PAL_MTPR_ASTEN sys$pal_mtpr_asten #define __PAL_MFPR_ASTSR sys$pal_mfpr_astsr #define __PAL_MTPR_ASTSR sys$pal_mtpr_astsr #define __PAL_MTPR_DATFX sys$pal_mtpr_datfx #define __PAL_MTPR_ESP sys$pal_mtpr_esp #define __PAL_MTPR_IPIR sys$pal_mtpr_ipir #define __PAL_MTPR_IPL sys$pal_mtpr_ipl #define __PAL_MTPR_PRBR sys$pal_mtpr_prbr #define __PAL_MTPR_SIRR sys$pal_mtpr_sirr #define __PAL_MTPR_SSP sys$pal_mtpr_ssp #define __PAL_MTPR_TBIA sys$pal_mtpr_tbia #define __PAL_MTPR_TBIAP sys$pal_mtpr_tbiap #define __PAL_MTPR_USP sys$pal_mtpr_usp #define __PAL_MFPR_WHAMI_SLOT sys$pal_mfpr_whami_slot #ifdef __INITIAL_POINTER_SIZE /* Not defined for older compilers */ #ifdef __x86_64 /* Verified for x86 port - Camiel Vanderhoeven */ #define __PAL_MFPR_ESP sys$pal_mfpr_esp #define __PAL_MFPR_IPL sys$pal_mfpr_ipl #define __PAL_MFPR_PRBR sys$pal_mfpr_prbr #define __PAL_MFPR_SISR sys$pal_mfpr_sisr #define __PAL_MFPR_SSP sys$pal_mfpr_ssp #define __PAL_MFPR_USP sys$pal_mfpr_usp #define __PAL_MFPR_WHAMI sys$pal_mfpr_whami #else #ifdef __vaxc #define __PAL_MFPR_ESP sys$pal_mfpr_esp #define __PAL_MFPR_IPL sys$pal_mfpr_ipl #define __PAL_MFPR_PRBR sys$pal_mfpr_prbr #define __PAL_MFPR_SISR sys$pal_mfpr_sisr #define __PAL_MFPR_SSP sys$pal_mfpr_ssp #define __PAL_MFPR_USP sys$pal_mfpr_usp #define __PAL_MFPR_WHAMI sys$pal_mfpr_cpuid #else #define __PAL_MFPR_KSP() *sys$gpq_ipr_ksp #define __PAL_MFPR_ESP() *sys$gpq_ipr_esp #define __PAL_MFPR_IPL() *sys$gpq_ipr_ipl #define __PAL_MFPR_PRBR() *sys$gpq_ipr_cpudb #define __PAL_MFPR_SISR() *sys$gpq_ipr_sisr #define __PAL_MFPR_SSP() *sys$gpq_ipr_ssp #define __PAL_MFPR_USP() *sys$gpq_ipr_usp #define __PAL_MFPR_WHAMI() *sys$gpq_ipr_cpuid #endif #endif #define __PAL_MTPR_TBIS sys$pal_mtpr_tbis #define __PAL_MTPR_TBISD sys$pal_mtpr_tbisd #define __PAL_MTPR_TBISI sys$pal_mtpr_tbisi #endif #define __PAL_BPT() __break(BREAK$C_DBG_PAL_BPT) #define __PAL_GENTRAP(code) __break2(BREAK$C_SYS_GENTRAP,code) #define __PAL_BUGCHK(code) __break2(BREAK$C_SYS_BUGCHECK,code) #define __PAL_IMB sys$pal_imb #define __PAL_PROBER sys$pal_prober #define __PAL_PROBEW sys$pal_probew #define __PAL_RD_PS sys$pal_rd_ps #define __PAL_SWASTEN sys$pal_swasten #define __PAL_WR_PS_SW sys$pal_wr_ps_sw #define __PAL_HALT sys$pal_halt #define __PAL_CFLUSH sys$pal_cflush #define __PAL_LDQP sys$pal_ldqp #define __PAL_STQP sys$pal_stqp #define __MF __MB #define __RPCC() ((unsigned __int64)0x0ffffffff & sys$rpcc_64()) #define __PAL_CHMU() sys$pal_chmu #define __PAL_CHMS() sys$pal_chms #include /* get the system service prototypes */ #endif /* __alpha */ #endif /* __PAL_BUILTINS_LOADED */