[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:
Heejin Ahn 2019-02-08 04:06:56 +00:00
parent c771675688
commit df6770f0c9
1 changed files with 1 additions and 1 deletions

View File

@ -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) {