blob: 16e5c8eb83d7a06c02e2e15d3e932fbc3cb30343 [file] [log] [blame]
JF Bastien5ca0bac2015-07-10 18:23:10 +00001// WebAssemblyInstrFloat.td-WebAssembly Float codegen support ---*- 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 Floating-point operand code-gen constructs.
12///
13//===----------------------------------------------------------------------===//
14
JF Bastiend9767a32015-07-14 21:13:29 +000015defm FADD : BinaryFP<fadd>;
16defm FSUB : BinaryFP<fsub>;
17defm FMUL : BinaryFP<fmul>;
18defm FDIV : BinaryFP<fdiv>;
19defm FABS : UnaryFP<fabs>;
20defm FNEG : UnaryFP<fneg>;
21defm COPYSIGN : BinaryFP<fcopysign>;
JF Bastienef172fc2015-08-11 02:45:15 +000022
23/*
24 * TODO(jfb): add and test these:
25 * defm CEIL : UnaryFP<fceil>;
26 * defm FLOOR : UnaryFP<ffloor>;
27 * defm TRUNC : UnaryFP<ftrunc>;
28 * defm NEARESTINT : UnaryFP<fnearbyint>;
29 */
JF Bastiend9767a32015-07-14 21:13:29 +000030
JF Bastienda06bce2015-08-11 21:02:46 +000031defm EQ : ComparisonFP<SETOEQ>;
32defm NE : ComparisonFP<SETUNE>;
33defm LT : ComparisonFP<SETOLT>;
34defm LE : ComparisonFP<SETOLE>;
35defm GT : ComparisonFP<SETOGT>;
36defm GE : ComparisonFP<SETOGE>;
JF Bastiend9767a32015-07-14 21:13:29 +000037
38defm SQRT : UnaryFP<fsqrt>;
39
40/*
41 * TODO(jfb): Add the following for 32-bit and 64-bit.
42 *
JF Bastien5ca0bac2015-07-10 18:23:10 +000043 * float32.min: minimum (binary operator); if either operand is NaN, returns NaN
44 * float32.max: maximum (binary operator); if either operand is NaN, returns NaN
45 */