MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / new_reloc_entry

Method new_reloc_entry

lib/asmjit/asmjit/core/codeholder.cpp:970–994  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

968// ========================
969
970Error CodeHolder::new_reloc_entry(Out<RelocEntry*> dst, RelocType reloc_type) noexcept {
971 ASMJIT_PROPAGATE(_relocations.reserve_additional(_arena));
972
973 uint32_t reloc_id = _relocations._size;
974 if (ASMJIT_UNLIKELY(reloc_id == Globals::kInvalidId)) {
975 return make_error(Error::kTooManyRelocations);
976 }
977
978 RelocEntry* re = _arena.alloc_oneshot<RelocEntry>();
979 if (ASMJIT_UNLIKELY(!re)) {
980 return make_error(Error::kOutOfMemory);
981 }
982
983 re->_id = reloc_id;
984 re->_reloc_type = reloc_type;
985 re->_format = OffsetFormat{};
986 re->_source_section_id = Globals::kInvalidId;
987 re->_target_section_id = Globals::kInvalidId;
988 re->_source_offset = 0;
989 re->_payload = 0;
990 _relocations.append_unchecked(re);
991
992 dst = re;
993 return Error::kOk;
994}
995
996// CodeHolder - Expression Evaluation
997// ==================================

Callers 4

embed_labelMethod · 0.80
embed_label_deltaMethod · 0.80
_emitMethod · 0.80
_emitMethod · 0.80

Calls 3

make_errorFunction · 0.85
reserve_additionalMethod · 0.80
append_uncheckedMethod · 0.80

Tested by

no test coverage detected