LCOV - code coverage report
Current view: top level - asmjit - x86builder.cpp (source / functions) Hit Total Coverage
Test: plumed test coverage (other modules) Lines: 0 17 0.0 %
Date: 2026-11-05 10:19:06 Functions: 0 6 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             : #include "api-build_p.h"
       8             : #if !defined(ASMJIT_NO_X86) && !defined(ASMJIT_NO_BUILDER)
       9             : 
      10             : #include "x86assembler.h"
      11             : #include "x86builder.h"
      12             : #include "x86emithelper_p.h"
      13             : 
      14             : ASMJIT_BEGIN_SUB_NAMESPACE(x86)
      15             : 
      16             : // x86::Builder - Construction & Destruction
      17             : // =========================================
      18             : 
      19           0 : Builder::Builder(CodeHolder* code) noexcept : BaseBuilder() {
      20           0 :   _archMask = (uint64_t(1) << uint32_t(Arch::kX86)) |
      21             :               (uint64_t(1) << uint32_t(Arch::kX64)) ;
      22           0 :   assignEmitterFuncs(this);
      23             : 
      24           0 :   if (code)
      25           0 :     code->attach(this);
      26           0 : }
      27           0 : Builder::~Builder() noexcept {}
      28             : 
      29             : // x86::Builder - Events
      30             : // =====================
      31             : 
      32           0 : Error Builder::onAttach(CodeHolder* code) noexcept {
      33           0 :   return Base::onAttach(code);
      34             : }
      35             : 
      36           0 : Error Builder::onDetach(CodeHolder* code) noexcept {
      37           0 :   return Base::onDetach(code);
      38             : }
      39             : 
      40             : // x86::Builder - Finalize
      41             : // =======================
      42             : 
      43           0 : Error Builder::finalize() {
      44           0 :   ASMJIT_PROPAGATE(runPasses());
      45           0 :   Assembler a(_code);
      46             :   a.addEncodingOptions(encodingOptions());
      47           0 :   a.addDiagnosticOptions(diagnosticOptions());
      48           0 :   return serializeTo(&a);
      49           0 : }
      50             : 
      51             : ASMJIT_END_SUB_NAMESPACE
      52             : 
      53             : #endif // !ASMJIT_NO_X86 && !ASMJIT_NO_BUILDER
      54             : 
      55             : #endif // __PLUMED_HAS_ASMJIT

Generated by: LCOV version 1.16