forked from OSchip/llvm-project
[WebAssembly] Fix parseImmediate's memory alignment requirement
This fixes the current failure in the x86-64 ubsan bot caused by r353496. llvm-svn: 353499
This commit is contained in:
parent
c771675688
commit
df6770f0c9
|
@ -108,7 +108,7 @@ template <typename T>
|
|||
bool parseImmediate(MCInst &MI, uint64_t &Size, ArrayRef<uint8_t> Bytes) {
|
||||
if (Size + sizeof(T) > Bytes.size())
|
||||
return false;
|
||||
T Val = support::endian::read<T, support::endianness::little, alignof(T)>(
|
||||
T Val = support::endian::read<T, support::endianness::little, 1>(
|
||||
Bytes.data() + Size);
|
||||
Size += sizeof(T);
|
||||
if (std::is_floating_point<T>::value) {
|
||||
|
|
Loading…
Reference in New Issue