OSDN Git Service

[WebAssembly] Fix p2align in assembler.
authorWouter van Oortmerssen <aardappel@gmail.com>
Thu, 27 Jun 2019 18:11:15 +0000 (18:11 +0000)
committerWouter van Oortmerssen <aardappel@gmail.com>
Thu, 27 Jun 2019 18:11:15 +0000 (18:11 +0000)
commitc1056cbe8b17a7f55e7c4829f75045d755e40845
treeed161546929e458e99e75c1e24e918f1b3ad834e
parent9a5e06d9619c4d0adb4ea58f68559c3b947f31ea
[WebAssembly] Fix p2align in assembler.

Summary:
- Match the syntax output by InstPrinter.
- Fix it always emitting 0 for align. Had to work around fact that
  opcode is not available for GetDefaultP2Align while parsing.
- Updated tests that were erroneously happy with a p2align=0

Fixes https://bugs.llvm.org/show_bug.cgi?id=40752

Reviewers: aheejin, sbc100

Subscribers: jgravelle-google, sunfish, jfb, llvm-commits, dschuff

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63633

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364570 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
test/MC/WebAssembly/atomics-encodings.s
test/MC/WebAssembly/basic-assembly.s
test/MC/WebAssembly/reloc-pic.s
test/MC/WebAssembly/simd-encodings.s