projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f2fde7
)
[DX] Speculative fix for big endian encoding
author
Chris Bieneman
<chris.bieneman@me.com>
Thu, 2 Feb 2023 05:19:35 +0000
(23:19 -0600)
committer
Chris Bieneman
<chris.bieneman@me.com>
Thu, 2 Feb 2023 05:19:35 +0000
(23:19 -0600)
I missed byte swapping the size field.
llvm/lib/MC/DXContainerPSVInfo.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/MC/DXContainerPSVInfo.cpp
b/llvm/lib/MC/DXContainerPSVInfo.cpp
index
5463f85
..
399f54c
100644
(file)
--- a/
llvm/lib/MC/DXContainerPSVInfo.cpp
+++ b/
llvm/lib/MC/DXContainerPSVInfo.cpp
@@
-26,6
+26,8
@@
void PSVRuntimeInfo::write(raw_ostream &OS, uint32_t Version) const {
default:
InfoSize = sizeof(dxbc::PSV::v2::RuntimeInfo);
}
+ if (sys::IsBigEndianHost)
+ sys::swapByteOrder(InfoSize);
// Write the size of the info.
OS.write(reinterpret_cast<const char *>(&InfoSize), sizeof(uint32_t));
// Write the info itself.