LLVM API Documentation

ARMBuildAttrs.h
Go to the documentation of this file.
00001 //===-- ARMBuildAttrs.h - ARM Build Attributes ------------------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file contains enumerations and support routines for ARM build attributes
00011 // as defined in ARM ABI addenda document (ABI release 2.08).
00012 //
00013 //===----------------------------------------------------------------------===//
00014 
00015 #ifndef __TARGET_ARMBUILDATTRS_H__
00016 #define __TARGET_ARMBUILDATTRS_H__
00017 
00018 namespace ARMBuildAttrs {
00019   enum SpecialAttr {
00020     // This is for the .cpu asm attr. It translates into one or more
00021     // AttrType (below) entries in the .ARM.attributes section in the ELF.
00022     SEL_CPU 
00023   };
00024 
00025   enum AttrType {
00026     // Rest correspond to ELF/.ARM.attributes
00027     File                      = 1,
00028     Section                   = 2,
00029     Symbol                    = 3,
00030     CPU_raw_name              = 4,
00031     CPU_name                  = 5,
00032     CPU_arch                  = 6,
00033     CPU_arch_profile          = 7,
00034     ARM_ISA_use               = 8,
00035     THUMB_ISA_use             = 9,
00036     VFP_arch                  = 10,
00037     WMMX_arch                 = 11,
00038     Advanced_SIMD_arch        = 12,
00039     PCS_config                = 13,
00040     ABI_PCS_R9_use            = 14,
00041     ABI_PCS_RW_data           = 15,
00042     ABI_PCS_RO_data           = 16,
00043     ABI_PCS_GOT_use           = 17,
00044     ABI_PCS_wchar_t           = 18,
00045     ABI_FP_rounding           = 19,
00046     ABI_FP_denormal           = 20,
00047     ABI_FP_exceptions         = 21,
00048     ABI_FP_user_exceptions    = 22,
00049     ABI_FP_number_model       = 23,
00050     ABI_align8_needed         = 24,
00051     ABI_align8_preserved      = 25,
00052     ABI_enum_size             = 26,
00053     ABI_HardFP_use            = 27,
00054     ABI_VFP_args              = 28,
00055     ABI_WMMX_args             = 29,
00056     ABI_optimization_goals    = 30,
00057     ABI_FP_optimization_goals = 31,
00058     compatibility             = 32,
00059     CPU_unaligned_access      = 34,
00060     VFP_HP_extension          = 36,
00061     ABI_FP_16bit_format       = 38,
00062     MPextension_use           = 42, // was 70, 2.08 ABI
00063     DIV_use                   = 44,
00064     nodefaults                = 64,
00065     also_compatible_with      = 65,
00066     T2EE_use                  = 66,
00067     conformance               = 67,
00068     Virtualization_use        = 68,
00069     MPextension_use_old       = 70
00070   };
00071 
00072   // Magic numbers for .ARM.attributes
00073   enum AttrMagic {
00074     Format_Version  = 0x41
00075   };
00076 
00077   // Legal Values for CPU_arch, (=6), uleb128
00078   enum CPUArch {
00079     Pre_v4       = 0,
00080     v4       = 1,   // e.g. SA110
00081     v4T      = 2,   // e.g. ARM7TDMI
00082     v5T      = 3,   // e.g. ARM9TDMI
00083     v5TE     = 4,   // e.g. ARM946E_S
00084     v5TEJ    = 5,   // e.g. ARM926EJ_S
00085     v6       = 6,   // e.g. ARM1136J_S
00086     v6KZ     = 7,   // e.g. ARM1176JZ_S
00087     v6T2     = 8,   // e.g. ARM1156T2F_S
00088     v6K      = 9,   // e.g. ARM1136J_S
00089     v7       = 10,  // e.g. Cortex A8, Cortex M3
00090     v6_M     = 11,  // e.g. Cortex M1
00091     v6S_M    = 12,  // v6_M with the System extensions
00092     v7E_M    = 13   // v7_M with DSP extensions
00093   };
00094 
00095   enum CPUArchProfile { // (=7), uleb128 
00096     Not_Applicable = 0, // pre v7, or cross-profile code
00097     ApplicationProfile = (0x41), // 'A' (e.g. for Cortex A8)
00098     RealTimeProfile = (0x52), // 'R' (e.g. for Cortex R4)
00099     MicroControllerProfile = (0x4D), // 'M' (e.g. for Cortex M3)
00100     SystemProfile = (0x53) // 'S' Application or real-time profile
00101   };
00102 
00103   // The following have a lot of common use cases
00104   enum { 
00105     //ARMISAUse (=8), uleb128  and THUMBISAUse (=9), uleb128
00106     Not_Allowed = 0,
00107     Allowed = 1,
00108 
00109     // FP_arch (=10), uleb128 (formerly Tag_VFP_arch = 10)
00110     AllowFPv2  = 2, // v2 FP ISA permitted (implies use of the v1 FP ISA)
00111     AllowFPv3A = 3, // v3 FP ISA permitted (implies use of the v2 FP ISA)
00112     AllowFPv3B = 4, // v3 FP ISA permitted, but only D0-D15, S0-S31 
00113     AllowFPv4A = 5, // v4 FP ISA permitted (implies use of v3 FP ISA) 
00114     AllowFPv4B = 6, // v4 FP ISA was permitted, but only D0-D15, S0-S31
00115 
00116     // Tag_WMMX_arch, (=11), uleb128
00117     AllowThumb32 = 2, // 32-bit Thumb (implies 16-bit instructions)
00118     
00119     // Tag_WMMX_arch, (=11), uleb128
00120     AllowWMMXv1 = 2,  // The user permitted this entity to use WMMX v2
00121 
00122     // Tag_ABI_FP_denormal, (=20), uleb128 
00123     PreserveFPSign = 2, // sign when flushed-to-zero is preserved
00124 
00125     // Tag_ABI_FP_number_model, (=23), uleb128
00126     AllowRTABI = 2,  // numbers, infinities, and one quiet NaN (see [RTABI])
00127     AllowIEE754 = 3 // this code to use all the IEEE 754-defined FP encodings
00128   };
00129 }
00130 
00131 #endif // __TARGET_ARMBUILDATTRS_H__