1*784f59b2Sjsg /* $OpenBSD: exec.h,v 1.15 2022/02/21 12:22:21 jsg Exp $ */ 29c0b8818Smickey 39c0b8818Smickey /* 49c0b8818Smickey * Copyright (c) 1994, The University of Utah and 59c0b8818Smickey * the Computer Systems Laboratory at the University of Utah (CSL). 69c0b8818Smickey * All rights reserved. 79c0b8818Smickey * 89c0b8818Smickey * Permission to use, copy, modify and distribute this software is hereby 99c0b8818Smickey * granted provided that (1) source code retains these copyright, permission, 109c0b8818Smickey * and disclaimer notices, and (2) redistributions including binaries 119c0b8818Smickey * reproduce the notices in supporting documentation, and (3) all advertising 129c0b8818Smickey * materials mentioning features or use of this software display the following 139c0b8818Smickey * acknowledgement: ``This product includes software developed by the 149c0b8818Smickey * Computer Systems Laboratory at the University of Utah.'' 159c0b8818Smickey * 169c0b8818Smickey * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 179c0b8818Smickey * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF 189c0b8818Smickey * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 199c0b8818Smickey * 209c0b8818Smickey * CSL requests users of this software to return to csl-dist@cs.utah.edu any 219c0b8818Smickey * improvements that they make and grant CSL redistribution rights. 229c0b8818Smickey * 239c0b8818Smickey * Utah $Hdr: exec.h 1.3 94/12/16$ 249c0b8818Smickey */ 259c0b8818Smickey 26e06af55aSmickey #ifndef _MACHINE_EXEC_H_ 27e06af55aSmickey #define _MACHINE_EXEC_H_ 28e06af55aSmickey 299c0b8818Smickey /* Size of a page in an object file. */ 309c0b8818Smickey #define __LDPGSZ 4096 319c0b8818Smickey 32710c1cd8Sart #define ARCH_ELFSIZE 32 33710c1cd8Sart 34e06af55aSmickey #define ELF_TARG_CLASS ELFCLASS32 35dd23f5eaSmickey #define ELF_TARG_DATA ELFDATA2MSB 369c0b8818Smickey #define ELF_TARG_MACH EM_PARISC 379c0b8818Smickey 38e06af55aSmickey /* 393ca8d265Smiod * the following MD ELF values definitions are from the: 40e06af55aSmickey * "Processor-Specific ELF Supplement for PA-RISC. 41d9707053Smickey * Including HP and HP-UX Extensions. Version 1.43. October 6, 1997" 42d9707053Smickey * http://devrsrc1.external.hp.com/STK/partner/elf-pa.pdf 43e06af55aSmickey * 44e06af55aSmickey */ 45e06af55aSmickey 46e06af55aSmickey /* parisc-specific elf flags */ 47e06af55aSmickey #define EF_PARISC_TRAPNIL 0x00010000 /* trap on NULL derefs */ 48e06af55aSmickey #define EF_PARISC_EXT 0x00020000 /* program uses arch exts */ 49e06af55aSmickey #define EF_PARISC_LSB 0x00040000 /* program expects LSB mode */ 50e06af55aSmickey #define EF_PARISC_WIDE 0x00080000 /* program expects wide mode */ 51e06af55aSmickey #define EF_PARISC_NO_KABP 0x00100000 /* don't allow kernel assisted 52e06af55aSmickey branch prediction */ 53e06af55aSmickey #define EF_PARISC_LAZYSWAP 0x00200000 /* allow lazy swap allocation 54e06af55aSmickey for dynamically allocated 55e06af55aSmickey program segments */ 56e06af55aSmickey #define EF_PARISC_ARCH 0x0000ffff /* architecture version */ 57e06af55aSmickey #define EFA_PARISC_1_0 0x020B 58e06af55aSmickey #define EFA_PARISC_1_1 0x0210 59e06af55aSmickey #define EFA_PARISC_2_0 0x0214 60e06af55aSmickey 61e06af55aSmickey /* legend: 0 - pa7000, 1 - pa7100, 2 - pa7200, 3 - pa7100LC, 4 - pa8000 */ 62e06af55aSmickey #define PARISC_AE_QWSI 0x00000001 /* 0 : enable quadword stores */ 63e06af55aSmickey #define PARISC_AE_FPLSU 0x00000002 /* 1: fp load/store to I/O space */ 64e06af55aSmickey #define PARISC_AE_RSQRT 0x00000004 /* 0 : reciprocal sqrt */ 65e06af55aSmickey #define PARISC_AE_FDCG 0x00000008 /* 0,1: fdc includes graph flushes */ 66e06af55aSmickey #define PARISC_AE_HPAR 0x00000010 /* 3,4: half-word add/sub/av */ 67e06af55aSmickey #define PARISC_AE_BSW 0x00000020 /* 3,4: half-word shift-add */ 68e06af55aSmickey #define PARISC_AE_HPSA 0x00000040 /* 3 : byte-swapping stores */ 69e06af55aSmickey #define PARISC_AE_DPR0 0x00000080 /* 2,4: data prefetch via ld to r0 */ 70e06af55aSmickey 71e06af55aSmickey #define SHN_PARISC_ANSI_COMMON 0xff00 72e06af55aSmickey #define SHN_PARISC_HUGE_COMMON 0xff01 73e06af55aSmickey 74e06af55aSmickey /* sh_type */ 75e06af55aSmickey #define SHT_PARISC_EXT 0x70000000 /* contains product-specific 76e06af55aSmickey extension bits */ 77*784f59b2Sjsg #define SHT_PARISC_UNWIND 0x70000001 /* contains unwind table entries 78e06af55aSmickey sh_info contains index of 79e06af55aSmickey the code section to which 80e06af55aSmickey unwind entries apply */ 81e06af55aSmickey #define SHT_PARISC_DOC 0x70000002 /* contains debug info for -O */ 82e06af55aSmickey #define SHT_PARISC_ANNOT 0x70000003 /* contains code annotations */ 83e06af55aSmickey 84e06af55aSmickey /* sh_flags */ 85e06af55aSmickey #define SHF_PARISC_SBP 0x80000000 /* contains code compiled for 86e06af55aSmickey static branch prediction */ 87e06af55aSmickey #define SHF_PARISC_HUGE 0x40000000 /* should be allocated far from gp */ 88e06af55aSmickey #define SHF_PARISC_SHORT 0x20000000 /* should be allocated near from gp */ 89e06af55aSmickey 90e06af55aSmickey #define ELF_PARISC_ARCHEXT ".PARISC.archext" 91e06af55aSmickey #define ELF_PARISC_MILLI ".PARISC.milli" 92e06af55aSmickey #define ELF_PARISC_UNWIND ".PARISC.unwind" 93e06af55aSmickey #define ELF_PARISC_UNWIND_INFO ".PARISC.unwind_info" 94e06af55aSmickey #define ELF_PARISC_SDATA ".sdata" 95e06af55aSmickey #define ELF_PARISC_NOBITS ".sbss" 96e06af55aSmickey 97e06af55aSmickey #define STT_PARISC_MILLI 13 /* entry point of a millicode routine */ 98e06af55aSmickey 99e06af55aSmickey #define PT_PARISC_ARCHEXT 0x70000000 /* segment contains 100e06af55aSmickey .PARISC.archext section */ 101e06af55aSmickey #define PT_PARISC_UNWIND 0x70000001 /* segment contains 102e06af55aSmickey .unwind section */ 103e06af55aSmickey 104e06af55aSmickey #define PF_PARISC_SBP 0x08000000 /* segment contains code 105e06af55aSmickey compiled for static branch prediction */ 106e06af55aSmickey 107e06af55aSmickey #endif /* _MACHINE_EXEC_H_ */ 108