cp1emu.c (1724c7c0c9494dcbdd7f630f29e1e8427cb231d1) cp1emu.c (8535f2ba0a9b971df62a5890699b9dfe2e0d5580)
1/*
2 * cp1emu.c: a MIPS coprocessor 1 (FPU) instruction emulator
3 *
4 * MIPS floating point support
5 * Copyright (C) 1994-2000 Algorithmics Ltd.
6 *
7 * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com
8 * Copyright (C) 2000 MIPS Technologies, Inc.

--- 816 unchanged lines hidden (view full) ---

825do { \
826 unsigned i; \
827 set_fpr32(&ctx->fpr[x], 1, si); \
828 for (i = 2; i < ARRAY_SIZE(ctx->fpr[x].val32); i++) \
829 set_fpr32(&ctx->fpr[x], i, 0); \
830} while (0)
831
832#define DIFROMREG(di, x) \
1/*
2 * cp1emu.c: a MIPS coprocessor 1 (FPU) instruction emulator
3 *
4 * MIPS floating point support
5 * Copyright (C) 1994-2000 Algorithmics Ltd.
6 *
7 * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com
8 * Copyright (C) 2000 MIPS Technologies, Inc.

--- 816 unchanged lines hidden (view full) ---

825do { \
826 unsigned i; \
827 set_fpr32(&ctx->fpr[x], 1, si); \
828 for (i = 2; i < ARRAY_SIZE(ctx->fpr[x].val32); i++) \
829 set_fpr32(&ctx->fpr[x], i, 0); \
830} while (0)
831
832#define DIFROMREG(di, x) \
833 ((di) = get_fpr64(&ctx->fpr[(x) & ~(cop1_64bit(xcp) == 0)], 0))
833 ((di) = get_fpr64(&ctx->fpr[(x) & ~(cop1_64bit(xcp) ^ 1)], 0))
834
835#define DITOREG(di, x) \
836do { \
837 unsigned fpr, i; \
834
835#define DITOREG(di, x) \
836do { \
837 unsigned fpr, i; \
838 fpr = (x) & ~(cop1_64bit(xcp) == 0); \
838 fpr = (x) & ~(cop1_64bit(xcp) ^ 1); \
839 set_fpr64(&ctx->fpr[fpr], 0, di); \
840 for (i = 1; i < ARRAY_SIZE(ctx->fpr[x].val64); i++) \
841 set_fpr64(&ctx->fpr[fpr], i, 0); \
842} while (0)
843
844#define SPFROMREG(sp, x) SIFROMREG((sp).bits, x)
845#define SPTOREG(sp, x) SITOREG((sp).bits, x)
846#define DPFROMREG(dp, x) DIFROMREG((dp).bits, x)

--- 1813 unchanged lines hidden ---
839 set_fpr64(&ctx->fpr[fpr], 0, di); \
840 for (i = 1; i < ARRAY_SIZE(ctx->fpr[x].val64); i++) \
841 set_fpr64(&ctx->fpr[fpr], i, 0); \
842} while (0)
843
844#define SPFROMREG(sp, x) SIFROMREG((sp).bits, x)
845#define SPTOREG(sp, x) SITOREG((sp).bits, x)
846#define DPFROMREG(dp, x) DIFROMREG((dp).bits, x)

--- 1813 unchanged lines hidden ---