1 // WebAssemblyInstrInteger.td-WebAssembly Integer codegen -------*- tablegen -*-
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 /// \brief WebAssembly Integer operand code-gen constructs.
13 //===----------------------------------------------------------------------===//
16 * TODO(jfb): Add the following for 32-bit and 64-bit.
18 * int32.add: signed-less addition
19 * int32.sub: signed-less subtraction
20 * int32.mul: signed-less multiplication (lower 32-bits)
21 * int32.sdiv: signed division
22 * int32.udiv: unsigned division
23 * int32.srem: signed remainder
24 * int32.urem: unsigned remainder
25 * int32.and: signed-less logical and
26 * int32.ior: signed-less inclusive or
27 * int32.xor: signed-less exclusive or
28 * int32.shl: signed-less shift left
29 * int32.shr: signed-less logical shift right
30 * int32.sar: signed-less arithmetic shift right
31 * int32.eq: signed-less compare equal
32 * int32.slt: signed less than
33 * int32.sle: signed less than or equal
34 * int32.ult: unsigned less than
35 * int32.ule: unsigned less than or equal
36 * int32.sgt: signed greater than
37 * int32.sge: signed greater than or equal
38 * int32.ugt: unsigned greater than
39 * int32.uge: unsigned greater than or equal
40 * int32.clz: count leading zeroes (defined for all values, including zero)
41 * int32.ctz: count trailing zeroes (defined for all values, including zero)
42 * int32.popcnt: count number of ones