ONE - On-device Neural Engine
Loading...
Searching...
No Matches
enco::AsmCode Class Reference

#include <AsmCode.h>

Public Member Functions

 AsmCode (const std::string &filename, const std::string &varname)
 
void dump (std::ostream &) const
 

Detailed Description

Definition at line 26 of file AsmCode.h.

Constructor & Destructor Documentation

◆ AsmCode()

enco::AsmCode::AsmCode ( const std::string &  filename,
const std::string &  varname 
)
inline

Definition at line 29 of file AsmCode.h.

30 : _filename{filename}, _varname{varname}
31 {
32 // DO NOTHING
33 }

Member Function Documentation

◆ dump()

void enco::AsmCode::dump ( std::ostream &  os) const

Definition at line 22 of file AsmCode.cpp.

23{
24 os << ".section .rodata" << std::endl;
25 os << ".global " << _varname << std::endl;
26 // Please refer to https://www.sourceware.org/binutils/docs/as/Type.html#Type for details
27 os << ".type " << _varname << ", STT_OBJECT" << std::endl;
28 os << ".align " << 4 << std::endl;
29 os << _varname << ":" << std::endl;
30 os << ".incbin " << '"' << _filename << '"' << std::endl;
31}

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