C# Class Mosa.Compiler.Framework.Platform.BaseCallingConvention32Bit

Implements the default 32-bit calling convention.
Inheritance: BaseCallingConventionExtended
显示文件 Open project: tgiphil/MOSA-Project

Protected Properties

Property Type Description
return32BitRegister Register
return64BitRegister Register
returnFloatingPointRegister Register
scratchRegister Register

Public Methods

Method Description
BaseCallingConvention32Bit ( BaseArchitecture architecture ) : System.Collections.Generic

Initializes a new instance of the BaseCallingConvention32Bit.

MakeCall ( BaseMethodCompiler compiler, Context context ) : void

Expands method call instruction represented by the context to perform the method call.

SetReturnValue ( BaseMethodCompiler compiler, Context context, Operand operand ) : void

Requests the calling convention to create an appropriate move instruction to populate the return value of a method.

Private Methods

Method Description
CalculateReturnSize ( BaseMethodCompiler compiler, MosaMethod method ) : int
CalculateReturnSize ( BaseMethodCompiler compiler, Operand result ) : int
CleanupReturnValue ( BaseMethodCompiler compiler, Context context, Operand result ) : void

Cleanups the return value.

FreeStackAfterCall ( BaseMethodCompiler compiler, Context context, int stackSize ) : void

Frees the stack after call.

Push ( BaseMethodCompiler compiler, Context context, Operand operand, int offset, int size, Operand scratch ) : void

Pushes the specified instructions.

PushOperands ( BaseMethodCompiler compiler, Context context, List operands, int space, Operand scratch ) : void

Calculates the remaining space.

PushOperands ( BaseMethodCompiler compiler, Context context, MosaMethod method, List operands, int space, Operand scratch ) : void

Calculates the remaining space.

ReserveStackSizeForCall ( BaseMethodCompiler compiler, Context context, int stackSize, Operand scratch ) : void

Reserves the stack size for call.

Method Details

BaseCallingConvention32Bit() public method

Initializes a new instance of the BaseCallingConvention32Bit.
public BaseCallingConvention32Bit ( BaseArchitecture architecture ) : System.Collections.Generic
architecture BaseArchitecture The architecture of the calling convention.
return System.Collections.Generic

MakeCall() public method

Expands method call instruction represented by the context to perform the method call.
public MakeCall ( BaseMethodCompiler compiler, Context context ) : void
compiler BaseMethodCompiler
context Context The context.
return void

SetReturnValue() public method

Requests the calling convention to create an appropriate move instruction to populate the return value of a method.
public SetReturnValue ( BaseMethodCompiler compiler, Context context, Operand operand ) : void
compiler BaseMethodCompiler The compiler.
context Context The context.
operand Operand The operand, that's holding the return value.
return void

Property Details

return32BitRegister protected_oe property

protected Register return32BitRegister
return Register

return64BitRegister protected_oe property

protected Register return64BitRegister
return Register

returnFloatingPointRegister protected_oe property

protected Register returnFloatingPointRegister
return Register

scratchRegister protected_oe property

protected Register scratchRegister
return Register