WebAssemblyInstrInteger.td revision 286425
1// WebAssemblyInstrInteger.td-WebAssembly Integer codegen -------*- tablegen -*- 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9/// 10/// \file 11/// \brief WebAssembly Integer operand code-gen constructs. 12/// 13//===----------------------------------------------------------------------===// 14 15defm ADD : BinaryInt<add>; 16defm SUB : BinaryInt<sub>; 17defm MUL : BinaryInt<mul>; 18defm SDIV : BinaryInt<sdiv>; 19defm UDIV : BinaryInt<udiv>; 20defm SREM : BinaryInt<srem>; 21defm UREM : BinaryInt<urem>; 22defm AND : BinaryInt<and>; 23defm IOR : BinaryInt<or>; 24defm XOR : BinaryInt<xor>; 25defm SHL : BinaryInt<shl>; 26defm SHR : BinaryInt<srl>; 27defm SAR : BinaryInt<sra>; 28 29/* 30 * TODO(jfb): Add the following for 32-bit and 64-bit. 31 * 32 * int32.eq: signed-less compare equal 33 * int32.slt: signed less than 34 * int32.sle: signed less than or equal 35 * int32.ult: unsigned less than 36 * int32.ule: unsigned less than or equal 37 * int32.sgt: signed greater than 38 * int32.sge: signed greater than or equal 39 * int32.ugt: unsigned greater than 40 * int32.uge: unsigned greater than or equal 41 */ 42 43defm CLZ : UnaryInt<ctlz>; 44defm CTZ : UnaryInt<cttz>; 45defm POPCNT : UnaryInt<ctpop>; 46