Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:21

0001 //===-- llvm/BinaryFormat/GOFF.h - GOFF definitions --------------*- C++-*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This header contains common, non-processor-specific data structures and
0010 // constants for the GOFF file format.
0011 //
0012 // GOFF specifics can be found in MVS Program Management: Advanced Facilities.
0013 // See
0014 // https://www.ibm.com/docs/en/zos/3.1.0?topic=facilities-generalized-object-file-format-goff
0015 //
0016 //===----------------------------------------------------------------------===//
0017 
0018 #ifndef LLVM_BINARYFORMAT_GOFF_H
0019 #define LLVM_BINARYFORMAT_GOFF_H
0020 
0021 #include "llvm/Support/DataTypes.h"
0022 
0023 namespace llvm {
0024 
0025 namespace GOFF {
0026 
0027 /// \brief Length of the parts of a physical GOFF record.
0028 constexpr uint8_t RecordLength = 80;
0029 constexpr uint8_t RecordPrefixLength = 3;
0030 constexpr uint8_t PayloadLength = 77;
0031 constexpr uint8_t RecordContentLength = RecordLength - RecordPrefixLength;
0032 
0033 /// \brief Maximum data length before starting a new card for RLD and TXT data.
0034 ///
0035 /// The maximum number of bytes that can be included in an RLD or TXT record and
0036 /// their continuations is a SIGNED 16 bit int despite what the spec says. The
0037 /// number of bytes we allow ourselves to attach to a card is thus arbitrarily
0038 /// limited to 32K-1 bytes.
0039 constexpr uint16_t MaxDataLength = 32 * 1024 - 1;
0040 
0041 /// \brief Prefix byte on every record. This indicates GOFF format.
0042 constexpr uint8_t PTVPrefix = 0x03;
0043 
0044 enum RecordType : uint8_t {
0045   RT_ESD = 0,
0046   RT_TXT = 1,
0047   RT_RLD = 2,
0048   RT_LEN = 3,
0049   RT_END = 4,
0050   RT_HDR = 15,
0051 };
0052 
0053 enum ESDSymbolType : uint8_t {
0054   ESD_ST_SectionDefinition = 0,
0055   ESD_ST_ElementDefinition = 1,
0056   ESD_ST_LabelDefinition = 2,
0057   ESD_ST_PartReference = 3,
0058   ESD_ST_ExternalReference = 4,
0059 };
0060 
0061 enum ESDNameSpaceId : uint8_t {
0062   ESD_NS_ProgramManagementBinder = 0,
0063   ESD_NS_NormalName = 1,
0064   ESD_NS_PseudoRegister = 2,
0065   ESD_NS_Parts = 3
0066 };
0067 
0068 enum ESDReserveQwords : uint8_t {
0069   ESD_RQ_0 = 0,
0070   ESD_RQ_1 = 1,
0071   ESD_RQ_2 = 2,
0072   ESD_RQ_3 = 3
0073 };
0074 
0075 enum ESDAmode : uint8_t {
0076   ESD_AMODE_None = 0,
0077   ESD_AMODE_24 = 1,
0078   ESD_AMODE_31 = 2,
0079   ESD_AMODE_ANY = 3,
0080   ESD_AMODE_64 = 4,
0081   ESD_AMODE_MIN = 16,
0082 };
0083 
0084 enum ESDRmode : uint8_t {
0085   ESD_RMODE_None = 0,
0086   ESD_RMODE_24 = 1,
0087   ESD_RMODE_31 = 3,
0088   ESD_RMODE_64 = 4,
0089 };
0090 
0091 enum ESDTextStyle : uint8_t {
0092   ESD_TS_ByteOriented = 0,
0093   ESD_TS_Structured = 1,
0094   ESD_TS_Unstructured = 2,
0095 };
0096 
0097 enum ESDBindingAlgorithm : uint8_t {
0098   ESD_BA_Concatenate = 0,
0099   ESD_BA_Merge = 1,
0100 };
0101 
0102 enum ESDTaskingBehavior : uint8_t {
0103   ESD_TA_Unspecified = 0,
0104   ESD_TA_NonReus = 1,
0105   ESD_TA_Reus = 2,
0106   ESD_TA_Rent = 3,
0107 };
0108 
0109 enum ESDExecutable : uint8_t {
0110   ESD_EXE_Unspecified = 0,
0111   ESD_EXE_DATA = 1,
0112   ESD_EXE_CODE = 2,
0113 };
0114 
0115 enum ESDDuplicateSymbolSeverity : uint8_t {
0116   ESD_DSS_NoWarning = 0,
0117   ESD_DSS_Warning = 1,
0118   ESD_DSS_Error = 2,
0119   ESD_DSS_Reserved = 3,
0120 };
0121 
0122 enum ESDBindingStrength : uint8_t {
0123   ESD_BST_Strong = 0,
0124   ESD_BST_Weak = 1,
0125 };
0126 
0127 enum ESDLoadingBehavior : uint8_t {
0128   ESD_LB_Initial = 0,
0129   ESD_LB_Deferred = 1,
0130   ESD_LB_NoLoad = 2,
0131   ESD_LB_Reserved = 3,
0132 };
0133 
0134 enum ESDBindingScope : uint8_t {
0135   ESD_BSC_Unspecified = 0,
0136   ESD_BSC_Section = 1,
0137   ESD_BSC_Module = 2,
0138   ESD_BSC_Library = 3,
0139   ESD_BSC_ImportExport = 4,
0140 };
0141 
0142 enum ESDLinkageType : uint8_t { ESD_LT_OS = 0, ESD_LT_XPLink = 1 };
0143 
0144 enum ESDAlignment : uint8_t {
0145   ESD_ALIGN_Byte = 0,
0146   ESD_ALIGN_Halfword = 1,
0147   ESD_ALIGN_Fullword = 2,
0148   ESD_ALIGN_Doubleword = 3,
0149   ESD_ALIGN_Quadword = 4,
0150   ESD_ALIGN_32byte = 5,
0151   ESD_ALIGN_64byte = 6,
0152   ESD_ALIGN_128byte = 7,
0153   ESD_ALIGN_256byte = 8,
0154   ESD_ALIGN_512byte = 9,
0155   ESD_ALIGN_1024byte = 10,
0156   ESD_ALIGN_2Kpage = 11,
0157   ESD_ALIGN_4Kpage = 12,
0158 };
0159 
0160 enum ENDEntryPointRequest : uint8_t {
0161   END_EPR_None = 0,
0162   END_EPR_EsdidOffset = 1,
0163   END_EPR_ExternalName = 2,
0164   END_EPR_Reserved = 3,
0165 };
0166 
0167 // \brief Subsections of the primary C_CODE section in the object file.
0168 enum SubsectionKind : uint8_t {
0169   SK_PPA1 = 2,
0170   SK_PPA2 = 4,
0171 };
0172 } // end namespace GOFF
0173 
0174 } // end namespace llvm
0175 
0176 #endif // LLVM_BINARYFORMAT_GOFF_H