Files
clang-p2996/llvm/test/MC/Disassembler/WebAssembly/wasm.txt
Thomas Lively a0d25815a0 [WebAssembly] v8x16.shuffle
Summary:
Since the shuffle mask is not exposed as an operand in the native ISel
DAG, create a new WebAssembly ISD node exposing the mask. The mask is
lowered as sixteen immediate byte indices no matter what type the
original vector shuffle was operating on.

This CL depends on D51656

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

llvm-svn: 341718
2018-09-07 21:54:46 +00:00

40 lines
921 B
Plaintext

# RUN: llvm-mc --disassemble %s -triple=wasm32-unknown-unknown | FileCheck %s
# CHECK: .text
# CHECK: nop
0x01
# CHECK: i32.add
0x6a
# CHECK: i64.const -1
0x42 0x7F
# CHECK: i64.load32_u 16:p2align=1
0x35 0x01 0x10
# CHECK: block
# 3
# FIXME: WebAssemblyInstPrinter does not currently print block number.
0x02 0x03
# CHECK: call_indirect
# $0=, 128, 0
# FIXME: WebAssemblyInstPrinter does not print immediates.
0x11 0x80 0x01 0x00
# CHECK: get_local 128
0x20 0x80 0x01
# Prefix byte example:
# CHECK: i64.trunc_u:sat/f64
0xFC 0x07
# v128.const is arbitrarily disassembled as v16i8
# CHECK: v128.const 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
0xFD 0x00 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F
# CHECK: v8x16.shuffle 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
0xFD 0x17 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F