diff options
author | Dan Gohman <dan433584@gmail.com> | 2016-01-13 19:29:37 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2016-01-13 19:29:37 +0000 |
commit | 938ff9f0aaed1053886508c5d6e5b25d4b4dfeff (patch) | |
tree | 0086393e8472a249cf38809013898c4287a7f4cd /llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp | |
parent | f03dbb3cb54fe62b2cbfa9f439f74084f34c67d6 (diff) | |
download | bcm5719-llvm-938ff9f0aaed1053886508c5d6e5b25d4b4dfeff.tar.gz bcm5719-llvm-938ff9f0aaed1053886508c5d6e5b25d4b4dfeff.zip |
[WebAssembly] MCFixupKindInfo's TargetSize is in bits rather than bytes.
llvm-svn: 257655
Diffstat (limited to 'llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp index bba06f65e16..3269ff0da07 100644 --- a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp +++ b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp @@ -73,8 +73,8 @@ void WebAssemblyAsmBackend::applyFixup(const MCFixup &Fixup, char *Data, unsigned DataSize, uint64_t Value, bool IsPCRel) const { const MCFixupKindInfo &Info = getFixupKindInfo(Fixup.getKind()); - unsigned NumBytes = RoundUpToAlignment(Info.TargetSize, 8); - if (!Value) + unsigned NumBytes = (Info.TargetSize + 7) / 8; + if (Value == 0) return; // Doesn't change encoding. // Shift the value into position. |