Target

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.

In 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.

Members

Functions

_init
void _init(ref const Param params)

Initialize the Target

alignsize
uint alignsize(Type type)

Requested target memory alignment size of the given type.

critsecsize
uint critsecsize()

Size of the target OS critical section.

deinitialize
void deinitialize()

Deinitializes the global state of the compiler.

fieldalign
uint fieldalign(Type type)

Requested target field alignment size of the given type.

getTargetInfo
Expression getTargetInfo(const(char)* name, const ref Loc loc)

Get targetInfo by key

isPOSIX
bool isPOSIX()
isReturnOnStack
bool isReturnOnStack(TypeFunction tf, bool needsThis)

Determine return style of function - whether in registers or through a hidden pointer to the caller's stack.

isVectorOpSupported
bool isVectorOpSupported(Type type, ubyte op, Type t2 = null)

Checks whether the target supports the given operation for vectors.

isVectorTypeSupported
int isVectorTypeSupported(int sz, Type type)

Checks whether the target supports a vector type.

isXmmSupported
bool isXmmSupported()
parameterSize
ulong parameterSize(const ref Loc loc, Type t)

Determine the size a value of type t will be when it is passed on the function parameter stack.

systemLinkage
LINK systemLinkage()

Default system linkage for the target.

toArgTypes
TypeTuple toArgTypes(Type t)

Describes how an argument type is passed to a function on target.

va_listType
Type va_listType()

Type for the va_list type for the target. NOTE: For Posix/x86_64 this returns the type which will really be used for passing an argument of type va_list.

Structs

FPTypeProperties
struct FPTypeProperties(T)

Values representing all properties for floating point types

Variables

c
TargetC c;

C ABI

cpp
TargetCPP cpp;

C++ ABI

objc
TargetObjC objc;

Objective-C ABI

Meta