1 // WebAssemblyInstrFloat.td-WebAssembly Float codegen support ---*- 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 Floating-point operand code-gen constructs.
13 //===----------------------------------------------------------------------===//
15 defm FADD : BinaryFP<fadd>;
16 defm FSUB : BinaryFP<fsub>;
17 defm FMUL : BinaryFP<fmul>;
18 defm FDIV : BinaryFP<fdiv>;
19 defm FABS : UnaryFP<fabs>;
20 defm FNEG : UnaryFP<fneg>;
21 defm COPYSIGN : BinaryFP<fcopysign>;
22 defm CEIL : UnaryFP<fceil>;
23 defm FLOOR : UnaryFP<ffloor>;
24 defm TRUNC : UnaryFP<ftrunc>;
25 defm NEARESTINT : UnaryFP<fnearbyint>;
28 * TODO(jfb): Add the following for 32-bit and 64-bit.
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
37 defm SQRT : UnaryFP<fsqrt>;
40 * TODO(jfb): Add the following for 32-bit and 64-bit.
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