TPDE
Loading...
Searching...
No Matches
tpde::CompilerBase< Adaptor, Derived, Config >::CallBuilderBase< CBDerived > Class Template Reference

Base class for target-specific CallBuilder implementations. More...

#include <CompilerBase.hpp>

Public Member Functions

void add_arg (ValuePart &&vp, CCAssignment cca)
 Add a value part as argument.
 
void add_arg (const CallArg &arg, u32 part_count)
 Add a full IR value as argument, with an explicit number of parts.
 
void add_arg (const CallArg &arg)
 Add a full IR value as argument.
 
void call (std::variant< SymRef, ValuePart >)
 Generate the function call (evict registers, call, reset stack frame).
 
void add_ret (ValuePart &vp, CCAssignment cca)
 Assign next return value part to vp.
 
void add_ret (ValuePart &&vp, CCAssignment cca)
 Assign next return value part to vp.
 
void add_ret (ValueRef &vr)
 Assign return values to the IR value.
 

Detailed Description

template<IRAdaptor Adaptor, typename Derived, CompilerConfig Config = CompilerConfigDefault>
template<typename CBDerived>
class tpde::CompilerBase< Adaptor, Derived, Config >::CallBuilderBase< CBDerived >

Base class for target-specific CallBuilder implementations.

Definition at line 244 of file CompilerBase.hpp.

Member Function Documentation

◆ add_arg() [1/3]

template<IRAdaptor Adaptor, typename Derived, CompilerConfig Config = CompilerConfigDefault>
template<typename CBDerived>
void tpde::CompilerBase< Adaptor, Derived, Config >::CallBuilderBase< CBDerived >::add_arg ( const CallArg & arg)
inline

Add a full IR value as argument.

The number of value parts must be exposed via val_parts. Values are decomposed into their parts and are typically either fully in registers or fully on the stack (except CallArg::Flag::allow_split).

Definition at line 274 of file CompilerBase.hpp.

◆ add_arg() [2/3]

template<IRAdaptor Adaptor, typename Derived, CompilerConfig Config>
template<typename CBDerived>
void tpde::CompilerBase< Adaptor, Derived, Config >::CallBuilderBase< CBDerived >::add_arg ( const CallArg & arg,
u32 part_count )

Add a full IR value as argument, with an explicit number of parts.

Values are decomposed into their parts and are typically either fully in registers or fully on the stack (except CallArg::Flag::allow_split).

Definition at line 679 of file CompilerBase.hpp.

◆ add_arg() [3/3]

template<IRAdaptor Adaptor, typename Derived, CompilerConfig Config>
template<typename CBDerived>
void tpde::CompilerBase< Adaptor, Derived, Config >::CallBuilderBase< CBDerived >::add_arg ( ValuePart && vp,
CCAssignment cca )

Add a value part as argument.

cca must be populated with information about the argument, except for the reg/stack_off, which are set by the CCAssigner. If no register bank is assigned, the register bank and size are retrieved from the value part, otherwise, the size must be set, too.

Definition at line 610 of file CompilerBase.hpp.


The documentation for this class was generated from the following file: