LCOV - code coverage report
Current view: top level - asmjit - emithelper_p.h (source / functions) Hit Total Coverage
Test: plumed test coverage (other modules) Lines: 1 1 100.0 %
Date: 2026-11-05 10:19:06 Functions: 0 0 -

          Line data    Source code
       1             : #ifdef __PLUMED_HAS_ASMJIT
       2             : // This file is part of AsmJit project <https://asmjit.com>
       3             : //
       4             : // See asmjit.h or LICENSE.md for license and copyright information
       5             : // SPDX-License-Identifier: Zlib
       6             : 
       7             : #ifndef ASMJIT_CORE_EMITHELPER_P_H_INCLUDED
       8             : #define ASMJIT_CORE_EMITHELPER_P_H_INCLUDED
       9             : 
      10             : #include "emitter.h"
      11             : #include "operand.h"
      12             : #include "type.h"
      13             : 
      14             : ASMJIT_BEGIN_NAMESPACE
      15             : 
      16             : //! \cond INTERNAL
      17             : //! \addtogroup asmjit_core
      18             : //! \{
      19             : 
      20             : //! Helper class that provides utilities for each supported architecture.
      21             : class BaseEmitHelper {
      22             : public:
      23             :   BaseEmitter* _emitter;
      24             : 
      25             :   inline explicit BaseEmitHelper(BaseEmitter* emitter = nullptr) noexcept
      26       82476 :     : _emitter(emitter) {}
      27             : 
      28             :   inline BaseEmitter* emitter() const noexcept { return _emitter; }
      29             :   inline void setEmitter(BaseEmitter* emitter) noexcept { _emitter = emitter; }
      30             : 
      31             :   //! Emits a pure move operation between two registers or the same type or between a register and its home
      32             :   //! slot. This function does not handle register conversion.
      33             :   virtual Error emitRegMove(
      34             :     const Operand_& dst_,
      35             :     const Operand_& src_, TypeId typeId, const char* comment = nullptr) = 0;
      36             : 
      37             :   //! Emits swap between two registers.
      38             :   virtual Error emitRegSwap(
      39             :     const BaseReg& a,
      40             :     const BaseReg& b, const char* comment = nullptr) = 0;
      41             : 
      42             :   //! Emits move from a function argument (either register or stack) to a register.
      43             :   //!
      44             :   //! This function can handle the necessary conversion from one argument to another, and from one register type
      45             :   //! to another, if it's possible. Any attempt of conversion that requires third register of a different group
      46             :   //! (for example conversion from K to MMX on X86/X64) will fail.
      47             :   virtual Error emitArgMove(
      48             :     const BaseReg& dst_, TypeId dstTypeId,
      49             :     const Operand_& src_, TypeId srcTypeId, const char* comment = nullptr) = 0;
      50             : 
      51             :   Error emitArgsAssignment(const FuncFrame& frame, const FuncArgsAssignment& args);
      52             : };
      53             : 
      54             : //! \}
      55             : //! \endcond
      56             : 
      57             : ASMJIT_END_NAMESPACE
      58             : 
      59             : #endif // ASMJIT_CORE_EMITHELPER_P_H_INCLUDED
      60             : 
      61             : #endif // __PLUMED_HAS_ASMJIT

Generated by: LCOV version 1.16