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

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 272 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 )
noexcept

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 678 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 )
noexcept

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 609 of file CompilerBase.hpp.


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