cp1emu.c (db985cbd67c45f875ef43cb5febfaa8cbd203c27) | cp1emu.c (c8c0da6bdf0f0d6f59fc23aab6ee373a131df82d) |
---|---|
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. --- 636 unchanged lines hidden (view full) --- 645 return 0; 646 647 return !test_thread_flag(TIF_32BIT_FPREGS); 648} 649 650#define SIFROMREG(si, x) \ 651do { \ 652 if (cop1_64bit(xcp)) \ | 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. --- 636 unchanged lines hidden (view full) --- 645 return 0; 646 647 return !test_thread_flag(TIF_32BIT_FPREGS); 648} 649 650#define SIFROMREG(si, x) \ 651do { \ 652 if (cop1_64bit(xcp)) \ |
653 (si) = get_fpr32(&ctx->fpr[x], 0); \ | 653 (si) = (int)get_fpr32(&ctx->fpr[x], 0); \ |
654 else \ | 654 else \ |
655 (si) = get_fpr32(&ctx->fpr[(x) & ~1], (x) & 1); \ | 655 (si) = (int)get_fpr32(&ctx->fpr[(x) & ~1], (x) & 1); \ |
656} while (0) 657 658#define SITOREG(si, x) \ 659do { \ 660 if (cop1_64bit(xcp)) { \ 661 unsigned i; \ 662 set_fpr32(&ctx->fpr[x], 0, si); \ 663 for (i = 1; i < ARRAY_SIZE(ctx->fpr[x].val32); i++) \ 664 set_fpr32(&ctx->fpr[x], i, 0); \ 665 } else { \ 666 set_fpr32(&ctx->fpr[(x) & ~1], (x) & 1, si); \ 667 } \ 668} while (0) 669 | 656} while (0) 657 658#define SITOREG(si, x) \ 659do { \ 660 if (cop1_64bit(xcp)) { \ 661 unsigned i; \ 662 set_fpr32(&ctx->fpr[x], 0, si); \ 663 for (i = 1; i < ARRAY_SIZE(ctx->fpr[x].val32); i++) \ 664 set_fpr32(&ctx->fpr[x], i, 0); \ 665 } else { \ 666 set_fpr32(&ctx->fpr[(x) & ~1], (x) & 1, si); \ 667 } \ 668} while (0) 669 |
670#define SIFROMHREG(si, x) ((si) = get_fpr32(&ctx->fpr[x], 1)) | 670#define SIFROMHREG(si, x) ((si) = (int)get_fpr32(&ctx->fpr[x], 1)) |
671 672#define SITOHREG(si, x) \ 673do { \ 674 unsigned i; \ 675 set_fpr32(&ctx->fpr[x], 1, si); \ 676 for (i = 2; i < ARRAY_SIZE(ctx->fpr[x].val32); i++) \ 677 set_fpr32(&ctx->fpr[x], i, 0); \ 678} while (0) --- 1280 unchanged lines hidden --- | 671 672#define SITOHREG(si, x) \ 673do { \ 674 unsigned i; \ 675 set_fpr32(&ctx->fpr[x], 1, si); \ 676 for (i = 2; i < ARRAY_SIZE(ctx->fpr[x].val32); i++) \ 677 set_fpr32(&ctx->fpr[x], i, 0); \ 678} while (0) --- 1280 unchanged lines hidden --- |