MCPcopy Create free account
hub / github.com/ZDoom/Raze / embed

Method embed

libraries/asmjit/asmjit/base/assembler.cpp:267–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267Error Assembler::embed(const void* data, uint32_t size) {
268 if (_lastError) return _lastError;
269
270 if (getRemainingSpace() < size) {
271 Error err = _code->growBuffer(&_section->_buffer, size);
272 if (ASMJIT_UNLIKELY(err != kErrorOk)) return setLastError(err);
273 }
274
275 ::memcpy(_bufferPtr, data, size);
276 _bufferPtr += size;
277
278#if !defined(ASMJIT_DISABLE_LOGGING)
279 if (_globalOptions & kOptionLoggingEnabled)
280 _code->_logger->logBinary(data, size);
281#endif // !ASMJIT_DISABLE_LOGGING
282
283 return kErrorOk;
284}
285
286Error Assembler::embedLabel(const Label& label) {
287 if (_lastError) return _lastError;

Callers 15

dbFunction · 0.45
dwFunction · 0.45
ddFunction · 0.45
dqFunction · 0.45
dint8Function · 0.45
duint8Function · 0.45
dint16Function · 0.45
duint16Function · 0.45
dint32Function · 0.45
duint32Function · 0.45
dint64Function · 0.45
duint64Function · 0.45

Calls 3

getRemainingSpaceFunction · 0.85
growBufferMethod · 0.80
logBinaryMethod · 0.80

Tested by

no test coverage detected