dmd.target
    Handles target-specific parameters
  
Discussion
    In order to allow for cross compilation, when the compiler produces a binary
 for a different platform than it is running on, target information needs
 to be abstracted. This is done in this module, primarily through Target.
  
Note: While DMD itself does not support cross-compilation, GDC and LDC do. Hence, this module is (sometimes heavily) modified by them, and contributors should review how their changes affect them.
License
Source: target.d
Documentation: https://dlang.org/phobos/dmd_target.html
- 
  DeclarationstructTarget;Describes a back-end target. At present it is incomplete, but in the future it should grow to contain most or all target machine and target O/S specific information. DiscussionIn many cases, calls to sizeof() can't be used directly for getting data type sizes since cross compiling is supported and would end up using the host sizes rather than the target sizes. - 
  DeclarationenumOS: ubyte;Bit decoding of the Target. OS
- 
  Declarationubyteptrsize;size of a pointer in bytes 
- 
  Declarationubyterealsize;size a real consumes in memory 
- 
  Declarationubyterealpad;padding added to the CPU real size to bring it up to realsize 
- 
  Declarationubyterealalignsize;alignment for reals 
- 
  Declarationubyteclassinfosize;size of ClassInfo
- 
  DeclarationulongmaxStaticDataSize;maximum size of static data 
- 
  DeclarationTargetCc;C ABI 
- 
  DeclarationTargetCPPcpp;C++ ABI 
- 
  DeclarationTargetObjCobjc;Objective-C ABI 
- 
  Declarationconst(char)[]architectureName;Architecture name 
- 
  Declarationconst(char)[]obj_ext;extension for object files 
- 
  Declarationconst(char)[]lib_ext;extension for static library files 
- 
  Declarationconst(char)[]dll_ext;extension for dynamic library files 
- 
  Declarationboolrun_noext;allow -run sources without extensions 
- 
  DeclarationstructFPTypeProperties(T);Values representing all properties for floating point types - 
  Declarationreal_tmax;largest representable value that's not infinity 
- 
  Declarationreal_tmin_normal;smallest representable normalized value that's not 0 
- 
  Declarationreal_tnan;NaN value 
- 
  Declarationreal_tinfinity;infinityvalue
- 
  Declarationreal_tepsilon;smallest increment to the value 1 
- 
  Declarationlongdig;number of decimal digits of precision 
- 
  Declarationlongmant_dig;number of bits in mantissa 
- 
  Declarationlongmax_exp;maximum int value such that 2 is representable 
- 
  Declarationlongmin_exp;minimum int value such that 2 is representable as a normalized value 
- 
  Declarationlongmax_10_exp;maximum int value such that 10 
- 
  Declarationlongmin_10_exp;minimum int value such that 10 is representable as a normalized value 
 
- 
  
- 
  DeclarationFPTypeProperties!floatFloatProperties;
- 
  DeclarationFPTypeProperties!doubleDoubleProperties;
- 
  DeclarationFPTypeProperties!real_tRealProperties;
- 
  Declarationvoid_init(const ref Paramparams);Initialize the Target 
- 
  DeclarationTarget.ObjectFormatobjectFormat();Determine the object format to be used 
- 
  DeclarationvoidsetCPU();Determine the instruction set to be used 
- 
  Declarationvoiddeinitialize();Deinitializes the global state of the compiler. DiscussionThis can be used to restore the state set by _initto its original state.
- 
  Declarationuintalignsize(Typetype);Requested target memory alignment size of the given type.ParametersTypetypetypeto inspectReturn Valuealignment in bytes 
- 
  Declarationuintfieldalign(Typetype);Requested target field alignment size of the given type.ParametersTypetypetypeto inspectReturn Valuealignment in bytes 
- 
  DeclarationTypeva_listType(const ref Locloc, Scope*sc);Type for the va_listtype for the target; e.g., required for_argptrdeclarations.NOTE: For Posix/x86_64 this returns the type which will really be used for passing an argument of type va_list. Return ValueTypethat representsva_list.
- 
  DeclarationintisVectorTypeSupported(intsz, Typetype);Checks whether the target supports a vector type.Parametersintszvector typesize in bytesTypetypevector element typeReturn Value0 vector typeis supported, 1 vectortypeis not supported on the target at all 2 vector elementtypeis not supported 3 vector size is not supported
- 
  DeclarationboolisVectorOpSupported(Typetype, EXPop, Typet2= null);Checks whether the target supports the given operation for vectors. ParametersTypetypetarget typeof operationEXPopthe unary or binary opbeing done on thetypeTypet2typeof second operand ifopReturn Valuetrueif the operation is supported ortypeis not a vector
- 
  DeclarationLINKsystemLinkage();Default system linkage for the target. Return ValueLINKto use forextern(System)
- 
  DeclarationTypeTupletoArgTypes(Typet);Describes how an argument type is passed to a function on target. ParametersTypettype to break down Return Valuetuple of types if type is passed in one or more registers empty tuple if type is always passed on the stack nullif the type is avoidor argtypes aren'tsupported by the target
- 
  DeclarationboolisReturnOnStack(TypeFunctiontf, boolneedsThis);Determine return style of function - whether in registers or through a hidden pointer to the caller's stack. ParametersTypeFunctiontffunction type to check boolneedsThistrueif the function type is for a non-static member functionReturn Valuetrueif return value from function is on the stack
- 
  DeclarationboolpreferPassByRef(Typet);Decides whether an inparameter of the specified POD type is to be passed by reference or by value. To be used with-preview=inonly!ParametersTypettype of the inparameter, must be a PODReturn Valuetrueif theinparameter is to be passed by reference
- 
  DeclarationExpressiongetTargetInfo(const(char)*name, const ref Locloc);Get targetInfo by key Parametersconst(char)*namenameof targetInfo to getLocloclocation to use for error messages Return ValueExpression for the requested targetInfo 
- 
  DeclarationboolisCalleeDestroyingArgs(TypeFunctiontf);ParametersTypeFunctiontftype of function being called Return Valuetrueif the callee invokes destructors for arguments.
- 
  DeclarationboollibraryObjectMonitors(FuncDeclarationfd, Statementfbody);Returns trueif the implementation for object monitors is always defined in the D runtime library (rt/monitor_.d).ParametersFuncDeclarationfdfunction with synchronizedstorage class.Statementfbodyentire function body of fdReturn Valuefalseif the target backend handles synchronizing monitors.
- 
  Declarationconst boolsupportsLinkerDirective();Returns trueif the target supportspragma(linkerDirective).Return Valuefalseif the target does not supportpragma(linkerDirective).
- 
  DeclarationboolisXmmSupported();Return Valuetrueif xmm usage is supported
- 
  Declarationconst nothrow @nogc @property scope boolisPOSIX();Return Valuetrueif generating code for POSIX
- 
  DeclarationuintstackAlign();Return Valuealignment of the stack 
 
- 
  
- 
  DeclarationstructTargetC;Functions and variables specific to interfacing with extern(C) ABI. - 
  DeclarationboolcrtDestructorsSupported;Not all platforms support crt_destructor 
- 
  Declarationubyteboolsize;size of a C _Booltype
- 
  Declarationubyteshortsize;size of a C shortorunsigned shorttype
- 
  Declarationubyteintsize;size of a C intorunsigned inttype
- 
  Declarationubytelongsize;size of a C longorunsigned longtype
- 
  Declarationubytelong_longsize;size of a C long longorunsigned long longtype
- 
  Declarationubytelong_doublesize;size of a C long double
- 
  Declarationubytewchar_tsize;size of a C wchar_ttype
- 
  DeclarationRuntimeruntime;vendor of the C runtimeto link against
- 
  DeclarationBitFieldStylebitFieldStyle;different C compilers do it differently 
 
- 
  
- 
  DeclarationstructTargetCPP;Functions and variables specific to interface with extern(C++) ABI. - 
  DeclarationboolreverseOverloads;set if overloaded functions are grouped and in reverse order (such as in dmc and cl) 
- 
  Declarationboolexceptions;set if catching C++ exceptionsis supported
- 
  DeclarationbooltwoDtorInVtable;target C++ ABI puts deleting and non-deleting destructor into vtable 
- 
  DeclarationboolsplitVBasetable;set if C++ ABI uses separate tables for virtual functions and virtual bases 
- 
  DeclarationboolwrapDtorInExternD;set if C++ dtors require a D wrapper to be callable from runtime 
- 
  DeclarationRuntimeruntime;vendor of the C++ runtimeto link against
- 
  Declarationconst(char)*toMangle(Dsymbols);Mangle the given symbol for C++ ABI. ParametersDsymbolsdeclaration with C++ linkage Return Valuestring mangling of symbol 
- 
  Declarationconst(char)*typeInfoMangle(ClassDeclarationcd);Get RTTI mangling of the given class declaration for C++ ABI. ParametersClassDeclarationcdclass with C++ linkage Return Valuestring mangling of C++ typeinfo 
- 
  Declarationconst(char)*thunkMangle(FuncDeclarationfd, intoffset);Get mangle name of a this-adjusting thunk to the given function declaration for C++ ABI. ParametersFuncDeclarationfdfunction with C++ linkage intoffsetcall offsetto the vptrReturn Valuestring mangling of C++ thunk, or nullif unhandled
- 
  Declarationconst(char)*typeMangle(Typet);Gets vendor-specific type mangling for C++ ABI. ParametersTypettype to inspect Return Valuestring if type is mangled specially on target nullif unhandled
- 
  DeclarationTypeparameterType(Typet);Get the type that will really be used for passing the given argument to an extern(C++)function, ornullif unhandled.ParametersTypettype to be passed. Return ValueTypeto use for typet
- 
  DeclarationboolfundamentalType(const Typet, ref boolisFundamental);Checks whether type is a vendor-specific fundamental type. ParametersTypettype to inspect boolisFundamentalwhere to store result Return ValuetrueifisFundamentalwas set by function
- 
  DeclarationuintderivedClassOffset(ClassDeclarationbaseClass);Get the starting offset position for fields of an extern(C++)class that is derived from the given base class.ParametersClassDeclarationbaseClassbase class with C++ linkage Return Valuestarting offset to lay out derived class fields 
 
- 
  
- 
  DeclarationstructTargetObjC;Functions and variables specific to interface with extern(Objective-C) ABI. - 
  Declarationboolsupported;set if compiler can interface with Objective-C 
 
- 
  
- 
  DeclarationTargettarget;