Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 1379952

Browse files
committed
[WebAssembly] Renumber and LEB128-encode SIMD opcodes
Reviewers: aheejin, dschuff, aardappel Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54126 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346463 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent b1c6e08 commit 1379952

File tree

4 files changed

+397
-418
lines changed

4 files changed

+397
-418
lines changed

lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ void WebAssemblyMCCodeEmitter::encodeInstruction(
6767
OS << uint8_t(Binary);
6868
} else {
6969
assert(Binary <= UINT16_MAX && "Several-byte opcodes not supported yet");
70-
OS << uint8_t(Binary >> 8) << uint8_t(Binary);
70+
OS << uint8_t(Binary >> 8);
71+
encodeULEB128(uint8_t(Binary), OS);
7172
}
7273

7374
// For br_table instructions, encode the size of the table. In the MCInst,

0 commit comments

Comments
 (0)