Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47fa0c02 authored by Ralf Baechle's avatar Ralf Baechle
Browse files

MIPS: math-emu: Reformat code according to coding style.

parent 85c51c51
Loading
Loading
Loading
Loading
+23 −19
Original line number Diff line number Diff line
@@ -869,14 +869,16 @@ static inline int cop1_64bit(struct pt_regs *xcp)
#endif
}

#define SIFROMREG(si, x) do {						\
#define SIFROMREG(si, x)						\
do {									\
	if (cop1_64bit(xcp))						\
		(si) = get_fpr32(&ctx->fpr[x], 0);			\
	else								\
		(si) = get_fpr32(&ctx->fpr[(x) & ~1], (x) & 1);		\
} while (0)

#define SITOREG(si, x) do {						\
#define SITOREG(si, x)							\
do {									\
	if (cop1_64bit(xcp)) {						\
		unsigned i;						\
		set_fpr32(&ctx->fpr[x], 0, si);				\
@@ -889,7 +891,8 @@ static inline int cop1_64bit(struct pt_regs *xcp)

#define SIFROMHREG(si, x)	((si) = get_fpr32(&ctx->fpr[x], 1))

#define SITOHREG(si, x) do {						\
#define SITOHREG(si, x)							\
do {									\
	unsigned i;							\
	set_fpr32(&ctx->fpr[x], 1, si);					\
	for (i = 2; i < ARRAY_SIZE(ctx->fpr[x].val32); i++)		\
@@ -899,7 +902,8 @@ static inline int cop1_64bit(struct pt_regs *xcp)
#define DIFROMREG(di, x)						\
	((di) = get_fpr64(&ctx->fpr[(x) & ~(cop1_64bit(xcp) == 0)], 0))

#define DITOREG(di, x) do {						\
#define DITOREG(di, x)							\
do {									\
	unsigned fpr, i;						\
	fpr = (x) & ~(cop1_64bit(xcp) == 0);				\
	set_fpr64(&ctx->fpr[fpr], 0, di);				\
@@ -1342,8 +1346,8 @@ static const unsigned char cmptab[8] = {
 */

#define DEF3OP(name, p, f1, f2, f3)					\
static union ieee754##p fpemu_##p##_##name(union ieee754##p r, union ieee754##p s, \
    union ieee754##p t) \
static union ieee754##p fpemu_##p##_##name(union ieee754##p r,		\
	union ieee754##p s, union ieee754##p t)				\
{									\
	struct _ieee754_csr ieee754_csr_save;				\
	s = f1(s, t);							\
+3 −4
Original line number Diff line number Diff line
@@ -174,8 +174,7 @@ union ieee754sp ieee754sp_format(int sn, int xe, unsigned xm)
			/* Clear grs bits */
			xm &= ~(SP_MBIT(3) - 1);
			xe++;
		}
		else {
		} else {
			/* sticky right shift es bits
			 */
			SPXSRSXn(es);
+17 −16
Original line number Diff line number Diff line
@@ -80,6 +80,7 @@ extern union ieee754sp ieee754sp_format(int, int, unsigned);
#define SPNORMRET2(s, e, m, name, a0, a1)				\
{									\
	union ieee754sp V = ieee754sp_format(s, e, m);			\
									\
	if (TSTX())							\
		return ieee754sp_xcpt(V, name, a0, a1);			\
	else								\
+11 −8
Original line number Diff line number Diff line
@@ -38,10 +38,13 @@ static int __init debugfs_fpuemu(void)
	if (!dir)
		return -ENOMEM;

#define FPU_STAT_CREATE(M)						\
#define FPU_EMU_STAT_OFFSET(m)						\
	offsetof(struct mips_fpu_emulator_stats, m)

#define FPU_STAT_CREATE(m)						\
do {									\
		d = debugfs_create_file(#M , S_IRUGO, dir,		\
			(void *)offsetof(struct mips_fpu_emulator_stats, M), \
	d = debugfs_create_file(#m , S_IRUGO, dir,			\
				(void *)FPU_EMU_STAT_OFFSET(m),		\
				&fops_fpuemu_stat);			\
	if (!d)								\
		return -ENOMEM;						\
+2 −2

File changed.

Contains only whitespace changes.

+11 −11

File changed.

Contains only whitespace changes.

+73 −73

File changed.

Contains only whitespace changes.

Loading