forked from OSchip/llvm-project
[ORC] Fix endianness in manual serialization to match WrapperFunctionUtils.
This commit is contained in:
parent
0672d5d104
commit
89fa1a3a83
|
@ -25,7 +25,8 @@ writeDebugObjectInfo(sys::MemoryBlock TargetMemBlock) {
|
||||||
ArgBuffer.resize(sizeof(decltype(DebugObjAddr)) +
|
ArgBuffer.resize(sizeof(decltype(DebugObjAddr)) +
|
||||||
sizeof(decltype(DebugObjSize)));
|
sizeof(decltype(DebugObjSize)));
|
||||||
|
|
||||||
BinaryStreamWriter ArgWriter(ArgBuffer, support::endianness::big);
|
// FIXME: Replace manual serializatio with WrapperFunction utility.
|
||||||
|
BinaryStreamWriter ArgWriter(ArgBuffer, support::endianness::little);
|
||||||
cantFail(ArgWriter.writeInteger(DebugObjAddr));
|
cantFail(ArgWriter.writeInteger(DebugObjAddr));
|
||||||
cantFail(ArgWriter.writeInteger(DebugObjSize));
|
cantFail(ArgWriter.writeInteger(DebugObjSize));
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,11 @@ Error TPCEHFrameRegistrar::registerEHFrames(JITTargetAddress EHFrameSectionAddr,
|
||||||
size_t EHFrameSectionSize) {
|
size_t EHFrameSectionSize) {
|
||||||
constexpr size_t ArgBufferSize = sizeof(uint64_t) + sizeof(uint64_t);
|
constexpr size_t ArgBufferSize = sizeof(uint64_t) + sizeof(uint64_t);
|
||||||
uint8_t ArgBuffer[ArgBufferSize];
|
uint8_t ArgBuffer[ArgBufferSize];
|
||||||
|
|
||||||
|
// FIXME: Replace manual serialization with WrapperFunction util call.
|
||||||
BinaryStreamWriter ArgWriter(
|
BinaryStreamWriter ArgWriter(
|
||||||
MutableArrayRef<uint8_t>(ArgBuffer, ArgBufferSize),
|
MutableArrayRef<uint8_t>(ArgBuffer, ArgBufferSize),
|
||||||
support::endianness::big);
|
support::endianness::little);
|
||||||
cantFail(ArgWriter.writeInteger(static_cast<uint64_t>(EHFrameSectionAddr)));
|
cantFail(ArgWriter.writeInteger(static_cast<uint64_t>(EHFrameSectionAddr)));
|
||||||
cantFail(ArgWriter.writeInteger(static_cast<uint64_t>(EHFrameSectionSize)));
|
cantFail(ArgWriter.writeInteger(static_cast<uint64_t>(EHFrameSectionSize)));
|
||||||
|
|
||||||
|
@ -67,9 +69,11 @@ Error TPCEHFrameRegistrar::deregisterEHFrames(
|
||||||
JITTargetAddress EHFrameSectionAddr, size_t EHFrameSectionSize) {
|
JITTargetAddress EHFrameSectionAddr, size_t EHFrameSectionSize) {
|
||||||
constexpr size_t ArgBufferSize = sizeof(uint64_t) + sizeof(uint64_t);
|
constexpr size_t ArgBufferSize = sizeof(uint64_t) + sizeof(uint64_t);
|
||||||
uint8_t ArgBuffer[ArgBufferSize];
|
uint8_t ArgBuffer[ArgBufferSize];
|
||||||
|
|
||||||
|
// FIXME: Replace manual serialization with WrapperFunction util call.
|
||||||
BinaryStreamWriter ArgWriter(
|
BinaryStreamWriter ArgWriter(
|
||||||
MutableArrayRef<uint8_t>(ArgBuffer, ArgBufferSize),
|
MutableArrayRef<uint8_t>(ArgBuffer, ArgBufferSize),
|
||||||
support::endianness::big);
|
support::endianness::little);
|
||||||
cantFail(ArgWriter.writeInteger(static_cast<uint64_t>(EHFrameSectionAddr)));
|
cantFail(ArgWriter.writeInteger(static_cast<uint64_t>(EHFrameSectionAddr)));
|
||||||
cantFail(ArgWriter.writeInteger(static_cast<uint64_t>(EHFrameSectionSize)));
|
cantFail(ArgWriter.writeInteger(static_cast<uint64_t>(EHFrameSectionSize)));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue