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 29defm EQ : ComparisonInt<SETEQ>; 30defm NE : ComparisonInt<SETNE>; 31defm SLT : ComparisonInt<SETLT>; 32defm SLE : ComparisonInt<SETLE>; 33defm ULT : ComparisonInt<SETULT>; 34defm ULE : ComparisonInt<SETULE>; 35defm SGT : ComparisonInt<SETGT>; 36defm SGE : ComparisonInt<SETGE>; 37defm UGT : ComparisonInt<SETUGT>; 38defm UGE : ComparisonInt<SETUGE>; 39 40defm CLZ : UnaryInt<ctlz>; 41defm CTZ : UnaryInt<cttz>; 42defm POPCNT : UnaryInt<ctpop>; 43