cp1emu.c (130fe357ee895421a4aefef7b1285bf52f295afe) | cp1emu.c (e24c3bec3e8e254a3784b3e4c97bd3a76fbcc807) |
---|---|
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. --- 1751 unchanged lines hidden (view full) --- 1760 1761 SPFROMREG(rv.s, MIPSInst_FT(ir)); 1762 if (rv.w & 0x1) 1763 SPFROMREG(rv.s, MIPSInst_FS(ir)); 1764 else 1765 rv.w = 0; 1766 break; 1767 | 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. --- 1751 unchanged lines hidden (view full) --- 1760 1761 SPFROMREG(rv.s, MIPSInst_FT(ir)); 1762 if (rv.w & 0x1) 1763 SPFROMREG(rv.s, MIPSInst_FS(ir)); 1764 else 1765 rv.w = 0; 1766 break; 1767 |
1768 case fmaddf_op: { 1769 union ieee754sp ft, fs, fd; 1770 1771 if (!cpu_has_mips_r6) 1772 return SIGILL; 1773 1774 SPFROMREG(ft, MIPSInst_FT(ir)); 1775 SPFROMREG(fs, MIPSInst_FS(ir)); 1776 SPFROMREG(fd, MIPSInst_FD(ir)); 1777 rv.s = ieee754sp_maddf(fd, fs, ft); 1778 break; 1779 } 1780 |
|
1768 case fabs_op: 1769 handler.u = ieee754sp_abs; 1770 goto scopuop; 1771 1772 case fneg_op: 1773 handler.u = ieee754sp_neg; 1774 goto scopuop; 1775 --- 204 unchanged lines hidden (view full) --- 1980 1981 DPFROMREG(rv.d, MIPSInst_FT(ir)); 1982 if (rv.l & 0x1) 1983 DPFROMREG(rv.d, MIPSInst_FS(ir)); 1984 else 1985 rv.l = 0; 1986 break; 1987 | 1781 case fabs_op: 1782 handler.u = ieee754sp_abs; 1783 goto scopuop; 1784 1785 case fneg_op: 1786 handler.u = ieee754sp_neg; 1787 goto scopuop; 1788 --- 204 unchanged lines hidden (view full) --- 1993 1994 DPFROMREG(rv.d, MIPSInst_FT(ir)); 1995 if (rv.l & 0x1) 1996 DPFROMREG(rv.d, MIPSInst_FS(ir)); 1997 else 1998 rv.l = 0; 1999 break; 2000 |
2001 case fmaddf_op: { 2002 union ieee754dp ft, fs, fd; 2003 2004 if (!cpu_has_mips_r6) 2005 return SIGILL; 2006 2007 DPFROMREG(ft, MIPSInst_FT(ir)); 2008 DPFROMREG(fs, MIPSInst_FS(ir)); 2009 DPFROMREG(fd, MIPSInst_FD(ir)); 2010 rv.d = ieee754dp_maddf(fd, fs, ft); 2011 break; 2012 } 2013 |
|
1988 case fabs_op: 1989 handler.u = ieee754dp_abs; 1990 goto dcopuop; 1991 1992 case fneg_op: 1993 handler.u = ieee754dp_neg; 1994 goto dcopuop; 1995 --- 401 unchanged lines hidden --- | 2014 case fabs_op: 2015 handler.u = ieee754dp_abs; 2016 goto dcopuop; 2017 2018 case fneg_op: 2019 handler.u = ieee754dp_neg; 2020 goto dcopuop; 2021 --- 401 unchanged lines hidden --- |