1// 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
15defm 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>;
22defm CEIL : UnaryFP<fceil>;
23defm FLOOR : UnaryFP<ffloor>;
24defm TRUNC : UnaryFP<ftrunc>;
25defm NEARESTINT : UnaryFP<fnearbyint>;
26
27/*
28 * TODO(jfb): Add the following for 32-bit and 64-bit.
29 *
30 * float32.eq: compare equal
31 * float32.lt: less than
32 * float32.le: less than or equal
33 * float32.gt: greater than
34 * float32.ge: greater than or equal
35 */
36
37defm SQRT : UnaryFP<fsqrt>;
38
39/*
40 * TODO(jfb): Add the following for 32-bit and 64-bit.
41 *
42 * float32.min: minimum (binary operator); if either operand is NaN, returns NaN
43 * float32.max: maximum (binary operator); if either operand is NaN, returns NaN
44 */
45