162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * MIPS floating point support
462306a36Sopenharmony_ci * Copyright (C) 1994-2000 Algorithmics Ltd.
562306a36Sopenharmony_ci *
662306a36Sopenharmony_ci *  Nov 7, 2000
762306a36Sopenharmony_ci *  Modification to allow integration with Linux kernel
862306a36Sopenharmony_ci *
962306a36Sopenharmony_ci *  Kevin D. Kissell, kevink@mips.com and Carsten Langgard, carstenl@mips.com
1062306a36Sopenharmony_ci *  Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
1162306a36Sopenharmony_ci */
1262306a36Sopenharmony_ci#ifndef __ARCH_MIPS_MATH_EMU_IEEE754_H
1362306a36Sopenharmony_ci#define __ARCH_MIPS_MATH_EMU_IEEE754_H
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci#include <linux/compiler.h>
1662306a36Sopenharmony_ci#include <asm/byteorder.h>
1762306a36Sopenharmony_ci#include <linux/kernel.h>
1862306a36Sopenharmony_ci#include <linux/types.h>
1962306a36Sopenharmony_ci#include <linux/sched.h>
2062306a36Sopenharmony_ci#include <asm/bitfield.h>
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ciunion ieee754dp {
2362306a36Sopenharmony_ci	struct {
2462306a36Sopenharmony_ci		__BITFIELD_FIELD(unsigned int sign:1,
2562306a36Sopenharmony_ci		__BITFIELD_FIELD(unsigned int bexp:11,
2662306a36Sopenharmony_ci		__BITFIELD_FIELD(u64 mant:52,
2762306a36Sopenharmony_ci		;)))
2862306a36Sopenharmony_ci	};
2962306a36Sopenharmony_ci	u64 bits;
3062306a36Sopenharmony_ci};
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ciunion ieee754sp {
3362306a36Sopenharmony_ci	struct {
3462306a36Sopenharmony_ci		__BITFIELD_FIELD(unsigned sign:1,
3562306a36Sopenharmony_ci		__BITFIELD_FIELD(unsigned bexp:8,
3662306a36Sopenharmony_ci		__BITFIELD_FIELD(unsigned mant:23,
3762306a36Sopenharmony_ci		;)))
3862306a36Sopenharmony_ci	};
3962306a36Sopenharmony_ci	u32 bits;
4062306a36Sopenharmony_ci};
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ci/*
4362306a36Sopenharmony_ci * single precision (often aka float)
4462306a36Sopenharmony_ci*/
4562306a36Sopenharmony_ciint ieee754sp_class(union ieee754sp x);
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ciunion ieee754sp ieee754sp_abs(union ieee754sp x);
4862306a36Sopenharmony_ciunion ieee754sp ieee754sp_neg(union ieee754sp x);
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ciunion ieee754sp ieee754sp_add(union ieee754sp x, union ieee754sp y);
5162306a36Sopenharmony_ciunion ieee754sp ieee754sp_sub(union ieee754sp x, union ieee754sp y);
5262306a36Sopenharmony_ciunion ieee754sp ieee754sp_mul(union ieee754sp x, union ieee754sp y);
5362306a36Sopenharmony_ciunion ieee754sp ieee754sp_div(union ieee754sp x, union ieee754sp y);
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ciunion ieee754sp ieee754sp_fint(int x);
5662306a36Sopenharmony_ciunion ieee754sp ieee754sp_flong(s64 x);
5762306a36Sopenharmony_ciunion ieee754sp ieee754sp_fdp(union ieee754dp x);
5862306a36Sopenharmony_ciunion ieee754sp ieee754sp_rint(union ieee754sp x);
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ciint ieee754sp_tint(union ieee754sp x);
6162306a36Sopenharmony_cis64 ieee754sp_tlong(union ieee754sp x);
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ciint ieee754sp_cmp(union ieee754sp x, union ieee754sp y, int cop, int sig);
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ciunion ieee754sp ieee754sp_sqrt(union ieee754sp x);
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ciunion ieee754sp ieee754sp_maddf(union ieee754sp z, union ieee754sp x,
6862306a36Sopenharmony_ci				union ieee754sp y);
6962306a36Sopenharmony_ciunion ieee754sp ieee754sp_msubf(union ieee754sp z, union ieee754sp x,
7062306a36Sopenharmony_ci				union ieee754sp y);
7162306a36Sopenharmony_ciunion ieee754sp ieee754sp_madd(union ieee754sp z, union ieee754sp x,
7262306a36Sopenharmony_ci				union ieee754sp y);
7362306a36Sopenharmony_ciunion ieee754sp ieee754sp_msub(union ieee754sp z, union ieee754sp x,
7462306a36Sopenharmony_ci				union ieee754sp y);
7562306a36Sopenharmony_ciunion ieee754sp ieee754sp_nmadd(union ieee754sp z, union ieee754sp x,
7662306a36Sopenharmony_ci				union ieee754sp y);
7762306a36Sopenharmony_ciunion ieee754sp ieee754sp_nmsub(union ieee754sp z, union ieee754sp x,
7862306a36Sopenharmony_ci				union ieee754sp y);
7962306a36Sopenharmony_ciint ieee754sp_2008class(union ieee754sp x);
8062306a36Sopenharmony_ciunion ieee754sp ieee754sp_fmin(union ieee754sp x, union ieee754sp y);
8162306a36Sopenharmony_ciunion ieee754sp ieee754sp_fmina(union ieee754sp x, union ieee754sp y);
8262306a36Sopenharmony_ciunion ieee754sp ieee754sp_fmax(union ieee754sp x, union ieee754sp y);
8362306a36Sopenharmony_ciunion ieee754sp ieee754sp_fmaxa(union ieee754sp x, union ieee754sp y);
8462306a36Sopenharmony_ci
8562306a36Sopenharmony_ci/*
8662306a36Sopenharmony_ci * double precision (often aka double)
8762306a36Sopenharmony_ci*/
8862306a36Sopenharmony_ciint ieee754dp_class(union ieee754dp x);
8962306a36Sopenharmony_ci
9062306a36Sopenharmony_ciunion ieee754dp ieee754dp_add(union ieee754dp x, union ieee754dp y);
9162306a36Sopenharmony_ciunion ieee754dp ieee754dp_sub(union ieee754dp x, union ieee754dp y);
9262306a36Sopenharmony_ciunion ieee754dp ieee754dp_mul(union ieee754dp x, union ieee754dp y);
9362306a36Sopenharmony_ciunion ieee754dp ieee754dp_div(union ieee754dp x, union ieee754dp y);
9462306a36Sopenharmony_ci
9562306a36Sopenharmony_ciunion ieee754dp ieee754dp_abs(union ieee754dp x);
9662306a36Sopenharmony_ciunion ieee754dp ieee754dp_neg(union ieee754dp x);
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ciunion ieee754dp ieee754dp_fint(int x);
9962306a36Sopenharmony_ciunion ieee754dp ieee754dp_flong(s64 x);
10062306a36Sopenharmony_ciunion ieee754dp ieee754dp_fsp(union ieee754sp x);
10162306a36Sopenharmony_ciunion ieee754dp ieee754dp_rint(union ieee754dp x);
10262306a36Sopenharmony_ci
10362306a36Sopenharmony_ciint ieee754dp_tint(union ieee754dp x);
10462306a36Sopenharmony_cis64 ieee754dp_tlong(union ieee754dp x);
10562306a36Sopenharmony_ci
10662306a36Sopenharmony_ciint ieee754dp_cmp(union ieee754dp x, union ieee754dp y, int cop, int sig);
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ciunion ieee754dp ieee754dp_sqrt(union ieee754dp x);
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_ciunion ieee754dp ieee754dp_maddf(union ieee754dp z, union ieee754dp x,
11162306a36Sopenharmony_ci				union ieee754dp y);
11262306a36Sopenharmony_ciunion ieee754dp ieee754dp_msubf(union ieee754dp z, union ieee754dp x,
11362306a36Sopenharmony_ci				union ieee754dp y);
11462306a36Sopenharmony_ciunion ieee754dp ieee754dp_madd(union ieee754dp z, union ieee754dp x,
11562306a36Sopenharmony_ci				union ieee754dp y);
11662306a36Sopenharmony_ciunion ieee754dp ieee754dp_msub(union ieee754dp z, union ieee754dp x,
11762306a36Sopenharmony_ci				union ieee754dp y);
11862306a36Sopenharmony_ciunion ieee754dp ieee754dp_nmadd(union ieee754dp z, union ieee754dp x,
11962306a36Sopenharmony_ci				union ieee754dp y);
12062306a36Sopenharmony_ciunion ieee754dp ieee754dp_nmsub(union ieee754dp z, union ieee754dp x,
12162306a36Sopenharmony_ci				union ieee754dp y);
12262306a36Sopenharmony_ciint ieee754dp_2008class(union ieee754dp x);
12362306a36Sopenharmony_ciunion ieee754dp ieee754dp_fmin(union ieee754dp x, union ieee754dp y);
12462306a36Sopenharmony_ciunion ieee754dp ieee754dp_fmina(union ieee754dp x, union ieee754dp y);
12562306a36Sopenharmony_ciunion ieee754dp ieee754dp_fmax(union ieee754dp x, union ieee754dp y);
12662306a36Sopenharmony_ciunion ieee754dp ieee754dp_fmaxa(union ieee754dp x, union ieee754dp y);
12762306a36Sopenharmony_ci
12862306a36Sopenharmony_ci
12962306a36Sopenharmony_ci/* 5 types of floating point number
13062306a36Sopenharmony_ci*/
13162306a36Sopenharmony_cienum {
13262306a36Sopenharmony_ci	IEEE754_CLASS_NORM	= 0x00,
13362306a36Sopenharmony_ci	IEEE754_CLASS_ZERO	= 0x01,
13462306a36Sopenharmony_ci	IEEE754_CLASS_DNORM	= 0x02,
13562306a36Sopenharmony_ci	IEEE754_CLASS_INF	= 0x03,
13662306a36Sopenharmony_ci	IEEE754_CLASS_SNAN	= 0x04,
13762306a36Sopenharmony_ci	IEEE754_CLASS_QNAN	= 0x05,
13862306a36Sopenharmony_ci};
13962306a36Sopenharmony_ci
14062306a36Sopenharmony_ci/* exception numbers */
14162306a36Sopenharmony_ci#define IEEE754_INEXACT			0x01
14262306a36Sopenharmony_ci#define IEEE754_UNDERFLOW		0x02
14362306a36Sopenharmony_ci#define IEEE754_OVERFLOW		0x04
14462306a36Sopenharmony_ci#define IEEE754_ZERO_DIVIDE		0x08
14562306a36Sopenharmony_ci#define IEEE754_INVALID_OPERATION	0x10
14662306a36Sopenharmony_ci
14762306a36Sopenharmony_ci/* cmp operators
14862306a36Sopenharmony_ci*/
14962306a36Sopenharmony_ci#define IEEE754_CLT	0x01
15062306a36Sopenharmony_ci#define IEEE754_CEQ	0x02
15162306a36Sopenharmony_ci#define IEEE754_CGT	0x04
15262306a36Sopenharmony_ci#define IEEE754_CUN	0x08
15362306a36Sopenharmony_ci
15462306a36Sopenharmony_ci/*
15562306a36Sopenharmony_ci * The control status register
15662306a36Sopenharmony_ci */
15762306a36Sopenharmony_cistruct _ieee754_csr {
15862306a36Sopenharmony_ci	__BITFIELD_FIELD(unsigned fcc:7,	/* condition[7:1] */
15962306a36Sopenharmony_ci	__BITFIELD_FIELD(unsigned nod:1,	/* set 1 for no denormals */
16062306a36Sopenharmony_ci	__BITFIELD_FIELD(unsigned c:1,		/* condition[0] */
16162306a36Sopenharmony_ci	__BITFIELD_FIELD(unsigned pad0:3,
16262306a36Sopenharmony_ci	__BITFIELD_FIELD(unsigned abs2008:1,	/* IEEE 754-2008 ABS/NEG.fmt */
16362306a36Sopenharmony_ci	__BITFIELD_FIELD(unsigned nan2008:1,	/* IEEE 754-2008 NaN mode */
16462306a36Sopenharmony_ci	__BITFIELD_FIELD(unsigned cx:6,		/* exceptions this operation */
16562306a36Sopenharmony_ci	__BITFIELD_FIELD(unsigned mx:5,		/* exception enable  mask */
16662306a36Sopenharmony_ci	__BITFIELD_FIELD(unsigned sx:5,		/* exceptions total */
16762306a36Sopenharmony_ci	__BITFIELD_FIELD(unsigned rm:2,		/* current rounding mode */
16862306a36Sopenharmony_ci	;))))))))))
16962306a36Sopenharmony_ci};
17062306a36Sopenharmony_ci#define ieee754_csr (*(struct _ieee754_csr *)(&current->thread.fpu.fcr31))
17162306a36Sopenharmony_ci
17262306a36Sopenharmony_cistatic inline unsigned int ieee754_getrm(void)
17362306a36Sopenharmony_ci{
17462306a36Sopenharmony_ci	return (ieee754_csr.rm);
17562306a36Sopenharmony_ci}
17662306a36Sopenharmony_ci
17762306a36Sopenharmony_cistatic inline unsigned int ieee754_setrm(unsigned int rm)
17862306a36Sopenharmony_ci{
17962306a36Sopenharmony_ci	return (ieee754_csr.rm = rm);
18062306a36Sopenharmony_ci}
18162306a36Sopenharmony_ci
18262306a36Sopenharmony_ci/*
18362306a36Sopenharmony_ci * get current exceptions
18462306a36Sopenharmony_ci */
18562306a36Sopenharmony_cistatic inline unsigned int ieee754_getcx(void)
18662306a36Sopenharmony_ci{
18762306a36Sopenharmony_ci	return (ieee754_csr.cx);
18862306a36Sopenharmony_ci}
18962306a36Sopenharmony_ci
19062306a36Sopenharmony_ci/* test for current exception condition
19162306a36Sopenharmony_ci */
19262306a36Sopenharmony_cistatic inline int ieee754_cxtest(unsigned int n)
19362306a36Sopenharmony_ci{
19462306a36Sopenharmony_ci	return (ieee754_csr.cx & n);
19562306a36Sopenharmony_ci}
19662306a36Sopenharmony_ci
19762306a36Sopenharmony_ci/*
19862306a36Sopenharmony_ci * get sticky exceptions
19962306a36Sopenharmony_ci */
20062306a36Sopenharmony_cistatic inline unsigned int ieee754_getsx(void)
20162306a36Sopenharmony_ci{
20262306a36Sopenharmony_ci	return (ieee754_csr.sx);
20362306a36Sopenharmony_ci}
20462306a36Sopenharmony_ci
20562306a36Sopenharmony_ci/* clear sticky conditions
20662306a36Sopenharmony_ci*/
20762306a36Sopenharmony_cistatic inline unsigned int ieee754_clrsx(void)
20862306a36Sopenharmony_ci{
20962306a36Sopenharmony_ci	return (ieee754_csr.sx = 0);
21062306a36Sopenharmony_ci}
21162306a36Sopenharmony_ci
21262306a36Sopenharmony_ci/* test for sticky exception condition
21362306a36Sopenharmony_ci */
21462306a36Sopenharmony_cistatic inline int ieee754_sxtest(unsigned int n)
21562306a36Sopenharmony_ci{
21662306a36Sopenharmony_ci	return (ieee754_csr.sx & n);
21762306a36Sopenharmony_ci}
21862306a36Sopenharmony_ci
21962306a36Sopenharmony_ci/* debugging */
22062306a36Sopenharmony_ciunion ieee754sp ieee754sp_dump(char *s, union ieee754sp x);
22162306a36Sopenharmony_ciunion ieee754dp ieee754dp_dump(char *s, union ieee754dp x);
22262306a36Sopenharmony_ci
22362306a36Sopenharmony_ci#define IEEE754_SPCVAL_PZERO		0	/* +0.0 */
22462306a36Sopenharmony_ci#define IEEE754_SPCVAL_NZERO		1	/* -0.0 */
22562306a36Sopenharmony_ci#define IEEE754_SPCVAL_PONE		2	/* +1.0 */
22662306a36Sopenharmony_ci#define IEEE754_SPCVAL_NONE		3	/* -1.0 */
22762306a36Sopenharmony_ci#define IEEE754_SPCVAL_PTEN		4	/* +10.0 */
22862306a36Sopenharmony_ci#define IEEE754_SPCVAL_NTEN		5	/* -10.0 */
22962306a36Sopenharmony_ci#define IEEE754_SPCVAL_PINFINITY	6	/* +inf */
23062306a36Sopenharmony_ci#define IEEE754_SPCVAL_NINFINITY	7	/* -inf */
23162306a36Sopenharmony_ci#define IEEE754_SPCVAL_INDEF_LEG	8	/* legacy quiet NaN */
23262306a36Sopenharmony_ci#define IEEE754_SPCVAL_INDEF_2008	9	/* IEEE 754-2008 quiet NaN */
23362306a36Sopenharmony_ci#define IEEE754_SPCVAL_PMAX		10	/* +max norm */
23462306a36Sopenharmony_ci#define IEEE754_SPCVAL_NMAX		11	/* -max norm */
23562306a36Sopenharmony_ci#define IEEE754_SPCVAL_PMIN		12	/* +min norm */
23662306a36Sopenharmony_ci#define IEEE754_SPCVAL_NMIN		13	/* -min norm */
23762306a36Sopenharmony_ci#define IEEE754_SPCVAL_PMIND		14	/* +min denorm */
23862306a36Sopenharmony_ci#define IEEE754_SPCVAL_NMIND		15	/* -min denorm */
23962306a36Sopenharmony_ci#define IEEE754_SPCVAL_P1E31		16	/* + 1.0e31 */
24062306a36Sopenharmony_ci#define IEEE754_SPCVAL_P1E63		17	/* + 1.0e63 */
24162306a36Sopenharmony_ci
24262306a36Sopenharmony_ciextern const union ieee754dp __ieee754dp_spcvals[];
24362306a36Sopenharmony_ciextern const union ieee754sp __ieee754sp_spcvals[];
24462306a36Sopenharmony_ci#define ieee754dp_spcvals ((const union ieee754dp *)__ieee754dp_spcvals)
24562306a36Sopenharmony_ci#define ieee754sp_spcvals ((const union ieee754sp *)__ieee754sp_spcvals)
24662306a36Sopenharmony_ci
24762306a36Sopenharmony_ci/*
24862306a36Sopenharmony_ci * Return infinity with given sign
24962306a36Sopenharmony_ci */
25062306a36Sopenharmony_ci#define ieee754dp_inf(sn)     (ieee754dp_spcvals[IEEE754_SPCVAL_PINFINITY+(sn)])
25162306a36Sopenharmony_ci#define ieee754dp_zero(sn)	(ieee754dp_spcvals[IEEE754_SPCVAL_PZERO+(sn)])
25262306a36Sopenharmony_ci#define ieee754dp_one(sn)	(ieee754dp_spcvals[IEEE754_SPCVAL_PONE+(sn)])
25362306a36Sopenharmony_ci#define ieee754dp_ten(sn)	(ieee754dp_spcvals[IEEE754_SPCVAL_PTEN+(sn)])
25462306a36Sopenharmony_ci#define ieee754dp_indef()	(ieee754dp_spcvals[IEEE754_SPCVAL_INDEF_LEG + \
25562306a36Sopenharmony_ci						   ieee754_csr.nan2008])
25662306a36Sopenharmony_ci#define ieee754dp_max(sn)	(ieee754dp_spcvals[IEEE754_SPCVAL_PMAX+(sn)])
25762306a36Sopenharmony_ci#define ieee754dp_min(sn)	(ieee754dp_spcvals[IEEE754_SPCVAL_PMIN+(sn)])
25862306a36Sopenharmony_ci#define ieee754dp_mind(sn)	(ieee754dp_spcvals[IEEE754_SPCVAL_PMIND+(sn)])
25962306a36Sopenharmony_ci#define ieee754dp_1e31()	(ieee754dp_spcvals[IEEE754_SPCVAL_P1E31])
26062306a36Sopenharmony_ci#define ieee754dp_1e63()	(ieee754dp_spcvals[IEEE754_SPCVAL_P1E63])
26162306a36Sopenharmony_ci
26262306a36Sopenharmony_ci#define ieee754sp_inf(sn)     (ieee754sp_spcvals[IEEE754_SPCVAL_PINFINITY+(sn)])
26362306a36Sopenharmony_ci#define ieee754sp_zero(sn)	(ieee754sp_spcvals[IEEE754_SPCVAL_PZERO+(sn)])
26462306a36Sopenharmony_ci#define ieee754sp_one(sn)	(ieee754sp_spcvals[IEEE754_SPCVAL_PONE+(sn)])
26562306a36Sopenharmony_ci#define ieee754sp_ten(sn)	(ieee754sp_spcvals[IEEE754_SPCVAL_PTEN+(sn)])
26662306a36Sopenharmony_ci#define ieee754sp_indef()	(ieee754sp_spcvals[IEEE754_SPCVAL_INDEF_LEG + \
26762306a36Sopenharmony_ci						   ieee754_csr.nan2008])
26862306a36Sopenharmony_ci#define ieee754sp_max(sn)	(ieee754sp_spcvals[IEEE754_SPCVAL_PMAX+(sn)])
26962306a36Sopenharmony_ci#define ieee754sp_min(sn)	(ieee754sp_spcvals[IEEE754_SPCVAL_PMIN+(sn)])
27062306a36Sopenharmony_ci#define ieee754sp_mind(sn)	(ieee754sp_spcvals[IEEE754_SPCVAL_PMIND+(sn)])
27162306a36Sopenharmony_ci#define ieee754sp_1e31()	(ieee754sp_spcvals[IEEE754_SPCVAL_P1E31])
27262306a36Sopenharmony_ci#define ieee754sp_1e63()	(ieee754sp_spcvals[IEEE754_SPCVAL_P1E63])
27362306a36Sopenharmony_ci
27462306a36Sopenharmony_ci/*
27562306a36Sopenharmony_ci * Indefinite integer value
27662306a36Sopenharmony_ci */
27762306a36Sopenharmony_cistatic inline int ieee754si_indef(void)
27862306a36Sopenharmony_ci{
27962306a36Sopenharmony_ci	return ieee754_csr.nan2008 ? 0 : INT_MAX;
28062306a36Sopenharmony_ci}
28162306a36Sopenharmony_ci
28262306a36Sopenharmony_cistatic inline s64 ieee754di_indef(void)
28362306a36Sopenharmony_ci{
28462306a36Sopenharmony_ci	return ieee754_csr.nan2008 ? 0 : S64_MAX;
28562306a36Sopenharmony_ci}
28662306a36Sopenharmony_ci
28762306a36Sopenharmony_ci/*
28862306a36Sopenharmony_ci * Overflow integer value
28962306a36Sopenharmony_ci */
29062306a36Sopenharmony_cistatic inline int ieee754si_overflow(int xs)
29162306a36Sopenharmony_ci{
29262306a36Sopenharmony_ci	return ieee754_csr.nan2008 && xs ? INT_MIN : INT_MAX;
29362306a36Sopenharmony_ci}
29462306a36Sopenharmony_ci
29562306a36Sopenharmony_cistatic inline s64 ieee754di_overflow(int xs)
29662306a36Sopenharmony_ci{
29762306a36Sopenharmony_ci	return ieee754_csr.nan2008 && xs ? S64_MIN : S64_MAX;
29862306a36Sopenharmony_ci}
29962306a36Sopenharmony_ci
30062306a36Sopenharmony_ci/* result types for xctx.rt */
30162306a36Sopenharmony_ci#define IEEE754_RT_SP	0
30262306a36Sopenharmony_ci#define IEEE754_RT_DP	1
30362306a36Sopenharmony_ci#define IEEE754_RT_XP	2
30462306a36Sopenharmony_ci#define IEEE754_RT_SI	3
30562306a36Sopenharmony_ci#define IEEE754_RT_DI	4
30662306a36Sopenharmony_ci
30762306a36Sopenharmony_ci/* compat */
30862306a36Sopenharmony_ci#define ieee754dp_fix(x)	ieee754dp_tint(x)
30962306a36Sopenharmony_ci#define ieee754sp_fix(x)	ieee754sp_tint(x)
31062306a36Sopenharmony_ci
31162306a36Sopenharmony_ci#endif /* __ARCH_MIPS_MATH_EMU_IEEE754_H */
312