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(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, Loc loc)

Get targetInfo by key

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)

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

Properties

isPOSIX
bool isPOSIX [@property getter]

Structs

FPTypeProperties
struct FPTypeProperties(T)

Values representing all properties for floating point types

Variables

DoubleProperties
FPTypeProperties!double DoubleProperties;
FloatProperties
FPTypeProperties!float FloatProperties;
RealProperties
FPTypeProperties!real_t RealProperties;
c
TargetC c;

C ABI

classinfosize
uint classinfosize;

size of ClassInfo

cpp
TargetCPP cpp;

C++ ABI

maxStaticDataSize
ulong maxStaticDataSize;

maximum size of static data

objc
TargetObjC objc;

Objective-C ABI

ptrsize
uint ptrsize;

size of a pointer in bytes

realalignsize
uint realalignsize;

alignment for reals

realpad
uint realpad;

padding added to the CPU real size to bring it up to realsize

realsize
uint realsize;

size a real consumes in memory

Meta